diff --git a/hyperglass/render/templates/base.html b/hyperglass/render/templates/base.html index a774787..7ae4ded 100644 --- a/hyperglass/render/templates/base.html +++ b/hyperglass/render/templates/base.html @@ -11,7 +11,7 @@ - + @@ -28,7 +28,6 @@ {% block scripts %} - {% if google_analytics|length > 0 %} diff --git a/hyperglass/static/js/hyperglass.js b/hyperglass/static/js/hyperglass.js index f2dd694..6de396c 100644 --- a/hyperglass/static/js/hyperglass.js +++ b/hyperglass/static/js/hyperglass.js @@ -225,6 +225,7 @@ var submitForm = function() { } else if (xhr.status == 200){ console.log(xhr.status, 'success') + var output = document.getElementById('output') output.innerHTML = '
' + '
' + diff --git a/hyperglass/wsgi.py b/hyperglass/wsgi.py index cdb2324..964a643 100644 --- a/hyperglass/wsgi.py +++ b/hyperglass/wsgi.py @@ -1,7 +1,12 @@ +import os +import hyperglass from hyperglass.hyperglass import app application = app +hyperglass_root = os.path.dirname(hyperglass.__file__) +static = os.path.join(hyperglass_root, "static") + if __name__ == "__main__": application.renderCSS() - application.run() + application.run(static_folder=static) diff --git a/manage.py b/manage.py index 5609259..71e569c 100644 --- a/manage.py +++ b/manage.py @@ -34,20 +34,3 @@ def testserver(): if __name__ == "__main__": main() - -# for arg in sys.argv: -# if arg == "clearcache": -# try: -# hyperglass.hyperglass.app.clearcache() -# logger.info("Successfully cleared cache.") -# except: -# raise -# logger.error("Failed to clear cache.") -# elif arg == "test": -# try: -# render.css.renderTemplate() -# app.run(host="0.0.0.0", debug=True, port=5000) -# logger.error("Started test server.") -# except: -# logger.error("Failed to start test server.") -# raise