Module: check_mk
Branch: master
Commit: c15626c97b1e3e294239278cd69e120376dc88d8
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=c15626c97b1e3e…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Wed Sep 16 11:55:25 2015 +0200
#2596 FIX Fix exception in availabiliy table if average number of events and summary are
both being displayed
The exception was about <tt>group_availability</tt> not being defined. This
has been fixed.
---
.werks/2596 | 10 ++++++++++
ChangeLog | 3 +++
web/htdocs/availability.py | 2 +-
3 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/.werks/2596 b/.werks/2596
new file mode 100644
index 0000000..2e708e9
--- /dev/null
+++ b/.werks/2596
@@ -0,0 +1,10 @@
+Title: Fix exception in availabiliy table if average number of events and summary are
both being displayed
+Level: 2
+Component: reporting
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i3
+Date: 1442397255
+
+The exception was about <tt>group_availability</tt> not being defined. This
has been fixed.
diff --git a/ChangeLog b/ChangeLog
index 6ceea1d..3bb2d5d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -274,6 +274,9 @@
* 2485 FIX: Fix Icon "BI Aggregations containing this service", also avoid
BI compilation without need...
* 2573 FIX: Fix influance of service period to the availability of BI aggregates...
+ Reporting & Availability:
+ * 2596 FIX: Fix exception in availabiliy table if average number of events and
summary are both being displayed...
+
Event Console:
* 2411 Check check_mkevents: Now able to look for events matching the host alias...
* 2533 Allow inverted match in Event Console rules
diff --git a/web/htdocs/availability.py b/web/htdocs/availability.py
index 65dc147..ddf59f2 100644
--- a/web/htdocs/availability.py
+++ b/web/htdocs/availability.py
@@ -1020,7 +1020,7 @@ def layout_availability_table(what, group_title, availability_table,
avoptions):
if aggr == "cnt":
count = summary_counts.get(sid, 0)
if show_summary == "average":
- count = float(count) / len(group_availability)
+ count = float(count) / len(availability_table)
text = "%.2f" % count
else:
text = str(count)