Module: check_mk
Branch: master
Commit: 2d053f09d1fb3229f76f54e93afaeaed6a34a40e
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=2d053f09d1fb32…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Thu Jan 16 10:57:47 2014 +0100
WATO: show check parameter icon even if param column visiable
---
web/htdocs/wato.py | 24 ++++++++++++++++--------
1 file changed, 16 insertions(+), 8 deletions(-)
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 77c8f69..37e16bd 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -2601,13 +2601,14 @@ def show_service_table(host, firsttime):
table.cell(_("Plugin output"), html.attrencode(output))
# Icon for Rule editor, Check parameters
- table.cell(parameter_column and _("Check Parameters") or
"")
varname = None
if checkgroup:
varname = "checkgroup_parameters:" + checkgroup
elif state_type == "active":
varname = "active_checks:" + ct
+ if parameter_column:
+ table.cell(_("Check Parameters"))
if varname and varname in g_rulespecs:
rulespec = g_rulespecs[varname]
url = make_link([("mode", "edit_ruleset"),
@@ -2624,15 +2625,22 @@ def show_service_table(host, firsttime):
if parameter_column:
html.write(paramtext)
- else:
- # Strip all HTML code from the paramtext
- paramtext = paramtext.replace('</td>', '\t')
- paramtext = paramtext.replace('</tr>', '\n')
- paramtext = html.strip_tags(paramtext)
+ # Strip all HTML code from the paramtext
+ table.cell("")
+ paramtext = paramtext.replace('</td>', '\t')
+ paramtext = paramtext.replace('</tr>', '\n')
+ paramtext = html.strip_tags(paramtext)
+
+ if parameter_column:
+ title = _("Edit the parameters of this check")
+ else:
title = _("Check parameters for this service") + ":
\n" + paramtext
- html.write('<a href="%s"><img
title="%s" class=icon
src="images/icon_rulesets.png"></a>' %
- (url, title))
+ html.write('<a href="%s"><img title="%s"
class=icon src="images/icon_rulesets.png"></a>' %
+ (url, title))
+
+ else:
+ table.cell("", "")
# Permanently disable icon