summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuha Sippola <juhasippola@outlook.com>2015-09-28 15:21:00 +0300
committerTony Sarajärvi <tony.sarajarvi@theqtcompany.com>2015-09-29 09:00:58 +0000
commit1e981ee6c23dd3bf13afe08045d0078ff9a7dbe6 (patch)
treeafa761c51180189f5293fbebde2602fe6c93a332
parenta4f46e87b163d3a0d122285ab55185c6ae0dcf33 (diff)
Qt Metrics 2 (v0.37): Build project page change
The Latest Status box to be shown only for the Qt5 view but hidden when a platform is selected (as it shows the full Qt5 status). Added an 'all' button to make it more visible when showing the full Qt5 view and when platform view. Change-Id: Ib6cd3d8857addf9c9346527cc7b7db34793ba845 Reviewed-by: Tony Sarajärvi <tony.sarajarvi@theqtcompany.com>
-rw-r--r--non-puppet/qtmetrics2/index.php5
-rw-r--r--non-puppet/qtmetrics2/templates/about.html2
-rw-r--r--non-puppet/qtmetrics2/templates/build_project.html62
3 files changed, 40 insertions, 29 deletions
diff --git a/non-puppet/qtmetrics2/index.php b/non-puppet/qtmetrics2/index.php
index 3ab7952..be206f8 100644
--- a/non-puppet/qtmetrics2/index.php
+++ b/non-puppet/qtmetrics2/index.php
@@ -210,15 +210,14 @@ $app->get('/buildproject/platform/:targetOs', function($targetOs) use($app)
'dbStatus' => $dbStatus,
'refreshed' => $dbStatus['refreshed'] . ' (GMT)',
'breadcrumb' => $breadcrumb,
+ 'buildProjectRoute' => $buildProjectRoute,
'buildPlatformRoute' => $buildProjectPlatformRoute,
'confRoute' => $confRoute,
'masterProject' => $ini['master_build_project'],
'masterState' => $ini['master_build_state'],
'platforms' => Factory::db()->getTargetPlatformOs(),
'targetOs' => $targetOs,
- 'latestProjectRuns' => Factory::db()->getLatestProjectBranchBuildResults(
- $ini['master_build_project'],
- $ini['master_build_state']),
+ 'latestProjectRuns' => null, // not used
'projectRuns' => Factory::createProjectRuns(
$ini['master_build_project'],
$ini['master_build_state']), // managed as objects
diff --git a/non-puppet/qtmetrics2/templates/about.html b/non-puppet/qtmetrics2/templates/about.html
index 9465fe8..ce05cee 100644
--- a/non-puppet/qtmetrics2/templates/about.html
+++ b/non-puppet/qtmetrics2/templates/about.html
@@ -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.36.2 (28-Sep-2015)</small></p>
+<p><small>Version 0.37 (28-Sep-2015)</small></p>
diff --git a/non-puppet/qtmetrics2/templates/build_project.html b/non-puppet/qtmetrics2/templates/build_project.html
index 44dad14..3232719 100644
--- a/non-puppet/qtmetrics2/templates/build_project.html
+++ b/non-puppet/qtmetrics2/templates/build_project.html
@@ -72,7 +72,7 @@
{# Check if any runs available #}
{% set runsAvailable = 0 %}
-{% for run in latestProjectRuns %}
+{% for run in confRuns %}
{% set runsAvailable = 1 %}
{% endfor %}
@@ -89,17 +89,23 @@
{##### Platform buttons #####}
<div>
+<div class="btn-groupxx">
+{% if targetOs == '' %}
+{% set buttonStyle = 'btn-primary' %}
+{% else %}
+{% set buttonStyle = 'btn-default' %}
+{% endif %}
+<a class="btn {{ buttonStyle }} btn-xs" href="{{ buildProjectRoute }}" role="button">all</a>
{% for platform in platforms %}
{% if platform.os == targetOs %}
{% set buttonStyle = 'btn-primary' %}
{% else %}
{% set buttonStyle = 'btn-default' %}
{% endif %}
-<div class="btn-group">
<a class="btn {{ buttonStyle }} btn-xs" href="{{ buildPlatformRoute }}/{{ platform.os|url_encode }}" role="button">{{ platform.os }}</a>
-</div>
{% endfor %}
</div>
+</div>
<hr>
{##### Info well #####}
@@ -108,10 +114,12 @@
<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>
+{% if targetOs == '' %}
+<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>
+{% endif %}
<li><strong>Results in Branches</strong> shows the {{ project.getName }} run results by branch
and their configuration on <strong>{{ masterProject }} {{ masterState }}</strong> builds
<ul>
@@ -133,6 +141,8 @@ and their configuration on <strong>{{ masterProject }} {{ masterState }}</strong
{##### Latest Status #####}
+{% if targetOs == '' %}
+
<div class="panel panel-primary">
<div class="panel-heading">
<h4 class="panel-title bold">Latest Status</h4>
@@ -144,9 +154,9 @@ and their configuration on <strong>{{ masterProject }} {{ masterState }}</strong
<tr>
<th>project</th>
<th class="rightBorder">latest result</th>
-{% for branch in latestProjectRuns %}
+{% for branch in latestProjectRuns %}
<th class="center">{{ branch.name }}</th>
-{% endfor %}
+{% endfor %}
</tr>
</thead>
<tbody>
@@ -155,24 +165,24 @@ and their configuration on <strong>{{ masterProject }} {{ masterState }}</strong
<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') %}
+{% if project.getStatus == constant('ConfRun::RESULT_SUCCESS') %}
{% set resultIcon = 'glyphicon glyphicon-ok green' %}
-{% elseif run.result == constant('ConfRun::RESULT_FAILURE') %}
+{% elseif project.getStatus == constant('ConfRun::RESULT_FAILURE') %}
{% set resultIcon = 'glyphicon glyphicon-remove red' %}
{% else %}
-{% set resultIcon = 'glyphicon glyphicon-ban-circle gray' %}
+{% 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>
@@ -182,7 +192,7 @@ title="<table>
<tr><th>Result: </td><td>{{ run.result }}</td></tr>
<tr><th>Duration: </td><td>{{ run.duration}}</td></tr></table>">
</span></td>
-{% endfor %}{# run #}
+{% endfor %}{# run #}
</tr>
</tbody>
</table>
@@ -190,6 +200,8 @@ title="<table>
</div> {# .panel-body #}
</div> {# .panel... #}
+{% endif %}{# targetOs #}
+
{##### Results in Branches #####}
<div class="panel panel-primary">
@@ -356,7 +368,7 @@ title="<table>
{% else %}{# runsAvailable #}
<div class="alert alert-danger" role="alert">
-No build data available for project {{ project.getName }}!
+No {{ targetOs }} build data available for project {{ project.getName }}!
</div>
{% endif %}{# runsAvailable #}