mirror of https://github.com/apache/cloudstack.git
new UI - localize alert dialog.
This commit is contained in:
parent
4b3cfe2d71
commit
7818fe4c3d
|
|
@ -711,11 +711,20 @@ long milliseconds = new Date().getTime();
|
|||
<div id="dialog_confirmation" title="Confirmation" style="display:none"></div>
|
||||
<div id="dialog_info" title="Info" style="display:none"></div>
|
||||
<div id="dialog_alert" title="Alert" style="display:none"></div>
|
||||
<div id="dialog_error" title="Error" style="display:none"></div>
|
||||
<div id="dialog_error" title="Error" style="display:none;color:red"></div>
|
||||
<div id="dialog_session_expired" title="Session Expired" style="display:none">
|
||||
<p>Your session has expired. Please click 'OK' to return to the login screen.</p>
|
||||
</div>
|
||||
|
||||
<div id="dialog_error_internet_not_resolved" title="Error" style="display:none;color:red">
|
||||
<p style="color:red">Internet name can not be resolved</p>
|
||||
</div>
|
||||
|
||||
<div id="dialog_error_management_server_not_accessible" title="Error" style="display:none">
|
||||
<p style="color:red">Management server is not accessible</p>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- templates starts here-->
|
||||
<div class="leftmenu_content" id="leftmenu_submenu_template" style="display: none">
|
||||
<div class="leftmenu_thirdindent">
|
||||
|
|
|
|||
|
|
@ -350,7 +350,7 @@ function portForwardingJsonToTemplate(jsonObj, $template) {
|
|||
$rowContainer.show();
|
||||
} else if (result.jobstatus == 2) { //Fail
|
||||
$spinningWheel.hide();
|
||||
$("#dialog_alert").html("<p>" + sanitizeXSS(result.jobresult) + "</p>").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("<p>" + sanitizeXSS(result.jobresult) + "</p>").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("<p style='color:red'><b>Operation error:</b></p><br/><p style='color:red'>"+ sanitizeXSS(result.jobresult)+"</p>").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("<p style='color:red'>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();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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("</h1");
|
||||
var errorMsg = xmlHttp.responseText.substring(start, end);
|
||||
$("#dialog_error").html("<p><b>Encountered an error:</b></p><br/><p>"+sanitizeXSS(errorMsg)+"</p>").dialog("open");
|
||||
$("#dialog_error").text(fromdb(errorMsg)).dialog("open");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue