From 007411f6c79773a84e02db3da032a39f9314b705 Mon Sep 17 00:00:00 2001 From: Morgan Richomme Date: Thu, 29 Sep 2016 15:39:42 +0200 Subject: Add a trend line to Functest reporting And use d3js lib rather than static images JIRA: FUNCTEST-483 Change-Id: I3c372a8e18fc366dfe510ab551596640fb6d9242 Signed-off-by: Morgan Richomme --- reporting/functest/template/index-status-tmpl.html | 96 ++++++++++++++-------- 1 file changed, 60 insertions(+), 36 deletions(-) (limited to 'reporting/functest/template/index-status-tmpl.html') diff --git a/reporting/functest/template/index-status-tmpl.html b/reporting/functest/template/index-status-tmpl.html index 67c2349..2beb912 100644 --- a/reporting/functest/template/index-status-tmpl.html +++ b/reporting/functest/template/index-status-tmpl.html @@ -3,17 +3,65 @@ - + - + + + + // Draw the trend line + var mytrend = trend("#trend_svg{{loop.index}}",trend{{loop.index}}) + // **************************************** + {%- endfor %} + }); + if ( !window.isLoaded ) { + window.addEventListener("load", function() { + onDocumentReady(); + }, false); + } else { + onDocumentReady(); + } + + +
@@ -40,41 +88,17 @@

List of last scenarios ({{version}}) run over the last {{period}} days

- + + {% for scenario,iteration in scenario_stats.iteritems() -%} - + + -- cgit 1.2.3-korg
ScenarioScenario StatusTrend Score Iteration
{{scenario}}{%if scenario_results[scenario].getScorePercent() < 8.3 -%} - - {%elif scenario_results[scenario].getScorePercent() < 16.7 -%} - - {%elif scenario_results[scenario].getScorePercent() < 25 -%} - - {%elif scenario_results[scenario].getScorePercent() < 33.3 -%} - - {%elif scenario_results[scenario].getScorePercent() < 41.7 -%} - - {%elif scenario_results[scenario].getScorePercent() < 50 -%} - - {%elif scenario_results[scenario].getScorePercent() < 58.3 -%} - - {%elif scenario_results[scenario].getScorePercent() < 66.7 -%} - - {%elif scenario_results[scenario].getScorePercent() < 75 -%} - - {%elif scenario_results[scenario].getScorePercent() < 83.3 -%} - - {%elif scenario_results[scenario].getScorePercent() < 91.7 -%} - - {%elif scenario_results[scenario].getScorePercent() < 100 -%} - - {%- else -%} - - {%- endif %}
{{scenario_results[scenario].getScore()}} {{iteration}}