Module: check_mk
Branch: master
Commit: ceee3883e117c9c3e4469a35a00982b4a268fcba
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=ceee3883e117c9…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Tue Apr 19 12:08:11 2016 +0200
3413 FIX Correctly display non-Ascii-characters in host tag values in host tag filter
---
.werks/3413 | 10 ++++++++++
ChangeLog | 1 +
web/plugins/visuals/filters.py | 6 +++---
3 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/.werks/3413 b/.werks/3413
new file mode 100644
index 0000000..ded33aa
--- /dev/null
+++ b/.werks/3413
@@ -0,0 +1,10 @@
+Title: Correctly display non-Ascii-characters in host tag values in host tag filter
+Level: 1
+Component: multisite
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.9i1
+Date: 1461060469
+
+
diff --git a/ChangeLog b/ChangeLog
index bd461ca..1424068 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -216,6 +216,7 @@
* 3398 FIX: Fix exception in Matrix layout if it contains certain complex columns
* 3401 FIX: Fix sorting and grouping hosts by their IPv4 address
* 3402 FIX: Using information from inventory in column tooltips now longer crashes
+ * 3413 FIX: Correctly display non-Ascii-characters in host tag values in host tag
filter
WATO:
* 3244 WATO BI Module: swap order of aggregation function and child node
selection...
diff --git a/web/plugins/visuals/filters.py b/web/plugins/visuals/filters.py
index 0e1325a..b1ee985 100644
--- a/web/plugins/visuals/filters.py
+++ b/web/plugins/visuals/filters.py
@@ -1007,11 +1007,11 @@ class FilterHostTags(Filter):
if tag is None:
tag = ''
- if type(title) == unicode:
- title = title.encode("utf-8")
+ # if type(title) == unicode:
+ # title = title.encode("utf-8")
grouped[entry[0]].append([tag, title])
- html.javascript('g_hosttag_groups = %r;' % grouped)
+ html.javascript('g_hosttag_groups = %s;' % json.dumps(grouped))
html.write('<table>')
for num in range(self.count):
prefix = 'host_tag_%d' % num