Module: check_mk
Branch: master
Commit: 8758ee511b75900c350002abd49a87aea4276a60
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=8758ee511b7590…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Sep 19 11:13:15 2012 +0200
Dashboard: Param wato_folder="" means WATO root folder, use it and also
display the title of this folder
---
ChangeLog | 2 ++
web/htdocs/dashboard.py | 10 +++++++---
2 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index d853353..f3564a3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -102,6 +102,8 @@
Multisite:
* Added css class="dashboard_<name>" to the dashboard div for easier
customization of the dashboard style of a special dashboard
+ * Dashboard: Param wato_folder="" means WATO root folder, use it and also
+ display the title of this folder
* Sidebar: Sorting aggregation groups in BI snapin now
* Sidebar: Sorting sites in master control snapin case insensitive
* FIX: fixed localization of general permissions
diff --git a/web/htdocs/dashboard.py b/web/htdocs/dashboard.py
index b070a2e..c2076e0 100644
--- a/web/htdocs/dashboard.py
+++ b/web/htdocs/dashboard.py
@@ -112,14 +112,18 @@ def render_dashboard(name):
# sensitive.
wato_folder = html.var("wato_folder")
- if not wato_folder: # ignore wato folder in case of root folder
- wato_folder = None
+
+ # When an empty wato_folder attribute is given a user really wants
+ # to see only the hosts contained in the root folder. So don't ignore
+ # the root folder anymore.
+ #if not wato_folder: # ignore wato folder in case of root folder
+ # wato_folder = None
# The title of the dashboard needs to be prefixed with the WATO path,
# in order to make it clear to the user, that he is seeing only partial
# data.
title = board["title"]
- if wato_folder:
+ if wato_folder is not None:
title = wato.api.get_folder_title(wato_folder) + " - " + title
html.header(title, javascripts=["dashboard"],
stylesheets=["pages", "dashboard", "status",
"views"])