[Kimchi-devel] [PATCH] Fix displaying numerous error msgs when host is shut down
Socorro Stoppler
socorro at linux.vnet.ibm.com
Mon Jul 13 19:18:50 UTC 2015
From: Socorro Stoppler <socorrob at us.ibm.com>
Fix displaying numerous error msgs when host is shut down
Signed-off-by: Socorro Stoppler <socorrob at us.ibm.com>
---
ui/js/src/kimchi.main.js | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/ui/js/src/kimchi.main.js b/ui/js/src/kimchi.main.js
index 0d4ad43..763834a 100644
--- a/ui/js/src/kimchi.main.js
+++ b/ui/js/src/kimchi.main.js
@@ -300,6 +300,7 @@ kimchi.main = function() {
};
var initUI = function() {
+ var errorMsg = "";
$(document).bind('ajaxError', function(event, jqXHR, ajaxSettings, errorThrown) {
if (!ajaxSettings['kimchi']) {
return;
@@ -314,8 +315,9 @@ kimchi.main = function() {
document.location.href= isSessionTimeout ? 'login.html?error=sessionTimeout' : 'login.html';
return;
}
- else if((jqXHR['status'] == 0) && ("error"==jqXHR.statusText) && !kimchi.isLoggingOut) {
- kimchi.message.error(i18n['KCHAPI6007E'].replace("%1", jqXHR.state()));
+ else if((jqXHR['status'] == 0) && ("error"==jqXHR.statusText) && !kimchi.isLoggingOut && errorMsg == "") {
+ errorMsg = i18n['KCHAPI6007E'].replace("%1", jqXHR.state());
+ kimchi.message.error(errorMsg);
}
if(ajaxSettings['originalError']) {
ajaxSettings['originalError'](jqXHR, jqXHR.statusText, errorThrown);
@@ -325,6 +327,7 @@ kimchi.main = function() {
kimchi.user.showUser(true);
initListeners();
updatePage();
+
};
// Load i18n translation strings first and then render the page.
--
1.9.1
More information about the Kimchi-devel
mailing list