diff --git a/PHPCI/Application.php b/PHPCI/Application.php index 9e555d5c..3378a050 100644 --- a/PHPCI/Application.php +++ b/PHPCI/Application.php @@ -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(); } diff --git a/PHPCI/View/BuildsTable.phtml b/PHPCI/View/BuildsTable.phtml index 8ced123f..34a5ca72 100644 --- a/PHPCI/View/BuildsTable.phtml +++ b/PHPCI/View/BuildsTable.phtml @@ -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()) getProject()->getTitle(); ?> getCommitId(); ?> getBranch(); ?> - + + getPlugins(), true); + + if ( !is_array($plugins) ) { + $plugins = array(); + } + if ( 0 === count($plugins) ) { + ?> + + + + + $pluginstatus): + $subcls = $pluginstatus?'label label-success':'label label-important'; + ?> + + + + +
+
View diff --git a/assets/css/phpci.css b/assets/css/phpci.css index 931c4b0a..cfb886d4 100644 --- a/assets/css/phpci.css +++ b/assets/css/phpci.css @@ -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)); @@ -61,7 +75,7 @@ body background: url('/assets/img/icon-build-running.png') no-repeat top left; } -h3 +h3 { border-bottom: 1px solid #f0f0f0; margin-top: 0;