Module: check_mk
Branch: master
Commit: 401180908a6896cac356a4b911e3664e641d1045
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=401180908a6896…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Sun Feb 17 12:48:56 2013 +0100
Availability: fix visibility of flapping column
---
web/plugins/views/availability.py | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/web/plugins/views/availability.py b/web/plugins/views/availability.py
index 5e24b60..a40611d 100644
--- a/web/plugins/views/availability.py
+++ b/web/plugins/views/availability.py
@@ -642,7 +642,7 @@ def melt_short_intervals(entries, duration, dont_merge):
def render_availability_table(availability, from_time, until_time, range_title, what,
avoptions, render_number):
# Some columns might be unneeded due to state treatment options
sg = avoptions["state_grouping"]
- sgs = [ sg["warn"], sg["unknown"], sg["host_down"] ]
+ state_groups = [ sg["warn"], sg["unknown"],
sg["host_down"] ]
# Render the stuff
availability.sort()
@@ -700,7 +700,9 @@ def render_availability_table(availability, from_time, until_time,
range_title,
continue
elif sid == "unmonitored" and not
avoptions["consider"]["unmonitored"]:
continue
- elif sid in [ "warn", "unknown", "host_down" ]
and sid not in sgs:
+ elif sid == "flapping" and not
avoptions["consider"]["flapping"]:
+ continue
+ elif sid in [ "warn", "unknown", "host_down" ]
and sid not in state_groups:
continue
number = states.get(sid, 0)
if not number: