Module: check_mk
Branch: master
Commit: e6c7716c39647974faba9ef20a8b22c0545ecdcd
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=e6c7716c396479…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Mar 5 11:19:54 2018 +0100
Make dashboard name available to dashlets to make links in e.g. limit errors work
Change-Id: Ie009d2303bee02bfbb1af03a3c7735098e8a12e7
---
web/htdocs/dashboard.py | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/web/htdocs/dashboard.py b/web/htdocs/dashboard.py
index 9dd3079..dc5fc19 100644
--- a/web/htdocs/dashboard.py
+++ b/web/htdocs/dashboard.py
@@ -447,10 +447,11 @@ def dashlet_container_end():
html.close_div()
-def draw_dashlet_content(nr, the_dashlet, wato_folder, stash_html_vars=True):
+def draw_dashlet_content(name, nr, the_dashlet, wato_folder, stash_html_vars=True):
if stash_html_vars:
html.stash_vars()
html.del_all_vars()
+ html.set_var("name", name)
try:
visuals.add_context_to_uri_vars(the_dashlet)
@@ -716,7 +717,7 @@ def draw_dashlet(name, board, nr, dashlet, wato_folder):
# The content is rendered only if it is fixed. In the
# other cases the initial (re)-size will paint the content.
if "render" in dashlet_type:
- draw_dashlet_content(nr, dashlet, wato_folder)
+ draw_dashlet_content(name, nr, dashlet, wato_folder)
elif "content" in dashlet: # fixed content
html.write(dashlet["content"])
@@ -792,7 +793,7 @@ def ajax_dashlet():
raise MKGeneralException(_('The requested dashlet type does not
exist.'))
wato_folder = html.var("wato_folder")
- draw_dashlet_content(ident, the_dashlet, wato_folder, stash_html_vars=False)
+ draw_dashlet_content(board, ident, the_dashlet, wato_folder, stash_html_vars=False)
#.
# .--Dashboard List------------------------------------------------------.