Module: check_mk
Branch: master
Commit: 14c1770cf8ab71ee2cbd174946d8d36bc5833195
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=14c1770cf8ab71…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Jul 31 08:38:25 2013 +0200
Added new painters for displaying host tags
---
ChangeLog | 3 ++-
web/plugins/views/painters.py | 17 +++++++++++++++--
2 files changed, 17 insertions(+), 3 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 5423ebb..7aa80f6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -96,12 +96,13 @@
* Editing localized strings (like the title) is now optional when cloning
views or editing cloned views. If not edited, the views inherit the
localized strings from their ancestors
+ * Add: Added simple problems Dashboard
+ * Added new painters for displaying host tags
* FIX: better error message in case of exception in SNMP handling
* FIX: Inventory screen: Now shows custom checks
* FIX: Fixed locking problem of multisite pages related to user loading/saving
* FIX: Fixed wrong default settings of view filters in localized multisite
* FIX: line wrapping of logwatch entries
- * Add: Added simple problems Dashboard
WATO:
* Allow to configure check-/retry_interval in second precision
diff --git a/web/plugins/views/painters.py b/web/plugins/views/painters.py
index f2b6969..6bf7529 100644
--- a/web/plugins/views/painters.py
+++ b/web/plugins/views/painters.py
@@ -1178,14 +1178,27 @@ def paint_host_tags(row):
return "", get_host_tags(row)
multisite_painters["host_tags"] = {
- "title" : _("Host Tags (Check_MK)"),
+ "title" : _("Host tags (raw)"),
"short" : _("Tags"),
"columns" : [ "host_custom_variable_names",
"host_custom_variable_values" ],
"paint" : paint_host_tags,
}
+def paint_host_tags_with_titles(row):
+ output = ''
+ for tag in get_host_tags(row).split():
+ output += tag + '<br />\n'
+ return "", output
+
+multisite_painters["host_tags_with_titles"] = {
+ "title" : _("Host tags (with titles)"),
+ "short" : _("Tags"),
+ "columns" : [ "host_custom_variable_names",
"host_custom_variable_values" ],
+ "paint" : paint_host_tags_with_titles,
+}
+
multisite_painters["host_comments"] = {
- "title" : _("Host Comments"),
+ "title" : _("Host comments"),
"short" : _("Comments"),
"columns" : [ "host_comments_with_info" ],
"paint" : lambda row: paint_comments("host_", row),