From bab8fe5f9b3dbb6220566a07bb5cf97a17295dc1 Mon Sep 17 00:00:00 2001 From: Austin Clark Date: Wed, 29 Jul 2015 12:53:05 -0600 Subject: [PATCH] Added more jquery to summary table display --- stackviz/static/js/summary.js | 36 +++++++++---------------- stackviz/templates/tempest/summary.html | 4 +-- 2 files changed, 15 insertions(+), 25 deletions(-) diff --git a/stackviz/static/js/summary.js b/stackviz/static/js/summary.js index f1e3b27..e1df41d 100644 --- a/stackviz/static/js/summary.js +++ b/stackviz/static/js/summary.js @@ -1,26 +1,14 @@ "use strict"; /* -
- - - - - - - - - - - - - - - - - -
Total Time:
Successes:
Failures:
Longest Test:
-
+
+
+
Test Runs
+
+ +
+
+
*/ //@param data: JSON data of the test run @@ -66,12 +54,14 @@ function getData(data) { function createTable(data, run) { + $('#run-summary-div').append("
" + + "
"); + var data_dict = getData(data); var tbl = document.createElement('table'); tbl.setAttribute("id","table-run-" + run); tbl.setAttribute("class","table table-bordered table-hover table-striped"); - var header = tbl.createTHead(); - header.innerHTML = ' Run #' + run + ''; for (var key in data_dict) { var row = tbl.insertRow(); var c1 = row.insertCell(); @@ -80,7 +70,7 @@ function createTable(data, run) { c2.innerHTML=data_dict[key]; } - document.getElementById("run-summary-div").appendChild(tbl); + document.getElementById("run-"+run+"-div").appendChild(tbl); } diff --git a/stackviz/templates/tempest/summary.html b/stackviz/templates/tempest/summary.html index 3098124..f476c32 100644 --- a/stackviz/templates/tempest/summary.html +++ b/stackviz/templates/tempest/summary.html @@ -18,9 +18,9 @@
-
+
-
Overview
+
Test Runs