Module: check_mk
Branch: master
Commit: b3d7b223ee675c3c717a3a252b8356ce19c913dc
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=b3d7b223ee675c…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Sep 7 11:41:02 2016 +0200
Fixed another non json encoded data serialization for JS
---
web/htdocs/dashboard.py | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/web/htdocs/dashboard.py b/web/htdocs/dashboard.py
index eab84c4..0e90b16 100644
--- a/web/htdocs/dashboard.py
+++ b/web/htdocs/dashboard.py
@@ -29,6 +29,11 @@ from valuespec import *
from lib import *
import wato
+try:
+ import simplejson as json
+except ImportError:
+ import json
+
loaded_with_language = False
builtin_dashboards = {}
builtin_dashboards_transformed = False
@@ -410,7 +415,7 @@ window.onresize = function () { calculate_dashboard(); }
dashboard_scheduler(1);
""" % (MAX, GROW, raster, header_height, screen_margin,
dashlet_padding, dashlet_min_size,
corner_overlap, ','.join(g_refresh_dashlets),
','.join(g_on_resize),
- name, board['mtime'], repr(g_dashlets_js)))
+ name, board['mtime'], json.dumps(g_dashlets_js)))
if mode == 'edit':
html.javascript('toggle_dashboard_edit(true)')