From 1e7a3702f550df5954447c452303bf5a8a2e8c4f Mon Sep 17 00:00:00 2001 From: Jessica Wang Date: Fri, 6 Jan 2012 11:53:01 -0800 Subject: [PATCH] bug 12901: cloudstack 3.0 new UI - system page - add host dialog - cluster dropdwon - show the current cluster as default selection. --- ui/scripts/system.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ui/scripts/system.js b/ui/scripts/system.js index 856325d087a..01a9e57c2cf 100644 --- a/ui/scripts/system.js +++ b/ui/scripts/system.js @@ -5406,8 +5406,11 @@ success: function(json) { clusterObjs = json.listclustersresponse.cluster; var items = []; - $(clusterObjs).each(function() { - items.push({id: this.id, description: this.name}); + $(clusterObjs).each(function() { + if(("clusters" in args.context) && (this.id == args.context.clusters[0].id)) + items.unshift({id: this.id, description: this.name}); + else + items.push({id: this.id, description: this.name}); }); args.response.success({data: items}); }