Module: check_mk
Branch: master
Commit: 975679128a452448a3d2bd60c8badfd53b122749
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=975679128a4524…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Dec 16 12:37:37 2013 +0100
FIX Own host tag groups without topics resulted in two groups "Host tags" in the
rule editor
Conflicts:
.bugs/1081
---
.bugs/1081 | 13 +++++++++++++
.werks/332 | 9 +++++++++
ChangeLog | 1 +
web/htdocs/wato.py | 4 +++-
4 files changed, 26 insertions(+), 1 deletion(-)
diff --git a/.bugs/1081 b/.bugs/1081
new file mode 100644
index 0000000..f451a2f
--- /dev/null
+++ b/.bugs/1081
@@ -0,0 +1,13 @@
+Title: Own host tag groups without topics are sorted in own group
+Component: wato
+Class: bug
+State: done
+Date: 2013-12-16 11:33:59
+Targetversion: 1.2.4
+
+Create a tag group. Do not set a topic. That tag group will be
+displayed in an own folder with the title "Host Tags". That folder
+is thus duplicate.
+
+2013-12-16 12:36:31: changed state open -> done
+This occured in the rule editor. has been fixed now
diff --git a/.werks/332 b/.werks/332
new file mode 100644
index 0000000..2a6acea
--- /dev/null
+++ b/.werks/332
@@ -0,0 +1,9 @@
+Title: Own host tag groups without topics resulted in two groups "Host tags" in
the rule editor
+Level: 1
+Component: wato
+Class: fix
+State: unknown
+Version: 1.2.5i1
+Date: 1387193799
+Targetversion: future
+
diff --git a/ChangeLog b/ChangeLog
index 7a17c48..10bd873 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -45,6 +45,7 @@
* 0311 FIX: Fixed "Inventory failed" message when trying an inventory on
clusters via WATO...
* 0330 FIX: Improved performance of WATO slave push with a large user base...
* 0331 FIX: LDAP diagnostic LOG can now have the $OMD_SITE$ macro configured via
WATO...
+ * 0332 FIX: Own host tag groups without topics resulted in two groups "Host
tags" in the rule editor
Notifications:
* 0108 FIX: Prevent service notification on host alerts...
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 02c2f40..8e2f0be 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -9577,6 +9577,8 @@ def group_hosttags_by_topic(hosttags):
tags = {}
for entry in hosttags:
topic, title = parse_hosttag_title(entry[1])
+ if not topic:
+ topic = _('Host tags')
tags.setdefault(topic, [])
tags[topic].append((entry[0], title) + entry[2:])
return sorted(tags.items(), key = lambda x: x[0])
@@ -11745,7 +11747,7 @@ def render_condition_editor(tag_specs, varprefix=""):
make_foldable = len(hosttags) > 1
for topic, grouped_tags in hosttags:
if make_foldable:
- html.begin_foldable_container("topic", topic, True,
"<b>%s</b>" % (topic or _('Host tags')))
+ html.begin_foldable_container("topic", topic, True,
"<b>%s</b>" % (topic))
html.write("<table class=\"hosttags\">")
# Show main tags