Module: check_mk
Branch: master
Commit: 10e08b9bf03cf57a46279323a3cef7cf9fa2d867
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=10e08b9bf03cf5…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Dec 20 18:15:49 2013 +0100
FIX Improved error handling in case of incorrect auth config in distributed WATO
environments
---
.werks/424 | 10 ++++++++++
ChangeLog | 1 +
web/htdocs/js/checkmk.js | 14 ++++++++++++--
3 files changed, 23 insertions(+), 2 deletions(-)
diff --git a/.werks/424 b/.werks/424
new file mode 100644
index 0000000..8dedfb4
--- /dev/null
+++ b/.werks/424
@@ -0,0 +1,10 @@
+Title: Improved error handling in case of incorrect auth config in distributed WATO
environments
+Level: 1
+Component: multisite
+Class: fix
+State: unknown
+Version: 1.2.5i1
+Date: 1387559719
+Targetversion: future
+
+
diff --git a/ChangeLog b/ChangeLog
index d00d76d..b75a60e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -97,6 +97,7 @@
* 0420 FIX: LDAP: Roles/Groups are now synced even if case of DNs do not match...
* 0421 FIX: UserDB: Fixed lost passwords when changing users in large user
databases...
* 0423 FIX: Users are not logged out anymore during changing their own passwords...
+ * 0424 FIX: Improved error handling in case of incorrect auth config in distributed
WATO environments
WATO:
* 0308 Multisite can now set rotation view permissions for NagVis...
diff --git a/web/htdocs/js/checkmk.js b/web/htdocs/js/checkmk.js
index e08c402..c7b925f 100644
--- a/web/htdocs/js/checkmk.js
+++ b/web/htdocs/js/checkmk.js
@@ -467,8 +467,18 @@ function pnp_response_handler(data, code) {
}
response = null;
- if(!valid_response)
- fallback_graphs(data);
+ if(!valid_response) {
+ if (code.match(/_login/)) {
+ // Login failed! This usually happens when one uses a distributed
+ // multisite setup but the transparent authentication is somehow
+ // broken. Display an error message trying to assist.
+ var container = document.getElementById(data['container']);
+ container.innerHTML = '<div class="error">Unable to fetch
graphs of the host. Maybe you have a '
+ + 'distributed setup and not set up the
authentication correctly yet.</div>';
+ } else {
+ fallback_graphs(data);
+ }
+ }
}
// Fallback bei doofer/keiner Antwort