Module: check_mk
Branch: master
Commit: d420b7b6fe9c15f93a8e2422873a2aa1e1ad634a
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=d420b7b6fe9c15…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Aug 25 11:10:02 2011 +0200
Showing reload error only once
---
web/htdocs/js/check_mk.js | 13 +++++++++----
1 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/web/htdocs/js/check_mk.js b/web/htdocs/js/check_mk.js
index b8d8baa..0e7a1ec 100644
--- a/web/htdocs/js/check_mk.js
+++ b/web/htdocs/js/check_mk.js
@@ -620,7 +620,9 @@ function updateHeaderTime() {
oTime = null;
}
+var g_reload_error = false;
function handleContentReload(_unused, code) {
+ g_reload_error = false;
var o = document.getElementById('data_container');
o.innerHTML = code;
executeJS('data_container');
@@ -634,10 +636,13 @@ function handleContentReload(_unused, code) {
}
function handleContentReloadError(data, statusCode) {
- var o = document.getElementById('data_container');
- o.innerHTML = '<div class=error>Update failed (' + statusCode
- + '). The shown data might be outdated</div>' +
o.innerHTML;
- o = null;
+ if(!g_reload_error) {
+ var o = document.getElementById('data_container');
+ o.innerHTML = '<div class=error>Update failed (' + statusCode
+ + '). The shown data might be outdated</div>' +
o.innerHTML;
+ o = null;
+ g_reload_error = true;
+ }
// Continue update after the error
startReloadTimer('');