diff --git a/client/WEB-INF/classes/resources/messages.properties b/client/WEB-INF/classes/resources/messages.properties index c9e7d8cc38f..cd2502402da 100644 --- a/client/WEB-INF/classes/resources/messages.properties +++ b/client/WEB-INF/classes/resources/messages.properties @@ -6,7 +6,8 @@ label.numretries = Number of Retries label.timeout.in.second = Timeout(seconds) message.action.delete.external.firewall=Please confirm that you would like to remove this external firewall. Warning: If you are planning to add back the same external firewall, you must reset usage data on the device. message.action.delete.external.load.balancer=Please confirm that you would like to remove this external load balancer. Warning: If you are planning to add back the same external load balancer, you must reset usage data on the device. - +message.download.ISO=Please click # to download ISO + #Labels label.account.id=Account ID label.account.name=Account Name diff --git a/ui/jsp/iso.jsp b/ui/jsp/iso.jsp index 00e318c62ec..6bd54ee6f18 100644 --- a/ui/jsp/iso.jsp +++ b/ui/jsp/iso.jsp @@ -16,7 +16,8 @@ dictionary = { 'label.action.copy.ISO.processing' : '', 'label.action.create.vm' : '', 'label.action.create.vm.processing' : '', - 'label.action.download.ISO' : '' + 'label.action.download.ISO' : '', + 'message.download.ISO' : '' }; diff --git a/ui/scripts/cloud.core.iso.js b/ui/scripts/cloud.core.iso.js index 525721c6421..4586a62e52a 100644 --- a/ui/scripts/cloud.core.iso.js +++ b/ui/scripts/cloud.core.iso.js @@ -727,11 +727,19 @@ function doDownloadISO($actionLink, $detailsTab, $midmenuItem1) { $infoContainer.removeClass("error"); $infoContainer.find("#icon,#info").removeClass("error"); var url = decodeURIComponent(json.queryasyncjobresultresponse.jobresult.iso.url); - var htmlMsg = "Please click " + url + "" + " to download ISO"; - $infoContainer.find("#info").html(htmlMsg); + var htmlMsg = dictionary["message.download.ISO"]; + var htmlMsg2 = htmlMsg.replace(/#/g, url); + $infoContainer.find("#info").html(htmlMsg2); $infoContainer.show(); - } else if (result.jobstatus == 2) { // Failed - handleErrorInDialog2(fromdb(result.jobresult.errortext), $dialogDownloadISO); + } else if (result.jobstatus == 2) { // Failed + var label = $actionLink.data("label"); + var label2; + if(label in dictionary) + label2 = dictionary[label]; + else + label2 = label; + var errorMsg = label2 + " - " + g_dictionary["label.failed"] + " - " + g_dictionary["label.error.code"] + " " + fromdb(result.jobresult.errorcode); + handleErrorInDialog2(errorMsg, $dialogDownloadISO); } } },