Module: check_mk
Branch: master
Commit: 69bda360d72c8f34e197d622eb7fcf1e2118c2ec
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=69bda360d72c8f…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Wed Apr 23 13:35:57 2014 +0200
WATO: Fixed exception in host parameter overview
---
.werks/904 | 10 ++++++++++
ChangeLog | 1 +
web/htdocs/wato.py | 11 +++++++----
3 files changed, 18 insertions(+), 4 deletions(-)
diff --git a/.werks/904 b/.werks/904
new file mode 100644
index 0000000..b11a6d7
--- /dev/null
+++ b/.werks/904
@@ -0,0 +1,10 @@
+Title: Fixed exception in host parameter overview
+Level: 1
+Component: wato
+Class: fix
+State: unknown
+Version: 1.2.5i3
+Date: 1398252687
+
+The host parameter overview raised an exception when the check in question
+had a rulegroup defined which was unknown in the WATO-GUI.
diff --git a/ChangeLog b/ChangeLog
index 415f31b..f58de74 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -61,6 +61,7 @@
* 0880 Added support for 389 Directory Server to LDAP connector
* 0607 online help text for host creation in WATO now also explains hostname caching
* 0781 FIX: host diag page: fixed problem with update of diagnose subwindows...
+ * 0904 FIX: Fixed exception in host parameter overview...
Notifications:
* 0754 Allow users to disable their notifications completely...
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 81370ad..7520eef 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -2290,10 +2290,13 @@ def mode_object_parameters(phase):
# but we need to address it anyway.
grouprule = "checkgroup_parameters:" + checkgroup
if grouprule not in g_rulespecs:
- rulespec = g_rulespecs["static_checks:" + checkgroup]
- url = make_link([('mode', 'edit_ruleset'),
('varname', "static_checks:" + checkgroup), ('host',
hostname)])
- render_rule_reason(_("Parameters"), url,
_("Determined by inventory"), None, False,
-
rulespec["valuespec"]._elements[2].value_to_text(serviceinfo["parameters"]))
+ rulespec = g_rulespecs.get("static_checks:" +
checkgroup)
+ if rulespec:
+ url = make_link([('mode', 'edit_ruleset'),
('varname', "static_checks:" + checkgroup), ('host',
hostname)])
+ render_rule_reason(_("Parameters"), url,
_("Determined by inventory"), None, False,
+
rulespec["valuespec"]._elements[2].value_to_text(serviceinfo["parameters"]))
+ else:
+ render_rule_reason(_("Parameters"), None,
"", "", True, _("This check is not configurable via WATO"))
else:
rulespec = g_rulespecs[grouprule]