Module: check_mk
Branch: master
Commit: ac29ff47b7f2209f2c1581325ff8227db7f2df44
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=ac29ff47b7f220…
Author: Andreas Umbreit <au(a)mathias-kettner.de>
Date: Tue Mar 7 09:22:10 2017 +0100
Combined graphs: Fix button visibility
Restricting display of Combined graps button to datasources
with str-type tables
---
web/htdocs/views.py | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/web/htdocs/views.py b/web/htdocs/views.py
index 0f31676..3ae10c5 100644
--- a/web/htdocs/views.py
+++ b/web/htdocs/views.py
@@ -1794,8 +1794,11 @@ def render_view(view, rows, datasource, group_painters, painters,
# Is the layout able to display checkboxes?
can_display_checkboxes = layout.get('checkboxes', False)
-
if show_buttons:
+ show_combined_graphs_button = \
+ ("host" in datasource["infos"] or "service" in
datasource["infos"]) and \
+ (type(datasource["table"]) == str) and \
+ ("host" in datasource["table"] or "service" in
datasource["table"])
show_context_links(view, datasource, show_filters,
# Take into account: permissions, display_options
row_count > 0 and command_form,
@@ -1804,10 +1807,7 @@ def render_view(view, rows, datasource, group_painters, painters,
# Show link to availability
datasource["table"] in [ "hosts",
"services" ] or "aggr" in datasource["infos"],
# Show link to combined graphs
- ("host" in datasource["infos"] or
"service" in datasource["infos"]) and \
- ("host" in datasource["table"] or
"service" in datasource["table"]),
- )
-
+ show_combined_graphs_button,)
# User errors in filters
html.show_user_errors()