Module: check_mk
Branch: master
Commit: 83959bd3ad69b3e0fed84641200e2029f64027f8
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=83959bd3ad69b3…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Mar 22 11:23:32 2017 +0100
4511 FIX Graph dashlets: Fixed graph rendering on host specific dashboards
When creating a host specific dashlet, where the host context is set via URL
variable, the graph dashlet was unable to select the correct graph. Instead it
displayed the message "Missing needed host parameter.".
Change-Id: I3174034ea4d083edc0c5dea0d30472069d970c23
---
.werks/4511 | 13 +++++++++++++
web/plugins/dashboard/dashlets.py | 2 +-
2 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/.werks/4511 b/.werks/4511
new file mode 100644
index 0000000..af1c74b
--- /dev/null
+++ b/.werks/4511
@@ -0,0 +1,13 @@
+Title: Graph dashlets: Fixed graph rendering on host specific dashboards
+Level: 1
+Component: multisite
+Class: fix
+Compatible: compat
+Edition: cre
+State: unknown
+Version: 1.5.0i1
+Date: 1490178137
+
+When creating a host specific dashlet, where the host context is set via URL
+variable, the graph dashlet was unable to select the correct graph. Instead it
+displayed the message "Missing needed host parameter.".
diff --git a/web/plugins/dashboard/dashlets.py b/web/plugins/dashboard/dashlets.py
index 7596004..9d4fb2f 100644
--- a/web/plugins/dashboard/dashlets.py
+++ b/web/plugins/dashboard/dashlets.py
@@ -364,7 +364,7 @@ def dashlet_graph(nr, dashlet):
def dashlet_graph_reload_js(nr, dashlet):
- host = dashlet['context'].get('host')
+ host = dashlet['context'].get('host', html.var("host"))
if not host:
raise MKUserError('host', _('Missing needed host parameter.'))