Module: check_mk
Branch: master
Commit: 19ce5e428558acefd161cd69b8346db5e65582b5
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=19ce5e428558ac…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Thu Oct 9 09:58:16 2014 +0200
Put reporting snapin into default sidebar
---
web/htdocs/views.py | 2 +-
web/plugins/config/builtin.py | 1 +
web/plugins/views/availability.py | 2 +-
3 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/web/htdocs/views.py b/web/htdocs/views.py
index 960a795..7eaaf03 100644
--- a/web/htdocs/views.py
+++ b/web/htdocs/views.py
@@ -1437,7 +1437,7 @@ def show_context_links(thisview, show_filters, display_options,
bestof = config.context_buttons_to_show)
if config.reporting_available():
- html.context_button(_("Export as PDF"), html.makeuri([],
filename="report_instant.py"), "pdf")
+ html.context_button(_("Export as PDF"), html.makeuri([],
filename="report_instant.py"), "report")
links = visuals.collect_context_links(thisview)
for linktitle, uri, icon, buttonid in links:
diff --git a/web/plugins/config/builtin.py b/web/plugins/config/builtin.py
index 1c5f710..8c82e27 100644
--- a/web/plugins/config/builtin.py
+++ b/web/plugins/config/builtin.py
@@ -56,6 +56,7 @@ sidebar = [
('tactical_overview', 'open'),
('search', 'open'),
('views', 'open'),
+ ('reports', 'closed'), # does not harm if not available
('bookmarks', 'open'),
('admin', 'open'),
('master_control', 'closed')
diff --git a/web/plugins/views/availability.py b/web/plugins/views/availability.py
index 8601608..698d726 100644
--- a/web/plugins/views/availability.py
+++ b/web/plugins/views/availability.py
@@ -142,7 +142,7 @@ def render_availability(view, datasource, filterheaders,
display_options,
togglebutton("avoptions", html.has_user_errors(),
"painteroptions", _("Configure details of the report"))
html.context_button(_("Status View"), html.makeuri([("mode",
"status")]), "status")
if config.reporting_available():
- html.context_button(_("Export as PDF"), html.makeuri([],
filename="report_instant.py"), "pdf")
+ html.context_button(_("Export as PDF"), html.makeuri([],
filename="report_instant.py"), "report")
if timeline:
html.context_button(_("Availability"),
html.makeuri([("timeline", "")]), "availability")
history_url = history_url_of(tl_site, tl_host, tl_service, range[0],
range[1])