diff options
author | 2017-07-25 21:04:07 +0000 | |
---|---|---|
committer | 2017-07-25 21:04:07 +0000 | |
commit | 967371648191c37e20123c08e761c7a8a2a98516 (patch) | |
tree | db5504a23f4015a4027d6f923fb8fd7a366c4e7d /docker/storperf-reporting/src/app.py | |
parent | 3e30bf5912cbd63a9dfc1977bbc1c900889ebd3c (diff) | |
parent | 9b1febca47789f85469faab8175c8928ede937ac (diff) |
Merge "Fixing URL for static files Earlier the static files were being served on /static/ now it has been fixed and are being served on /reporting/js/ and /reporting/css/ for js and css files respectively. JIRA: STORPERF-192"
Diffstat (limited to 'docker/storperf-reporting/src/app.py')
-rw-r--r-- | docker/storperf-reporting/src/app.py | 11 |
1 files changed, 11 insertions, 0 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') |