diff --git a/client/WEB-INF/classes/resources/messages.properties b/client/WEB-INF/classes/resources/messages.properties index b97c902413e..1011cf6b9a6 100644 --- a/client/WEB-INF/classes/resources/messages.properties +++ b/client/WEB-INF/classes/resources/messages.properties @@ -22,6 +22,7 @@ label.adding.failed=Adding Failed label.succeeded=Succeeded label.failed=Failed label.error.code=Error Code +label.new.password=New Password label.add.zone=Add Zone label.adding.zone=Adding Zone label.add.host=Add Host diff --git a/ui/index.jsp b/ui/index.jsp index bf2ebfc4ad4..a160a1b8b06 100644 --- a/ui/index.jsp +++ b/ui/index.jsp @@ -65,12 +65,12 @@ diff --git a/ui/jsp/instance.jsp b/ui/jsp/instance.jsp index b9fe6e2ef9e..38ebd4926f9 100644 --- a/ui/jsp/instance.jsp +++ b/ui/jsp/instance.jsp @@ -7,36 +7,37 @@ diff --git a/ui/scripts/cloud.core.instance.js b/ui/scripts/cloud.core.instance.js index 039d62f85ac..4d01f75321c 100644 --- a/ui/scripts/cloud.core.instance.js +++ b/ui/scripts/cloud.core.instance.js @@ -1172,9 +1172,10 @@ function initVMWizard() { bindClickToMidMenu($midmenuItem1, vmToRightPanel, getMidmenuId); if (item.passwordenabled == true) { - var secondRowText = "New password is " + item.password; + var secondRowText = dictionary["label.new.password"] + ": " + item.password; afterAddingMidMenuItem($midmenuItem1, true, secondRowText); - + $midmenuItem1.data("afterActionInfo", secondRowText); + /* var afterActionInfo = "Instance " + getVmName(item.name, item.displayname) + " has been created successfully. New password is " + item.password; $midmenuItem1.data("afterActionInfo", afterActionInfo); @@ -1184,7 +1185,8 @@ function initVMWizard() { "OK": function() { $(this).dialog("close"); } - }).dialog("open"); + }).dialog("open"); + */ } else { afterAddingMidMenuItem($midmenuItem1, true, null); @@ -1311,6 +1313,7 @@ var vmActionMap = { var jsonObj = json.queryasyncjobresultresponse.jobresult.virtualmachine; vmToMidmenu(jsonObj, $midmenuItem1); + /* $("#dialog_info") .text("New password of instance " + getVmName(jsonObj.name, jsonObj.displayname) + " is " + fromdb(jsonObj.password)) .dialog('option', 'buttons', { @@ -1318,8 +1321,9 @@ var vmActionMap = { $(this).dialog("close"); } }).dialog("open"); + */ - return "New password is " + fromdb(jsonObj.password); + return dictionary["label.new.password"] + ": " + fromdb(jsonObj.password); } }, "label.action.change.service": { diff --git a/ui/scripts/cloud.core.js b/ui/scripts/cloud.core.js index ec202e4836e..b310cec9b30 100644 --- a/ui/scripts/cloud.core.js +++ b/ui/scripts/cloud.core.js @@ -113,11 +113,12 @@ function doActionToTab(id, $actionLink, apiCommand, $midmenuItem1, $thisTab) { //handleMidMenuItemAfterDetailsTabAction() will used updated $midmenuItem1.data("jsonObj") if(afterActionInfo == null) - handleMidMenuItemAfterDetailsTabAction($midmenuItem1, true, (label2 + " action succeeded.")); + handleMidMenuItemAfterDetailsTabAction($midmenuItem1, true, (label2 + " - " + g_dictionary["label.succeeded"])); else handleMidMenuItemAfterDetailsTabAction($midmenuItem1, true, afterActionInfo); } else if (result.jobstatus == 2) { // Failed - handleMidMenuItemAfterDetailsTabAction($midmenuItem1, false, (label2 + " action failed. Reason: " + fromdb(result.jobresult.errortext))); + var errorMsg = label2 + " - " + g_dictionary["label.failed"] + " - " + g_dictionary["label.error.code"] + " " + fromdb(result.jobresult.errorcode); + handleMidMenuItemAfterDetailsTabAction($midmenuItem1, false, errorMsg); } } }, @@ -150,7 +151,7 @@ function doActionToTab(id, $actionLink, apiCommand, $midmenuItem1, $thisTab) { success: function(json) { $spinningWheel.hide(); afterActionSeccessFn(json, $midmenuItem1, id); //afterActionSeccessFn() will update $midmenuItem1.data("jsonObj") - handleMidMenuItemAfterDetailsTabAction($midmenuItem1, true, (label2 + " action succeeded.")); //handleMidMenuItemAfterDetailsTabAction() will used updated $midmenuItem1.data("jsonObj") + handleMidMenuItemAfterDetailsTabAction($midmenuItem1, true, (label2 + " - " + g_dictionary["label.succeeded"])); //handleMidMenuItemAfterDetailsTabAction() will used updated $midmenuItem1.data("jsonObj") }, error: function(XMLHttpResponse) { handleError(XMLHttpResponse, function() {