mirror of https://github.com/apache/cloudstack.git
new UI - show new password on middle menu if deploy virtual machine with a template whose password is enabled.
This commit is contained in:
parent
4fa53720c6
commit
23c62e568b
|
|
@ -325,6 +325,7 @@ function clickInstanceGroupHeader($arrowIcon) {
|
|||
else
|
||||
commandString = "command=listIsos&isReady=true&bootable=true&zoneid="+zoneId+"&page="+currentPageInTemplateGridInVmPopup;
|
||||
}
|
||||
commandString += "&hypervisor=XenServer"; //This line is temporary. will change it later.
|
||||
|
||||
var loading = $vmPopup.find("#wiz_template_loading").show();
|
||||
if(currentPageInTemplateGridInVmPopup==1)
|
||||
|
|
@ -597,11 +598,17 @@ function clickInstanceGroupHeader($arrowIcon) {
|
|||
} else {
|
||||
$("body").stopTime(timerKey);
|
||||
if (result.jobstatus == 1) {
|
||||
// Succeeded
|
||||
afterAddingMidMenuItem($midmenuItem1, true);
|
||||
if("virtualmachine" in result)
|
||||
vmToMidmenu(result.virtualmachine[0], $midmenuItem1);
|
||||
|
||||
// Succeeded
|
||||
//if("virtualmachine" in result) {
|
||||
vmToMidmenu(result.virtualmachine[0], $midmenuItem1);
|
||||
if (result.virtualmachine[0].passwordenabled == 'true') {
|
||||
var extraMessage = "New password:" + result.virtualmachine[0].password;
|
||||
afterAddingMidMenuItem($midmenuItem1, true, extraMessage);
|
||||
}
|
||||
else {
|
||||
afterAddingMidMenuItem($midmenuItem1, true);
|
||||
}
|
||||
//}
|
||||
} else if (result.jobstatus == 2) {
|
||||
// Failed
|
||||
afterAddingMidMenuItem($midmenuItem1, false, fromdb(result.jobresult));
|
||||
|
|
|
|||
|
|
@ -619,10 +619,11 @@ function afterAddingMidMenuItem($midmenuItem1, isSuccessful, extraMessage) {
|
|||
}
|
||||
else {
|
||||
$midmenuItem1.find("#info_icon").addClass("error").show();
|
||||
$midmenuItem1.find("#first_row").text("Adding failed");
|
||||
if(extraMessage != null)
|
||||
$midmenuItem1.find("#second_row").text(extraMessage);
|
||||
$midmenuItem1.find("#first_row").text("Adding failed");
|
||||
}
|
||||
|
||||
if(extraMessage != null)
|
||||
$midmenuItem1.find("#second_row").text(extraMessage);
|
||||
}
|
||||
|
||||
function bindClickToMidMenu($midmenuItem1, toRightPanel, getMidmenuId) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue