Module: check_mk
Branch: master
Commit: 493b251ac264f0360709b3f31040f67ca581c194
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=493b251ac264f0…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Dec 3 17:35:18 2010 +0100
Better error handling while performing actions
---
web/htdocs/check_mk.js | 13 +++++++------
1 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/web/htdocs/check_mk.js b/web/htdocs/check_mk.js
index 1186fa8..277525c 100644
--- a/web/htdocs/check_mk.js
+++ b/web/htdocs/check_mk.js
@@ -213,16 +213,17 @@ function performAction(oLink, action, type, site, name1, name2) {
}
if(validResponse && response[0] === 'OK') {
- oImg.src = 'images/icon_reload.gif';
+ oImg.src = 'images/icon_reload.gif';
window.location.reload();
} else if(validResponse && response[0] === 'TIMEOUT') {
- oImg.src = 'images/icon_reload_failed.gif';
+ oImg.src = 'images/icon_reload_failed.gif';
+ oImg.title = 'Timeout while performing action: ' + response[1];
} else if(validResponse) {
- oImg.src = 'images/icon_reload_failed.gif';
- alert('Problem while processing - Response: ' + response.join('
'));
+ oImg.src = 'images/icon_reload_failed.gif';
+ oImg.title = 'Problem while processing - Response: ' + response.join('
');
} else {
- oImg.src = 'images/icon_reload_failed.gif';
- alert('Invalid response: ' + response);
+ oImg.src = 'images/icon_reload_failed.gif';
+ oImg.title = 'Invalid response: ' + response;
}
validResponse = null;