UI plugins, including quality trend chart, logs and lines of code. Some UI tweaks.
This commit is contained in:
parent
a634f6086b
commit
b33189e08e
28 changed files with 2778 additions and 217 deletions
|
|
@ -31,10 +31,28 @@ class BuildController extends \PHPCI\Controller
|
|||
public function view($buildId)
|
||||
{
|
||||
$build = $this->_buildStore->getById($buildId);
|
||||
$this->view->plugins = $this->getUiPlugins();
|
||||
$this->view->build = $build;
|
||||
$this->view->data = $this->getBuildData($buildId);
|
||||
}
|
||||
|
||||
protected function getUiPlugins()
|
||||
{
|
||||
$rtn = array();
|
||||
$path = APPLICATION_PATH . 'public/assets/js/build-plugins/';
|
||||
$dir = opendir($path);
|
||||
|
||||
while ($item = readdir($dir)) {
|
||||
if (substr($item, 0, 1) == '.' || substr($item, -3) != '.js') {
|
||||
continue;
|
||||
}
|
||||
|
||||
$rtn[] = $item;
|
||||
}
|
||||
|
||||
return $rtn;
|
||||
}
|
||||
|
||||
/**
|
||||
* AJAX call to get build data:
|
||||
*/
|
||||
|
|
@ -43,6 +61,23 @@ class BuildController extends \PHPCI\Controller
|
|||
die($this->getBuildData($buildId));
|
||||
}
|
||||
|
||||
/**
|
||||
* AJAX call to get build meta:
|
||||
*/
|
||||
public function meta($buildId)
|
||||
{
|
||||
$build = $this->_buildStore->getById($buildId);
|
||||
$key = $this->getParam('key', null);
|
||||
$numBuilds = $this->getParam('num_builds', 1);
|
||||
$data = null;
|
||||
|
||||
if ($key && $build) {
|
||||
$data = $this->_buildStore->getMeta($key, $build->getProjectId(), $buildId, $numBuilds);
|
||||
}
|
||||
|
||||
die(json_encode($data));
|
||||
}
|
||||
|
||||
/**
|
||||
* Get build data from database and json encode it:
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue