diff options
author | Juha Sippola <juhasippola@outlook.com> | 2015-09-23 12:15:13 +0300 |
---|---|---|
committer | Tony Sarajärvi <tony.sarajarvi@theqtcompany.com> | 2015-09-23 09:40:35 +0000 |
commit | 1f60410f51f86287ebe9c8694d92df139e830b6f (patch) | |
tree | 80ebd1f2defcdce4d095911f07d48f8e758170eb /non-puppet/qtmetrics2/templates | |
parent | 5edc66cf4b798345d25452ad3fb8f41359d081e4 (diff) |
Qt Metrics 2 (v0.33): Bpassed page for testset
New page (or route actually) to list blacklisted passed
test functions since a specific date for one testset
only (for usability and performance). This page can be
opened from the testset page via a button. The testset
list routes modified for systematic names.
Change-Id: If9a6e2ca24539df8d62101d82422866b89bf4b6d
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@theqtcompany.com>
Diffstat (limited to 'non-puppet/qtmetrics2/templates')
4 files changed, 83 insertions, 47 deletions
diff --git a/non-puppet/qtmetrics2/templates/about.html b/non-puppet/qtmetrics2/templates/about.html index 40a3fcc..d1d72d5 100644 --- a/non-puppet/qtmetrics2/templates/about.html +++ b/non-puppet/qtmetrics2/templates/about.html @@ -34,7 +34,7 @@ /** * About window content - * @since 21-09-2015 + * @since 22-09-2015 * @author Juha Sippola */ @@ -52,4 +52,4 @@ and the global Qt developer community are the target audience. For detailed desc <p>See the <strong><a href="https://wiki.qt.io/Qt_Metrics_2_Backlog" target="_blank">backlog</a></strong> for development items currently identified or in progress.</p> -<p><small>Version 0.32 (21-Sep-2015)</small></p> +<p><small>Version 0.33 (22-Sep-2015)</small></p> diff --git a/non-puppet/qtmetrics2/templates/testfunctions_bpass.html b/non-puppet/qtmetrics2/templates/testfunctions_bpass.html index 1dc5394..91ed345 100644 --- a/non-puppet/qtmetrics2/templates/testfunctions_bpass.html +++ b/non-puppet/qtmetrics2/templates/testfunctions_bpass.html @@ -34,7 +34,7 @@ /** * Blacklisted passes (testfunctions) page - * @since 21-09-2015 + * @since 22-09-2015 * @author Juha Sippola */ @@ -57,6 +57,8 @@ {##### Title #####} <h1 class="page-header"> +<span id="testset">{{ testset }}</span> +<span id="project" class="hidden">{{ project }}</span> Test Function Blacklisted Passes <button type="button" class="btn btn-xs btn-info" data-toggle="collapse" data-target="#info" aria-expanded="false" aria-controls="info"> <span class="glyphicon glyphicon-info-sign"></span> @@ -94,9 +96,11 @@ and configuration. The testset link opens a page where the test functions are li <div class="progress-bar progress-bar-striped active" role="progressbar" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100"> </div> </div> +{% if testset == '' %} <div class="alert alert-warning" role="alert"> <span class="glyphicon glyphicon-time"></span> <strong>Please wait:</strong> Extracting the data will be ready in less than a minute! </div> +{% endif %} </div> {# testfunctions_blacklisted_passed_data #} </div> {# .col... #} 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 #} diff --git a/non-puppet/qtmetrics2/templates/testset.html b/non-puppet/qtmetrics2/templates/testset.html index b5b86d6..817e783 100644 --- a/non-puppet/qtmetrics2/templates/testset.html +++ b/non-puppet/qtmetrics2/templates/testset.html @@ -34,7 +34,7 @@ /** * Testset page (list of configurations) - * @since 17-09-2015 + * @since 22-09-2015 * @author Juha Sippola */ @@ -91,6 +91,7 @@ <div class="well infoWell"> <span class="glyphicon glyphicon-info-sign"></span> <strong>Testset</strong><br> <ul> +<li><strong>Buttons</strong> open a detailed list for the {{ testset.getName }} testset</li> <li><strong>Latest Status</strong> shows the overall testset status across all branches <ul> <li>latest result: overall testset status based on the latest @@ -118,6 +119,16 @@ and their configuration on <strong>{{ masterProject }} {{ masterState }}</strong </div> </div> +{##### Buttons #####} + +<div> +<div class="btn-group"> +{% set link = bpassedTestsetRoute ~ '/' ~ testset.getName|url_encode ~ '/' ~ testset.getProjectName|url_encode %} +<a class="btn btn-primary btn-xs" href="{{ link }}" role="button">test function blacklisted passes</a> +</div> +</div> +<hr> + {% if runsAvailable %} {##### Latest Status #####} |