From f2888cbb715666137b15a9d95757961c0a4dd071 Mon Sep 17 00:00:00 2001 From: Jessica Wang Date: Fri, 6 Jan 2012 16:28:53 -0800 Subject: [PATCH] cloudstack 3.0 new UI - system page - add cluster dialog - pod dropdwon - show the current pod 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 bd7cb9deb4a..575377e9423 100644 --- a/ui/scripts/system.js +++ b/ui/scripts/system.js @@ -4727,8 +4727,11 @@ success: function(json) { var pods = json.listpodsresponse.pod; var items = []; - $(pods).each(function() { - items.push({id: this.id, description: this.name}); + $(pods).each(function() { + if(("pods" in args.context) && (this.id == args.context.pods[0].id)) + items.unshift({id: this.id, description: this.name}); + else + items.push({id: this.id, description: this.name}); }); args.response.success({data: items}); }