Module: check_mk
Branch: master
Commit: 12dff89982a84af06506925f307b865d0c24ed2d
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=12dff89982a84a…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Jul 14 10:43:07 2017 +0200
4994 FIX Analyze host rulesets: Fixed rendering of some values (e.g. Count, size and age
of files)
Change-Id: Ice2320b40148edfcf11e1e2865f1fa3f487179dc
---
.werks/4994 | 11 +++++++++++
web/htdocs/valuespec.py | 2 +-
web/htdocs/wato.py | 2 +-
3 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/.werks/4994 b/.werks/4994
new file mode 100644
index 0000000..adc0362
--- /dev/null
+++ b/.werks/4994
@@ -0,0 +1,11 @@
+Title: Analyze host rulesets: Fixed rendering of some values (e.g. Count, size and age of
files)
+Level: 1
+Component: wato
+Class: fix
+Compatible: compat
+Edition: cre
+State: unknown
+Version: 1.5.0i1
+Date: 1500021760
+
+
diff --git a/web/htdocs/valuespec.py b/web/htdocs/valuespec.py
index ab88b86..a4733dd 100644
--- a/web/htdocs/valuespec.py
+++ b/web/htdocs/valuespec.py
@@ -1132,7 +1132,7 @@ class ListOfStrings(ValueSpec):
if self._vertical:
# TODO: This is a workaround for a bug. This function needs to return str
objects right now.
- s = map(lambda v: html.render_tr(html.render_td(
HTML(self._valuespec.value_to_text(v)) )), value)
+ s = map(lambda v:
html.render_tr(html.render_td(HTML(self._valuespec.value_to_text(v)))), value)
return "%s" % html.render_table(HTML().join(s))
else:
return ", ".join([ self._valuespec.value_to_text(v) for v in value
])
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index a9b8fbb..2c8bd1a 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -2408,7 +2408,7 @@ def output_analysed_ruleset(all_rulesets, rulespec, hostname,
service, known_set
# We have a setting
elif valuespec:
- if ruleset.match_type() in ( "all", "list" ):
+ if ruleset.match_type() == "all":
html.write(", ".join([valuespec.value_to_text(e) for e in
setting]))
else:
html.write(valuespec.value_to_text(setting))