Module: check_mk
Branch: master
Commit: 4beb3647f92b2502485e46a3af4a9aea0a66cef8
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=4beb3647f92b25…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Thu Mar 7 08:40:22 2013 +0100
Availability: fix visibility of columns
---
web/plugins/views/availability.py | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/web/plugins/views/availability.py b/web/plugins/views/availability.py
index bf2c401..68d16aa 100644
--- a/web/plugins/views/availability.py
+++ b/web/plugins/views/availability.py
@@ -699,7 +699,7 @@ def render_availability_table(availability, from_time, until_time,
range_title,
def cell_active(sid):
if sid == "outof_notification_period" and not
avoptions["consider"]["notification_period"]:
return False
- elif sid == "in_downtime" and
avoptions["downtimes"]["include"] == "ignore":
+ elif sid == "in_downtime" and
avoptions["downtimes"]["include"] != "honor":
return False
elif sid == "unmonitored" and not
avoptions["consider"]["unmonitored"]:
return False
@@ -764,6 +764,8 @@ def render_availability_table(availability, from_time, until_time,
range_title,
considered_duration = until_time - from_time
for sid, css, sname, help in availability_columns:
+ if not cell_active(sid):
+ continue
number = summary.get(sid, 0)
if show_summary == "average" or
avoptions["timeformat"].startswith("percentage"):
number /= len(availability)