Module: check_mk
Branch: master
Commit: d2026dec1a141c498f816bd6a2f5cbd9a5805bdf
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=d2026dec1a141c…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Mon Oct 6 18:22:38 2014 +0200
Fix adding new views to implicity main dashboard
---
web/htdocs/dashboard.py | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/web/htdocs/dashboard.py b/web/htdocs/dashboard.py
index a3e5477..c60628c 100644
--- a/web/htdocs/dashboard.py
+++ b/web/htdocs/dashboard.py
@@ -181,7 +181,10 @@ def permitted_dashboards():
def page_dashboard():
load_dashboards()
- name = html.var("name", "main")
+ name = html.var("name")
+ if not name:
+ name = "main"
+ html.set_var("name", name) # make sure that URL context is always
complete
if name not in available_dashboards:
raise MKGeneralException(_("The requested dashboard can not be
found."))
@@ -678,6 +681,7 @@ def page_create_view_dashlet():
import views
url = html.makeuri([], filename = "create_view_dashlet_infos.py")
url += '&datasource=%s' # %s can not be added using html.makeuri()
+ # Note: %s will later be replaced by datasource
views.page_create_view(next_url=url)
else: