Module: check_mk
Branch: master
Commit: d28596681f352071acaa3e553fa7f3ff755b77da
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=d28596681f3520…
Author: Bastian Kuhn <bk(a)mathias-kettner.de>
Date: Thu Oct 18 19:56:08 2012 +0200
BI: Using parameters for hosttags
---
ChangeLog | 1 +
web/htdocs/bi.py | 5 ++++-
2 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index ce284ac..c0b093c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -41,6 +41,7 @@
aggregation compilations
* Correct representation of (!), (!!) and (?) markers in check output
* Corrected representation of assumed state in box layout
+ * Feature: Using parameters for hosttags
WATO:
* Added progress indicator in single site WATO "Activate Changes"
diff --git a/web/htdocs/bi.py b/web/htdocs/bi.py
index 33e6100..b4f75b0 100644
--- a/web/htdocs/bi.py
+++ b/web/htdocs/bi.py
@@ -693,7 +693,7 @@ def compile_aggregation_rule(aggr_type, rule, args, lvl):
# 2: (['waage'], '(.*)')
calllist = []
for n in node[1:-2]:
- if type(n) in [ str, unicode ]:
+ if type(n) in [ str, unicode, list ]:
n = subst_vars(n, arginfo)
calllist.append(n)
matches = find_matching_services(aggr_type, node[0], calllist)
@@ -777,6 +777,9 @@ def find_variables(pattern, varname):
# replace variables in a string
def subst_vars(pattern, arginfo):
+ if type(pattern) == list:
+ return [subst_vars(x, arginfo) for x in pattern ]
+
for name, value in arginfo.items():
if type(pattern) in [ str, unicode ]:
pattern = pattern.replace('$'+name+'$', value)