Authorize Security Group Rule, Download Template, Download ISO action - change UI to show error text (English, non-localized) instead of error code(530, 531) when API call returns error.

This commit is contained in:
Jessica Wang 2011-02-04 11:11:28 -08:00
parent e86723e194
commit 592cfc6b73
3 changed files with 6 additions and 4 deletions

View File

@ -732,7 +732,8 @@ function doDownloadISO($actionLink, $detailsTab, $midmenuItem1) {
$infoContainer.find("#info").html(htmlMsg2);
$infoContainer.show();
} else if (result.jobstatus == 2) { // Failed
var errorMsg = g_dictionary["label.failed"] + " - " + g_dictionary["label.error.code"] + " " + fromdb(result.jobresult.errorcode);
//var errorMsg = g_dictionary["label.failed"] + " - " + g_dictionary["label.error.code"] + " " + fromdb(result.jobresult.errorcode);
var errorMsg = g_dictionary["label.failed"] + " - " + fromdb(result.jobresult.errortext);
handleErrorInDialog2(errorMsg, $dialogDownloadISO);
}
}

View File

@ -309,8 +309,8 @@ function initAddIngressRuleDialog() {
}
}
} else if (result.jobstatus == 2) { // Failed
//var errorMsg = fromdb(result.jobresult.errortext);
var errorMsg = g_dictionary["label.failed"] + " - " + g_dictionary["label.error.code"] + " " + fromdb(result.jobresult.errorcode);
//var errorMsg = g_dictionary["label.failed"] + " - " + g_dictionary["label.error.code"] + " " + fromdb(result.jobresult.errorcode);
var errorMsg = g_dictionary["label.failed"] + " - " + fromdb(result.jobresult.errortext);
handleErrorInDialog2(errorMsg, $thisDialog);
}
}

View File

@ -766,7 +766,8 @@ function doDownloadTemplate($actionLink, $detailsTab, $midmenuItem1) {
$infoContainer.find("#info").html(htmlMsg2);
$infoContainer.show();
} else if (result.jobstatus == 2) { // Failed
var errorMsg = g_dictionary["label.failed"] + " - " + g_dictionary["label.error.code"] + " " + fromdb(result.jobresult.errorcode);
//var errorMsg = g_dictionary["label.failed"] + " - " + g_dictionary["label.error.code"] + " " + fromdb(result.jobresult.errorcode);
var errorMsg = g_dictionary["label.failed"] + " - " + fromdb(result.jobresult.errortext);
handleErrorInDialog2(errorMsg, $dialogDownloadTemplate);
}
}