diff --git a/ui/new/index.jsp b/ui/new/index.jsp index 17185781259..6ed014b43a2 100644 --- a/ui/new/index.jsp +++ b/ui/new/index.jsp @@ -711,11 +711,20 @@ long milliseconds = new Date().getTime();
- +Your session has expired. Please click 'OK' to return to the login screen.
Internet name can not be resolved
+Management server is not accessible
+" + sanitizeXSS(result.jobresult) + "
").dialog("open"); + $("#dialog_alert").text(fromdb(result.jobresult)).dialog("open"); } } }, @@ -587,7 +587,7 @@ function loadBalancerJsonToTemplate(jsonObj, $template) { $spinningWheel.hide(); $rowContainerEdit.hide(); $rowContainer.show(); - $("#dialog_alert").html("" + sanitizeXSS(result.jobresult) + "
").dialog("open"); + $("#dialog_alert").text(fromdb(result.jobresult)).dialog("open"); } } }, @@ -651,7 +651,7 @@ function loadBalancerJsonToTemplate(jsonObj, $template) { refreshLbVmSelect($template, loadBalancerId); $spinningWheel.hide(); } else if (result.jobstatus == 2) { // Failed - $("#dialog_error").html("Operation error:
"+ sanitizeXSS(result.jobresult)+"
").dialog("open"); + $("#dialog_error").text(fromdb(result.jobresult)).dialog("open"); $spinningWheel.hide(); } } @@ -717,7 +717,7 @@ function lbVmObjToTemplate(obj, $template) { $(this).remove(); }); } else if (result.jobstatus == 2) { // Failed - $("#dialog_error").html("We were unable to remove the Virtual Instance: "+vmName + " from your load balancer policy. Please try again.").dialog("open"); + $("#dialog_error").text(fromdb(result.jobresult)).dialog("open"); $spinningWheel.hide(); } } diff --git a/ui/new/scripts/cloud.core2.js b/ui/new/scripts/cloud.core2.js index fcdb3055831..5be8f609661 100644 --- a/ui/new/scripts/cloud.core2.js +++ b/ui/new/scripts/cloud.core2.js @@ -1419,10 +1419,10 @@ function handleError(xmlHttp, handleErrorCallback) { $("#dialog_session_expired").dialog("open"); } else if (xmlHttp.status == ERROR_INTERNET_NAME_NOT_RESOLVED) { - $("#dialog_error").text("Internet name can not be resolved").dialog("open"); + $("#dialog_error_internet_not_resolved").dialog("open"); } else if (xmlHttp.status == ERROR_INTERNET_CANNOT_CONNECT) { - $("#dialog_error").text("Management server is not accessible").dialog("open"); + $("#dialog_error_management_server_not_accessible").dialog("open"); } else if (xmlHttp.status == ERROR_VMOPS_ACCOUNT_ERROR && handleErrorCallback != undefined) { handleErrorCallback(); @@ -1434,7 +1434,7 @@ function handleError(xmlHttp, handleErrorCallback) { var start = xmlHttp.responseText.indexOf("h1") + 3; var end = xmlHttp.responseText.indexOf("Encountered an error:
"+sanitizeXSS(errorMsg)+"
").dialog("open"); + $("#dialog_error").text(fromdb(errorMsg)).dialog("open"); } }