Skip to content
Snippets Groups Projects
Commit cb3e4c8a authored by hahn's avatar hahn
Browse files

temp checkin 9

parent 6ad4b635
Branches
No related tags found
No related merge requests found
......@@ -29,7 +29,7 @@
}
}
body{}
body{padding-top: 0;}
body, label, input, button, select, textarea, p, .btn {
font-size: 12px;
}
......@@ -55,6 +55,7 @@
background: none;
padding: 0.5em; margin-bottom: 2em;
}
.description{font-weight:bold; color:#aaa; font-size: 200%; font-style: italic;}
#content{
margin-top: 2em;
border-left: 0px solid #ccc;
......
......@@ -792,15 +792,21 @@ public function getBox($sWarnlevel, $sMessage){
return $sReturn;
}
public function queue($sTargetphase, $sVersion) {
/**
* put a packaged version into the queue of a specified phase
* @param string $sPhase name of the phase
* @param string $sVersion version
* @return string
*/
public function queue($sPhase, $sVersion) {
if (!$this->isActivePhase($sTargetphase)) return false;
if (!$this->isActivePhase($sPhase)) return false;
$sReturn="<h2>Queue to $sTargetphase</h2>";
$sReturn="<h2>Queue to $sPhase</h2>";
$sPlace="onhold";
$sLinkTarget = $this->_getArchiveDir($sVersion);
$sLinkName = $this->_getFileBase($sTargetphase, $sPlace);
$sLinkName = $this->_getFileBase($sPhase, $sPlace);
// --------------------------------------------------
// Checks
......@@ -832,11 +838,17 @@ public function getBox($sWarnlevel, $sMessage){
return $this->getBox("error", 'Queuing failed One of the commands failed.' . $sReturn);
}
$sReturn.=$this->getBox("success", "the version $sVersion was set to place $sPlace");
$sReturn.=$this->deploy($sTargetphase);
$sReturn.=$this->deploy($sPhase);
return $sReturn;
}
/**
* deploy a queued package - this moves the queue into the repo directory
* and will be installed on server within 30 min
* @param type $sTargetphase
* @return boolean|string
*/
public function deploy($sTargetphase) {
if (!$this->isActivePhase($sTargetphase)) return false;
......
......@@ -96,16 +96,23 @@ class projectlist {
public function renderOverview() {
$sOut = '';
$oPrj = false;
$sTrClass="trproject";
$sColClass="tdphase";
$sNavi='';
$sNavi.='<option value="trproject">Alle</option>';
$sPrjFilter='';
$sPhaseFilter='';
$sPrjFilter.='<option value="'.$sTrClass.'">Alle</option>';
$sPhaseFilter.='<option value="'.$sColClass.'">Alle</option>';
foreach (array_keys($this->_aPhases) as $sPhase) {
$sPhaseFilter.='<option value="'.$sPhase.'">'.$sPhase.'</option>';
}
// loop over projects
foreach ($this->_aProjects as $sPrj => $aData) {
$oPrj = new project($sPrj);
$sNavi.='<option value="'.$sPrj.'">'.$oPrj->getLabel().'</option>';
$sPrjFilter.='<option value="'.$sPrj.'">'.$oPrj->getLabel().'</option>';
$aPrjData = $oPrj->getAllPhaseInfos();
$sOutPhases = '';
......@@ -119,7 +126,7 @@ class projectlist {
if (!$oPrj->isActivePhase($sPhase)) {
$sOutPhases.='
<td class="' . $sPhase . '" colspan="3">
<td class="' . $sPhase . ' '.$sColClass.'" colspan="3">
<div class="versioninfo center inactive"><i class="icon-ban-circle"></i> inactive</div>
</td>';
} else {
......@@ -187,17 +194,17 @@ class projectlist {
// output
$sOutPhases.='
<td class="' . $sPhase . '">
<td class="' . $sPhase . ' '.$sColClass.'">
<div class="versioninfo">
' . $sInfoH . '
</div>
</td>
<td class="' . $sPhase . '">
<td class="' . $sPhase . ' '.$sColClass.'">
<div class="versioninfo">
' . $sInfoQ . '
</div>
</td>
<td class="' . $sPhase . '">
<td class="' . $sPhase . ' '.$sColClass.'">
<div class="versioninfo">
' . $sInfoD . '
</div>
......@@ -209,7 +216,7 @@ class projectlist {
// render output
$sOut.='
<tr class="'.$sPrj.' trproject">
<tr class="'.$sPrj.' '.$sTrClass.'">
<td class="prj">
<a href="/deployment/'.$sPrj.'/" class="btn "><i class=" icon-book"></i> '.$oPrj->getLabel().'</a><br>
' . $oPrj->getDescription() . '<br>';
......@@ -224,28 +231,34 @@ class projectlist {
if ($sOut)
$sOut = '
Projekt-Filter:
<select onchange="$(\'.trproject\').hide(); $(\'.\' + this.value).show();">
'.$sNavi.'
<select onchange="$(\'.'.$sTrClass.'\').hide(); $(\'.\' + this.value).show();">
'.$sPrjFilter.'
</select>
&nbsp;&nbsp;&nbsp;
Phasen:
<select onchange="$(\'.'.$sColClass.'\').hide(); $(\'.\' + this.value).show();">
'.$sPhaseFilter.'
</select>
<table class="table" id="tbloverview">
<thead>
<tr>
<th class="prj">Projekt</th>
<th class="preview" colspan="3" >Preview</th>
<th class="stage" colspan="3" >Stage</th>
<th class="live" colspan="3" >Live</th>
<th class="preview '.$sColClass.'" colspan="3" >Preview</th>
<th class="stage '.$sColClass.'" colspan="3" >Stage</th>
<th class="live '.$sColClass.'" colspan="3" >Live</th>
</tr>
<tr>
<td></td>
<td class="preview">Queue</td>
<td class="preview">Repo</td>
<td class="preview">Installiert</td>
<td class="stage">Queue</td>
<td class="stage">Repo</td>
<td class="stage">Installiert</td>
<td class="live">Queue</td>
<td class="live">Repo</td>
<td class="live">Installiert</td>
<td class="preview '.$sColClass.'">Queue</td>
<td class="preview '.$sColClass.'">Repo</td>
<td class="preview '.$sColClass.'">Installiert</td>
<td class="stage '.$sColClass.'">Queue</td>
<td class="stage '.$sColClass.'">Repo</td>
<td class="stage '.$sColClass.'">Installiert</td>
<td class="live '.$sColClass.'">Queue</td>
<td class="live '.$sColClass.'">Repo</td>
<td class="live '.$sColClass.'">Installiert</td>
</tr>
</thead>
<tbody>
......
......@@ -50,7 +50,7 @@ function getTopArea(){
require_once("./classes/project.class.php");
$oPrj=new project($aParams["prj"]);
$sReturn=' '. aHome() . ' ' . aPrjHome().'
<h1>'.$oPrj->getLabel().'</h1><span>'.$oPrj->getDescription().'</div>';
<h1>'.$oPrj->getLabel().'</h1><span class="description">'.$oPrj->getDescription().'</div>';
if (array_key_exists("action", $aParams)){
$sReturn.='<h2>Aktion: '.$aParams["action"].'</h2>';
}
......
<?php
// http://iml:deployment@ci.iml.unibe.ch/deployment/?prj=ci&action=deploy&par3=preview&confirm=1
require_once(dirname(__dir__) . "/public_html/deployment/config/inc_projects_config.php");
$sAuth="iml:deployment@";
echo "===== IMLDEPLOYMENT - deploy all projects =====\n";
foreach ($aProjects as $sPrj=>$aData){
echo "--- $sPrj\n";
foreach (array_keys($aConfig["phases"]) as $sPhase){
echo "$sPhase ... ";
$sUrl="http://${sAuth}ci.iml.unibe.ch/deployment/?prj=${sPrj}&action=deploy&par3=${sPhase}&confirm=1";
echo file_get_contents($sUrl);
}
echo "\n";
}
echo "done\n";
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment