Commit 2bbec7c0 authored by Aleksey Shirokih's avatar Aleksey Shirokih
Browse files

use better json lib for dashboards

parent 02165622
......@@ -39,4 +39,5 @@ setproctitle>=1.1.9
ujson>=1.35
yappi==0.94
XlsxWriter==0.9.3
pylibmc==1.5.1
\ No newline at end of file
pylibmc==1.5.1
demjson==2.2.4
\ No newline at end of file
......@@ -8,7 +8,7 @@
# ---------------------------------------------------------------------
"""
import json
import demjson
from jinja2 import Environment, FileSystemLoader
from noc.config import config
......@@ -43,5 +43,5 @@ class IPSLADashboard(BaseDashboard):
tmpl = j2_env.get_template("dash_ipsla.j2")
data = tmpl.render(context)
render = json.loads(data)
render = demjson.decode(data)
return render
......@@ -8,7 +8,7 @@
# ---------------------------------------------------------------------
"""
import json
import demjson
from jinja2 import Environment, FileSystemLoader
from noc.config import config
......@@ -55,5 +55,5 @@ class LinkDashboard(BaseDashboard):
tmpl = j2_env.get_template("dash_link.j2")
data = tmpl.render(context)
render = json.loads(data)
render = demjson.decode(data)
return render
......@@ -6,7 +6,7 @@
# See LICENSE for details
# ---------------------------------------------------------------------
import json
import demjson
from jinja2 import Environment, FileSystemLoader
from noc.config import config
......@@ -105,5 +105,5 @@ class MODashboard(BaseDashboard):
tmpl = j2_env.get_template("dash_mo.j2")
data = tmpl.render(context)
render = json.loads(data)
render = demjson.decode(data)
return render
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment