Module: check_mk
Branch: master
Commit: e2144a2d08813a785f6e312227fecb6ec6c72c7c
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=e2144a2d08813a…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Tue Jan 26 17:11:16 2016 +0100
Only show button to graph collections in CEE
---
web/htdocs/visuals.py | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/web/htdocs/visuals.py b/web/htdocs/visuals.py
index 990d6c1..ac9da08 100644
--- a/web/htdocs/visuals.py
+++ b/web/htdocs/visuals.py
@@ -281,8 +281,10 @@ def page_list(what, title, visuals, custom_columns = [],
html.context_button(info["plural_title"].title(),
'edit_%s.py' % other_what, other_what[:-1])
# TODO: We hack in those visuals that already have been moved to pagetypes here
- html.context_button(_("Graph Collections"),
"graph_collections.py", "graph_collection")
- html.context_button(_("Custom Graphs"), "custom_graphs.py",
"custom_graph")
+ if pagetypes.has_page_type("graph_collection"):
+ html.context_button(_("Graph Collections"),
"graph_collections.py", "graph_collection")
+ if pagetypes.has_page_type("custom_graph"):
+ html.context_button(_("Custom Graphs"), "custom_graphs.py",
"custom_graph")
html.context_button(_("Bookmark Lists"), "bookmark_lists.py",
"bookmark_list")
html.end_context_buttons()