From a0cd197d0df3e9433bcc93b1f5c33599f9c9345b Mon Sep 17 00:00:00 2001 From: Juha Sippola Date: Wed, 5 Aug 2015 10:59:15 +0300 Subject: Qt Metrics 2 (v0.16): Log file links MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Added log file links to the build lists. Changed passing the project runs as objects to the template files (instead of arrays). Change-Id: I1ed889de5b9eb06cb44fc1e18df85a4f61d1de2b Reviewed-by: Tony Sarajärvi --- non-puppet/qtmetrics2/index.php | 37 ++++++++++++++++++++----------------- 1 file changed, 20 insertions(+), 17 deletions(-) (limited to 'non-puppet/qtmetrics2/index.php') diff --git a/non-puppet/qtmetrics2/index.php b/non-puppet/qtmetrics2/index.php index 84faf9d..367650d 100644 --- a/non-puppet/qtmetrics2/index.php +++ b/non-puppet/qtmetrics2/index.php @@ -34,8 +34,7 @@ /** * Qt Metrics API - * @version 0.11 - * @since 23-07-2015 + * @since 03-08-2015 * @author Juha Sippola */ @@ -130,9 +129,9 @@ $app->get('/buildproject', function() use($app) 'latestProjectRuns' => Factory::db()->getLatestProjectBranchBuildResults( $ini['master_build_project'], $ini['master_build_state']), - 'projectBuilds' => Factory::db()->getProjectBuildsByBranch( + 'projectRuns' => Factory::createProjectRuns( $ini['master_build_project'], - $ini['master_build_state']), + $ini['master_build_state']), // managed as objects 'project' => Factory::createProject( $ini['master_build_project'], $ini['master_build_project'], @@ -175,9 +174,9 @@ $app->get('/buildproject/platform/:targetOs', function($targetOs) use($app) 'latestProjectRuns' => Factory::db()->getLatestProjectBranchBuildResults( $ini['master_build_project'], $ini['master_build_state']), - 'projectBuilds' => Factory::db()->getProjectBuildsByBranch( + 'projectRuns' => Factory::createProjectRuns( $ini['master_build_project'], - $ini['master_build_state']), + $ini['master_build_state']), // managed as objects 'project' => Factory::createProject( $ini['master_build_project'], $ini['master_build_project'], @@ -215,9 +214,9 @@ $app->get('/testsetproject/:project', function($project) use($app) $project, $ini['master_build_project'], $ini['master_build_state']), - 'projectBuilds' => Factory::db()->getProjectBuildsByBranch( + 'projectRuns' => Factory::createProjectRuns( $ini['master_build_project'], - $ini['master_build_state']), + $ini['master_build_state']), // managed as objects 'confBuilds' => Factory::db()->getTestsetProjectResultsByBranchConf( $project, $ini['master_build_project'], @@ -249,14 +248,14 @@ $app->get('/conf/:conf', function($conf) use($app) 'refreshed' => Factory::db()->getDbRefreshed() . ' (GMT)', 'masterProject' => $ini['master_build_project'], 'masterState' => $ini['master_build_state'], - 'projectBuilds' => Factory::db()->getProjectBuildsByBranch( - $ini['master_build_project'], - $ini['master_build_state']), 'testsetProject' => '', 'latestConfRuns' => Factory::db()->getLatestConfBranchBuildResults( $conf, $ini['master_build_project'], $ini['master_build_state']), + 'projectRuns' => Factory::createProjectRuns( + $ini['master_build_project'], + $ini['master_build_state']), // managed as objects 'conf' => Factory::createConf( $conf, $ini['master_build_project'], @@ -298,16 +297,20 @@ $app->get('/conf/:conf/:testsetproject', function($conf, $testsetProject) use($a 'refreshed' => Factory::db()->getDbRefreshed() . ' (GMT)', 'masterProject' => $ini['master_build_project'], 'masterState' => $ini['master_build_state'], - 'projectBuilds' => Factory::db()->getProjectBuildsByBranch( - $ini['master_build_project'], - $ini['master_build_state']), 'testsetProject' => $testsetProject, 'latestConfRuns' => null, // not used + 'projectRuns' => Factory::createProjectRuns( + $ini['master_build_project'], + $ini['master_build_state']), // managed as objects 'conf' => Factory::createConf( $conf, $ini['master_build_project'], $ini['master_build_state']), // managed as object - 'confRuns' => null, // not used + 'confRuns' => Factory::createConfRuns( + $ini['master_build_project'], + $ini['master_build_state'], + '', + $conf), // managed as objects 'testsetRuns' => Factory::createTestsetRunsInConf( $conf, $testsetProject, @@ -399,9 +402,9 @@ $app->get('/testset/:testset/:project', function($testset, $project) use($app) 'sinceDateFlaky' => Factory::getSinceDate(intval($ini['flaky_testsets_last_days']) - 1), 'masterProject' => $ini['master_build_project'], 'masterState' => $ini['master_build_state'], - 'projectBuilds' => Factory::db()->getProjectBuildsByBranch( + 'projectRuns' => Factory::createProjectRuns( $ini['master_build_project'], - $ini['master_build_state']), + $ini['master_build_state']), // managed as objects 'testset' => Factory::createTestset( $testset, $project, -- cgit v1.2.3