Module: check_mk
Branch: master
Commit: 4e0d775041baeac2a41545172861349f07c6be4a
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=4e0d775041baea…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Mon Dec 20 13:32:08 2010 +0100
Multisite: new column host_tags
---
ChangeLog | 3 ++-
web/plugins/views/painters.py | 13 +++++++++++++
2 files changed, 15 insertions(+), 1 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index b657dd1..d60c93d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -21,8 +21,9 @@
* new HTML parameter display_options, which allows to switch off several
parts of the output (e.g. the HTML header, external links, etc).
* View hoststatus: show PNP graph of host (usually ping stats)
- * Multisite: new tab "Display": here the user can choose time stamp
+ * new tab "Display": here the user can choose time stamp
display format and PNP graph ranges
+ * new column "host_tags", showing the Check_MK host tags of a host
Checks & Agents:
* Fixed problem with OnlyFrom: in Linux agent (df didn't work properly)
diff --git a/web/plugins/views/painters.py b/web/plugins/views/painters.py
index fab7163..a60fea5 100644
--- a/web/plugins/views/painters.py
+++ b/web/plugins/views/painters.py
@@ -1000,6 +1000,19 @@ multisite_painters["host_custom_notes"] = {
"paint" : paint_custom_notes
}
+def paint_host_tags(row):
+ for name, val in zip(row["host_custom_variable_names"],
+ row["host_custom_variable_values"]):
+ if name == "TAGS":
+ return "", val
+ return "",""
+
+multisite_painters["host_tags"] = {
+ "title" : "Host Tags (Check_MK)",
+ "short" : "Tags",
+ "columns" : [ "host_custom_variable_names",
"host_custom_variable_values" ],
+ "paint" : paint_host_tags
+}
# _ _ _
# | | | | ___ ___| |_ __ _ _ __ ___ _ _ _ __ ___