View build
This commit is contained in:
parent
d08134d378
commit
62b957fb83
|
@ -12,6 +12,7 @@ namespace PHPCI\Controller;
|
||||||
use b8;
|
use b8;
|
||||||
use b8\Exception\HttpException\NotFoundException;
|
use b8\Exception\HttpException\NotFoundException;
|
||||||
use PHPCI\BuildFactory;
|
use PHPCI\BuildFactory;
|
||||||
|
use PHPCI\Helper\Lang;
|
||||||
use PHPCI\Model\Build;
|
use PHPCI\Model\Build;
|
||||||
use PHPCI\Model\Project;
|
use PHPCI\Model\Project;
|
||||||
use PHPCI\Service\BuildService;
|
use PHPCI\Service\BuildService;
|
||||||
|
@ -52,26 +53,26 @@ class BuildController extends \PHPCI\Controller
|
||||||
}
|
}
|
||||||
|
|
||||||
if (empty($build)) {
|
if (empty($build)) {
|
||||||
throw new NotFoundException('Build with ID: ' . $buildId . ' does not exist.');
|
throw new NotFoundException(Lang::get('build_x_not_found', $buildId));
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->view->plugins = $this->getUiPlugins();
|
$this->view->plugins = $this->getUiPlugins();
|
||||||
$this->view->build = $build;
|
$this->view->build = $build;
|
||||||
$this->view->data = $this->getBuildData($build);
|
$this->view->data = $this->getBuildData($build);
|
||||||
|
|
||||||
$this->layout->title = 'Build #' . $build->getId();
|
$this->layout->title = Lang::get('build_n', $buildId);
|
||||||
$this->layout->subtitle = $build->getProjectTitle();
|
$this->layout->subtitle = $build->getProjectTitle();
|
||||||
|
|
||||||
$nav = array(
|
$nav = array(
|
||||||
'title' => 'Build '.$build->getId(),
|
'title' => Lang::get('build_n', $buildId),
|
||||||
'icon' => 'cog',
|
'icon' => 'cog',
|
||||||
'links' => array(
|
'links' => array(
|
||||||
'build/rebuild/' . $build->getId() => 'Rebuild Now',
|
'build/rebuild/' . $build->getId() => Lang::get('rebuild_now'),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
if ($this->currentUserIsAdmin()) {
|
if ($this->currentUserIsAdmin()) {
|
||||||
$nav['links']['build/delete/' . $build->getId()] = 'Delete Build';
|
$nav['links']['build/delete/' . $build->getId()] = Lang::get('delete_build');
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->layout->nav = $nav;
|
$this->layout->nav = $nav;
|
||||||
|
@ -142,7 +143,7 @@ class BuildController extends \PHPCI\Controller
|
||||||
$copy = BuildFactory::getBuildById($buildId);
|
$copy = BuildFactory::getBuildById($buildId);
|
||||||
|
|
||||||
if (empty($copy)) {
|
if (empty($copy)) {
|
||||||
throw new NotFoundException('Build with ID: ' . $buildId . ' does not exist.');
|
throw new NotFoundException(Lang::get('build_x_not_found', $buildId));
|
||||||
}
|
}
|
||||||
|
|
||||||
$build = $this->buildService->createDuplicateBuild($copy);
|
$build = $this->buildService->createDuplicateBuild($copy);
|
||||||
|
@ -161,7 +162,7 @@ class BuildController extends \PHPCI\Controller
|
||||||
$build = BuildFactory::getBuildById($buildId);
|
$build = BuildFactory::getBuildById($buildId);
|
||||||
|
|
||||||
if (empty($build)) {
|
if (empty($build)) {
|
||||||
throw new NotFoundException('Build with ID: ' . $buildId . ' does not exist.');
|
throw new NotFoundException(Lang::get('build_x_not_found', $buildId));
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->buildService->deleteBuild($build);
|
$this->buildService->deleteBuild($build);
|
||||||
|
|
|
@ -87,4 +87,4 @@ class Lang
|
||||||
|
|
||||||
return $strings;
|
return $strings;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -115,5 +115,55 @@ $strings = array(
|
||||||
<a href="https://bitbucket.org/%s/admin/services">
|
<a href="https://bitbucket.org/%s/admin/services">
|
||||||
Services</a> section of your Bitbucket repository.',
|
Services</a> section of your Bitbucket repository.',
|
||||||
|
|
||||||
|
// View Build
|
||||||
|
'build_x_not_found' => 'Build with ID %d does not exist.',
|
||||||
|
'build_n' => 'Build %d',
|
||||||
|
'rebuild_now' => 'Rebuild Now',
|
||||||
|
|
||||||
);
|
|
||||||
|
'committed_by_x' => 'Committed by %s',
|
||||||
|
'commit_id_x' => 'Commit: %s',
|
||||||
|
|
||||||
|
'chart_display' => 'This chart will display once the build has completed.',
|
||||||
|
|
||||||
|
'build' => 'Build',
|
||||||
|
'lines' => 'Lines',
|
||||||
|
'comment_lines' => 'Comment Lines',
|
||||||
|
'noncomment_lines' => 'Non-Comment Lines',
|
||||||
|
'logical_lines' => 'Logical Lines',
|
||||||
|
'lines_of_code' => 'Lines of Code',
|
||||||
|
'build_log' => 'Build Log',
|
||||||
|
'quality_trend' => 'Quality Trend',
|
||||||
|
'phpmd_warnings' => 'PHPMD Warnings',
|
||||||
|
'phpcs_warnings' => 'PHPCS Warnings',
|
||||||
|
'phpcs_errors' => 'PHPCS Errors',
|
||||||
|
'phplint_errors' => 'Lint Errors',
|
||||||
|
'phpunit_errors' => 'PHPUnit Errors',
|
||||||
|
'phpdoccheck_warnings' => 'Missing Docblocks',
|
||||||
|
'issues' => 'Issues',
|
||||||
|
|
||||||
|
'phpcpd' => 'PHP Copy/Paste Detector',
|
||||||
|
'phpcs' => 'PHP Code Sniffer',
|
||||||
|
'phpdoccheck' => 'Missing Docblocks',
|
||||||
|
'phpmd' => 'PHP Mess Detector',
|
||||||
|
'phpspec' => 'PHP Spec',
|
||||||
|
'phpunit' => 'PHP Unit',
|
||||||
|
|
||||||
|
'file' => 'File',
|
||||||
|
'line' => 'Line',
|
||||||
|
'class' => 'Class',
|
||||||
|
'method' => 'Method',
|
||||||
|
'message' => 'Message',
|
||||||
|
'start' => 'Start',
|
||||||
|
'end' => 'End',
|
||||||
|
'from' => 'From',
|
||||||
|
'to' => 'To',
|
||||||
|
'suite' => 'Suite',
|
||||||
|
'test' => 'Test',
|
||||||
|
'result' => 'Result',
|
||||||
|
'ok' => 'OK',
|
||||||
|
'took_n_seconds' => 'Took %d seconds',
|
||||||
|
'build_created' => 'Build Created',
|
||||||
|
'build_started' => 'Build Started',
|
||||||
|
'build_finished' => 'Build Finished',
|
||||||
|
);
|
||||||
|
|
|
@ -9,4 +9,6 @@
|
||||||
|
|
||||||
require_once(dirname(__FILE__) . '/lang.en-gb.php');
|
require_once(dirname(__FILE__) . '/lang.en-gb.php');
|
||||||
|
|
||||||
if (!isset($strings)) $strings = array('test' => 'test');
|
if (!isset($strings)) {
|
||||||
|
$strings = array('test' => 'test');
|
||||||
|
}
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
|
<?php use PHPCI\Helper\Lang; ?>
|
||||||
<div class="build-info-panel box box-solid">
|
<div class="build-info-panel box box-solid">
|
||||||
|
|
||||||
<div class="box-header">
|
<div class="box-header">
|
||||||
<h1 class="box-title">
|
<h1 class="box-title">
|
||||||
Committed by <?php print $build->getCommitterEmail(); ?>
|
<?php Lang::out('committed_by_x', $build->getCommitterEmail()); ?>
|
||||||
<label class="pull-right label"></label>
|
<label class="pull-right label"></label>
|
||||||
</h1>
|
</h1>
|
||||||
</div>
|
</div>
|
||||||
|
@ -17,10 +18,10 @@
|
||||||
</div>
|
</div>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
<strong>Branch: </strong> <?php print $build->getBranch(); ?>
|
<?php Lang::out('branch_x', $build->getBranch()); ?>
|
||||||
|
|
||||||
<?php if ($build->getCommitId() != 'Manual'): ?>
|
<?php if ($build->getCommitId() != 'Manual'): ?>
|
||||||
<br><strong>Commit ID: </strong> <?php print $build->getCommitId(); ?><br>
|
<br><?php Lang::out('commit_id_x', $build->getCommitId()); ?>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
var locPlugin = ActiveBuild.UiPlugin.extend({
|
var locPlugin = ActiveBuild.UiPlugin.extend({
|
||||||
id: 'build-lines-chart',
|
id: 'build-lines-chart',
|
||||||
css: 'col-lg-6 col-md-6 col-sm-12 col-xs-12',
|
css: 'col-lg-6 col-md-6 col-sm-12 col-xs-12',
|
||||||
title: 'Lines of Code',
|
title: Lang.get('lines_of_code'),
|
||||||
lastData: null,
|
lastData: null,
|
||||||
displayOnUpdate: false,
|
displayOnUpdate: false,
|
||||||
rendered: false,
|
rendered: false,
|
||||||
|
@ -24,7 +24,7 @@ var locPlugin = ActiveBuild.UiPlugin.extend({
|
||||||
},
|
},
|
||||||
|
|
||||||
render: function() {
|
render: function() {
|
||||||
return $('<div id="phploc-lines"></div>').text('This chart will display once the build has completed.');
|
return $('<div id="phploc-lines"></div>').text(Lang.get('chart_display'));
|
||||||
},
|
},
|
||||||
|
|
||||||
onUpdate: function(e) {
|
onUpdate: function(e) {
|
||||||
|
@ -44,7 +44,7 @@ var locPlugin = ActiveBuild.UiPlugin.extend({
|
||||||
|
|
||||||
$('#phploc-lines').empty().animate({height: '275px'});
|
$('#phploc-lines').empty().animate({height: '275px'});
|
||||||
|
|
||||||
var titles = ['Build', 'Lines', 'Comment Lines', 'Non-Comment Lines', 'Logical Lines'];
|
var titles = [Lang.get('build'), Lang.get('lines'), Lang.get('comment_lines'), Lang.get('noncomment_lines'), Lang.get('logical_lines')];
|
||||||
var data = [titles];
|
var data = [titles];
|
||||||
for (var i in builds) {
|
for (var i in builds) {
|
||||||
data.push(['#' + builds[i].build_id, parseInt(builds[i].meta_value.LOC), parseInt(builds[i].meta_value.CLOC), parseInt(builds[i].meta_value.NCLOC), parseInt(builds[i].meta_value.LLOC)]);
|
data.push(['#' + builds[i].build_id, parseInt(builds[i].meta_value.LOC), parseInt(builds[i].meta_value.CLOC), parseInt(builds[i].meta_value.NCLOC), parseInt(builds[i].meta_value.LLOC)]);
|
||||||
|
@ -52,8 +52,8 @@ var locPlugin = ActiveBuild.UiPlugin.extend({
|
||||||
|
|
||||||
var data = google.visualization.arrayToDataTable(data);
|
var data = google.visualization.arrayToDataTable(data);
|
||||||
var options = {
|
var options = {
|
||||||
hAxis: {title: 'Builds'},
|
hAxis: {title: Lang.get('builds')},
|
||||||
vAxis: {title: 'Lines'},
|
vAxis: {title: Lang.get('lines')},
|
||||||
backgroundColor: { fill: 'transparent' },
|
backgroundColor: { fill: 'transparent' },
|
||||||
height: 275
|
height: 275
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
var logPlugin = ActiveBuild.UiPlugin.extend({
|
var logPlugin = ActiveBuild.UiPlugin.extend({
|
||||||
id: 'build-log',
|
id: 'build-log',
|
||||||
css: 'col-lg-6 col-md-12 col-sm-12 col-xs-12',
|
css: 'col-lg-6 col-md-12 col-sm-12 col-xs-12',
|
||||||
title: 'Build Log',
|
title: Lang.get('build_log'),
|
||||||
|
|
||||||
init: function(){
|
init: function(){
|
||||||
this._super();
|
this._super();
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
var phpcpdPlugin = ActiveBuild.UiPlugin.extend({
|
var phpcpdPlugin = ActiveBuild.UiPlugin.extend({
|
||||||
id: 'build-phpcpd',
|
id: 'build-phpcpd',
|
||||||
css: 'col-lg-6 col-md-12 col-sm-12 col-xs-12',
|
css: 'col-lg-6 col-md-12 col-sm-12 col-xs-12',
|
||||||
title: 'PHP Copy/Paste Detector',
|
title: Lang.get('phpcpd'),
|
||||||
lastData: null,
|
lastData: null,
|
||||||
box: true,
|
box: true,
|
||||||
rendered: false,
|
rendered: false,
|
||||||
|
@ -26,9 +26,9 @@ var phpcpdPlugin = ActiveBuild.UiPlugin.extend({
|
||||||
return $('<table class="table" id="phpcpd-data">' +
|
return $('<table class="table" id="phpcpd-data">' +
|
||||||
'<thead>' +
|
'<thead>' +
|
||||||
'<tr>' +
|
'<tr>' +
|
||||||
' <th>File</th>' +
|
' <th>'+Lang.get('file')+'</th>' +
|
||||||
' <th>Start</th>' +
|
' <th>'+Lang.get('start')+'</th>' +
|
||||||
' <th>End</th>' +
|
' <th>'+Lang.get('end')+'</th>' +
|
||||||
'</tr>' +
|
'</tr>' +
|
||||||
'</thead><tbody></tbody></table>');
|
'</thead><tbody></tbody></table>');
|
||||||
|
|
||||||
|
@ -64,10 +64,10 @@ var phpcpdPlugin = ActiveBuild.UiPlugin.extend({
|
||||||
file = '<a target="_blank" href="'+fileLink+'">' + file + '</a>';
|
file = '<a target="_blank" href="'+fileLink+'">' + file + '</a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
var label = 'From';
|
var label = Lang.get('from');
|
||||||
|
|
||||||
if (i % 2 > 0) {
|
if (i % 2 > 0) {
|
||||||
label = 'To';
|
label = Lang.get('to');
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
rowClass = (rowClass == 'warning' ? 'danger' : 'warning');
|
rowClass = (rowClass == 'warning' ? 'danger' : 'warning');
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
var phpcsPlugin = ActiveBuild.UiPlugin.extend({
|
var phpcsPlugin = ActiveBuild.UiPlugin.extend({
|
||||||
id: 'build-phpcs',
|
id: 'build-phpcs',
|
||||||
css: 'col-lg-6 col-md-12 col-sm-12 col-xs-12',
|
css: 'col-lg-6 col-md-12 col-sm-12 col-xs-12',
|
||||||
title: 'PHP Code Sniffer',
|
title: Lang.get('phpcs'),
|
||||||
lastData: null,
|
lastData: null,
|
||||||
box: true,
|
box: true,
|
||||||
rendered: false,
|
rendered: false,
|
||||||
|
@ -25,9 +25,9 @@ var phpcsPlugin = ActiveBuild.UiPlugin.extend({
|
||||||
return $('<table class="table" id="phpcs-data">' +
|
return $('<table class="table" id="phpcs-data">' +
|
||||||
'<thead>' +
|
'<thead>' +
|
||||||
'<tr>' +
|
'<tr>' +
|
||||||
' <th>File</th>' +
|
' <th>'+Lang.get('file')+'</th>' +
|
||||||
' <th>Line</th>' +
|
' <th>'+Lang.get('line')+'</th>' +
|
||||||
' <th>Message</th>' +
|
' <th>'+Lang.get('message')+'</th>' +
|
||||||
'</tr>' +
|
'</tr>' +
|
||||||
'</thead><tbody></tbody></table>');
|
'</thead><tbody></tbody></table>');
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
var phpdoccheckPlugin = ActiveBuild.UiPlugin.extend({
|
var phpdoccheckPlugin = ActiveBuild.UiPlugin.extend({
|
||||||
id: 'build-phpdoccheck-warnings',
|
id: 'build-phpdoccheck-warnings',
|
||||||
css: 'col-lg-6 col-md-12 col-sm-12 col-xs-12',
|
css: 'col-lg-6 col-md-12 col-sm-12 col-xs-12',
|
||||||
title: 'PHP Docblock Checker',
|
title: Lang.get('phpdoccheck'),
|
||||||
lastData: null,
|
lastData: null,
|
||||||
displayOnUpdate: false,
|
displayOnUpdate: false,
|
||||||
box: true,
|
box: true,
|
||||||
|
@ -27,10 +27,10 @@ var phpdoccheckPlugin = ActiveBuild.UiPlugin.extend({
|
||||||
return $('<table class="table" id="phpdoccheck-data">' +
|
return $('<table class="table" id="phpdoccheck-data">' +
|
||||||
'<thead>' +
|
'<thead>' +
|
||||||
'<tr>' +
|
'<tr>' +
|
||||||
' <th>File</th>' +
|
' <th>'+Lang.get('file')+'</th>' +
|
||||||
' <th>Line</th>' +
|
' <th>'+Lang.get('line')+'</th>' +
|
||||||
' <th>Class</th>' +
|
' <th>'+Lang.get('class')+'</th>' +
|
||||||
' <th>Method</th>' +
|
' <th>'+Lang.get('method')+'</th>' +
|
||||||
'</tr>' +
|
'</tr>' +
|
||||||
'</thead><tbody></tbody></table>');
|
'</thead><tbody></tbody></table>');
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
var phpmdPlugin = ActiveBuild.UiPlugin.extend({
|
var phpmdPlugin = ActiveBuild.UiPlugin.extend({
|
||||||
id: 'build-phpmd-warnings',
|
id: 'build-phpmd-warnings',
|
||||||
css: 'col-lg-6 col-md-12 col-sm-12 col-xs-12',
|
css: 'col-lg-6 col-md-12 col-sm-12 col-xs-12',
|
||||||
title: 'PHP Mess Detector',
|
title: Lang.get('phpmd'),
|
||||||
lastData: null,
|
lastData: null,
|
||||||
displayOnUpdate: false,
|
displayOnUpdate: false,
|
||||||
box: true,
|
box: true,
|
||||||
|
@ -28,10 +28,10 @@ var phpmdPlugin = ActiveBuild.UiPlugin.extend({
|
||||||
return $('<table class="table" id="phpmd-data">' +
|
return $('<table class="table" id="phpmd-data">' +
|
||||||
'<thead>' +
|
'<thead>' +
|
||||||
'<tr>' +
|
'<tr>' +
|
||||||
' <th>File</th>' +
|
' <th>'+Lang.get('file')+'</th>' +
|
||||||
' <th>Start</th>' +
|
' <th>'+Lang.get('start')+'</th>' +
|
||||||
' <th>End</th>' +
|
' <th>'+Lang.get('end')+'</th>' +
|
||||||
' <th>Message</th>' +
|
' <th>'+Lang.get('message')+'</th>' +
|
||||||
'</tr>' +
|
'</tr>' +
|
||||||
'</thead><tbody></tbody></table>');
|
'</thead><tbody></tbody></table>');
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
var phpspecPlugin = ActiveBuild.UiPlugin.extend({
|
var phpspecPlugin = ActiveBuild.UiPlugin.extend({
|
||||||
id: 'build-phpspec-errors',
|
id: 'build-phpspec-errors',
|
||||||
css: 'col-lg-12 col-md-12 col-sm-12 col-xs-12',
|
css: 'col-lg-12 col-md-12 col-sm-12 col-xs-12',
|
||||||
title: 'PHPSpec',
|
title: Lang.get('phpspec'),
|
||||||
lastData: null,
|
lastData: null,
|
||||||
displayOnUpdate: false,
|
displayOnUpdate: false,
|
||||||
box: true,
|
box: true,
|
||||||
|
@ -28,9 +28,9 @@ var phpspecPlugin = ActiveBuild.UiPlugin.extend({
|
||||||
return $('<table class="table table-striped" id="phpspec-data">' +
|
return $('<table class="table table-striped" id="phpspec-data">' +
|
||||||
'<thead>' +
|
'<thead>' +
|
||||||
'<tr>' +
|
'<tr>' +
|
||||||
' <th>Suite</th>' +
|
' <th>'+Lang.get('suite')+'</th>' +
|
||||||
' <th>Test</th>' +
|
' <th>'+Lang.get('test')+'</th>' +
|
||||||
' <th>Result</th>' +
|
' <th>'+Lang.get('result')+'</th>' +
|
||||||
'</tr>' +
|
'</tr>' +
|
||||||
'</thead><tbody></tbody></table>');
|
'</thead><tbody></tbody></table>');
|
||||||
},
|
},
|
||||||
|
@ -57,8 +57,8 @@ var phpspecPlugin = ActiveBuild.UiPlugin.extend({
|
||||||
var row = $(
|
var row = $(
|
||||||
'<tr>'+
|
'<tr>'+
|
||||||
'<td>'+test_suite.name+'</td>'+
|
'<td>'+test_suite.name+'</td>'+
|
||||||
'<td title="Took '+test_case['time']+'Seconds">'+test_case.name+'</td>'+
|
'<td title="'+Lang.get('took_n_seconds', test_case['time'])+'">'+test_case.name+'</td>'+
|
||||||
'<td>'+(test_case.message?test_case.message:'OK')+'</td>'+
|
'<td>'+(test_case.message ? test_case.message : Lang.get('ok'))+'</td>'+
|
||||||
'</tr>'
|
'</tr>'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
var phpunitPlugin = ActiveBuild.UiPlugin.extend({
|
var phpunitPlugin = ActiveBuild.UiPlugin.extend({
|
||||||
id: 'build-phpunit-errors',
|
id: 'build-phpunit-errors',
|
||||||
css: 'col-lg-6 col-md-12 col-sm-12 col-xs-12',
|
css: 'col-lg-6 col-md-12 col-sm-12 col-xs-12',
|
||||||
title: 'PHPUnit',
|
title: Lang.get('phpunit'),
|
||||||
lastData: null,
|
lastData: null,
|
||||||
displayOnUpdate: false,
|
displayOnUpdate: false,
|
||||||
box: true,
|
box: true,
|
||||||
|
@ -28,7 +28,7 @@ var phpunitPlugin = ActiveBuild.UiPlugin.extend({
|
||||||
return $('<table class="table" id="phpunit-data">' +
|
return $('<table class="table" id="phpunit-data">' +
|
||||||
'<thead>' +
|
'<thead>' +
|
||||||
'<tr>' +
|
'<tr>' +
|
||||||
' <th>Test</th>' +
|
' <th>'+Lang.get('test')+'</th>' +
|
||||||
'</tr>' +
|
'</tr>' +
|
||||||
'</thead><tbody></tbody></table>');
|
'</thead><tbody></tbody></table>');
|
||||||
},
|
},
|
||||||
|
|
|
@ -28,9 +28,9 @@ var timePlugin = ActiveBuild.UiPlugin.extend({
|
||||||
return '<table class="table table-striped table-bordered">' +
|
return '<table class="table table-striped table-bordered">' +
|
||||||
'<thead>' +
|
'<thead>' +
|
||||||
'<tr>' +
|
'<tr>' +
|
||||||
'<th style="width: 33.3%">Build Created</th>' +
|
'<th style="width: 33.3%">'+Lang.get('build_created')+'</th>' +
|
||||||
'<th style="width: 33.3%">Build Started</th>' +
|
'<th style="width: 33.3%">'+Lang.get('build_started')+'</th>' +
|
||||||
'<th style="width: 33.3%">Build Finished</th>' +
|
'<th style="width: 33.3%">'+Lang.get('build_finished')+'</th>' +
|
||||||
'</tr>' +
|
'</tr>' +
|
||||||
'</thead>' +
|
'</thead>' +
|
||||||
'<tbody>' +
|
'<tbody>' +
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
var warningsPlugin = ActiveBuild.UiPlugin.extend({
|
var warningsPlugin = ActiveBuild.UiPlugin.extend({
|
||||||
id: 'build-warnings-chart',
|
id: 'build-warnings-chart',
|
||||||
css: 'col-lg-6 col-md-6 col-sm-12 col-xs-12',
|
css: 'col-lg-6 col-md-6 col-sm-12 col-xs-12',
|
||||||
title: 'Quality Trend',
|
title: Lang.get('quality_trend'),
|
||||||
keys: {
|
keys: {
|
||||||
'phpmd-warnings': 'PHPMD Warnings',
|
'phpmd-warnings': Lang.get('phpmd_warnings'),
|
||||||
'phpcs-warnings': 'PHPCS Warnings',
|
'phpcs-warnings': Lang.get('phpcs_warnings'),
|
||||||
'phpcs-errors': 'PHPCS Errors',
|
'phpcs-errors': Lang.get('phpcs_errors'),
|
||||||
'phplint-errors': 'PHPLint Errors',
|
'phplint-errors': Lang.get('phplint_errors'),
|
||||||
'phpunit-errors': 'PHPUnit Errors',
|
'phpunit-errors': Lang.get('phpunit_errors'),
|
||||||
'phpdoccheck-warnings': 'PHP Docblock Checker Warnings'
|
'phpdoccheck-warnings': Lang.get('phpdoccheck')
|
||||||
},
|
},
|
||||||
data: {},
|
data: {},
|
||||||
displayOnUpdate: false,
|
displayOnUpdate: false,
|
||||||
|
@ -39,7 +39,7 @@ var warningsPlugin = ActiveBuild.UiPlugin.extend({
|
||||||
},
|
},
|
||||||
|
|
||||||
render: function() {
|
render: function() {
|
||||||
return $('<div id="build-warnings"></div>').text('This chart will display once the build has completed.');
|
return $('<div id="build-warnings"></div>').text(Lang.get('chart_display'));
|
||||||
},
|
},
|
||||||
|
|
||||||
onUpdate: function(e) {
|
onUpdate: function(e) {
|
||||||
|
@ -91,8 +91,8 @@ var warningsPlugin = ActiveBuild.UiPlugin.extend({
|
||||||
|
|
||||||
var data = google.visualization.arrayToDataTable(data);
|
var data = google.visualization.arrayToDataTable(data);
|
||||||
var options = {
|
var options = {
|
||||||
hAxis: {title: 'Builds'},
|
hAxis: {title: Lang.get('builds')},
|
||||||
vAxis: {title: 'Warnings / Errors'},
|
vAxis: {title: Lang.get('issues')},
|
||||||
backgroundColor: { fill: 'transparent' },
|
backgroundColor: { fill: 'transparent' },
|
||||||
height: 275,
|
height: 275,
|
||||||
pointSize: 3
|
pointSize: 3
|
||||||
|
|
|
@ -484,6 +484,6 @@ var Lang = {
|
||||||
return sprintf.apply(sprintf[0], args);
|
return sprintf.apply(sprintf[0], args);
|
||||||
}
|
}
|
||||||
|
|
||||||
return '';
|
return 'MISSING: ' + string;
|
||||||
}
|
}
|
||||||
};
|
};
|
Loading…
Reference in a new issue