summaryrefslogtreecommitdiffstats
path: root/non-puppet/qtmetrics2/templates/testfunctions_bpass_data.html
diff options
context:
space:
mode:
Diffstat (limited to 'non-puppet/qtmetrics2/templates/testfunctions_bpass_data.html')
-rw-r--r--non-puppet/qtmetrics2/templates/testfunctions_bpass_data.html107
1 files changed, 64 insertions, 43 deletions
diff --git a/non-puppet/qtmetrics2/templates/testfunctions_bpass_data.html b/non-puppet/qtmetrics2/templates/testfunctions_bpass_data.html
index 117db0d..7fd55d7 100644
--- a/non-puppet/qtmetrics2/templates/testfunctions_bpass_data.html
+++ b/non-puppet/qtmetrics2/templates/testfunctions_bpass_data.html
@@ -34,7 +34,7 @@
/**
* Blacklisted passes (testfunctions) data
- * @since 21-09-2015
+ * @since 22-09-2015
* @author Juha Sippola
*/
@@ -49,8 +49,31 @@
*/
#}
+{# Calculate max result count for the bar #}
+{% set prevTestsetName = '' %}
+{% set prevProjectName = '' %}
+{% set testfunctionCount = 0 %}
+{% set maxCount = 1 %}
+{% for testfunction in testfunctions %}
+{% if (testfunction.getTestsetName == prevTestsetName) and (testfunction.getTestsetProjectName == prevProjectName) %}
+{% set testfunctionCount = testfunctionCount + 1 %}
+{% else %}
+{% if testfunctionCount > maxCount %}
+{% set maxCount = testfunctionCount %}
+{% endif %}
+{% set testfunctionCount = 1 %}
+{% endif %}
+{% set prevTestsetName = testfunction.getTestsetName %}
+{% set prevProjectName = testfunction.getTestsetProjectName %}
+{% endfor %}
+{% if testfunctionCount > maxCount %}
+{% set maxCount = testfunctionCount %}
+{% endif %}
+
{##### Summary #####}
+{% if testfunctionCount > 0 %}
+
<div class="panel panel-primary">
<div class="panel-heading">
<h4 class="panel-title bold">Summary <small>(last {{ lastDays }} days since {{ sinceDate }})</small></h4>
@@ -67,48 +90,31 @@
</tr>
</thead>
<tbody>
-{# Calculate max result count for the bar #}
-{% set prevTestsetName = '' %}
-{% set prevProjectName = '' %}
-{% set testfunctionCount = 0 %}
-{% set maxCount = 1 %}
-{% for testfunction in testfunctions %}
-{% if (testfunction.getTestsetName == prevTestsetName) and (testfunction.getTestsetProjectName == prevProjectName) %}
-{% set testfunctionCount = testfunctionCount + 1 %}
-{% else %}
-{% if testfunctionCount > maxCount %}
-{% set maxCount = testfunctionCount %}
-{% endif %}
-{% set testfunctionCount = 1 %}
-{% endif %}
-{% set prevTestsetName = testfunction.getTestsetName %}
-{% set prevProjectName = testfunction.getTestsetProjectName %}
-{% endfor %}
{# Print testsets #}
-{% set prevTestsetName = '' %}
-{% set prevProjectName = '' %}
-{% set testfunctionCount = 0 %}
-{% set bar = 0 %}
-{% for testfunction in testfunctions %}
+{% set prevTestsetName = '' %}
+{% set prevProjectName = '' %}
+{% set testfunctionCount = 0 %}
+{% set bar = 0 %}
+{% for testfunction in testfunctions %}
{# First row #}
-{% if prevTestsetName == '' %}
+{% if prevTestsetName == '' %}
<tr>
<td>{{ testfunction.getTestsetName }}</td>
<td>{{ testfunction.getTestsetProjectName }}</td>
-{% set testfunctionCount = 1 %}
+{% set testfunctionCount = 1 %}
{# Same testset: Increase the counter #}
-{% elseif (testfunction.getTestsetName == prevTestsetName) and (testfunction.getTestsetProjectName == prevProjectName) %}
-{% set testfunctionCount = testfunctionCount + 1 %}
+{% elseif (testfunction.getTestsetName == prevTestsetName) and (testfunction.getTestsetProjectName == prevProjectName) %}
+{% set testfunctionCount = testfunctionCount + 1 %}
{# New testset: Print count for previous one and start new row #}
-{% else %}
-{% set bar = ((BAR_AREA/maxCount) * testfunctionCount)|round(0, 'floor') %}
-{% if (testfunctionCount > 0) and (bar == 0) %}
-{% set bar = 1 %}
-{% endif %}
+{% else %}
+{% set bar = ((BAR_AREA/maxCount) * testfunctionCount)|round(0, 'floor') %}
+{% if (testfunctionCount > 0) and (bar == 0) %}
+{% set bar = 1 %}
+{% endif %}
<td class="leftBorder center">{{ testfunctionCount }}</td>
<td class="center showInLargeDisplay">
<div>
@@ -119,18 +125,18 @@
<tr>
<td>{{ testfunction.getTestsetName }}</td>
<td>{{ testfunction.getTestsetProjectName }}</td>
-{% set testfunctionCount = 1 %}
-{% endif %}
-{% set prevTestsetName = testfunction.getTestsetName %}
-{% set prevProjectName = testfunction.getTestsetProjectName %}
-{% endfor %}{# testfunction #}
+{% set testfunctionCount = 1 %}
+{% endif %}
+{% set prevTestsetName = testfunction.getTestsetName %}
+{% set prevProjectName = testfunction.getTestsetProjectName %}
+{% endfor %}{# testfunction #}
{# Print count for last one #}
-{% if testfunctionCount > 0 %}
-{% set bar = ((BAR_AREA/maxCount) * testfunctionCount)|round(0, 'floor') %}
-{% if (testfunctionCount > 0) and (bar == 0) %}
-{% set bar = 1 %}
-{% endif %}
+{% if testfunctionCount > 0 %}
+{% set bar = ((BAR_AREA/maxCount) * testfunctionCount)|round(0, 'floor') %}
+{% if (testfunctionCount > 0) and (bar == 0) %}
+{% set bar = 1 %}
+{% endif %}
<td class="leftBorder center">{{ testfunctionCount }}</td>
<td class="center showInLargeDisplay">
<div>
@@ -139,19 +145,24 @@
</td>
</tr>
-{% endif %}
+{% endif %}
</tbody>
</table>
</div> {# .table-responsive #}
</div> {# .panel-body #}
</div> {# .panel... #}
+{% endif %}{# testfunctionCount #}
+
{##### List #####}
<div class="panel panel-primary">
<div class="panel-heading">
<h4 class="panel-title bold">Blacklisted Passes <small>(last {{ lastDays }} days since {{ sinceDate }})</small></h4>
</div>
+
+{% if testfunctionCount > 0 %}
+
<div class="panel-body">
<div class="table-responsive">
<table class="table table-striped">
@@ -191,4 +202,14 @@
</table>
</div> {# .table-responsive #}
</div> {# .panel-body #}
+
+{% endif %}{# testfunctionCount #}
+
</div> {# .panel... #}
+
+{% if testfunctionCount == 0 %}
+<div class="alert alert-info" role="alert">
+The testset {{ testset }} ({{ project }}) either does not have any blacklisted test functions,
+or there are failed or skipped blacklisted test functions since {{ sinceDate }}!
+</div>
+{% endif %}{# testfunctionCount #}