instance page - reset password - pop up a dialog box after action succeeds.

This commit is contained in:
Jessica Wang 2010-12-07 13:45:55 -08:00
parent 5c25508949
commit e9ba4263f9

View File

@ -1144,12 +1144,20 @@ var vmActionMap = {
afterActionSeccessFn: function(json, $midmenuItem1, id) {
var item = json.queryasyncjobresultresponse.jobresult.virtualmachine;
var $afterActionInfoContainer = $("#right_panel_content #after_action_info_container_on_top");
var afterActionInfo = "New password is " + fromdb(item.password);
var afterActionInfo = "New password of instance " + getVmName(item.name, item.displayname) + " is " + fromdb(item.password);
$afterActionInfoContainer.find("#after_action_info").text(afterActionInfo);
handleMidMenuItemAfterDetailsTabAction($midmenuItem1, true, afterActionInfo); //override default afterActionInfo("Reset Password action succeeded")
$afterActionInfoContainer.removeClass("errorbox").show();
$afterActionInfoContainer.removeClass("errorbox").show();
$("#dialog_info")
.text(afterActionInfo)
.dialog('option', 'buttons', {
"OK": function() {
$(this).dialog("close");
}
}).dialog("open");
}
},
"Change Service": {