Select Git revision
act_overview.php 5.60 KiB
<?php
/* ######################################################################
IML DEPLOYMENT
webgui - overview
* for all projects
* for a single project
---------------------------------------------------------------------
2014-11-17 Axel <axel.hahn@iml.unibe.ch> added tags and branches
2014-04-24 Axel <axel.hahn@iml.unibe.ch> new visual; sortorder in
project overview
2013-11-08 Axel <axel.hahn@iml.unibe.ch>
###################################################################### */
if (!array_key_exists("prj", $aParams)) {
// ----------------------------------------------------------------------
// overview over all projects
// ----------------------------------------------------------------------
require_once("./classes/projectlist.class.php");
$oPrjList = new projectlist();
$sOut = $oPrjList->renderOverview();
} else {
// ----------------------------------------------------------------------
// overview of a single project
// ----------------------------------------------------------------------
require_once("./classes/project.class.php");
$oPrj = new project($aParams["prj"]);
$iCountOfBranches=0;
$iCountOfBuildErrors=count($oPrj->getBuildErrors());
$iCountOfpackages=count($oPrj->getVersions());
$iCountOfPhases=count($oPrj->getActivePhases());
$sBuildErrorContent='<p>'.t('build-failes-hint').'</p>';
if($iCountOfBuildErrors){
$aTabdata=array();
$aErrorfiles=$oPrj->getBuildErrors();
rsort($aErrorfiles);
foreach ($aErrorfiles as $sNumber=>$sErrorfile){
$aTabdata[$oHtml->getIcon('file-any').' '.$sErrorfile]=''
// . 'file: ' . $oHtml->getIcon('file-target'). ''.$sErrorfile.'<br>'
// . 'date: ' . .'<br>'
// . 'age: ' . .'<br>'
. $oPrj->getBuildErrorContent($sErrorfile);
}
$sBuildErrorContent.=$oHtml->getNav(array(
'options' => array(
'type'=>'pills',
'justified'=>0,
),
'tabs'=>$aTabdata)
);
} else {
$sBuildErrorContent=$oHtml->getBox('info', t('build-failes-none'));
}
$sListOfBranches='<h4>'.t('branch-select').'</h4><ol>';
foreach($oPrj->getRemoteBranches() as $aBranch){
$sListOfBranches.='<li title="'.$aBranch['revision'].'">'.$aBranch['label'] . '</li>';
$iCountOfBranches++;
}
$sListOfBranches.='</ol>';