From 3c5f37fcca0ac18b612d5f242d0421076e5bd4d5 Mon Sep 17 00:00:00 2001 From: Jessica Wang Date: Tue, 17 Apr 2012 10:34:36 -0700 Subject: [PATCH] cloudstack 3.0 UI - deployVM action - not show dialogbox of "password of new VM xxx is yyy" if deployVirtualMachine API doesn't return password (regardless of passwordenabled property). --- ui/scripts/instances.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ui/scripts/instances.js b/ui/scripts/instances.js index c5c612486f4..9d9ac0e73c6 100644 --- a/ui/scripts/instances.js +++ b/ui/scripts/instances.js @@ -503,6 +503,8 @@ if (group != null && group.length > 0) array1.push("&group="+todb(group)); + //array1.push("&startVm=false"); //for testing only, comment it out before checking in + $.ajax({ url: createURL("deployVirtualMachine"+array1.join("")), dataType: "json", @@ -513,8 +515,8 @@ {jobId: jid, getUpdatedItem: function(json) { var item = json.queryasyncjobresultresponse.jobresult.virtualmachine; - if (item.passwordenabled == true) - alert("Password of new VM " + getVmName(item.name, item.displayname) + " is " + item.password); + if (item.password != null) + alert("Password of new VM " + item.displayname + " is " + item.password); return item; }, getActionFilter: function() {