This commit is contained in:
Dmitry Khomutov 2017-01-06 18:39:04 +07:00
commit 69302adf2b
23 changed files with 202 additions and 187 deletions

View file

@ -181,21 +181,21 @@ PHP Censor',
'build' => 'Build',
'lines' => 'Lines',
'comment_lines' => 'Comment Lines',
'noncomment_lines' => 'Non-Comment 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',
'codeception_errors' => 'Codeception Errors',
'phpmd_warnings' => 'PHPMD Warnings',
'phpcs_warnings' => 'PHPCS Warnings',
'phpcs_errors' => 'PHPCS Errors',
'phplint_errors' => 'Lint Errors',
'phpunit_errors' => 'PHPUnit Errors',
'lines_of_code' => 'Lines of code',
'build_log' => 'Build log',
'quality_trend' => 'Quality trend',
'codeception_errors' => 'Codeception errors',
'phpmd_warnings' => 'PHPMD warnings',
'phpcs_warnings' => 'PHPCS warnings',
'phpcs_errors' => 'PHPCS errors',
'phplint_errors' => 'Lint errors',
'phpunit_errors' => 'PHPUnit errors',
'phpunit_fail_init' => 'Neither a configuration file nor a test directory found.',
'phpcpd_warnings' => 'PHP Copy/Paste Detector Warnings',
'phpdoccheck_warnings' => 'Missing Docblocks',
'phpcpd_warnings' => 'PHP Copy/Paste Detector warnings',
'phpdoccheck_warnings' => 'Missing docblocks',
'issues' => 'Issues',
'phpcpd' => 'PHP Copy/Paste Detector',
@ -462,7 +462,7 @@ PHP Censor',
'php_cpd' => 'PHP Copy/Paste Detector',
'php_docblock_checker' => 'PHP Docblock Checker',
'composer' => 'Composer',
'php_loc' => 'PHPLOC',
'php_loc' => 'PHP LOC',
'php_parallel_lint' => 'PHP Parallel Lint',
'email' => 'Email',
'atoum' => 'Atoum',

View file

@ -166,19 +166,19 @@ PHPCI',
'build' => 'Build',
'lines' => 'Lines',
'comment_lines' => 'Comment Lines',
'noncomment_lines' => 'Non-Comment Lines',
'logical_lines' => 'Logical Lines',
'lines_of_code' => 'Lines of Code',
'comment_lines' => 'Comment lines',
'noncomment_lines' => 'Non-Comment lines',
'logical_lines' => 'Logical lines',
'lines_of_code' => 'Lines of code',
'build_log' => 'Log de compilação',
'quality_trend' => 'Quality Trend',
'codeception_errors' => 'Codeception Errors',
'phpmd_warnings' => 'PHPMD Warnings',
'phpcs_warnings' => 'PHPCS Warnings',
'phpcs_errors' => 'PHPCS Errors',
'phplint_errors' => 'Lint Errors',
'phpunit_errors' => 'PHPUnit Errors',
'phpdoccheck_warnings' => 'Missing Docblocks',
'quality_trend' => 'Quality trend',
'codeception_errors' => 'Codeception errors',
'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',
'codeception' => 'Codeception',

View file

@ -446,7 +446,7 @@ PHP Censor',
'php_cpd' => 'PHP Copy/Paste Detector',
'php_docblock_checker' => 'PHP Docblock Checker',
'composer' => 'Composer',
'php_loc' => 'PHPLOC',
'php_loc' => 'PHP LOC',
'php_parallel_lint' => 'PHP Parallel Lint',
'email' => 'Email',
'atoum' => 'Atoum',

View file

@ -164,19 +164,19 @@ PHPCI',
'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',
'codeception_errors' => 'Codeception Errors',
'phpmd_warnings' => 'PHPMD Warnings',
'phpcs_warnings' => 'PHPCS Warnings',
'phpcs_errors' => 'PHPCS Errors',
'phplint_errors' => 'Lint Errors',
'phpunit_errors' => 'PHPUnit Errors',
'phpdoccheck_warnings' => 'Missing Docblocks',
'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',
'codeception_errors' => 'Codeception errors',
'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',
'codeception' => 'Codeception',

View file

@ -10,7 +10,6 @@ use PHPCensor\Model\Base\BuildErrorBase;
/**
* BuildError Model
* @uses PHPCensor\Model\Base\BuildErrorBase
*/
class BuildError extends BuildErrorBase
{

View file

@ -3,7 +3,7 @@ use PHPCensor\Helper\Lang;
$linkTemplate = $build->getFileLinkTemplate();
/** @var \PHPCI\Model\BuildError[] $errors */
/** @var \PHPCensor\Model\BuildError[] $errors */
foreach ($errors as $error):
$link = str_replace('{FILE}', $error->getFile(), $linkTemplate);
@ -11,7 +11,7 @@ foreach ($errors as $error):
$link = str_replace('{LINE_END}', $error->getLineEnd(), $link);
?>
<tr class="bg-<?php print $error->getSeverityClass(); ?>">
<tr>
<td>
<span class="label label-<?php print $error->getSeverityClass(); ?>">
<?php print Lang::get($error->getSeverityString()); ?>
@ -30,7 +30,7 @@ foreach ($errors as $error):
?>
</a>
</td>
<td class="visible-line-breaks"><?php print $error->getMessage(); ?></td>
<td class="visible-line-breaks"><?= trim($error->getMessage()); ?></td>
</tr>

View file

@ -134,11 +134,11 @@
<div class="tab-content">
<div class="tab-pane active" id="log">
<pre style="height: 400px; overflow-y: auto;"><?php print $data['log']; ?></pre>
<pre style="overflow-y: visible;"><?php print $data['log']; ?></pre>
</div>
<div class="tab-pane" id="errors">
<table class="errors-table table table-hover dataTable">
<table class="errors-table table">
<thead>
<tr>
<th><?php Lang::out('severity'); ?></th>
@ -149,7 +149,7 @@
</tr>
</thead>
<tbody>
<?php print $data['error_html']; ?>
<?php print $data['error_html']; ?>
</tbody>
</table>
</div>

View file

@ -96,7 +96,7 @@
<!-- Recent builds: -->
<div class="box box-primary">
<div class="box">
<div class="box-header"><h3 class="box-title">Builds</h3></div>
<table class="table table-striped table-bordered">
<thead>

View file

@ -1,9 +1,9 @@
<?php use PHPCensor\Helper\Lang; ?>
<?php if(empty($builds) || !count($builds)): ?>
<tr class="">
<td colspan="6"><?php Lang::out('no_builds_yet'); ?></td>
</tr>
<tr class="">
<td colspan="6"><?php Lang::out('no_builds_yet'); ?></td>
</tr>
<?php endif; ?>
<?php foreach($builds as $build): ?>
@ -11,36 +11,36 @@
<?php
switch($build->getStatus())
{
case 0:
$cls = 'active';
$subcls = 'info';
$status = Lang::get('pending');
break;
case 1:
$cls = 'warning';
$subcls = 'warning';
$status = Lang::get('running');
break;
case 2:
$cls = 'success';
$subcls = 'success';
$status = Lang::get('success');
break;
case 3:
$cls = 'danger';
$subcls = 'danger';
$status = Lang::get('failed');
break;
case 0:
$cls = 'active';
$subcls = 'info';
$status = Lang::get('pending');
break;
case 1:
$cls = 'warning';
$subcls = 'warning';
$status = Lang::get('running');
break;
case 2:
$cls = 'success';
$subcls = 'success';
$status = Lang::get('success');
break;
case 3:
$cls = 'danger';
$subcls = 'danger';
$status = Lang::get('failed');
break;
}
?>
<tr class="<?php print $cls; ?>">
<td><a href="<?php echo APP_URL ?>build/view/<?php print $build->getId(); ?>">#<?php print str_pad($build->getId(), 6, '0', STR_PAD_LEFT); ?></a></td>
<tr>
<td><a href="<?php echo APP_URL ?>build/view/<?php print $build->getId(); ?>">#<?php print str_pad($build->getId(), 6, '0', STR_PAD_LEFT); ?></a></td>
<td><?php print $build->getCreated()->format('Y-m-d H:i:s'); ?></td>
<td><a href="<?php echo APP_URL ?>project/view/<?php print $build->getProjectId(); ?>">
<td><a href="<?php echo APP_URL ?>project/view/<?php print $build->getProjectId(); ?>">
<i class="fa fa-<?php print $build->getProject()->getIcon(); ?>"></i>
<?php
@ -66,22 +66,22 @@ switch($build->getStatus())
?>
</td>
<td><a href="<?php print $build->getBranchLink(); ?>" target="_blank"><?php print $build->getBranch(); ?></a></td>
<td>
<span class='label label-<?php echo $subcls ?>'><?php echo $status ?></span>
</td>
<td>
<div class="btn-group">
<a class="btn btn-default btn-sm" href="<?php echo APP_URL ?>build/view/<?php print $build->getId(); ?>"><?php Lang::out('view'); ?></a>
<?php if($this->User()->getIsAdmin()): ?>
<button class="btn btn-default btn-sm dropdown-toggle" data-toggle="dropdown">
<span class="caret"></span>
</button>
<ul class="dropdown-menu">
<li><a href="<?php echo APP_URL ?>build/delete/<?php print $build->getId(); ?>" class="app-delete-build"><?php Lang::out('delete_build'); ?></a></li>
</ul>
<?php endif; ?>
</div>
</td>
<td><a href="<?php print $build->getBranchLink(); ?>" target="_blank"><?php print $build->getBranch(); ?></a></td>
<td>
<span class='label label-<?php echo $subcls ?>'><?php echo $status ?></span>
</td>
<td>
<div class="btn-group">
<a class="btn btn-default btn-sm" href="<?php echo APP_URL ?>build/view/<?php print $build->getId(); ?>"><?php Lang::out('view'); ?></a>
<?php if($this->User()->getIsAdmin()): ?>
<button class="btn btn-default btn-sm dropdown-toggle" data-toggle="dropdown">
<span class="caret"></span>
</button>
<ul class="dropdown-menu">
<li><a href="<?php echo APP_URL ?>build/delete/<?php print $build->getId(); ?>" class="app-delete-build"><?php Lang::out('delete_build'); ?></a></li>
</ul>
<?php endif; ?>
</div>
</td>
</tr>
<?php endforeach; ?>

View file

@ -1,5 +1,5 @@
<?php use PHPCensor\Helper\Lang; ?>
<div class="box box-primary">
<div class="box">
<div class="box-header">
<h3 class="box-title"><?php Lang::out('group_add_edit'); ?></h3>
</div>

View file

@ -5,7 +5,7 @@
</a>
</div>
<div class="box box-primary">
<div class="box">
<div class="box-header">
<h3 class="box-title"><?php Lang::out('project_groups'); ?></h3>
</div>

View file

@ -3,7 +3,7 @@
<div class="col-sm-5">
<?php foreach ($groups as $group): ?>
<div class="box box-primary">
<div class="box">
<div class="box-header">
<h3 class="box-title"><?php print $group['title']; ?></h3>
</div>
@ -16,7 +16,7 @@
</div>
<div class="col-sm-7 pull-left">
<div class="box box-primary">
<div class="box">
<div class="box-header">
<h3 class="box-title"><?php Lang::out('latest_builds'); ?></h3>
</div>

View file

@ -8,7 +8,7 @@
<div class="row">
<div class="col-md-6">
<div class="box box-primary">
<div class="box">
<div class="box-header">
<h3 class="box-title"><?php Lang::out('enabled_plugins'); ?></h3>
</div>
@ -35,7 +35,7 @@
</div>
<div class="col-md-6">
<div class="box box-primary">
<div class="box">
<div class="box-header">
<h3 class="box-title"><?php Lang::out('installed_packages'); ?></h3>
</div>

View file

@ -42,34 +42,34 @@
<div class="row">
<div class="col-lg-9 col-md-8 col-sm-8">
<div class="box box-primary">
<div class="col-lg-9 col-md-8 col-sm-8">
<div class="box">
<div class="box-header">
<h3 class="box-title"><?php Lang::out('builds'); ?> (<?php print $total; ?>)</h3>
</div>
<table class="table">
<thead>
<tr>
<th><?php Lang::out('id'); ?></th>
<table class="table">
<thead>
<tr>
<th><?php Lang::out('id'); ?></th>
<th><?php Lang::out('date'); ?></th>
<th><?php Lang::out('project'); ?></th>
<th class="hidden-md hidden-sm hidden-xs"><?php Lang::out('commit'); ?></th>
<th><?php Lang::out('branch'); ?></th>
<th><?php Lang::out('status'); ?></th>
<th style="width: 100px"></th>
</tr>
</thead>
<tbody id="latest-builds">
<?php print $builds; ?>
</tbody>
</table>
<th><?php Lang::out('project'); ?></th>
<th class="hidden-md hidden-sm hidden-xs"><?php Lang::out('commit'); ?></th>
<th><?php Lang::out('branch'); ?></th>
<th><?php Lang::out('status'); ?></th>
<th style="width: 100px"></th>
</tr>
</thead>
<tbody id="latest-builds">
<?php print $builds; ?>
</tbody>
</table>
</div>
</div>
</div>
<div class="col-lg-3 col-md-4 col-sm-4">
<?php if (in_array($project->getType(), ['github', 'gitlab', 'bitbucket'])): ?>
<div class="box box-info">
<div class="box">
<div class="box-header">
<h4 class="box-title"><?php Lang::out('webhooks'); ?></h4>
</div>
@ -100,7 +100,7 @@
<?php endif; ?>
<?php if ($project->getSshPublicKey()): ?>
<div class="box box-info">
<div class="box">
<div class="box-header"><h3 class="box-title"><a data-toggle="collapse" data-parent="#accordion" href="#publicCollapse"><?php Lang::out('public_key'); ?></a></h3></div>
<div class="box-body" style="word-break: break-all;"><?php print $project->getSshPublicKey(); ?></div>
</div>

View file

@ -1,8 +1,8 @@
<?php use PHPCensor\Helper\Lang; ?>
<div class="row">
<div class="col-sm-8">
<div class="box box-primary">
<div class="col-sm-8">
<div class="box ">
<div class="box-header">
<h3 class="box-title"><?php Lang::out('project_details'); ?></h3>
</div>
@ -11,11 +11,11 @@
<?php print $form; ?>
</div>
</div>
</div>
</div>
<?php if(!is_null($key)): ?>
<div class="col-sm-4">
<div class="box box-info">
<div class="box">
<div class="box-body">
<p><?php Lang::out('public_key_help'); ?></p>

View file

@ -30,20 +30,20 @@
</p>
<?php endif; ?>
<div class="box box-primary">
<div class="box">
<div class="box-body clearfix">
<?php print $basicSettings; ?>
</div>
</div>
<div class="box box-primary">
<div class="box">
<div class="box-header"><h3 class="box-title"><?php Lang::out('build_settings'); ?></h3></div>
<div class="box-body clearfix">
<?php print $buildSettings; ?>
</div>
</div>
<div class="box box-primary">
<div class="box">
<div class="box-header"><h3 class="box-title"><?php Lang::out('github_application'); ?></h3></div>
<div class="box-body clearfix">
@ -81,7 +81,7 @@
</div>
<div class="col-lg-4">
<div class="box box-info">
<div class="box">
<div class="box-header">
<h3 class="box-title"><?php Lang::out('github_where_to_find'); ?></h3>
</div>
@ -99,7 +99,7 @@
</div>
<div class="box box-primary">
<div class="box">
<div class="box-header">
<h3 class="box-title"><?php Lang::out('email_settings'); ?></h3>
</div>
@ -116,7 +116,7 @@
</div>
</div>
<div class="box box-primary">
<div class="box">
<div class="box-header">
<h3 class="box-title">Authentication Settings</h3>
</div>

View file

@ -6,8 +6,8 @@
</div>
<div class="row">
<div class="col-xs-12">
<div class="box box-primary">
<div class="col-xs-12">
<div class="box">
<table class="table">
<thead>
@ -56,6 +56,5 @@
</tbody>
</table>
</div>
</div>
</div>
</div>

View file

@ -3,7 +3,7 @@
<p class="alert alert-success"><?php Lang::out('your_details_updated'); ?></p>
<?php endif; ?>
<div class="box box-primary">
<div class="box">
<div class="box-header">
<h3 class="box-title"><?php Lang::out('update_your_details'); ?></h3>
</div>

View file

@ -1,9 +1,9 @@
<div class="row">
<div class="col-sm-12">
<div class="box box-primary">
<div class="col-sm-12">
<div class="box">
<div class="box-body">
<?php print $form; ?>
</div>
</div>
</div>
</div>
</div>