cloudstack 3.0 new UI - system page - add cluster dialog - pod dropdwon - show the current pod as default selection.

This commit is contained in:
Jessica Wang 2012-01-06 16:28:53 -08:00
parent 639b9b4fb4
commit f2888cbb71

View File

@ -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});
}