summaryrefslogtreecommitdiffstats
path: root/non-puppet/qtmetrics2/templates
diff options
context:
space:
mode:
authorJuha Sippola <juhasippola@outlook.com>2015-07-01 16:10:05 +0300
committerTony Sarajärvi <tony.sarajarvi@theqtcompany.com>2015-09-16 07:32:03 +0000
commit64a14e09f7d3a73f58758f67fe35a779f56f580b (patch)
tree6fe4162566943457a86a2914716d01eab7fda99f /non-puppet/qtmetrics2/templates
parent17114a51b5015b5af18818c30344bbe5365d7a6c (diff)
Qt Metrics 2 (v0.7): Overview and Project pages
Implemented the overview page to show status of the latest Qt5 state build for each branch including the build result itself and the testset results in the Qt5 state builds (testset results are shown by testset project). Implemented the build project (Qt5 state in practice) and testset project pages, the first to show the build results and the latter to show the testset results. Both are linked from the overview page, and the testset project page also from the new search box on the home page. Change-Id: Iaa97597b63e05af426e6749af2b2cbadbb492eb7 Reviewed-by: Tony Sarajärvi <tony.sarajarvi@theqtcompany.com>
Diffstat (limited to 'non-puppet/qtmetrics2/templates')
-rw-r--r--non-puppet/qtmetrics2/templates/about.html6
-rw-r--r--non-puppet/qtmetrics2/templates/build_project.html342
-rw-r--r--non-puppet/qtmetrics2/templates/home.html103
-rw-r--r--non-puppet/qtmetrics2/templates/overview.html237
-rw-r--r--non-puppet/qtmetrics2/templates/testset.html464
-rw-r--r--non-puppet/qtmetrics2/templates/testset_project.html346
6 files changed, 1232 insertions, 266 deletions
diff --git a/non-puppet/qtmetrics2/templates/about.html b/non-puppet/qtmetrics2/templates/about.html
index 1ba66fc..6e2ca7d 100644
--- a/non-puppet/qtmetrics2/templates/about.html
+++ b/non-puppet/qtmetrics2/templates/about.html
@@ -34,8 +34,8 @@
/**
* About window content
- * @version 0.6
- * @since 26-06-2015
+ * @version 0.7
+ * @since 30-06-2015
* @author Juha Sippola
*/
@@ -44,4 +44,4 @@
<p>This is Qt Metrics revision 2 with redesigned UI and database.</p>
<p>These pages are still <strong>under construction</strong> and therefore the views and functionality is limited.</p>
<p>See the <a href="https://wiki.qt.io/Qt_Metrics_2_Backlog" target="_blank">backlog</a> for development items currently identified or in progress.</p>
-<p><small>Version 0.6 (26-Jun-2015)</small></p>
+<p><small>Version 0.7 (30-Jun-2015)</small></p>
diff --git a/non-puppet/qtmetrics2/templates/build_project.html b/non-puppet/qtmetrics2/templates/build_project.html
new file mode 100644
index 0000000..c400e28
--- /dev/null
+++ b/non-puppet/qtmetrics2/templates/build_project.html
@@ -0,0 +1,342 @@
+{#
+#############################################################################
+##
+## Copyright (C) 2015 The Qt Company Ltd.
+## Contact: http://www.qt.io/licensing/
+##
+## This file is part of the Quality Assurance module of the Qt Toolkit.
+##
+## $QT_BEGIN_LICENSE:LGPL21$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see http://www.qt.io/terms-conditions. For further
+## information use the contact form at http://www.qt.io/contact-us.
+##
+## GNU Lesser General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU Lesser
+## General Public License version 2.1 or version 3 as published by the Free
+## Software Foundation and appearing in the file LICENSE.LGPLv21 and
+## LICENSE.LGPLv3 included in the packaging of this file. Please review the
+## following information to ensure the GNU Lesser General Public License
+## requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+## http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+##
+## As a special exception, The Qt Company gives you certain additional
+## rights. These rights are described in The Qt Company LGPL Exception
+## version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+/**
+ * Build project page
+ * @version 0.1
+ * @since 30-06-2015
+ * @author Juha Sippola
+ */
+
+#}
+
+{% include "header.html" %}
+
+{# Failed/passed bar area size in px #}
+{% set BAR_AREA = 120 %}
+
+{# project as Project object
+/**
+ * @var Project[] project
+ */
+#}
+
+{# confRuns as ConfRun objects
+/**
+ * @var ConfRun[] confRuns
+ */
+#}
+
+<ol class="breadcrumb">
+ {% for link in breadcrumb %}
+ <li><a href="{{ link.link }}">{{ link.name }}</a></li>
+ {% endfor %}
+ <li class="active">{{ project.getName }}</li>
+</ol>
+
+<div class="container-fluid">
+ <div class="row">
+
+ <div class="col-sm-12 col-md-12 main">
+
+ {# Check if any runs available #}
+ {% set runsAvailable = 0 %}
+ {% for run in latestProjectRuns %}
+ {% set runsAvailable = 1 %}
+ {% endfor %}
+
+ {##### Title #####}
+
+ <h1 class="page-header">
+ {{ project.getName }}
+ <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>
+ </button>
+ <small>{{ refreshed }}</small>
+ </h1>
+
+ {##### Info well #####}
+
+ <div class="collapse" id="info">
+ <div class="well infoWell">
+ <span class="glyphicon glyphicon-info-sign"></span> <strong>Build Project</strong><br>
+ <ul>
+ <li>In <strong>Latest Status</strong>, the <strong>latest result</strong> shows the overall project status based on the
+ latest <strong>{{ masterProject }} {{ masterState }}</strong> builds across all branches,
+ and the <strong>branch</strong> results across all configurations (both show failed if failed
+ in one or in several builds).</li>
+ <li><strong>Results in Branches</strong> shows the {{ project.getName }} run results by branch
+ and their configuration on <strong>{{ masterProject }} {{ masterState }}</strong> builds
+ (<span class="glyphicon glyphicon-ok green"></span> = {{ constant('ConfRun::RESULT_SUCCESS') }},
+ <span class="glyphicon glyphicon-ok-sign green"></span> = {{ constant('ConfRun::RESULT_SUCCESS') }} as forcesuccess,
+ <span class="glyphicon glyphicon-remove red"></span> = {{ constant('ConfRun::RESULT_FAILURE') }},
+ <span class="glyphicon glyphicon-ban-circle gray"></span> = {{ constant('ConfRun::RESULT_UNDEF') }});
+ details on the runs are available as tooltip on result icon.</li>
+ </ul>
+ </div>
+ </div>
+
+ {% if runsAvailable %}
+
+ {##### Latest Status #####}
+
+ <div class="panel panel-primary">
+ <div class="panel-heading">
+ <h4 class="panel-title bold">Latest Status</h4>
+ </div>
+ <div class="panel-body">
+ <div class="table-responsive">
+ <table class="table table-striped">
+ <thead>
+ <tr>
+ <th>project</th>
+ <th class="rightBorder">latest result</th>
+ {% for branch in latestProjectRuns %}
+ <th class="center">{{ branch.name }}</th>
+ {% endfor %}
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ {# Project name #}
+ <td>{{ project.getName }}</td>
+
+ {# Testset status according to the latest build results #}
+ {% if project.getStatus == constant('ConfRun::RESULT_SUCCESS') %}
+ {% set resultIcon = 'glyphicon glyphicon-ok green' %}
+ {% elseif project.getStatus == constant('ConfRun::RESULT_FAILURE') %}
+ {% set resultIcon = 'glyphicon glyphicon-remove red' %}
+ {% else %}
+ {% set resultIcon = '' %}
+ {% endif %}
+ <td class="rightBorder"><span class="spaceHorizontal {{ resultIcon }}"></span>{{ project.getStatus }}</td>
+
+ {# Result (by branch) #}
+ {% for run in latestProjectRuns %}
+ {% if run.result == constant('ConfRun::RESULT_SUCCESS') %}
+ {% set resultIcon = 'glyphicon glyphicon-ok green' %}
+ {% elseif run.result == constant('ConfRun::RESULT_FAILURE') %}
+ {% set resultIcon = 'glyphicon glyphicon-remove red' %}
+ {% else %}
+ {% set resultIcon = 'glyphicon glyphicon-ban-circle gray' %}
+ {% endif %}
+ <td class="center">
+ <span class="spaceHorizontal {{ resultIcon }} clickOnTouch"
+ data-toggle="tooltip" data-placement="top" data-html="true"
+ title="<table>
+ <tr><th>Branch: </td><td>{{ run.name }}</td></tr>
+ <tr><th>Build key: </td><td>{{ run.buildKey }}</td></tr>
+ <tr><th>Timestamp: </td><td>{{ run.timestamp }}</td></tr>
+ <tr><th>Result: </td><td>{{ run.result }}</td></tr>
+ <tr><th>Duration: </td><td>{{ run.duration}}</td></tr>
+ </table>">
+ </span>
+ </td>
+ {% endfor %}
+ </tr>
+ </tbody>
+ </table>
+ </div> {# /table-responsive #}
+ </div> {# /panel-body #}
+ </div> {# /panel... #}
+
+ {##### Results in Branches #####}
+
+ <div class="panel panel-primary">
+ <div class="panel-heading">
+ <h4 class="panel-title bold">Results in Branches</h4>
+ </div>
+ </div>
+
+ {# Get branches #}
+ {% set branches = [] %}
+ {% for run in projectBuilds %}
+ {% if run.branch not in branches %}
+ {% set branches = branches|merge([run.branch]) %}
+ {% endif %}
+ {% endfor %}
+
+ {# Loop all the branches #}
+ {% for branch in branches %}
+
+ {# Get all build keys #}
+ {% set buildKey = '' %}
+ {% set buildKeys = [] %}
+ {% set dates = [] %}
+ {% for run in projectBuilds %}
+ {% if run.branch == branch %}
+ {% if buildKey != run.buildKey %}
+ {% set buildKey = run.buildKey %}
+ {% set buildKeys = buildKeys|merge([run.buildKey]) %}
+ {% set dates = dates|merge([run.timestamp]) %}
+ {% endif %}
+ {% endif %}
+ {% endfor %}
+
+ {# Check if conf run for this branch #}
+ {% set confBranch = 0 %}
+ {% for run in confRuns if run.getBranchName == branch %}
+ {% set confBranch = 1 %}
+ {% endfor %}
+
+ {# Show branch if conf run for it #}
+ {% if confBranch %}
+ <div class="panel panel-info">
+ <div class="panel-heading">
+ <h4 class="panel-title bold">{{ branch }}</h4>
+ </div>
+ <div class="panel-body">
+ <div class="table-responsive">
+ <table class="table table-striped">
+ <thead>
+ <tr>
+ <th class="bold rightBorder">{{ project.getName }}</th>
+ {% for key, buildKey in buildKeys %}
+ <th class="center">
+ {% if buildKey|length > 6 %}
+ <span class="clickOnTouch" data-toggle="tooltip" data-placement="top"
+ title="{{ buildKey }}">{{ buildKey|slice(0, 4) }}...
+ </span>
+ {% else %}
+ {{ buildKey }}
+ {% endif %}
+ <br>
+ <span class="gray"><small>{{ dates[key]|date("m-d") }}</small></span>
+ </th>
+ {% endfor %}
+ </tr>
+ </thead>
+ <tbody>
+ {% set confPrev = '' %}
+ {% set buildKeyIndexPrinted = -1 %}
+ {% set buildKeyFound = 0 %}
+ {% for run in confRuns if run.getBranchName == branch %}
+
+ {# New row for each conf #}
+ {% if confPrev != run.getName %}
+ {# Close previous row #}
+ {% if confPrev != '' %}
+ {# Fill empty cells at the end of the row #}
+ {% for key, buildKey in buildKeys %}
+ {% if key > buildKeyIndexPrinted %}
+ <td></td>
+ {% endif %}
+ {% endfor %}
+ </tr>
+ {% endif %}
+ <tr>
+ <td class="rightBorder"><small>{{ run.getName }}</small></td>
+ {% set buildKeyIndexPrinted = -1 %}
+ {% endif %}
+
+ {# Result per build key #}
+ {% set buildKeyFound = 0 %}
+ {% for key, buildKey in buildKeys %}
+ {# Print each column only once (checked based on column index key and buildKeyFound flag) #}
+ {% if key > buildKeyIndexPrinted and not buildKeyFound %}
+ {% if buildKey == run.getBuildKey %}
+ {# Print result #}
+ {% set forcesuccess = '' %}
+ {% if run.getResult == constant('ConfRun::RESULT_SUCCESS') %}
+ {% if run.getForcesuccess == 0 %}
+ {% set resultIcon = 'glyphicon glyphicon-ok green' %}
+ {% else %}
+ {# Forcesuccess #}
+ {% set resultIcon = 'glyphicon glyphicon-ok-sign green' %}
+ {% set forcesuccess = ' (as forcesuccess)' %}
+ {% endif %}
+ {% elseif run.getResult == constant('ConfRun::RESULT_FAILURE') %}
+ {% set resultIcon = 'glyphicon glyphicon-remove red' %}
+ {% elseif run.getResult == constant('ConfRun::RESULT_UNDEF') %}
+ {% set resultIcon = 'glyphicon glyphicon-ban-circle gray' %}
+ {% else %}
+ {% set resultIcon = '' %}
+ {% endif %}
+ <td class="center">
+ <span class="spaceHorizontal {{ resultIcon }} clickOnTouch"
+ data-toggle="tooltip" data-placement="top" data-html="true"
+ title="<table>
+ <tr><th>Build key: </th><td>{{ buildKey }}</td></tr>
+ <tr><th>Configuration: </th><td>{{ run.getName }}</td></tr>
+ <tr><th>Timestamp: </th><td>{{ run.getTimestamp }}</td></tr>
+ <tr><th>Result: </th><td>{{ run.getResult }} {{ forcesuccess }}</td></tr>
+ <tr><th>Duration: </th><td>{{ run.getDuration }}</td></tr>
+ <tr><th>Forcesuccess: </th><td>{% if run.getForcesuccess %}yes{% else %}no{% endif %}</td></tr>
+ <tr><th>Insignificant: </th><td>{% if run.getInsignificant %}yes{% else %}no{% endif %}</td></tr>
+ </table>">
+ </span>
+ </td>
+ {% set buildKeyFound = 1 %}
+ {% else %}
+ {# Print empty cell #}
+ <td></td>
+ {% endif %}
+ {% set buildKeyIndexPrinted = key %}
+ {% endif %}
+ {% endfor %}
+ {% set confPrev = run.getName %}
+ {% endfor %}
+
+ {# Close last row (also fill empty cells at the end of the row) #}
+ {% for key, buildKey in buildKeys %}
+ {% if key > buildKeyIndexPrinted %}
+ <td></td>
+ {% endif %}
+ {% endfor %}
+ </tr>
+ </tbody>
+ </table>
+ </div> {# /table-responsive #}
+ </div> {# /panel-body #}
+ </div> {# /panel... #}
+ {% endif %} {# testsetBranch #}
+ {% endfor %}
+
+ {% else %} {# runsAvailable #}
+ <div class="alert alert-danger" role="alert">
+ No build data available for project {{ project.getName }}!
+ </div>
+ {% endif %}
+
+ </div> {# /col... #}
+ </div> {# /row #}
+
+</div> {# /container-fluid #}
+
+{% include "footer.html" %}
+
+{# Local scripts for this page #}
+<script src="scripts/tooltip.js"></script>
+
+{% include "close.html" %}
diff --git a/non-puppet/qtmetrics2/templates/home.html b/non-puppet/qtmetrics2/templates/home.html
index ed41f70..b9d3486 100644
--- a/non-puppet/qtmetrics2/templates/home.html
+++ b/non-puppet/qtmetrics2/templates/home.html
@@ -34,8 +34,8 @@
/**
* Home page
- * @version 0.2
- * @since 18-06-2015
+ * @version 0.4
+ * @since 30-06-2015
* @author Juha Sippola
*/
@@ -59,17 +59,23 @@
<div class="row">
- <div class="col-md-6">
+ <div class="col-md-1">
+ </div>
+
+ <div class="col-md-4">
+ <hr>
<h2>Overview</h2>
- <p>See the overview of the builds by projects across the latest branches:</p>
+ <p>See the latest build status across the branches:</p>
<div>
- {% for state in states %}
- <a class="btn btn-default btn-xs" disabled="disabled" href="{{ overviewRoute }}/{{ state.name }}" role="button">{{ state.name }}</a>
- {% endfor %}
+ <a class="btn btn-primary btn-xs" href="{{ overviewRoute }}" role="button">{{ masterProject }} {{ masterState }}</a>
</div>
</div>
- <div class="col-md-6">
+ <div class="col-md-1">
+ </div>
+
+ <div class="col-md-4">
+ <hr>
<h2>Platforms</h2>
<p>See target platform status:</p>
<div>
@@ -86,7 +92,9 @@
{% endfor %}
{% for name in os %}
<div class="btn-group">
- <button type="button" class="btn btn-default btn-xs dropdown-toggle" disabled="disabled" data-toggle="dropdown" aria-expanded="false">{{ name }}<span class="caret"></span></button>
+ <button type="button" class="btn btn-primary btn-xs dropdown-toggle" disabled="disabled"
+ data-toggle="dropdown" aria-expanded="false">{{ name }}<span class="caret"></span>
+ </button>
<ul class="dropdown-menu textSmall" role="menu">
{% for platform in platforms %}
{% if platform.os == name %}
@@ -100,62 +108,80 @@
{% endfor %}
</div>
</div>
+
</div>
<div class="row">
- <div class="col-md-6">
- <h2>Branches</h2>
- <p>See branch status:</p>
+ <div class="col-md-1">
+ </div>
+
+ <div class="col-md-4">
+ <hr>
+ <h2>Projects</h2>
+ <p>See testset status for a project:</p>
<div>
- {% for branch in branches %}
- <a class="btn btn-default btn-xs" disabled="disabled" href="{{ branchRoute }}/{{ branch.name }}" role="button">{{ branch.name }}</a>
- {% endfor %}
+ <form class="form-horizontal" role="form" method="post">
+ <div class="input-group input-group-sm">
+ <input id="projectInput" name="projectInputValue" type="text" class="form-control" placeholder="project name...">
+ <span class="input-group-btn">
+ <input id="projectInputSubmit" name="projectInputSubmit" type="submit" class="btn btn-primary" value="Show">
+ </span>
+ </div>
+ </form>
</div>
</div>
+ <div class="col-md-1">
+ </div>
+
<div class="col-md-4">
+ <hr>
<h2>Tests</h2>
- <p>See top failure lists or single testset results:</p>
- <div>
- <a class="btn btn-default btn-xs" href="{{ testRoute }}/top" role="button">top failures</a>
- <a class="btn btn-default btn-xs" href="{{ testRoute }}/flaky" role="button">flaky testsets</a>
- </div>
+ <p>See results for a testset:</p>
<div>
<form class="form-horizontal" role="form" method="post">
<div class="input-group input-group-sm">
<input id="testsetInput" name="testsetInputValue" type="text" class="form-control" placeholder="testset name...">
<span class="input-group-btn">
- <input id="testsetInputSubmit" name="testsetInputSubmit" type="submit" class="btn btn-default" value="Show">
+ <input id="testsetInputSubmit" name="testsetInputSubmit" type="submit" class="btn btn-primary" value="Show">
</span>
- </div> {# /input-group #}
+ </div>
</form>
</div>
+ <br>
+ <p>See testset lists:</p>
+ <div>
+ <a class="btn btn-primary btn-xs" href="{{ testRoute }}/top" role="button">top failures</a>
+ <a class="btn btn-primary btn-xs" href="{{ testRoute }}/flaky" role="button">flaky testsets</a>
+ </div>
</div>
+
</div>
<div class="row">
- <div class="col-md-6">
- <h2>Projects</h2>
- <p>See project status:</p>
+ <div class="col-md-1">
+ </div>
+
+ <div class="col-md-4">
+ <hr>
+ <h2>Branches</h2>
+ <p>See branch status:</p>
<div>
- {% for project in projects %}
- {# Show button color based on project status (according to the latest build results) #}
- {% if project.getStatus == constant('ProjectRun::RESULT_SUCCESS') %}
- {% set buttonStatus = 'btn-success' %}
- {% elseif project.getStatus == constant('ProjectRun::RESULT_FAILURE') %}
- {% set buttonStatus = 'btn-danger' %}
- {% else %}
- {% set buttonStatus = 'btn-default' %}
- {% endif %}
- {# Show only valid projects #}
- {% if project.getStatus != constant('ProjectRun::RESULT_EMPTY') %}
- <a class="btn {{ buttonStatus }} btn-xs" disabled="disabled" href="{{ overviewRoute }}/state/{{ project.getName }}" role="button">{{ project.getName }}</a>
- {% endif %}
+ {% for branch in branches %}
+ <a class="btn btn-primary btn-xs" disabled="disabled" href="{{ branchRoute }}/{{ branch.name }}" role="button">{{ branch.name }}</a>
{% endfor %}
</div>
</div>
+
+ <div class="col-md-1">
+ </div>
+
+ <div class="col-md-4">
+ <hr>
+ </div>
+
</div>
<br>
@@ -166,6 +192,7 @@
{% include "footer.html" %}
{# Local scripts for this page #}
+<script src="scripts/project_autocomplete.js"></script>
<script src="scripts/testset_autocomplete.js"></script>
{% include "close.html" %}
diff --git a/non-puppet/qtmetrics2/templates/overview.html b/non-puppet/qtmetrics2/templates/overview.html
new file mode 100644
index 0000000..8ccb955
--- /dev/null
+++ b/non-puppet/qtmetrics2/templates/overview.html
@@ -0,0 +1,237 @@
+{#
+#############################################################################
+##
+## Copyright (C) 2015 The Qt Company Ltd.
+## Contact: http://www.qt.io/licensing/
+##
+## This file is part of the Quality Assurance module of the Qt Toolkit.
+##
+## $QT_BEGIN_LICENSE:LGPL21$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see http://www.qt.io/terms-conditions. For further
+## information use the contact form at http://www.qt.io/contact-us.
+##
+## GNU Lesser General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU Lesser
+## General Public License version 2.1 or version 3 as published by the Free
+## Software Foundation and appearing in the file LICENSE.LGPLv21 and
+## LICENSE.LGPLv3 included in the packaging of this file. Please review the
+## following information to ensure the GNU Lesser General Public License
+## requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+## http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+##
+## As a special exception, The Qt Company gives you certain additional
+## rights. These rights are described in The Qt Company LGPL Exception
+## version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+/**
+ * Overview page
+ * @version 0.1
+ * @since 30-06-2015
+ * @author Juha Sippola
+ */
+
+#}
+
+{% include "header.html" %}
+
+{# Failed/passed bar area size in px #}
+{% set BAR_AREA = 60 %}
+
+<ol class="breadcrumb">
+ {% for link in breadcrumb %}
+ <li><a href="{{ link.link }}">{{ link.name }}</a></li>
+ {% endfor %}
+ <li class="active">overview</li>
+</ol>
+
+<div class="container-fluid">
+ <div class="row">
+
+ <div class="col-sm-12 col-md-12 main">
+
+ {##### Title #####}
+
+ <h1 class="page-header">
+ Overview: {{ masterProject }} {{ masterState }}
+ <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>
+ </button>
+ <small>{{ refreshed }}</small>
+ </h1>
+
+ {##### Info well #####}
+
+ <div class="collapse" id="info">
+ <div class="well infoWell">
+ <span class="glyphicon glyphicon-info-sign"></span> <strong>Overview</strong><br>
+ <ul>
+ <li><strong>Latest {{ masterProject }} {{ masterState }} Build Status</strong> shows
+ the overall result of the latest <strong>{{ masterProject }} {{ masterState }}</strong>
+ builds themselves by branch; details on the runs are available as tooltip on result icon.</li>
+ <li><strong>Latest Testing Status</strong> shows the status based on testset results
+ in the latest <strong>{{ masterProject }} {{ masterState }}</strong> builds in any
+ configuration by testset project across all branches.</li>
+ </ul>
+ </div>
+ </div>
+
+ {##### Latest Build Status #####}
+
+ <div class="panel panel-primary">
+ <div class="panel-heading">
+ <h4 class="panel-title bold">Latest {{ masterProject }} {{ masterState }} Build Status</h4>
+ </div>
+ <div class="panel-body">
+ <div class="table-responsive">
+ <table class="table table-striped">
+ <thead>
+ <tr>
+ <th class="rightBorder">project</th>
+ {% for branch in latestProjectRuns %}
+ <th class="center">{{ branch.name }}</th>
+ {% endfor %}
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ {# Project name #}
+ <td class="rightBorder"><a href="{{ buildProjectRoute }}/{{ masterProject }}">{{ masterProject }}</a></td>
+
+ {# Result (by branch) #}
+ {% for run in latestProjectRuns %}
+ {% if run.result == constant('projectRun::RESULT_SUCCESS') %}
+ {% set resultIcon = 'glyphicon glyphicon-ok green' %}
+ {% elseif run.result == constant('projectRun::RESULT_FAILURE') %}
+ {% set resultIcon = 'glyphicon glyphicon-remove red' %}
+ {% else %}
+ {% set resultIcon = 'glyphicon glyphicon-ban-circle gray' %}
+ {% endif %}
+ <td class="center">
+ <span class="spaceHorizontal {{ resultIcon }} clickOnTouch"
+ data-toggle="tooltip" data-placement="top" data-html="true"
+ title="<table>
+ <tr><th>Branch: </td><td>{{ run.name }}</td></tr>
+ <tr><th>Build key: </td><td>{{ run.buildKey }}</td></tr>
+ <tr><th>Timestamp: </td><td>{{ run.timestamp }}</td></tr>
+ <tr><th>Result: </td><td>{{ run.result }}</td></tr>
+ <tr><th>Duration: </td><td>{{ run.duration}}</td></tr>
+ </table>">
+ </span>
+ </td>
+ {% endfor %}
+ </tr>
+
+ </tbody>
+ </table>
+ </div> {# /table-responsive #}
+ </div> {# /panel-body #}
+ </div> {# /panel... #}
+
+ {##### Latest Testing Status #####}
+
+ <div class="panel panel-primary">
+ <div class="panel-heading">
+ <h4 class="panel-title bold">Latest Testing Status</h4>
+ </div>
+
+ {# Get branches and projects #}
+ {% set branches = [] %}
+ {% set projects = [] %}
+ {% for run in latestTestsetRuns %}
+ {% if run.branch not in branches %}
+ {% set branches = branches|merge([run.branch]) %}
+ {% endif %}
+ {% if run.project not in projects %}
+ {% set projects = projects|merge([run.project]) %}
+ {% endif %}
+ {% endfor %}
+
+ <div class="panel-body">
+ <div class="table-responsive">
+ <table class="table table-striped">
+ <thead>
+ <tr>
+ <th class="rightBorder">testset project</th>
+ {% for branch in branches %}
+ <th class="center">{{ branch }}<br>
+ <small>failed <span class ="gray">(total)</span></small>
+ </th>
+ <th class="showInLargeDisplay"></th>
+ {% endfor %}
+ </tr>
+ </thead>
+ <tbody>
+ {# Calculate max failed result count for the bar #}
+ {% set maxCount = 1 %}
+ {% for run in latestTestsetRuns %}
+ {% if run.failed > maxCount %}
+ {% set maxCount = run.failed %}
+ {% endif %}
+ {% endfor %}
+
+ {% for project in projects %}
+ <tr>
+ {# Project name #}
+ <td class="rightBorder"><a href="{{ testsetProjectRoute }}/{{ project }}">{{ project }}</a></td>
+
+ {# Result (by branch) #}
+ {% for branch in branches %}
+ {% for run in latestTestsetRuns if project == run.project and branch == run.branch %}
+
+ {# Show results #}
+ {% set failed = run.failed %}
+ {% set passed = run.passed %}
+ {% set total = passed + failed %}
+ <td class="center">{{ failed }}<span class ="gray"> ({{ total }})</span></td>
+
+ {# Show results as bars (scaled to BAR_AREA px) #}
+ {% set failedBar = ((BAR_AREA/maxCount) * failed)|round(0, 'floor') %}
+ {% if (failed > 0) and (failedBar == 0) %}
+ {% set failedBar = 1 %}
+ {% endif %}
+ {% if failed == 0 %}
+ {% set failed = '' %}
+ {% endif %}
+ {% if (passed > 0) and (failed == 0) %}
+ {% set passedBar = maxCount %}
+ {% else %}
+ {% set passed = '' %}
+ {% endif %}
+ <td class="center showInLargeDisplay">
+ <div>
+ <div class="floatLeft redBackground" style="width: {{ failedBar }}px"><small>{{ failed }}</small></div>
+ <div class="floatLeft greenBackground" style="width: {{ passedBar }}px"><small>{{ passed }}</small></div>
+ </div>
+ </td>
+ {% else %}
+ <td></td>
+ {% endfor %}
+ {% endfor %}
+ </tr>
+ {% endfor %}
+ </tbody>
+ </table>
+ </div> {# /table-responsive #}
+ </div> {# /panel-body #}
+ </div> {# /panel... #}
+
+ </div> {# /col... #}
+ </div> {# /row #}
+
+</div> {# /container-fluid #}
+
+{% include "footer.html" %}
+
+{# Local scripts for this page #}
+<script src="scripts/tooltip.js"></script>
+
+{% include "close.html" %}
diff --git a/non-puppet/qtmetrics2/templates/testset.html b/non-puppet/qtmetrics2/templates/testset.html
index 59f98e4..9df501c 100644
--- a/non-puppet/qtmetrics2/templates/testset.html
+++ b/non-puppet/qtmetrics2/templates/testset.html
@@ -34,8 +34,8 @@
/**
* Testset page
- * @version 0.4
- * @since 26-06-2015
+ * @version 0.5
+ * @since 30-06-2015
* @author Juha Sippola
*/
@@ -70,6 +70,12 @@
<div class="col-sm-12 col-md-12 main">
+ {# Check if any runs available #}
+ {% set runsAvailable = 0 %}
+ {% for run in testsetRuns %}
+ {% set runsAvailable = 1 %}
+ {% endfor %}
+
{##### Title #####}
<h1 class="page-header">
@@ -97,256 +103,264 @@
(during the last {{ lastDaysFlaky }} days, since {{ sinceDateFlaky }}).</li>
<li><strong>Results in Branches</strong> shows the {{ testset.getName }} run results by branch
and their configuration on <strong>{{ masterProject }} {{ masterState }}</strong> builds
- (<span class="glyphicon glyphicon-ok green"></span> = passed,
- <span class="glyphicon glyphicon-ok-sign green"></span> = passed as flaky,
- <span class="glyphicon glyphicon-remove red"></span> = failed); details on the runs are
- available as tooltip on result icon.</li>
+ (<span class="glyphicon glyphicon-ok green"></span> = {{ constant('TestsetRun::RESULT_SUCCESS') }},
+ <span class="glyphicon glyphicon-ok-sign green"></span> = {{ constant('TestsetRun::RESULT_SUCCESS') }} as flaky,
+ <span class="glyphicon glyphicon-remove red"></span> = {{ constant('TestsetRun::RESULT_FAILURE') }});
+ details on the runs are available as tooltip on result icon.</li>
</ul>
</div>
</div>
- {##### Summary #####}
-
- <div class="panel panel-primary">
- <div class="panel-heading">
- <h4 class="panel-title bold">Summary</h4>
- </div>
- <div class="panel-body">
- <div class="table-responsive">
- <table class="table table-striped">
- <thead>
- <tr>
- <th>project</th>
- <th>latest result</th>
- <th class="leftBorder center"><span class="spaceHorizontal glyphicon glyphicon-remove red"></span>failed <span class ="gray">(total)</span></th>
- <th class="showInLargeDisplay"></th>
- <th class="leftBorder center"><span class="spaceHorizontal glyphicon glyphicon-ok-sign green"></span>flaky <span class ="gray">(total)</span></th>
- <th class="showInLargeDisplay"></th>
- </tr>
- </thead>
- <tbody>
- {# Calculate max result count for the bar #}
- {% set maxCount = 1 %}
- {% if (testset.getTestsetResultCounts.passed + testset.getTestsetResultCounts.failed) > maxCount %}
- {% set maxCount = testset.getTestsetResultCounts.passed + testset.getTestsetResultCounts.failed %}
- {% endif %}
- {% if testset.getTestsetFlakyCounts.flaky > maxCount %}
- {% set maxCount = testset.getTestsetFlakyCounts.flaky %}
- {% endif %}
-
- {# Print summary #}
- <tr>
- {# Project name #}
- <td>{{ testset.getProjectName }}</td>
-
- {# Testset status according to the latest build results #}
- {% if testset.getStatus == constant('testsetRun::RESULT_SUCCESS') %}
- {% set resultIcon = 'glyphicon glyphicon-ok green' %}
- {% elseif testset.getStatus == constant('testsetRun::RESULT_FAILURE') %}
- {% set resultIcon = 'glyphicon glyphicon-remove red' %}
- {% else %}
- {% set resultIcon = '' %}
- {% endif %}
- <td><span class="spaceHorizontal {{ resultIcon }}"></span>{{ testset.getStatus }}</td>
-
- {# Show failed #}
- {% set failed = testset.getTestsetResultCounts.failed %}
- {% set passed = testset.getTestsetResultCounts.passed %}
- {% set total = passed + failed %}
- <td class="leftBorder center">{{ failed }}<span class ="gray"> ({{ total }})</span></td>
- {# Show results as bars (scaled to BAR_AREA px) #}
- {% set passedBar = ((BAR_AREA/maxCount) * passed)|round(0, 'floor') %}
- {% if (passed > 0) and (passedBar == 0) %}
- {% set passedBar = 1 %}
- {% endif %}
- {% set failedBar = ((BAR_AREA/maxCount)*failed)|round(0, 'floor') %}
- {% if (failed > 0) and (failedBar == 0) %}
- {% set failedBar = 1 %}
+ {% if runsAvailable %}
+
+ {##### Latest Status #####}
+
+ <div class="panel panel-primary">
+ <div class="panel-heading">
+ <h4 class="panel-title bold">Latest Status</h4>
+ </div>
+ <div class="panel-body">
+ <div class="table-responsive">
+ <table class="table table-striped">
+ <thead>
+ <tr>
+ <th>project</th>
+ <th>latest result</th>
+ <th class="leftBorder center"><span class="spaceHorizontal glyphicon glyphicon-remove red"></span>failed <span class ="gray">(total)</span></th>
+ <th class="showInLargeDisplay"></th>
+ <th class="leftBorder center"><span class="spaceHorizontal glyphicon glyphicon-ok-sign green"></span>flaky <span class ="gray">(total)</span></th>
+ <th class="showInLargeDisplay"></th>
+ </tr>
+ </thead>
+ <tbody>
+ {# Calculate max result count for the bar #}
+ {% set maxCount = 1 %}
+ {% if (testset.getTestsetResultCounts.passed + testset.getTestsetResultCounts.failed) > maxCount %}
+ {% set maxCount = testset.getTestsetResultCounts.passed + testset.getTestsetResultCounts.failed %}
{% endif %}
- <td class="center showInLargeDisplay">
- <div>
- <div class="floatLeft redBackground" style="width: {{ failedBar }}px">{{ failed }}</div>
- <div class="floatLeft greenBackground" style="width: {{ passedBar }}px">{{ passed }}</div>
- </div>
- </td>
-
- {# Show flaky #}
- {% set flaky = testset.getTestsetFlakyCounts.flaky %}
- <td class="leftBorder center">{{ flaky }}<span class ="gray"> ({{ total }})</span></td>
- {# Show results as bars (scaled to BAR_AREA px) #}
- {% set flakyBar = ((BAR_AREA/maxCount)*flaky)|round(0, 'floor') %}
- {% if (flaky > 0) and (flakyBar == 0) %}
- {% set flakyBar = 1 %}
+ {% if testset.getTestsetFlakyCounts.flaky > maxCount %}
+ {% set maxCount = testset.getTestsetFlakyCounts.flaky %}
{% endif %}
- <td class="center showInLargeDisplay">
- {% if flaky > 0 %}
- <div>
- <div class="floatLeft redBackground" style="width: {{ flakyBar }}px">{{ flaky }}</div>
- </div>
+
+ {# Print summary #}
+ <tr>
+ {# Project name #}
+ <td>{{ testset.getProjectName }}</td>
+
+ {# Testset status according to the latest build results #}
+ {% if testset.getStatus == constant('TestsetRun::RESULT_SUCCESS') %}
+ {% set resultIcon = 'glyphicon glyphicon-ok green' %}
+ {% elseif testset.getStatus == constant('TestsetRun::RESULT_FAILURE') %}
+ {% set resultIcon = 'glyphicon glyphicon-remove red' %}
+ {% else %}
+ {% set resultIcon = '' %}
+ {% endif %}
+ <td><span class="spaceHorizontal {{ resultIcon }}"></span>{{ testset.getStatus }}</td>
+
+ {# Show failed #}
+ {% set failed = testset.getTestsetResultCounts.failed %}
+ {% set passed = testset.getTestsetResultCounts.passed %}
+ {% set total = passed + failed %}
+ <td class="leftBorder center">{{ failed }}<span class ="gray"> ({{ total }})</span></td>
+ {# Show results as bars (scaled to BAR_AREA px) #}
+ {% set passedBar = ((BAR_AREA/maxCount) * passed)|round(0, 'floor') %}
+ {% if (passed > 0) and (passedBar == 0) %}
+ {% set passedBar = 1 %}
+ {% endif %}
+ {% set failedBar = ((BAR_AREA/maxCount)*failed)|round(0, 'floor') %}
+ {% if (failed > 0) and (failedBar == 0) %}
+ {% set failedBar = 1 %}
{% endif %}
- </td>
- </tr>
+ <td class="center showInLargeDisplay">
+ <div>
+ <div class="floatLeft redBackground" style="width: {{ failedBar }}px"><small>{{ failed }}</small></div>
+ <div class="floatLeft greenBackground" style="width: {{ passedBar }}px"><small>{{ passed }}</small></div>
+ </div>
+ </td>
+
+ {# Show flaky #}
+ {% set flaky = testset.getTestsetFlakyCounts.flaky %}
+ <td class="leftBorder center">{{ flaky }}<span class ="gray"> ({{ total }})</span></td>
+ {# Show results as bars (scaled to BAR_AREA px) #}
+ {% set flakyBar = ((BAR_AREA/maxCount)*flaky)|round(0, 'floor') %}
+ {% if (flaky > 0) and (flakyBar == 0) %}
+ {% set flakyBar = 1 %}
+ {% endif %}
+ <td class="center showInLargeDisplay">
+ {% if flaky > 0 %}
+ <div>
+ <div class="floatLeft redBackground" style="width: {{ flakyBar }}px"><small>{{ flaky }}</small></div>
+ </div>
+ {% endif %}
+ </td>
+ </tr>
- </tbody>
- </table>
- </div> {# /table-responsive #}
- </div> {# /panel-body #}
- </div> {# /panel... #}
+ </tbody>
+ </table>
+ </div> {# /table-responsive #}
+ </div> {# /panel-body #}
+ </div> {# /panel... #}
- {##### Results in Branches #####}
+ {##### Results in Branches #####}
- <div class="panel panel-primary">
- <div class="panel-heading">
- <h4 class="panel-title bold">Results in Branches</h4>
+ <div class="panel panel-primary">
+ <div class="panel-heading">
+ <h4 class="panel-title bold">Results in Branches</h4>
+ </div>
</div>
- </div>
-
- {# Get branches #}
- {% set branches = [] %}
- {% for run in projectBuilds %}
- {% if run.branch not in branches %}
- {% set branches = branches|merge([run.branch]) %}
- {% endif %}
- {% endfor %}
- {# Loop all the branches #}
- {% for branch in branches %}
-
- {# Get all build keys #}
- {% set buildKey = '' %}
- {% set buildKeys = [] %}
- {% set dates = [] %}
+ {# Get branches #}
+ {% set branches = [] %}
{% for run in projectBuilds %}
- {% if run.branch == branch %}
- {% if buildKey != run.buildKey %}
- {% set buildKey = run.buildKey %}
- {% set buildKeys = buildKeys|merge([run.buildKey]) %}
- {% set dates = dates|merge([run.timestamp]) %}
- {% endif %}
+ {% if run.branch not in branches %}
+ {% set branches = branches|merge([run.branch]) %}
{% endif %}
{% endfor %}
- {# Check if testset run for this branch #}
- {% set testsetBranch = 0 %}
- {% for run in testsetRuns if run.getBranchName == branch %}
- {% set testsetBranch = 1 %}
- {% endfor %}
-
- {# Show branch if testset run for it #}
- {% if testsetBranch %}
- <div class="panel panel-info">
- <div class="panel-heading">
- <h4 class="panel-title bold">{{ branch }}</h4>
- </div>
- <div class="panel-body">
- <div class="table-responsive">
- <table class="table table-striped">
- <thead>
- <tr>
- <th class="bold rightBorder">{{ testset.getName }}</th>
- {% for key, buildKey in buildKeys %}
- <th class="center">
- {% if buildKey|length > 6 %}
- <span class="clickOnTouch" data-toggle="tooltip" data-placement="top"
- title="{{ buildKey }}">{{ buildKey|slice(0, 4) }}...
- </span>
- {% else %}
- {{ buildKey }}
- {% endif %}
- <br>
- <span class="gray"><small>{{ dates[key]|date("m-d") }}</small></span>
- </th>
- {% endfor %}
- </tr>
- </thead>
- <tbody>
- {% set confPrev = '' %}
- {% set buildKeyIndexPrinted = -1 %}
- {% set buildKeyFound = 0 %}
- {% for run in testsetRuns if run.getBranchName == branch %}
-
- {# New row for each conf #}
- {% if confPrev != run.getConfName %}
- {# Close previous row #}
- {% if confPrev != '' %}
- {# Fill empty cells at the end of the row #}
- {% for key, buildKey in buildKeys %}
- {% if key > buildKeyIndexPrinted %}
- <td></td>
+ {# Loop all the branches #}
+ {% for branch in branches %}
+
+ {# Get all build keys #}
+ {% set buildKey = '' %}
+ {% set buildKeys = [] %}
+ {% set dates = [] %}
+ {% for run in projectBuilds %}
+ {% if run.branch == branch %}
+ {% if buildKey != run.buildKey %}
+ {% set buildKey = run.buildKey %}
+ {% set buildKeys = buildKeys|merge([run.buildKey]) %}
+ {% set dates = dates|merge([run.timestamp]) %}
+ {% endif %}
+ {% endif %}
+ {% endfor %}
+
+ {# Check if testset run for this branch #}
+ {% set testsetBranch = 0 %}
+ {% for run in testsetRuns if run.getBranchName == branch %}
+ {% set testsetBranch = 1 %}
+ {% endfor %}
+
+ {# Show branch if testset run for it #}
+ {% if testsetBranch %}
+ <div class="panel panel-info">
+ <div class="panel-heading">
+ <h4 class="panel-title bold">{{ branch }}</h4>
+ </div>
+ <div class="panel-body">
+ <div class="table-responsive">
+ <table class="table table-striped">
+ <thead>
+ <tr>
+ <th class="bold rightBorder">{{ testset.getName }}</th>
+ {% for key, buildKey in buildKeys %}
+ <th class="center">
+ {% if buildKey|length > 6 %}
+ <span class="clickOnTouch" data-toggle="tooltip" data-placement="top"
+ title="{{ buildKey }}">{{ buildKey|slice(0, 4) }}...
+ </span>
+ {% else %}
+ {{ buildKey }}
{% endif %}
- {% endfor %}
- </tr>
+ <br>
+ <span class="gray"><small>{{ dates[key]|date("m-d") }}</small></span>
+ </th>
+ {% endfor %}
+ </tr>
+ </thead>
+ <tbody>
+ {% set confPrev = '' %}
+ {% set buildKeyIndexPrinted = -1 %}
+ {% set buildKeyFound = 0 %}
+ {% for run in testsetRuns if run.getBranchName == branch %}
+
+ {# New row for each conf #}
+ {% if confPrev != run.getConfName %}
+ {# Close previous row #}
+ {% if confPrev != '' %}
+ {# Fill empty cells at the end of the row #}
+ {% for key, buildKey in buildKeys %}
+ {% if key > buildKeyIndexPrinted %}
+ <td></td>
+ {% endif %}
+ {% endfor %}
+ </tr>
+ {% endif %}
+ <tr>
+ <td class="rightBorder"><small>{{ run.getConfName }}</small></td>
+ {% set buildKeyIndexPrinted = -1 %}
{% endif %}
- <tr>
- <td class="rightBorder"><small>{{ run.getConfName }}</small></td>
- {% set buildKeyIndexPrinted = -1 %}
- {% endif %}
- {# Result per build key #}
- {% set buildKeyFound = 0 %}
- {% for key, buildKey in buildKeys %}
- {# Print each column only once (checked based on column index key and buildKeyFound flag) #}
- {% if key > buildKeyIndexPrinted and not buildKeyFound %}
- {% if buildKey == run.getBuildKey %}
- {# Print result #}
- {% set flaky = '' %}
- {% if run.getResult == constant('testsetRun::RESULT_SUCCESS') %}
- {% if run.getRun == 1 %}
- {% set resultIcon = 'glyphicon glyphicon-ok green' %}
+ {# Result per build key #}
+ {% set buildKeyFound = 0 %}
+ {% for key, buildKey in buildKeys %}
+ {# Print each column only once (checked based on column index key and buildKeyFound flag) #}
+ {% if key > buildKeyIndexPrinted and not buildKeyFound %}
+ {% if buildKey == run.getBuildKey %}
+ {# Print result #}
+ {% set flaky = '' %}
+ {% if run.getResult == constant('TestsetRun::RESULT_SUCCESS') %}
+ {% if run.getRun == 1 %}
+ {% set resultIcon = 'glyphicon glyphicon-ok green' %}
+ {% else %}
+ {# Flaky #}
+ {% set resultIcon = 'glyphicon glyphicon-ok-sign green' %}
+ {% set flaky = ' (on run ' ~ run.getRun ~ ' as flaky)' %}
+ {% endif %}
+ {% elseif run.getResult == constant('TestsetRun::RESULT_FAILURE') %}
+ {% set resultIcon = 'glyphicon glyphicon-remove red' %}
{% else %}
- {# Flaky #}
- {% set resultIcon = 'glyphicon glyphicon-ok-sign green' %}
- {% set flaky = ' (on run ' ~ run.getRun ~ ' as flaky)' %}
+ {% set resultIcon = '' %}
{% endif %}
- {% elseif run.getResult == constant('testsetRun::RESULT_FAILURE') %}
- {% set resultIcon = 'glyphicon glyphicon-remove red' %}
- {% else %}
- {% set resultIcon = '' %}
- {% endif %}
- {% if (run.getDuration / 10) > 60 %}
- {% set durationFormatted = ' (00:' ~ (run.getDuration/10)|date("i:s") ~ ')' %}
+ {% if (run.getDuration / 10) > 60 %}
+ {% set durationFormatted = ' (00:' ~ (run.getDuration/10)|date("i:s") ~ ')' %}
+ {% else %}
+ {% set durationFormatted = '' %}
+ {% endif %}
+ <td class="center">
+ <span class="spaceHorizontal {{ resultIcon }} clickOnTouch"
+ data-toggle="tooltip" data-placement="top" data-html="true"
+ title="<table>
+ <tr><th>Build key: </th><td>{{ buildKey }}</td></tr>
+ <tr><th>Configuration: </th><td>{{ run.getConfName }}</td></tr>
+ <tr><th>Timestamp: </th><td>{{ run.getTimestamp }}</td></tr>
+ <tr><th>Result: </th><td>{{ run.getResult }} {{ flaky }}</td></tr>
+ <tr><th>Duration: </th><td>{{ run.getDuration / 10 }} s {{ durationFormatted }}</td></tr>
+ <tr><th>Run #: </th><td>{{ run.getRun }}</td></tr>
+ <tr><th>Insignificant: </th><td>{% if run.getInsignificant %}yes{% else %}no{% endif %}</td></tr>
+ </table>">
+ </span>
+ </td>
+ {% set buildKeyFound = 1 %}
{% else %}
- {% set durationFormatted = '' %}
+ {# Print empty cell #}
+ <td></td>
{% endif %}
- <td class="center">
- <span class="spaceHorizontal {{ resultIcon }} clickOnTouch"
- data-toggle="tooltip" data-placement="top" data-html="true"
- title="<table>
- <tr><th>Build key: </th><td>{{ buildKey }}</td></tr>
- <tr><th>Configuration: </th><td>{{ run.getConfName }}</td></tr>
- <tr><th>Timestamp: </th><td>{{ run.getTimestamp }}</td></tr>
- <tr><th>Result: </th><td>{{ run.getResult }} {{ flaky }}</td></tr>
- <tr><th>Duration: </th><td>{{ run.getDuration / 10 }} s {{ durationFormatted }}</td></tr>
- <tr><th>Run #: </th><td>{{ run.getRun }}</td></tr>
- <tr><th>Insignificant: </th><td>{% if run.getInsignificant %}yes{% else %}no{% endif %}</td></tr>
- </table>">
- </span>
- </td>
- {% set buildKeyFound = 1 %}
- {% else %}
- {# Print empty cell #}
- <td></td>
+ {% set buildKeyIndexPrinted = key %}
{% endif %}
- {% set buildKeyIndexPrinted = key %}
+ {% endfor %}
+ {% set confPrev = run.getConfName %}
+ {% endfor %}
+
+ {# Close last row (also fill empty cells at the end of the row) #}
+ {% for key, buildKey in buildKeys %}
+ {% if key > buildKeyIndexPrinted %}
+ <td></td>
{% endif %}
{% endfor %}
- {% set confPrev = run.getConfName %}
- {% endfor %}
+ </tr>
+ </tbody>
+ </table>
+ </div> {# /table-responsive #}
+ </div> {# /panel-body #}
+ </div> {# /panel... #}
+ {% endif %} {# testsetBranch #}
+ {% endfor %}
- {# Close last row (also fill empty cells at the end of the row) #}
- {% for key, buildKey in buildKeys %}
- {% if key > buildKeyIndexPrinted %}
- <td></td>
- {% endif %}
- {% endfor %}
- </tr>
- </tbody>
- </table>
- </div> {# /table-responsive #}
- </div> {# /panel-body #}
- </div> {# /panel... #}
- {% endif %} {# testsetBranch #}
- {% endfor %}
+ {% else %} {# runsAvailable #}
+ <div class="alert alert-danger" role="alert">
+ No test result data available for testset {{ testset.getName }} in project {{ testset.getProjectName }}!
+ </div>
+ {% endif %}
</div> {# /col... #}
</div> {# /row #}
diff --git a/non-puppet/qtmetrics2/templates/testset_project.html b/non-puppet/qtmetrics2/templates/testset_project.html
new file mode 100644
index 0000000..a4cf0fb
--- /dev/null
+++ b/non-puppet/qtmetrics2/templates/testset_project.html
@@ -0,0 +1,346 @@
+{#
+#############################################################################
+##
+## Copyright (C) 2015 The Qt Company Ltd.
+## Contact: http://www.qt.io/licensing/
+##
+## This file is part of the Quality Assurance module of the Qt Toolkit.
+##
+## $QT_BEGIN_LICENSE:LGPL21$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see http://www.qt.io/terms-conditions. For further
+## information use the contact form at http://www.qt.io/contact-us.
+##
+## GNU Lesser General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU Lesser
+## General Public License version 2.1 or version 3 as published by the Free
+## Software Foundation and appearing in the file LICENSE.LGPLv21 and
+## LICENSE.LGPLv3 included in the packaging of this file. Please review the
+## following information to ensure the GNU Lesser General Public License
+## requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+## http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+##
+## As a special exception, The Qt Company gives you certain additional
+## rights. These rights are described in The Qt Company LGPL Exception
+## version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+/**
+ * Testset project page
+ * @version 0.1
+ * @since 30-06-2015
+ * @author Juha Sippola
+ */
+
+#}
+
+{% include "header.html" %}
+
+{# Failed/passed bar area size in px #}
+{% set BAR_AREA = 60 %}
+
+<ol class="breadcrumb">
+ {% for link in breadcrumb %}
+ <li><a href="{{ link.link }}">{{ link.name }}</a></li>
+ {% endfor %}
+ <li class="active">{{ project }}</li>
+</ol>
+
+<div class="container-fluid">
+ <div class="row">
+
+ <div class="col-sm-12 col-md-12 main">
+
+ {# Check if any runs available #}
+ {% set runsAvailable = 0 %}
+ {% for run in confBuilds %}
+ {% set runsAvailable = 1 %}
+ {% endfor %}
+
+ {##### Title #####}
+
+ <h1 class="page-header">
+ {{ project }}
+ <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>
+ </button>
+ <small>{{ refreshed }}</small>
+ </h1>
+
+ {##### Info well #####}
+
+ <div class="collapse" id="info">
+ <div class="well infoWell">
+ <span class="glyphicon glyphicon-info-sign"></span> <strong>Testset project</strong><br>
+ <ul>
+ <li><strong>Latest Status</strong> shows the status based on the results of {{ project }}
+ testsets in the latest <strong>{{ masterProject }} {{ masterState }}</strong> builds
+ in any configuration across all branches.</li>
+ <li><strong>Results in Branches</strong> shows the results of {{ project }} testsets by branch
+ and their configuration in <strong>{{ masterProject }} {{ masterState }}</strong> builds
+ ( <button type="button" class="btn btn-xs btn-success"><span class="badge">n</span></button> = all n testsets passed,
+ <button type="button" class="btn btn-xs btn-danger"><span class="badge">n</span></button> = n testsets failed);
+ details are available as tooltip on result icon.</li>
+ </ul>
+ </div>
+ </div>
+
+ {% if runsAvailable %}
+
+ {##### Latest Status #####}
+
+ <div class="panel panel-primary">
+ <div class="panel-heading">
+ <h4 class="panel-title bold">Latest Status</h4>
+ </div>
+
+ {# Get branches #}
+ {% set branches = [] %}
+ {% for run in latestTestsetRuns %}
+ {% if run.branch not in branches %}
+ {% set branches = branches|merge([run.branch]) %}
+ {% endif %}
+ {% endfor %}
+
+ <div class="panel-body">
+ <div class="table-responsive">
+ <table class="table table-striped">
+ <thead>
+ <tr>
+ <th class="rightBorder">testset project</th>
+ {% for branch in branches %}
+ <th class="center">{{ branch }}<br>
+ <small>failed <span class ="gray">(total)</span></small>
+ </th>
+ <th class="showInLargeDisplay"></th>
+ {% endfor %}
+ </tr>
+ </thead>
+ <tbody>
+ {# Calculate max failed result count for the bar #}
+ {% set maxCount = 1 %}
+ {% for run in latestTestsetRuns %}
+ {% if run.failed > maxCount %}
+ {% set maxCount = run.failed %}
+ {% endif %}
+ {% endfor %}
+
+ <tr>
+ {# Project name #}
+ <td class="rightBorder">{{ project }}</td>
+
+ {# Result (by branch) #}
+ {% for branch in branches %}
+ {% for run in latestTestsetRuns if project == run.project and branch == run.branch %}
+
+ {# Show results #}
+ {% set failed = run.failed %}
+ {% set passed = run.passed %}
+ {% set total = passed + failed %}
+ <td class="center">{{ failed }}<span class ="gray"> ({{ total }})</span></td>
+
+ {# Show results as bars (scaled to BAR_AREA px) #}
+ {% set failedBar = ((BAR_AREA/maxCount) * failed)|round(0, 'floor') %}
+ {% if (failed > 0) and (failedBar == 0) %}
+ {% set failedBar = 1 %}
+ {% endif %}
+ {% if failed == 0 %}
+ {% set failed = '' %}
+ {% endif %}
+ {% if (passed > 0) and (failed == 0) %}
+ {% set passedBar = BAR_AREA %}
+ {% else %}
+ {% set passed = '' %}
+ {% endif %}
+ <td class="center showInLargeDisplay">
+ <div>
+ <div class="floatLeft redBackground" style="width: {{ failedBar }}px">{{ failed }}</div>
+ <div class="floatLeft greenBackground" style="width: {{ passedBar }}px">{{ passed }}</div>
+ </div>
+ </td>
+ {% else %}
+ <td></td>
+ {% endfor %}
+ {% endfor %}
+ </tr>
+ </tbody>
+ </table>
+ </div> {# /table-responsive #}
+ </div> {# /panel-body #}
+ </div> {# /panel... #}
+
+ {##### Results in Branches #####}
+
+ <div class="panel panel-primary">
+ <div class="panel-heading">
+ <h4 class="panel-title bold">Results in Branches</h4>
+ </div>
+ </div>
+
+ {# Get branches #}
+ {% set branches = [] %}
+ {% for run in projectBuilds %}
+ {% if run.branch not in branches %}
+ {% set branches = branches|merge([run.branch]) %}
+ {% endif %}
+ {% endfor %}
+
+ {# Loop all the branches #}
+ {% for branch in branches %}
+
+ {# Get all build keys #}
+ {% set buildKey = '' %}
+ {% set buildKeys = [] %}
+ {% set dates = [] %}
+ {% for run in projectBuilds %}
+ {% if run.branch == branch %}
+ {% if buildKey != run.buildKey %}
+ {% set buildKey = run.buildKey %}
+ {% set buildKeys = buildKeys|merge([run.buildKey]) %}
+ {% set dates = dates|merge([run.timestamp]) %}
+ {% endif %}
+ {% endif %}
+ {% endfor %}
+
+ {# Check if testsets run for this branch #}
+ {% set testsetBranch = 0 %}
+ {% for run in confBuilds if run.branch == branch %}
+ {% set testsetBranch = 1 %}
+ {% endfor %}
+
+ {# Show branch if testsets run for it #}
+ {% if testsetBranch %}
+ <div class="panel panel-info">
+ <div class="panel-heading">
+ <h4 class="panel-title bold">{{ branch }}</h4>
+ </div>
+ <div class="panel-body">
+ <div class="table-responsive">
+ <table class="table table-striped">
+ <thead>
+ <tr>
+ <th class="bold rightBorder">{{ project }}</th>
+ {% for key, buildKey in buildKeys %}
+ <th class="center">
+ {% if buildKey|length > 6 %}
+ <span class="clickOnTouch" data-toggle="tooltip" data-placement="top"
+ title="{{ buildKey }}">{{ buildKey|slice(0, 4) }}...
+ </span>
+ {% else %}
+ {{ buildKey }}
+ {% endif %}
+ <br>
+ <span class="gray"><small>{{ dates[key]|date("m-d") }}</small></span>
+ </th>
+ {% endfor %}
+ </tr>
+ </thead>
+ <tbody>
+ {% set confPrev = '' %}
+ {% set buildKeyIndexPrinted = -1 %}
+ {% set buildKeyFound = 0 %}
+ {% for run in confBuilds if run.branch == branch %}
+
+ {# New row for each conf #}
+ {% if confPrev != run.conf %}
+ {# Close previous row #}
+ {% if confPrev != '' %}
+ {# Fill empty cells at the end of the row #}
+ {% for key, buildKey in buildKeys %}
+ {% if key > buildKeyIndexPrinted %}
+ <td></td>
+ {% endif %}
+ {% endfor %}
+ </tr>
+ {% endif %}
+ <tr>
+ <td class="rightBorder"><small>{{ run.conf }}</small></td>
+ {% set buildKeyIndexPrinted = -1 %}
+ {% endif %}
+
+ {# Result per build key #}
+ {% set buildKeyFound = 0 %}
+ {% for key, buildKey in buildKeys %}
+ {# Print each column only once (checked based on column index key and buildKeyFound flag) #}
+ {% if key > buildKeyIndexPrinted and not buildKeyFound %}
+ {% if buildKey == run.buildKey %}
+ {# Print results #}
+ <td class="center">
+ {% if (run.failed + run.ifailed) > 0 %}
+ <button type="button" class="btn btn-xs btn-danger clickOnTouch"
+ data-toggle="tooltip" data-placement="top" data-html="true"
+ title="<table>
+ <tr><th>Build key: </th><td>{{ buildKey }}</td></tr>
+ <tr><th>Configuration: </th><td>{{ run.conf }}</td></tr>
+ <tr><th>Testsets passed: </th><td>{{ run.passed }}</td></tr>
+ <tr><th>Testsets passed (insignificant): </th><td>{{ run.ipassed }}</td></tr>
+ <tr><th>Testsets failed: </th><td>{{ run.failed }}</td></tr>
+ <tr><th>Testsets failed (insignificant): </th><td>{{ run.ifailed }}</td></tr>
+ </table>">
+ <span class="badge">{{ run.failed + run.ifailed }}</span>
+ </button>
+ {% elseif (run.passed + run.ipassed) > 0 %}
+ <button type="button" class="btn btn-xs btn-success clickOnTouch"
+ data-toggle="tooltip" data-placement="top" data-html="true"
+ title="<table>
+ <tr><th>Build key: </th><td>{{ buildKey }}</td></tr>
+ <tr><th>Configuration: </th><td>{{ run.conf }}</td></tr>
+ <tr><th>Testsets passed: </th><td>{{ run.passed }}</td></tr>
+ <tr><th>Testsets passed (insignificant): </th><td>{{ run.ipassed }}</td></tr>
+ <tr><th>Testsets failed: </th><td>{{ run.failed }}</td></tr>
+ <tr><th>Testsets failed (insignificant): </th><td>{{ run.ifailed }}</td></tr>
+ </table>">
+ <span class="badge"><small>{{ run.passed + run.ipassed }}</small></span>
+ </button>
+ {% endif %}
+ </td>
+ {% set buildKeyFound = 1 %}
+ {% else %}
+ {# Print empty cell #}
+ <td></td>
+ {% endif %}
+ {% set buildKeyIndexPrinted = key %}
+ {% endif %}
+ {% endfor %}
+ {% set confPrev = run.conf %}
+ {% endfor %}
+
+ {# Close last row (also fill empty cells at the end of the row) #}
+ {% for key, buildKey in buildKeys %}
+ {% if key > buildKeyIndexPrinted %}
+ <td></td>
+ {% endif %}
+ {% endfor %}
+ </tr>
+ </tbody>
+ </table>
+ </div> {# /table-responsive #}
+ </div> {# /panel-body #}
+ </div> {# /panel... #}
+ {% endif %} {# testsetBranch #}
+ {% endfor %}
+
+ {% else %} {# runsAvailable #}
+ <div class="alert alert-danger" role="alert">
+ No test result data available for project {{ project }}!
+ </div>
+ {% endif %}
+
+ </div> {# /col... #}
+ </div> {# /row #}
+
+</div> {# /container-fluid #}
+
+{% include "footer.html" %}
+
+{# Local scripts for this page #}
+<script src="scripts/tooltip.js"></script>
+
+{% include "close.html" %}