Module: check_mk
Branch: master
Commit: 2e5a8a7be9a63296e2c04010532c09b290758a38
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=2e5a8a7be9a632…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Wed Apr 16 13:40:27 2014 +0200
Fix crash in AV when timeline is inline and icons are hidden
---
web/plugins/views/availability.py | 17 ++++++++++-------
1 file changed, 10 insertions(+), 7 deletions(-)
diff --git a/web/plugins/views/availability.py b/web/plugins/views/availability.py
index d7da0cc..a76f7f0 100644
--- a/web/plugins/views/availability.py
+++ b/web/plugins/views/availability.py
@@ -1184,20 +1184,23 @@ def render_availability_group(group_title, range_title, group_id,
availability,
for site, host, service, display_name, states, considered_duration, total_duration,
statistics, timeline_rows, group_ids in group_availability:
table.row()
+ if what != "bi":
+ timeline_url = html.makeuri([
+ ("timeline", "yes"),
+ ("timeline_site", site),
+ ("timeline_host", host),
+ ("timeline_service", service)])
+ else:
+ timeline_url = html.makeuri([("timeline", "yes"),
("av_aggr_name", service), ("av_aggr_group", host)])
+
+
if not "omit_buttons" in labelling and not do_csv:
table.cell("", css="buttons")
if what != "bi":
- timeline_url = html.makeuri([
- ("timeline", "yes"),
- ("timeline_site", site),
- ("timeline_host", host),
- ("timeline_service", service)])
-
history_url = history_url_of(site, host, service, from_time, until_time)
html.icon_button(history_url, _("Event History"),
"history")
html.icon_button(timeline_url, _("Timeline"),
"timeline")
else:
- timeline_url = html.makeuri([("timeline", "yes"),
("av_aggr_name", service), ("av_aggr_group", host)])
html.icon_button(timeline_url, _("Timeline"),
"timeline")
host_url = "view.py?" + html.urlencode_vars([("view_name",
"hoststatus"), ("site", site), ("host", host)])