summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuha Sippola <juhasippola@outlook.com>2015-09-21 16:32:13 +0300
committerTony Sarajärvi <tony.sarajarvi@theqtcompany.com>2015-09-23 09:39:41 +0000
commit5943fba9d274c49e00a6f956536841a99f247e2d (patch)
tree9796e34842daeb221caaf7a207abb384cb34e667
parentaec98cc36adff49eb0e44b617608a961d1404d19 (diff)
Qt Metrics 2 (v0.29): Build directory link
Added link to build directory to the build keys in build lists. Change-Id: I8f0aed00d4e020588ecc038fe375425a81e3a8ae Reviewed-by: Tony Sarajärvi <tony.sarajarvi@theqtcompany.com>
-rw-r--r--non-puppet/qtmetrics2/src/ConfRun.php15
-rw-r--r--non-puppet/qtmetrics2/src/ProjectRun.php31
-rw-r--r--non-puppet/qtmetrics2/src/TestfunctionRun.php14
-rw-r--r--non-puppet/qtmetrics2/src/TestsetRun.php15
-rw-r--r--non-puppet/qtmetrics2/templates/about.html2
-rw-r--r--non-puppet/qtmetrics2/templates/build_project.html12
-rw-r--r--non-puppet/qtmetrics2/templates/conf.html36
-rw-r--r--non-puppet/qtmetrics2/templates/testfunction.html27
-rw-r--r--non-puppet/qtmetrics2/templates/testset.html10
-rw-r--r--non-puppet/qtmetrics2/templates/testset_project_data_results.html12
-rw-r--r--non-puppet/qtmetrics2/templates/testset_testfunctions.html27
11 files changed, 170 insertions, 31 deletions
diff --git a/non-puppet/qtmetrics2/src/ConfRun.php b/non-puppet/qtmetrics2/src/ConfRun.php
index 9598e6c..eabefa0 100644
--- a/non-puppet/qtmetrics2/src/ConfRun.php
+++ b/non-puppet/qtmetrics2/src/ConfRun.php
@@ -34,8 +34,7 @@
/**
* ConfRun class
- * @version 0.2
- * @since 24-07-2015
+ * @since 17-09-2015
* @author Juha Sippola
*/
@@ -117,6 +116,18 @@ class ConfRun extends ProjectRun {
}
/**
+ * Get build directory link.
+ * @return string
+ */
+ public function getBuildLink()
+ {
+ return Factory::getCiLogPath()
+ . urlencode(parent::getFullProjectName())
+ . '/build_' . parent::getBuildKeyString()
+ . '/' . urlencode($this->name);
+ }
+
+ /**
* Get log file link.
* @return string
*/
diff --git a/non-puppet/qtmetrics2/src/ProjectRun.php b/non-puppet/qtmetrics2/src/ProjectRun.php
index 4e5a9ad..863d70b 100644
--- a/non-puppet/qtmetrics2/src/ProjectRun.php
+++ b/non-puppet/qtmetrics2/src/ProjectRun.php
@@ -34,8 +34,7 @@
/**
* ProjectRun class
- * @version 0.2
- * @since 12-05-2015
+ * @since 17-09-2015
* @author Juha Sippola
*/
@@ -51,6 +50,11 @@ class ProjectRun {
const RESULT_ABORTED = "ABORTED";
/**
+ * If the build key is long, a shorter version of the key can be requested
+ */
+ const SHORT_BUILDKEY_LENGTH = 6;
+
+ /**
* Project name.
* @var string
*/
@@ -160,6 +164,18 @@ class ProjectRun {
}
/**
+ * Get build key short version.
+ * @return string
+ */
+ public function getShortBuildKey()
+ {
+ if (strlen($this->buildKey) > self::SHORT_BUILDKEY_LENGTH)
+ return substr($this->buildKey, 0, self::SHORT_BUILDKEY_LENGTH - 2) . '...';
+ else
+ return $this->buildKey;
+ }
+
+ /**
* Get result (plain result without any possible flags).
* @return string
*/
@@ -207,6 +223,17 @@ class ProjectRun {
}
/**
+ * Get build directory link.
+ * @return string
+ */
+ public function getBuildLink()
+ {
+ return Factory::getCiLogPath()
+ . urlencode(self::getFullProjectName())
+ . '/build_' . self::getBuildKeyString();
+ }
+
+ /**
* Get log file link.
* @return string
*/
diff --git a/non-puppet/qtmetrics2/src/TestfunctionRun.php b/non-puppet/qtmetrics2/src/TestfunctionRun.php
index 5291109..4c4619e 100644
--- a/non-puppet/qtmetrics2/src/TestfunctionRun.php
+++ b/non-puppet/qtmetrics2/src/TestfunctionRun.php
@@ -34,7 +34,7 @@
/**
* TestfunctionRun class
- * @since 16-09-2015
+ * @since 17-09-2015
* @author Juha Sippola
*/
@@ -231,6 +231,18 @@ class TestfunctionRun extends ProjectRun {
return $flag;
}
+ /**
+ * Get build directory link.
+ * @return string
+ */
+ public function getBuildLink()
+ {
+ return Factory::getCiLogPath()
+ . urlencode(parent::getFullProjectName())
+ . '/build_' . parent::getBuildKeyString()
+ . '/' . urlencode($this->confName);
+ }
+
}
?>
diff --git a/non-puppet/qtmetrics2/src/TestsetRun.php b/non-puppet/qtmetrics2/src/TestsetRun.php
index 6da6161..1203276 100644
--- a/non-puppet/qtmetrics2/src/TestsetRun.php
+++ b/non-puppet/qtmetrics2/src/TestsetRun.php
@@ -34,8 +34,7 @@
/**
* TestsetRun class
- * @version 0.5
- * @since 15-07-2015
+ * @since 17-09-2015
* @author Juha Sippola
*/
@@ -173,6 +172,18 @@ class TestsetRun extends ProjectRun {
return $flag;
}
+ /**
+ * Get build directory link.
+ * @return string
+ */
+ public function getBuildLink()
+ {
+ return Factory::getCiLogPath()
+ . urlencode(parent::getFullProjectName())
+ . '/build_' . parent::getBuildKeyString()
+ . '/' . urlencode($this->confName);
+ }
+
}
?>
diff --git a/non-puppet/qtmetrics2/templates/about.html b/non-puppet/qtmetrics2/templates/about.html
index 6c97bd1..67549d8 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.28 (17-Sep-2015)</small></p>
+<p><small>Version 0.29 (17-Sep-2015)</small></p>
diff --git a/non-puppet/qtmetrics2/templates/build_project.html b/non-puppet/qtmetrics2/templates/build_project.html
index fa12d6b..44dad14 100644
--- a/non-puppet/qtmetrics2/templates/build_project.html
+++ b/non-puppet/qtmetrics2/templates/build_project.html
@@ -34,7 +34,7 @@
/**
* Build project page
- * @since 16-09-2015
+ * @since 17-09-2015
* @author Juha Sippola
*/
@@ -212,15 +212,19 @@ title="<table>
{# Get all build keys, dates and log links #}
{% set buildKey = '' %}
{% set buildKeys = [] %}
+{% set buildKeysShort = [] %}
{% set dates = [] %}
{% set logLinks = [] %}
+{% set buildLinks = [] %}
{% for run in projectRuns %}
{% if run.getBranchName == branch %}
{% if buildKey != run.getBuildKey %}
{% set buildKey = run.getBuildKey %}
{% set buildKeys = buildKeys|merge([run.getBuildKey]) %}
+{% set buildKeysShort = buildKeysShort|merge([run.getShortBuildKey]) %}
{% set dates = dates|merge([run.getTimestamp]) %}
{% set logLinks = logLinks|merge([run.getLogLink]) %}
+{% set buildLinks = buildLinks|merge([run.getBuildLink]) %}
{% endif %}
{% endif %}
{% endfor %}
@@ -246,10 +250,10 @@ title="<table>
<th class="bold rightBorder">flags</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><br>
+{% if buildKey == buildKeysShort[key] %}
+<a href="{{ buildLinks[key] }}" target="_blank">{{ buildKey }}</a><br>
{% else %}
-{{ buildKey }}<br>
+<a href="{{ buildLinks[key] }}" target="_blank"><span class="clickOnTouch" data-toggle="tooltip" data-placement="top" title="{{ buildKey }}">{{ buildKeysShort[key] }}</span></a><br>
{% endif %}
<span class="gray"><small>{{ dates[key]|date("m-d") }}</small></span><br>
<a href="{{ logLinks[key] }}" target="_blank"><span class="glyphicon glyphicon-file"></span></a>
diff --git a/non-puppet/qtmetrics2/templates/conf.html b/non-puppet/qtmetrics2/templates/conf.html
index 4d35ac2..f5dab3a 100644
--- a/non-puppet/qtmetrics2/templates/conf.html
+++ b/non-puppet/qtmetrics2/templates/conf.html
@@ -34,7 +34,7 @@
/**
* Configuration page
- * @since 03-08-2015
+ * @since 17-09-2015
* @author Juha Sippola
*/
@@ -243,21 +243,26 @@ title="insignificant">i</span>
{# Get all build keys, dates and log links #}
{% set buildKey = '' %}
{% set buildKeys = [] %}
+{% set buildKeysShort = [] %}
{% set dates = [] %}
{% set logLinks = [] %}
+{% set buildLinks = [] %}
{% for run in projectRuns %}
{% if run.getBranchName == branch %}
{% if buildKey != run.getBuildKey %}
{% set buildKey = run.getBuildKey %}
{% set buildKeys = buildKeys|merge([run.getBuildKey]) %}
+{% set buildKeysShort = buildKeysShort|merge([run.getShortBuildKey]) %}
{% set dates = dates|merge([run.getTimestamp]) %}
{% set confRunFound = 0 %}
{% for confRun in confRuns if (confRun.getBranchName == branch) and (confRun.getBuildKey == buildKey) %}
{% set logLinks = logLinks|merge([confRun.getLogLink]) %}
+{% set buildLinks = buildLinks|merge([confRun.getBuildLink]) %}
{% set confRunFound = 1 %}
{% endfor %}
{% if not confRunFound %}
{% set logLinks = logLinks|merge(['']) %}
+{% set buildLinks = buildLinks|merge(['']) %}
{% endif %}
{% endif %}
{% endif %}
@@ -284,10 +289,18 @@ title="insignificant">i</span>
<th class="bold rightBorder">flags</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><br>
+{% if buildLinks[key] != '' %}
+{% if buildKey == buildKeysShort[key] %}
+<a href="{{ buildLinks[key] }}" target="_blank">{{ buildKey }}</a><br>
+{% else %}
+<a href="{{ buildLinks[key] }}" target="_blank"><span class="clickOnTouch" data-toggle="tooltip" data-placement="top" title="{{ buildKey }}">{{ buildKeysShort[key] }}</span></a><br>
+{% endif %}
{% else %}
+{% if buildKey == buildKeysShort[key] %}
{{ buildKey }}<br>
+{% else %}
+<span class="clickOnTouch" data-toggle="tooltip" data-placement="top" title="{{ buildKey }}">{{ buildKeysShort[key] }}</span><br>
+{% endif %}
{% endif %}
<span class="gray"><small>{{ dates[key]|date("m-d") }}</small></span><br>
{% if logLinks[key] != '' %}
@@ -421,21 +434,26 @@ title="<table>
{# Get all build keys, dates and conf log links #}
{% set buildKey = '' %}
{% set buildKeys = [] %}
+{% set buildKeysShort = [] %}
{% set dates = [] %}
{% set logLinks = [] %}
+{% set buildLinks = [] %}
{% for run in projectRuns %}
{% if run.getBranchName == branch %}
{% if buildKey != run.getBuildKey %}
{% set buildKey = run.getBuildKey %}
{% set buildKeys = buildKeys|merge([run.getBuildKey]) %}
+{% set buildKeysShort = buildKeysShort|merge([run.getShortBuildKey]) %}
{% set dates = dates|merge([run.getTimestamp]) %}
{% set confRunFound = 0 %}
{% for confRun in confRuns if (confRun.getBranchName == branch) and (confRun.getBuildKey == buildKey) %}
{% set logLinks = logLinks|merge([confRun.getLogLink]) %}
+{% set buildLinks = buildLinks|merge([confRun.getBuildLink]) %}
{% set confRunFound = 1 %}
{% endfor %}
{% if not confRunFound %}
{% set logLinks = logLinks|merge(['']) %}
+{% set buildLinks = buildLinks|merge(['']) %}
{% endif %}
{% endif %}
{% endif %}
@@ -464,10 +482,18 @@ title="<table>
<th class="bold rightBorder">flags</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><br>
+{% if buildLinks[key] != '' %}
+{% if buildKey == buildKeysShort[key] %}
+<a href="{{ buildLinks[key] }}" target="_blank">{{ buildKey }}</a><br>
+{% else %}
+<a href="{{ buildLinks[key] }}" target="_blank"><span class="clickOnTouch" data-toggle="tooltip" data-placement="top" title="{{ buildKey }}">{{ buildKeysShort[key] }}</span></a><br>
+{% endif %}
{% else %}
+{% if buildKey == buildKeysShort[key] %}
{{ buildKey }}<br>
+{% else %}
+<span class="clickOnTouch" data-toggle="tooltip" data-placement="top" title="{{ buildKey }}">{{ buildKeysShort[key] }}</span><br>
+{% endif %}
{% endif %}
<span class="gray"><small>{{ dates[key]|date("m-d") }}</small></span><br>
{% if logLinks[key] != '' %}
diff --git a/non-puppet/qtmetrics2/templates/testfunction.html b/non-puppet/qtmetrics2/templates/testfunction.html
index e9c269e..26017db 100644
--- a/non-puppet/qtmetrics2/templates/testfunction.html
+++ b/non-puppet/qtmetrics2/templates/testfunction.html
@@ -34,7 +34,7 @@
/**
* Test function page (list of test rows)
- * @since 16-09-2015
+ * @since 17-09-2015
* @author Juha Sippola
*/
@@ -127,13 +127,26 @@
{# Get all build keys, dates and log links #}
{% set buildKey = '' %}
{% set buildKeys = [] %}
+{% set buildKeysShort = [] %}
{% set dates = [] %}
+{% set buildLinks = [] %}
{% for run in projectRuns %}
{% if run.getBranchName == branch %}
{% if buildKey != run.getBuildKey %}
{% set buildKey = run.getBuildKey %}
{% set buildKeys = buildKeys|merge([run.getBuildKey]) %}
+{% set buildKeysShort = buildKeysShort|merge([run.getShortBuildKey]) %}
{% set dates = dates|merge([run.getTimestamp]) %}
+{% set testrowRunFound = 0 %}
+{% for testrowRun in testrowRuns if (testrowRun.getBranchName == branch) and (testrowRun.getBuildKey == buildKey) %}
+{% if not testrowRunFound %}
+{% set buildLinks = buildLinks|merge([testrowRun.getBuildLink]) %}
+{% endif %}
+{% set testrowRunFound = 1 %}
+{% endfor %}
+{% if not testrowRunFound %}
+{% set buildLinks = buildLinks|merge(['']) %}
+{% endif %}
{% endif %}
{% endif %}
{% endfor %}
@@ -159,10 +172,18 @@
<th class="bold rightBorder">flags</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><br>
+{% if buildLinks[key] != '' %}
+{% if buildKey == buildKeysShort[key] %}
+<a href="{{ buildLinks[key] }}" target="_blank">{{ buildKey }}</a><br>
+{% else %}
+<a href="{{ buildLinks[key] }}" target="_blank"><span class="clickOnTouch" data-toggle="tooltip" data-placement="top" title="{{ buildKey }}">{{ buildKeysShort[key] }}</span></a><br>
+{% endif %}
{% else %}
+{% if buildKey == buildKeysShort[key] %}
{{ buildKey }}<br>
+{% else %}
+<span class="clickOnTouch" data-toggle="tooltip" data-placement="top" title="{{ buildKey }}">{{ buildKeysShort[key] }}</span><br>
+{% endif %}
{% endif %}
<span class="gray"><small>{{ dates[key]|date("m-d") }}</small></span>
</th>
diff --git a/non-puppet/qtmetrics2/templates/testset.html b/non-puppet/qtmetrics2/templates/testset.html
index f9be9c1..b5b86d6 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 16-09-2015
+ * @since 17-09-2015
* @author Juha Sippola
*/
@@ -231,12 +231,14 @@ and their configuration on <strong>{{ masterProject }} {{ masterState }}</strong
{# Get all build keys, dates and log links #}
{% set buildKey = '' %}
{% set buildKeys = [] %}
+{% set buildKeysShort = [] %}
{% set dates = [] %}
{% for run in projectRuns %}
{% if run.getBranchName == branch %}
{% if buildKey != run.getBuildKey %}
{% set buildKey = run.getBuildKey %}
{% set buildKeys = buildKeys|merge([run.getBuildKey]) %}
+{% set buildKeysShort = buildKeysShort|merge([run.getShortBuildKey]) %}
{% set dates = dates|merge([run.getTimestamp]) %}
{% endif %}
{% endif %}
@@ -263,10 +265,10 @@ and their configuration on <strong>{{ masterProject }} {{ masterState }}</strong
<th class="bold rightBorder">flags</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><br>
-{% else %}
+{% if buildKey == buildKeysShort[key] %}
{{ buildKey }}<br>
+{% else %}
+<span class="clickOnTouch" data-toggle="tooltip" data-placement="top" title="{{ buildKey }}">{{ buildKeysShort[key] }}</span><br>
{% endif %}
<span class="gray"><small>{{ dates[key]|date("m-d") }}</small></span>
</th>
diff --git a/non-puppet/qtmetrics2/templates/testset_project_data_results.html b/non-puppet/qtmetrics2/templates/testset_project_data_results.html
index 2538b90..b3fca37 100644
--- a/non-puppet/qtmetrics2/templates/testset_project_data_results.html
+++ b/non-puppet/qtmetrics2/templates/testset_project_data_results.html
@@ -34,7 +34,7 @@
/**
* Testset project results data
- * @since 16-09-2015
+ * @since 17-09-2015
* @author Juha Sippola
*/
@@ -70,15 +70,19 @@
{# Get all build keys, dates and log links #}
{% set buildKey = '' %}
{% set buildKeys = [] %}
+{% set buildKeysShort = [] %}
{% set dates = [] %}
{% set logLinks = [] %}
+{% set buildLinks = [] %}
{% for run in projectRuns %}
{% if run.getBranchName == branch %}
{% if buildKey != run.getBuildKey %}
{% set buildKey = run.getBuildKey %}
{% set buildKeys = buildKeys|merge([run.getBuildKey]) %}
+{% set buildKeysShort = buildKeysShort|merge([run.getShortBuildKey]) %}
{% set dates = dates|merge([run.getTimestamp]) %}
{% set logLinks = logLinks|merge([run.getLogLink]) %}
+{% set buildLinks = buildLinks|merge([run.getBuildLink]) %}
{% endif %}
{% endif %}
{% endfor %}
@@ -103,10 +107,10 @@
<th class="bold rightBorder">configuration</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><br>
+{% if buildKey == buildKeysShort[key] %}
+<a href="{{ buildLinks[key] }}" target="_blank">{{ buildKey }}</a><br>
{% else %}
-{{ buildKey }}<br>
+<a href="{{ buildLinks[key] }}" target="_blank"><span class="clickOnTouch" data-toggle="tooltip" data-placement="top" title="{{ buildKey }}">{{ buildKeysShort[key] }}</span></a><br>
{% endif %}
<span class="gray"><small>{{ dates[key]|date("m-d") }}</small></span><br>
<a href="{{ logLinks[key] }}" target="_blank"><span class="glyphicon glyphicon-file"></span></a>
diff --git a/non-puppet/qtmetrics2/templates/testset_testfunctions.html b/non-puppet/qtmetrics2/templates/testset_testfunctions.html
index fe4216c..04b989d 100644
--- a/non-puppet/qtmetrics2/templates/testset_testfunctions.html
+++ b/non-puppet/qtmetrics2/templates/testset_testfunctions.html
@@ -34,7 +34,7 @@
/**
* Testset page (list of test functions)
- * @since 16-09-2015
+ * @since 17-09-2015
* @author Juha Sippola
*/
@@ -134,13 +134,26 @@
{# Get all build keys, dates and log links #}
{% set buildKey = '' %}
{% set buildKeys = [] %}
+{% set buildKeysShort = [] %}
{% set dates = [] %}
+{% set buildLinks = [] %}
{% for run in projectRuns %}
{% if run.getBranchName == branch %}
{% if buildKey != run.getBuildKey %}
{% set buildKey = run.getBuildKey %}
{% set buildKeys = buildKeys|merge([run.getBuildKey]) %}
+{% set buildKeysShort = buildKeysShort|merge([run.getShortBuildKey]) %}
{% set dates = dates|merge([run.getTimestamp]) %}
+{% set testfunctionRunFound = 0 %}
+{% for testfunctionRun in testfunctionRuns if (testfunctionRun.getBranchName == branch) and (testfunctionRun.getBuildKey == buildKey) %}
+{% if not testfunctionRunFound %}
+{% set buildLinks = buildLinks|merge([testfunctionRun.getBuildLink]) %}
+{% endif %}
+{% set testfunctionRunFound = 1 %}
+{% endfor %}
+{% if not testfunctionRunFound %}
+{% set buildLinks = buildLinks|merge(['']) %}
+{% endif %}
{% endif %}
{% endif %}
{% endfor %}
@@ -166,10 +179,18 @@
<th class="bold rightBorder">flags</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><br>
+{% if buildLinks[key] != '' %}
+{% if buildKey == buildKeysShort[key] %}
+<a href="{{ buildLinks[key] }}" target="_blank">{{ buildKey }}</a><br>
+{% else %}
+<a href="{{ buildLinks[key] }}" target="_blank"><span class="clickOnTouch" data-toggle="tooltip" data-placement="top" title="{{ buildKey }}">{{ buildKeysShort[key] }}</span></a><br>
+{% endif %}
{% else %}
+{% if buildKey == buildKeysShort[key] %}
{{ buildKey }}<br>
+{% else %}
+<span class="clickOnTouch" data-toggle="tooltip" data-placement="top" title="{{ buildKey }}">{{ buildKeysShort[key] }}</span><br>
+{% endif %}
{% endif %}
<span class="gray"><small>{{ dates[key]|date("m-d") }}</small></span>
</th>