Module: check_mk
Branch: master
Commit: eb96617c39664124ca4d0b557a5a6fda3101a86a
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=eb96617c396641…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Dec 8 09:43:56 2011 +0100
Multisite icons: Always using host custom vars for processing but also fetching service
custom vars from the datasource
---
web/plugins/views/painters.py | 14 +++++++++-----
1 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/web/plugins/views/painters.py b/web/plugins/views/painters.py
index 15a5f91..c903ef7 100644
--- a/web/plugins/views/painters.py
+++ b/web/plugins/views/painters.py
@@ -121,8 +121,8 @@ def paint_icons(what, row):
what: "host" or "service"
row: The livestatus row of the current object
"""
- custom_vars = dict(zip(row[what + "_custom_variable_names"],
- row[what + "_custom_variable_values"]))
+ custom_vars = dict(zip(row["host_custom_variable_names"],
+ row["host_custom_variable_values"]))
# Extract host tags
if "TAGS" in custom_vars:
@@ -145,11 +145,15 @@ def paint_icons(what, row):
def iconpainter_columns(what):
cols = set(['site',
'host_name',
- what + '_custom_variable_names',
- what + '_custom_variable_values' ])
+ 'host_custom_variable_names',
+ 'host_custom_variable_values' ])
if what == 'service':
- cols.add('service_description')
+ cols.update([
+ 'service_description',
+ 'service_custom_variable_names',
+ 'service_custom_variable_values',
+ ])
for icon in multisite_icons:
if 'columns' in icon: