Module: check_mk
Branch: master
Commit: f536293d570cd112a282c9d9631ef22b3b39200e
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=f536293d570cd1…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Feb 21 10:04:27 2017 +0100
Fixed recently introduced issue on single host aggregation page when having no hosts
configured
Change-Id: I12549301b18998b4bc16e8a329aae9daa7194898
---
web/htdocs/bi.py | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/web/htdocs/bi.py b/web/htdocs/bi.py
index b7d6941..e1bc75c 100644
--- a/web/htdocs/bi.py
+++ b/web/htdocs/bi.py
@@ -2601,13 +2601,14 @@ def get_status_info_filtered(filter_header, only_sites, limit,
add_columns, prec
for row in rows:
parent_filter += [ 'Filter: host_name = %s\n' % p for p in
row["parents"] ]
- parent_filter_txt = ''.join(parent_filter)
- parent_filter_txt += 'Or: %d\n' % len(parent_filter)
-
- for row in get_status_info_filtered(parent_filter_txt, only_sites,
- limit, add_columns, False, bygroup):
- if row['name'] not in hostnames:
- rows.append(row)
+ if parent_filter:
+ parent_filter_txt = ''.join(parent_filter)
+ parent_filter_txt += 'Or: %d\n' % len(parent_filter)
+
+ for row in get_status_info_filtered(parent_filter_txt, only_sites,
+ limit, add_columns, False, bygroup):
+ if row['name'] not in hostnames:
+ rows.append(row)
return rows