Module: check_mk
Branch: master
Commit: d3489b887dce16a9f53ba2e74ba754dc86049852
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=d3489b887dce16…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Apr 1 13:50:25 2016 +0200
3358 FIX Fixed BI Boxes views when "Enable BI compilation diagnostics" enabled
---
.werks/3358 | 10 ++++++++++
ChangeLog | 1 +
web/htdocs/bi.py | 14 ++++++++------
3 files changed, 19 insertions(+), 6 deletions(-)
diff --git a/.werks/3358 b/.werks/3358
new file mode 100644
index 0000000..88185db
--- /dev/null
+++ b/.werks/3358
@@ -0,0 +1,10 @@
+Title: Fixed BI Boxes views when "Enable BI compilation diagnostics" enabled
+Level: 1
+Component: bi
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.9i1
+Date: 1459511339
+
+
diff --git a/ChangeLog b/ChangeLog
index 8bb2aec..1c9dd97 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -208,6 +208,7 @@
* 3247 FIX: Do not allow multiple BI aggregates with the same title...
* 3232 FIX: BI: Only querying site of host for specific host status info...
* 3291 FIX: Improved error handling when searching for BI aggregations with invalid
regex
+ * 3358 FIX: Fixed BI Boxes views when "Enable BI compilation diagnostics"
enabled
Reporting & Availability:
* 3267 New availability option for reclassifying host state
"unreachable"...
diff --git a/web/htdocs/bi.py b/web/htdocs/bi.py
index be7e25f..17528c0 100644
--- a/web/htdocs/bi.py
+++ b/web/htdocs/bi.py
@@ -1251,9 +1251,6 @@ def get_status_info_filtered(filter_header, only_sites, limit,
add_columns, fetc
columns = [ "name", "host_name", "state",
"hard_state", "plugin_output", "scheduled_downtime_depth",
"host_in_service_period", "acknowledged",
"services_with_fullstate", "parents" ] + add_columns
- sites.live().set_only_sites(only_sites)
- sites.live().set_prepend_site(True)
-
query = "GET hosts%s\n" % (bygroup and "bygroup" or
"")
query += "Columns: " + (" ".join(columns)) + "\n"
query += filter_header
@@ -1265,10 +1262,14 @@ def get_status_info_filtered(filter_header, only_sites, limit,
add_columns, fetc
sites.live().set_only_sites(only_sites)
sites.live().set_prepend_site(True)
-
sites.live().set_auth_domain('bi')
+
data = sites.live().query(query)
+ html.live.set_only_sites(only_sites)
+ html.live.set_prepend_site(True)
+ html.live.set_auth_domain('bi')
+
sites.live().set_prepend_site(False)
sites.live().set_only_sites(None)
sites.live().set_auth_domain('read')
@@ -1282,10 +1283,11 @@ def get_status_info_filtered(filter_header, only_sites, limit,
add_columns, fetc
# host_aggregation construct.
if fetch_parents:
parent_filter = []
- for row in data:
- parent_filter += [ 'Filter: name = %s\n' % p for p in row[8] ]
+ for row in rows:
+ parent_filter += [ 'Filter: name = %s\n' % p for p in
row["services_with_fullstate"] ]
parent_filter_txt = ''.join(parent_filter)
parent_filter_txt += 'Or: %d\n' % len(parent_filter)
+
for row in get_status_info_filtered(filter_header, only_sites, limit,
add_columns, False, bygroup):
if row['name'] not in hostnames:
rows.append(row)