Module: check_mk
Branch: master
Commit: 008122e7a7f0396d1eea1c7d215028cf63399a77
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=008122e7a7f039…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Sat Oct 29 18:26:44 2011 +0200
WATO: show rule icon only if a ruleset exists
---
web/htdocs/wato.py | 20 ++++++++++----------
1 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index c7ceda4..379f3f6 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -1825,17 +1825,17 @@ def show_service_table(hostname, firsttime):
html.write("<td>")
if checkgroup:
varname = "checkgroup_parameters:" + checkgroup
- url = make_link([("mode", "edit_ruleset"),
- ("varname", varname),
- ("host", hostname),
- ("item", repr(item))])
- title = _("Edit rules for this check parameter")
- rulespec = g_rulespecs.get(varname)
- if rulespec:
+ if varname in g_rulespecs:
+ rulespec = g_rulespecs[varname]
+ url = make_link([("mode", "edit_ruleset"),
+ ("varname", varname),
+ ("host", hostname),
+ ("item", repr(item))])
+ title = _("Edit rules for this check parameter")
title = "Check parameters for this service: " + \
- rulespec["valuespec"].value_to_text(params)
- html.write('<a href="%s"><img title="%s"
class=icon src="images/icon_rulesets.png"></a>' %
- (url, title))
+ rulespec["valuespec"].value_to_text(params)
+ html.write('<a href="%s"><img
title="%s" class=icon
src="images/icon_rulesets.png"></a>' %
+ (url, title))
html.write("</td>")