Merge pull request #77 from gabriel403/feature/uitweaks
You certainly can has merge.
This commit is contained in:
commit
bbb40ee89b
|
@ -10,6 +10,7 @@
|
|||
namespace PHPCI;
|
||||
|
||||
use b8;
|
||||
use b8\Registry;
|
||||
use b8\Http\Response\RedirectResponse;
|
||||
use b8\View;
|
||||
|
||||
|
@ -35,6 +36,9 @@ class Application extends b8\Application
|
|||
$skipValidation = ($externalAction || $sessionAction);
|
||||
|
||||
if($skipValidation || $this->validateSession()) {
|
||||
if ( !empty($_SESSION['user']) ) {
|
||||
Registry::getInstance()->set('user', $_SESSION['user']);
|
||||
}
|
||||
parent::handleRequest();
|
||||
}
|
||||
|
||||
|
|
|
@ -11,21 +11,26 @@ switch($build->getStatus())
|
|||
{
|
||||
case 0:
|
||||
$cls = 'info';
|
||||
$subcls = 'info';
|
||||
$status = 'Pending';
|
||||
|
||||
break;
|
||||
|
||||
case 1:
|
||||
$cls = 'warning';
|
||||
$subcls = 'warning';
|
||||
$status = 'Running';
|
||||
break;
|
||||
|
||||
case 2:
|
||||
$cls = 'success';
|
||||
$subcls = 'success';
|
||||
$status = 'Success';
|
||||
break;
|
||||
|
||||
case 3:
|
||||
$cls = 'error';
|
||||
$subcls = 'important';
|
||||
$status = 'Failed';
|
||||
break;
|
||||
}
|
||||
|
@ -35,7 +40,31 @@ switch($build->getStatus())
|
|||
<td><a href="<?= PHPCI_URL ?>project/view/<?php print $build->getProjectId(); ?>"><?php print $build->getProject()->getTitle(); ?></a></td>
|
||||
<td><a href="<?php print $build->getCommitLink(); ?>"><?php print $build->getCommitId(); ?></a></td>
|
||||
<td><a href="<?php print $build->getBranchLink(); ?>"><?php print $build->getBranch(); ?></a></td>
|
||||
<td><?php print $status; ?></td>
|
||||
<td>
|
||||
<?php
|
||||
$plugins = json_decode($build->getPlugins(), true);
|
||||
|
||||
if ( !is_array($plugins) ) {
|
||||
$plugins = array();
|
||||
}
|
||||
if ( 0 === count($plugins) ) {
|
||||
?>
|
||||
<span class='label label-<?= $subcls ?>'>
|
||||
<?= $status ?>
|
||||
</span>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
foreach($plugins as $plugin => $pluginstatus):
|
||||
$subcls = $pluginstatus?'label label-success':'label label-important';
|
||||
?>
|
||||
<span class='<?= $subcls ?>'>
|
||||
<?= ucwords(str_replace('_', ' ', $plugin)) ?>
|
||||
</span>
|
||||
<?php endforeach; ?>
|
||||
<br style='clear:both;' />
|
||||
</td>
|
||||
<td>
|
||||
<div class="btn-group">
|
||||
<a class="btn" href="<?= PHPCI_URL ?>build/view/<?php print $build->getId(); ?>">View</a>
|
||||
|
|
|
@ -14,6 +14,20 @@ body
|
|||
padding: 10px;
|
||||
}
|
||||
|
||||
td .label { margin-right: 5px; }
|
||||
|
||||
.success-message {
|
||||
background-color: #4F8A10;
|
||||
}
|
||||
|
||||
.error-message {
|
||||
background-color: #FF4747;
|
||||
}
|
||||
|
||||
#latest-builds td {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.widget-title, .modal-header, .table th, div.dataTables_wrapper .ui-widget-header, .ui-dialog .ui-dialog-titlebar {
|
||||
background-color: #efefef;
|
||||
background-image: -webkit-gradient(linear, 0 0%, 0 100%, from(#fdfdfd), to(#eaeaea));
|
||||
|
|
Loading…
Reference in a new issue