From 21644ee3689be254791809c791a18fcce7495aa1 Mon Sep 17 00:00:00 2001 From: saksham115 Date: Wed, 30 Aug 2017 03:46:21 +0530 Subject: Support for internal results navigation JIRA: STORPERF-164 Change-Id: Ieabeef70be76dc905707461d2e66e4ebf5b1fdc6 Signed-off-by: saksham115 --- docker/storperf-reporting/src/app.py | 14 ++ .../src/templates/plot_jobs.html | 267 +++++++++++++++++++++ 2 files changed, 281 insertions(+) create mode 100644 docker/storperf-reporting/src/templates/plot_jobs.html (limited to 'docker') diff --git a/docker/storperf-reporting/src/app.py b/docker/storperf-reporting/src/app.py index 39ea259..8ee04b8 100644 --- a/docker/storperf-reporting/src/app.py +++ b/docker/storperf-reporting/src/app.py @@ -39,6 +39,20 @@ def get_data(data): def success(): try: URL = session["url"] + if URL.find("jobs") is not -1 and URL.find("metadata") is -1: + data = urllib.urlopen(URL).read() + data = json.loads(data) + temp = data["job_ids"] + print temp + if temp: + info = {} + for ID in temp: + url = URL + "?id=" + ID + "&type=metadata" + data_temp = urllib.urlopen(url).read() + data_temp = json.loads(data_temp) + report_data = get_data(data_temp)[-1] + info[ID] = report_data + return render_template('plot_jobs.html', results=info) if validators.url(URL): data = urllib.urlopen(URL).read() else: diff --git a/docker/storperf-reporting/src/templates/plot_jobs.html b/docker/storperf-reporting/src/templates/plot_jobs.html new file mode 100644 index 0000000..d2d3613 --- /dev/null +++ b/docker/storperf-reporting/src/templates/plot_jobs.html @@ -0,0 +1,267 @@ + + + + + + Chart | Storperf + + + + + + + + + + +
+ {% include 'header.html' %} +
Loading... +
+ +
+
+
+
+ + + + \ No newline at end of file -- cgit 1.2.3-korg