From 8403f02718a94285a55fceba8793251a6fc39dea Mon Sep 17 00:00:00 2001 From: inpos Date: Wed, 22 Aug 2018 21:48:07 +0300 Subject: [PATCH] turn on/off charts --- orun/extjs/app.html | 3 +-- orun/extjs/cp.py | 11 ++++++++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/orun/extjs/app.html b/orun/extjs/app.html index bdc56aa..4fa7c29 100644 --- a/orun/extjs/app.html +++ b/orun/extjs/app.html @@ -4,8 +4,7 @@ {title} - - + {packages} + +'''.format(base_url=BASE_URL, + theme_model=THEME_MODEL, + chart_theme_model=CHART_THEME_MODEL) if ENABLE_CHARTS else '' +EXTJS_PACKAGES = '' + CHART_HTML_CODE + @cherrypy.expose class ExtJS: _cp_config = { @@ -31,7 +40,7 @@ class ExtApplication(cp.Application): theme=THEME, theme_model=THEME_MODEL, script=str(js.js_manager), - chart_theme_model=CHART_THEME_MODEL) + packages=EXTJS_PACKAGES) @cherrypy.expose def ajax_callback(self, *args, **kwargs):