Module: check_mk
Branch: master
Commit: b8ddb786b2319d87099730e2847f7c1bc5ec39d1
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=b8ddb786b2319d…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Dec 11 08:55:33 2014 +0100
Fixed possible exception during dashlet editing
---
web/htdocs/dashboard.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/web/htdocs/dashboard.py b/web/htdocs/dashboard.py
index 466947f..1181048 100644
--- a/web/htdocs/dashboard.py
+++ b/web/htdocs/dashboard.py
@@ -378,6 +378,7 @@ def render_dashboard(name):
url = dashlet.get("url",
"dashboard_dashlet.py?name="+name+"&id="+ str(nr))
refresh = dashlet.get("refresh",
dashlet_type.get("refresh"))
if refresh:
+ action = None
if 'on_refresh' in dashlet_type:
try:
action = 'function() {%s}' %
dashlet_type['on_refresh'](nr, dashlet)
@@ -389,7 +390,9 @@ def render_dashboard(name):
else:
# FIXME: remove add_wato_folder_to_url
action = '"%s"' % add_wato_folder_to_url(url,
wato_folder) # url to dashboard_dashlet.py
- refresh_dashlets.append('[%d, %d, %s]' % (nr, refresh, action))
+
+ if action:
+ refresh_dashlets.append('[%d, %d, %s]' % (nr, refresh,
action))
# Update the dashlets context with the dashboard global context when there are