Module: check_mk
Branch: master
Commit: 19d7454969960f231d54f3bfdaf82441cfa10f6e
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=19d7454969960f…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Mar 7 11:38:13 2019 +0100
Small host tag edit dialog usability improvements
* Remove useless columns (number of entries, type of tag) from tag list table
* Displaying default tag topic consistently as "Host tags"
Change-Id: I39437b98db1f202d74bcd6bf6d5edc27865b7ec7
---
cmk/gui/wato/pages/host_tags.py | 8 +++-----
cmk/gui/watolib/host_attributes.py | 2 ++
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/cmk/gui/wato/pages/host_tags.py b/cmk/gui/wato/pages/host_tags.py
index 507b326..d86c99d 100644
--- a/cmk/gui/wato/pages/host_tags.py
+++ b/cmk/gui/wato/pages/host_tags.py
@@ -217,7 +217,7 @@ class ModeHostTags(WatoMode, watolib.HosttagsConfiguration):
return
for nr, entry in enumerate(effective_tag_groups):
- tag_id, title, choices = entry[:3] # fourth: tag dependency information
+ tag_id, title, _choices = entry[:3] # fourth: tag dependency
information
topic, title = map(_u, watolib.parse_hosttag_title(title))
table.row()
table.cell(_("Actions"), css="buttons")
@@ -247,9 +247,7 @@ class ModeHostTags(WatoMode, watolib.HosttagsConfiguration):
table.text_cell(_("ID"), tag_id)
table.text_cell(_("Title"), title)
- table.text_cell(_("Topic"), topic or '')
- table.text_cell(_("Type"), (len(choices) == 1 and
_("Checkbox") or _("Dropdown")))
- table.text_cell(_("Choices"), str(len(choices)))
+ table.text_cell(_("Topic"), topic or _("Host tags"))
table.cell(_("Demonstration"), sortable=False)
html.begin_form("tag_%s" % tag_id)
watolib.host_attribute("tag_%s" %
tag_id).render_input("", None)
@@ -287,7 +285,7 @@ class ModeHostTags(WatoMode, watolib.HosttagsConfiguration):
table.text_cell(_("ID"), tag_id)
table.text_cell(_("Title"), _u(title))
- table.text_cell(_("Topic"), _u(topic) or '')
+ table.text_cell(_("Topic"), _u(topic) or _("Host
tags"))
table.text_cell(
_("Tags using this auxiliary tag"), ", ".join(
self._get_tags_using_aux_tag(effective_tag_groups, tag_id)))
diff --git a/cmk/gui/watolib/host_attributes.py b/cmk/gui/watolib/host_attributes.py
index 9f1db5a..ff66af6 100644
--- a/cmk/gui/watolib/host_attributes.py
+++ b/cmk/gui/watolib/host_attributes.py
@@ -632,12 +632,14 @@ def _transform_attribute_topic_title_to_id(topic_title):
u"Management Board": "management_board",
u"Network Scan": "network_scan",
u"Custom attributes": "custom_attributes",
+ u"Host tags": "host_tags",
u"Grundeinstellungen": "basic",
u"Adresse": "address",
u"Datenquellen": "data_sources",
u"Management-Board": "management_board",
u"Netzwerk-Scan": "network_scan",
u"Eigene Attribute": "custom_attributes",
+ u"Hostmerkmale": "host_tags",
}
try: