diff --git a/logging.conf b/logging.conf index 75af48ccd..7dc252985 100644 --- a/logging.conf +++ b/logging.conf @@ -2,6 +2,7 @@ keys=root,scheduler,fetcher,processor,webui [logger_root] +level=INFO handlers=screen [logger_scheduler] diff --git a/run.py b/run.py index c68e6559f..767e3bc17 100755 --- a/run.py +++ b/run.py @@ -63,6 +63,7 @@ def run_webui(): app.config['fetch'] = lambda task: pickle.loads(fetch_rpc.fetch(task).data) app.config['projectdb'] = get_projectdb app.config['scheduler_rpc'] = scheduler_rpc + #app.config['cdn'] = '//cdnjs.cloudflare.com/ajax/libs/' app.run() if __name__ == '__main__': diff --git a/webui/app.py b/webui/app.py index f176fa078..cd893d4c0 100644 --- a/webui/app.py +++ b/webui/app.py @@ -6,8 +6,24 @@ # Created on 2014-02-22 23:17:13 import os +import sys +import urlparse from flask import Flask app = Flask('webui', static_folder=os.path.join(os.path.dirname(__file__), 'static'), template_folder=os.path.join(os.path.dirname(__file__), 'templates')) + +def cdn_url_handler(error, endpoint, kwargs): + if endpoint == 'cdn': + path = kwargs.pop('path') + cdn = app.config.get('cdn', 'http://cdn.staticfile.org/') + return urlparse.urljoin(cdn, path) + else: + exc_type, exc_value, tb = sys.exc_info() + if exc_value is error: + raise exc_type, exc_value, tb + else: + raise error + +app.handle_url_build_error = cdn_url_handler diff --git a/webui/templates/debug.html b/webui/templates/debug.html index 20d54b465..869cbe0f7 100644 --- a/webui/templates/debug.html +++ b/webui/templates/debug.html @@ -10,24 +10,24 @@ - - - + + + - - - - - - - - - - - - - + + + + + + + + + + + + +
diff --git a/webui/templates/index.html b/webui/templates/index.html index 731a9df1d..52363e06f 100644 --- a/webui/templates/index.html +++ b/webui/templates/index.html @@ -9,9 +9,13 @@ - - + + + + + + @@ -80,9 +84,6 @@ - - -