diff options
Diffstat (limited to 'docker/storperf-reporting/src')
-rw-r--r-- | docker/storperf-reporting/src/app.py | 11 | ||||
-rw-r--r-- | docker/storperf-reporting/src/templates/index.html | 8 | ||||
-rw-r--r-- | docker/storperf-reporting/src/templates/plot_tables.html | 12 |
3 files changed, 21 insertions, 10 deletions
diff --git a/docker/storperf-reporting/src/app.py b/docker/storperf-reporting/src/app.py index 25edf48..fadda66 100644 --- a/docker/storperf-reporting/src/app.py +++ b/docker/storperf-reporting/src/app.py @@ -8,6 +8,7 @@ ############################################################################## from flask import Flask, redirect, url_for, request, render_template, session +from flask import send_from_directory import urllib import json app = Flask(__name__) @@ -29,6 +30,16 @@ def url(): return redirect(url_for('success')) +@app.route('/reporting/js/<path:path>') +def js(path): + return send_from_directory('static/js/', path) + + +@app.route('/reporting/css/<path:path>') +def css(path): + return send_from_directory('static/css/', path) + + @app.route('/reporting/') def index(): return render_template('index.html') diff --git a/docker/storperf-reporting/src/templates/index.html b/docker/storperf-reporting/src/templates/index.html index c302299..70e33bd 100644 --- a/docker/storperf-reporting/src/templates/index.html +++ b/docker/storperf-reporting/src/templates/index.html @@ -3,10 +3,10 @@ <head> <title>Graphing Module | Storperf</title> - <link rel="stylesheet" href="{{ url_for('static', filename='css/bootstrap.min.css') }}"> - <script src="{{ url_for('static', filename='js/jquery-2.1.3.min.js') }}"></script> - <script src="{{ url_for('static', filename='js/bootstrap.min.js') }}"></script> - <script src="{{ url_for('static', filename='js/jquery.bootpag.min.js') }}"></script> + <link rel="stylesheet" href="/reporting/css/bootstrap.min.css"> + <script src="/reporting/js/jquery-2.1.3.min.js"></script> + <script src="/reporting/js/bootstrap.min.js"></script> + <script src="/reporting/js/jquery.bootpag.min.js"></script> </head> <body> diff --git a/docker/storperf-reporting/src/templates/plot_tables.html b/docker/storperf-reporting/src/templates/plot_tables.html index 4d6c887..a8c508d 100644 --- a/docker/storperf-reporting/src/templates/plot_tables.html +++ b/docker/storperf-reporting/src/templates/plot_tables.html @@ -4,12 +4,12 @@ <head> <meta charset="utf-8" /> <title>Chart | Storperf</title> - <link rel="stylesheet" href="{{ url_for('static', filename='css/bootstrap.min.css') }}"> - <script src="{{ url_for('static', filename='js/jquery-2.1.3.min.js') }}"></script> - <script src="{{ url_for('static', filename='js/bootstrap.min.js') }}"></script> - <script src="{{ url_for('static', filename='js/jquery.bootpag.min.js') }}"></script> - <script src="{{ url_for('static', filename='js/plotly-latest.min.js') }}"></script> - <script src="{{ url_for('static', filename='js/Chart.min.js') }}"></script> + <link rel="stylesheet" href="/reporting/css/bootstrap.min.css"> + <script src="/reporting/js/jquery-2.1.3.min.js"></script> + <script src="/reporting/js/bootstrap.min.js"></script> + <script src="/reporting/js/jquery.bootpag.min.js"></script> + <script src="/reporting/js/plotly-latest.min.js"></script> + <script src="/reporting/js/Chart.min.js"></script> <style> .table td { text-align: left; |