mirror of https://github.com/apache/cloudstack.git
instance page - reset password action - show new password in dialog and right panel when middle menu item is clicked.
This commit is contained in:
parent
e9b446e3bd
commit
046c556da1
|
|
@ -1310,22 +1310,15 @@ var vmActionMap = {
|
|||
var jsonObj = json.queryasyncjobresultresponse.jobresult.virtualmachine;
|
||||
vmToMidmenu(jsonObj, $midmenuItem1);
|
||||
|
||||
var afterActionInfo = "New password of instance " + getVmName(jsonObj.name, jsonObj.displayname) + " is " + fromdb(jsonObj.password);
|
||||
|
||||
$("#dialog_info")
|
||||
.text(afterActionInfo)
|
||||
.text("New password of instance " + getVmName(jsonObj.name, jsonObj.displayname) + " is " + fromdb(jsonObj.password))
|
||||
.dialog('option', 'buttons', {
|
||||
"OK": function() {
|
||||
$(this).dialog("close");
|
||||
}
|
||||
}).dialog("open");
|
||||
|
||||
/*
|
||||
var $afterActionInfoContainer = $("#right_panel_content #after_action_info_container_on_top");
|
||||
$afterActionInfoContainer.find("#after_action_info").text(afterActionInfo);
|
||||
handleMidMenuItemAfterDetailsTabAction($midmenuItem1, true, afterActionInfo); //override default afterActionInfo("Reset Password action succeeded")
|
||||
$afterActionInfoContainer.removeClass("errorbox").show();
|
||||
*/
|
||||
|
||||
return "New password is " + fromdb(jsonObj.password);
|
||||
}
|
||||
},
|
||||
"Change Service": {
|
||||
|
|
|
|||
|
|
@ -90,8 +90,13 @@ function doActionToTab(id, $actionLink, apiCommand, $midmenuItem1, $thisTab) {
|
|||
$spinningWheel.hide();
|
||||
|
||||
if (result.jobstatus == 1) { // Succeeded
|
||||
afterActionSeccessFn(json, $midmenuItem1, id); //this line will update $midmenuItem1.data("jsonObj")
|
||||
handleMidMenuItemAfterDetailsTabAction($midmenuItem1, true, (label + " action succeeded.")); //updated $midmenuItem1.data("jsonObj") will be used here
|
||||
var afterActionInfo = afterActionSeccessFn(json, $midmenuItem1, id); //afterActionSeccessFn() will update $midmenuItem1.data("jsonObj")
|
||||
|
||||
//handleMidMenuItemAfterDetailsTabAction() will used updated $midmenuItem1.data("jsonObj")
|
||||
if(afterActionInfo == null)
|
||||
handleMidMenuItemAfterDetailsTabAction($midmenuItem1, true, (label + " action succeeded."));
|
||||
else
|
||||
handleMidMenuItemAfterDetailsTabAction($midmenuItem1, true, afterActionInfo);
|
||||
} else if (result.jobstatus == 2) { // Failed
|
||||
handleMidMenuItemAfterDetailsTabAction($midmenuItem1, false, (label + " action failed. Reason: " + fromdb(result.jobresult.errortext)));
|
||||
}
|
||||
|
|
@ -125,8 +130,8 @@ function doActionToTab(id, $actionLink, apiCommand, $midmenuItem1, $thisTab) {
|
|||
async: false,
|
||||
success: function(json) {
|
||||
$spinningWheel.hide();
|
||||
afterActionSeccessFn(json, $midmenuItem1, id); //this line will update $midmenuItem1.data("jsonObj")
|
||||
handleMidMenuItemAfterDetailsTabAction($midmenuItem1, true, (label + " action succeeded.")); //updated $midmenuItem1.data("jsonObj") will be used here
|
||||
afterActionSeccessFn(json, $midmenuItem1, id); //afterActionSeccessFn() will update $midmenuItem1.data("jsonObj")
|
||||
handleMidMenuItemAfterDetailsTabAction($midmenuItem1, true, (label + " action succeeded.")); //handleMidMenuItemAfterDetailsTabAction() will used updated $midmenuItem1.data("jsonObj")
|
||||
},
|
||||
error: function(XMLHttpResponse) {
|
||||
handleError(XMLHttpResponse, function() {
|
||||
|
|
|
|||
Loading…
Reference in New Issue