Module: check_mk
Branch: master
Commit: 84c1e3210699a580b6e3404796b6607a4095abe9
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=84c1e3210699a5…
Author: Marcel Arentz <ma(a)mathias-kettner.de>
Date: Fri Jun 9 15:02:23 2017 +0200
4818 FIX Fixed "No Data" in Tactical Overview if missing permissions to see failed notifications
Guest do not have permissions to see failed notifications per default which
lead into an empty tactical overview. This bug is in Check_MK since June 2016.
Change-Id: I404e7d14a2e71435cd888f97137b5a0c5fd3d9f7
---
.werks/4818 | 11 +++++++++++
web/htdocs/notifications.py | 2 +-
2 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/.werks/4818 b/.werks/4818
new file mode 100644
index 0000000..f14d617
--- /dev/null
+++ b/.werks/4818
@@ -0,0 +1,11 @@
+Title: Fixed "No Data" in Tactical Overview if missing permissions to see failed notifications
+Level: 2
+Component: multisite
+Compatible: compat
+Edition: cre
+Version: 1.5.0i1
+Date: 1497013081
+Class: fix
+
+Guest do not have permissions to see failed notifications per default which
+lead into an empty tactical overview. This bug is in Check_MK since June 2016.
diff --git a/web/htdocs/notifications.py b/web/htdocs/notifications.py
index 3457238..6733ec7 100644
--- a/web/htdocs/notifications.py
+++ b/web/htdocs/notifications.py
@@ -95,7 +95,7 @@ def load_failed_notifications(before=None, after=None, stat_only=False, extra_he
config.user.may("general.see_failed_notifications_24h")
if not may_see_notifications:
- return None
+ return [0]
query_filters = [
"class = 3",
Module: check_mk
Branch: master
Commit: 3a9095d9197fa0f92e74211b5676c90552ff744c
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=3a9095d9197fa0…
Author: Marcel Arentz <ma(a)mathias-kettner.de>
Date: Fri Jun 9 15:03:32 2017 +0200
updated werk description
Change-Id: I3ecb69c7efcfefe6ac59e68e521d3d7bb2381657
---
.werks/4818 | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/.werks/4818 b/.werks/4818
index f14d617..327c57d 100644
--- a/.werks/4818
+++ b/.werks/4818
@@ -8,4 +8,5 @@ Date: 1497013081
Class: fix
Guest do not have permissions to see failed notifications per default which
-lead into an empty tactical overview. This bug is in Check_MK since June 2016.
+lead into an empty tactical overview. This bug has been in Check_MK since
+June 2016.
Module: check_mk
Branch: master
Commit: 3e32f07831a7e9c32943796abb827cd355f05933
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=3e32f07831a7e9…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Thu Jun 8 17:17:00 2017 +0200
4712 FIX BI availability: Fixes bugs related to no configured BIs and BIs only showing services
If you opened the BI availability page without having any BIs configured, an exception was shown.
BIs only containing service states, but not the host state of the given host were incorrectly calculated.
Change-Id: Ia7f0a8a124eb5261fd37b9079be8ca92b1f05c1b
---
.werks/4712 | 15 +++++++++++++++
web/htdocs/availability.py | 9 ++++++---
2 files changed, 21 insertions(+), 3 deletions(-)
diff --git a/.werks/4712 b/.werks/4712
new file mode 100644
index 0000000..639ba66
--- /dev/null
+++ b/.werks/4712
@@ -0,0 +1,15 @@
+Title: BI availability: Fixes bugs related to no configured BIs and BIs only showing services
+Level: 1
+Component: bi
+Class: fix
+Compatible: compat
+Edition: cre
+State: unknown
+Version: 1.5.0i1
+Date: 1496934799
+
+If you opened the BI availability page without having any BIs configured, an exception was shown.
+
+
+BIs only containing service states, but not the host state of the services host, were incorrectly calculated.
+
diff --git a/web/htdocs/availability.py b/web/htdocs/availability.py
index 0e02842..05932c8 100644
--- a/web/htdocs/availability.py
+++ b/web/htdocs/availability.py
@@ -1709,6 +1709,7 @@ def get_bi_leaf_history(aggr_rows, time_range, livestatus_limit):
for site, host, service in bi.find_all_leaves(tree):
by_host.setdefault(host, set([])).add(service)
host_service_info.add((host, service and service or ""))
+ host_service_info.add((host, ""))
timeline_container = TimelineContainer(row)
timeline_container.host_service_info = host_service_info
@@ -1725,7 +1726,7 @@ def get_bi_leaf_history(aggr_rows, time_range, livestatus_limit):
data = sites.live().query(query)
if not data:
- return [], None
+ return [], [], None
sites.live().set_prepend_site(False)
sites.live().set_only_sites(None)
@@ -1757,9 +1758,11 @@ def get_bi_leaf_history(aggr_rows, time_range, livestatus_limit):
return phases_list, timeline_containers, len(rows)
def compute_bi_timelines(timeline_containers, time_range, timewarp, phases_list):
- aggr_row_timelines = []
bi.load_assumptions()
+ if not timeline_containers:
+ return timeline_containers
+
def update_states(states, use_entries, phase_entries):
for element in use_entries:
hostname, svc_desc = element
@@ -1787,7 +1790,7 @@ def compute_bi_timelines(timeline_containers, time_range, timewarp, phases_list)
# Remaining phases, may include some elements
- for from_time, phase_hst_svc in phases_list:
+ for from_time, phase_hst_svc in phases_list[1:]:
phase_keys = set(phase_hst_svc.keys())
for timeline_container in timeline_containers: