Commit 7c36972b authored by Marcel's avatar Marcel
Browse files

Add client side log levels.

parent dfe9feff
......@@ -14,6 +14,7 @@ use_forgot = False
# logging on clientside
client_logging = True
client_loglevel = info
# use base when running in subdirectory
#base = /vispa
......
......@@ -57,6 +57,7 @@ class PlatformController(AbstractController):
profile_id = self.get('profile_id')
preferences = Profile.get_preferences(db, profile_id, parse_json=True)
client_logging = vispa.config('web', 'client_logging', True)
client_loglevel = vispa.config('web', 'client_loglevel', 'info')
data = {'username' : username,
'common_js' : self._platform.common_js,
'common_css' : self._platform.common_css,
......@@ -64,7 +65,8 @@ class PlatformController(AbstractController):
'secure_websockets': secure_websockets,
'workspace_id' : 1,#self.get('workspace_id')
'profile_id' : profile_id,
'client_logging' : client_logging}
'client_logging' : client_logging,
'client_loglevel' : client_loglevel}
data.update(preferences)
return data
......
......@@ -16,9 +16,9 @@ var Vispa = Class.extend({
preferenceHandler: {},
preferenceView: {},
bus: {
onopen: function(){$.jqlog.log('Bus connected');},
onclose: function(){$.jqlog.log('Bus disconnected');},
onerror: function(){$.jqlog.log('Bus error');}
onopen: function(){$.jqlog.info('Bus connected');},
onclose: function(){$.jqlog.info('Bus disconnected');},
onerror: function(){$.jqlog.info('Bus error');}
}
};
this.workflow = {
......
......@@ -52,8 +52,7 @@
"ludo-jquery-treetable/jquery.treeTable.js",
"tablesorter/jquery.tablesorter.min.js",
"tablesorter/jquery.tablesorter.pager.js",
"selectBoxIt/jquery.selectBoxIt.min.js"
]
"selectBoxIt/jquery.selectBoxIt.min.js"]
framework_scripts = ["class/class.min.js",
"json/json2.js"]
base_scripts = ["jquery.callbacks.min.js",
......@@ -98,8 +97,7 @@
"ludo-jquery-treetable/css/jquery.treeTable.css",
"tablesorter/css/jquery.tablesorter.min.css",
"tablesorter/css/jquery.tablesorter.pager.css",
"selectBoxIt/css/jquery.selectBoxIt.min.css"
]
"selectBoxIt/css/jquery.selectBoxIt.min.css"]
base_scripts = ["resets.css",
"menu.css",
"overlay.css",
......@@ -121,7 +119,9 @@
<%block name="js_inline_post">
$(function() {
${'$.jqlog.enable();' if client_logging else ''}
% if client_logging:
$.jqlog.enable().level('${client_loglevel}');
% endif
// show the inner startup overlay (css transition)
$('#startup-overlay-inner').toggleClass('visible');
......
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