diff --git a/config/lang/de-de.json b/config/lang/de-de.json index cb4cd76ce6a85aab480564e96e8f7364dbc02432..55e082a64df3170ddad2bec7d8c4366facefcce6 100644 --- a/config/lang/de-de.json +++ b/config/lang/de-de.json @@ -35,6 +35,8 @@ "overview-filterreset-hint":"Filter zurücksetzen", "overview-filterprogress":"Fortschritt", "overview-projectcount":"Anzahl der Projekte", + "overview-actions-title":"Actionen", + "overview-actions-hint":"Die wichtigsten Aktionen:", "class-actionlog-title": "Action-Log", "class-actionlog-filter": "Filter", @@ -303,7 +305,7 @@ "ok": "OK", "packages": "Pakete", "phase": "Phase", - "phase-details": "Details", + "phase-details": "Details %s", "phase-details-hint": "Details zur Phase [%s]", "phase-is-active": "Phase aktivieren", "phase-targethosts": "Zielsysteme", diff --git a/config/lang/en-en.json b/config/lang/en-en.json index 0f301b350ea73820f4b08eb7887401494cc5fe29..8b9d9e3b10ad20ca762477c20cd35efa8fdfed85 100644 --- a/config/lang/en-en.json +++ b/config/lang/en-en.json @@ -20,7 +20,7 @@ "overview-label": "Overview", - "overview-hint":"all projects and versions in all phases", + "overview-hint":"All projects and versions in all phases", "overview-hint-dblclick":"Double click to open the project [%s]", "overview-filter":"Filter", "overview-filter-hint":"Show only this project", @@ -34,6 +34,8 @@ "overview-filterreset-hint":"Remove all filter settings", "overview-filterprogress":"Progress", "overview-projectcount":"Count of projects", + "overview-actions-title":"Actions", + "overview-actions-hint":"Most relevant actions for this project:", "class-actionlog-title": "Action-Log", "class-actionlog-filter": "Filter", @@ -305,7 +307,7 @@ "ok": "OK", "packages": "packages", "phase": "Phase", - "phase-details": "Details", + "phase-details": "Details %s", "phase-details-hint": "Details of phase [%s]", "phase-is-active": "Activate phase", "phase-targethosts": "Target hosts", diff --git a/public_html/deployment/classes/actionlog.class.php b/public_html/deployment/classes/actionlog.class.php index d0a386bc3fce13ef7c949254df71b3fb5cedd3c6..6a86b3ac37d46b0c24004475b74ca13cc2274285 100644 --- a/public_html/deployment/classes/actionlog.class.php +++ b/public_html/deployment/classes/actionlog.class.php @@ -348,8 +348,8 @@ class Actionlog { } else { $sReturn= '<strong>' - . '<button onclick="setLogVisibility(\'block\');" id="btnShowLogs" class="btn btn-secondary btnLogs"><i class="fa-solid fa-chevron-right"></i> </button>' - . '<button onclick="setLogVisibility(\'none\');" id="btnHideLogs" class="btn btn-secondary btnLogs"><i class="fa-solid fa-chevron-down"></i> </button>' + . '<button onclick="setLogVisibility(\'block\');" id="btnShowLogs" class="btn btn-default btnLogs"><i class="fa-solid fa-chevron-right"></i> </button>' + . '<button onclick="setLogVisibility(\'none\');" id="btnHideLogs" class="btn btn-default btnLogs"><i class="fa-solid fa-chevron-down"></i> </button>' . ' ' . t("class-actionlog-title") .(isset($aFilter["project"]) ? ' ['.$aFilter["project"].'] ' : '') . '</strong>' diff --git a/public_html/deployment/classes/htmlelements.class.php b/public_html/deployment/classes/htmlelements.class.php index 91943c7c97d4a3226b6a2c457496ed85b08ef447..0296b1783d125690e684151780a94bbe082b9499 100755 --- a/public_html/deployment/classes/htmlelements.class.php +++ b/public_html/deployment/classes/htmlelements.class.php @@ -133,7 +133,7 @@ class htmlelements { } // do not use this .. it overrides internal attribute vars // return $this->getTag('i', array('class'=>$sPrefix.$sIconclass)); - return '<i class="'.$sPrefix.$sIconclass.'"></i> '; + return '<i class="'.$sPrefix.$sIconclass.'"></i> '; } diff --git a/public_html/deployment/classes/htmlguielements.class.php b/public_html/deployment/classes/htmlguielements.class.php index 4ebc040673ee3e1c0ff1848716f0b8ec34963939..7c3e2cec6a412bbd2c448ef6a80bbe4801184559 100644 --- a/public_html/deployment/classes/htmlguielements.class.php +++ b/public_html/deployment/classes/htmlguielements.class.php @@ -354,13 +354,18 @@ class htmlguielements{ $aItem[$sKey]=''; } } - $aItem['class'].='btn btn-default'; + // if not class "btn" was added: add "btn" + // if not class "btn-[something]" was added: add "btn-default" + $sClass=$aItem['class']; + $sClass=(strstr($sClass, 'btn-') ? '' : 'btn-default ').$sClass; + $sClass=(strstr($sClass, 'btn ') ? '' : 'btn ').$sClass; + $aItem['class']=$sClass; if (isset($aItem['type'])){ $aItem=$this->_getButtonattributesByType($aItem); unset($aItem['type']); } - + // $aItem['label'].=' -> '.$sClass; return $this->getLink($aItem); } diff --git a/public_html/deployment/classes/project_gui.class.php b/public_html/deployment/classes/project_gui.class.php index 15c1e8458d14ceb0b62773742fb29fc00691d787..31ea97c9da41ecad158d82c896c83262b2e4b3f3 100644 --- a/public_html/deployment/classes/project_gui.class.php +++ b/public_html/deployment/classes/project_gui.class.php @@ -320,7 +320,7 @@ class projectgui extends project { ), 'phase' => array('icon' => $this->_oHtml->getIcon('phase'), 'class' => $sPhase, 'hint' => sprintf(t('phase-details-hint'), $sPhase), - 'label' => t('phase-details') + 'label' => sprintf(t('phase-details'), $sPhase), ), 'rollback' => array('class' => $sPhase, 'hint' => sprintf(t('rollback-hint'), $sPhase, $sVersion), @@ -328,7 +328,8 @@ class projectgui extends project { ), 'setup' => array('class' => $sPhase, 'hint' => sprintf(t('setup-hint'), $sPhase, $sVersion), - 'label' => t('setup') + 'label' => t('setup'), + 'class' => 'btn-primary' ), ); /* @@ -392,10 +393,11 @@ class projectgui extends project { return '<span class="btn disabled btn-default" title="no permission [project-action-' . $sFunction . '] for user [' . $this->oUser->getUsername() . ']"><i class="' . $sIconClass . '"></i> ' . $sLabel . '</span>'; } + // $sClass='btn ' . (strstr('btn-', $sClass) ? '': 'btn-default ') .$sClass; return $this->_oHtml->getLinkButton(array( 'href' => $sLink, 'title' => $sHint, - 'class' => 'btn btn-default ' . $sClass, + 'class' => $sClass, 'type' => $sFunction, 'onmouseover' => $sOnMouseover, 'onmouseout' => $sOnMouseout, @@ -1361,8 +1363,8 @@ class projectgui extends project { foreach (array_keys($this->getPhases()) as $sPhase) { if ($this->isActivePhase($sPhase)){ $sRolloutDebug.='<strong>'.$sPhase.'</strong>' - . '<pre>Config = '.print_r($this->oRolloutPlugin->getConfig($sPhase), 1).'</pre>' - . '<pre>Commands = '.print_r($this->oRolloutPlugin->getDeployCommands($sPhase), 1).'</pre>' + . '<pre>Config = '.print_r($this->oRolloutPlugin->getConfig($sPhase, 1), 1).'</pre>' + . '<pre>Commands = '.print_r($this->oRolloutPlugin->getDeployCommands($sPhase, 1), 1).'</pre>' ; } } @@ -1609,7 +1611,7 @@ class projectgui extends project { */ public function renderVisual() { $sReturn = ''; - $sContinue = '<span style="font-size: 300%; color:#ace;">»»</span><br><br>'; + $sContinue = '<span style="font-size: 300%; color:#ace;">»»</span><br>'; $aBranches=$this->getRemoteBranches(); if(!is_array($aBranches)){ @@ -1655,32 +1657,25 @@ class projectgui extends project { $sDetail = $sFullbar . '<br>' . $sPhase; $sPhaseImg.=' - <div class="process ' . $sPhase . '"> + <div class="process"> <div class="details">' . $sDetail . ' </div> - <div><img src="/deployment/images/process/bg_phase.png" alt="' . t("phase") . ' ' . $sPhase . '"></div> </div>'; } $sReturn = ' <div class="visualprocess"> <div class="process box"> - <div class="title">' . $this->_oHtml->getIcon('repository') . t("versioncontrol") . '</div> + <div class="title">' . t("versioncontrol") . '</div> <div class="details"> ' . $sRepoBar . '<br> - <!-- - <a href="#h3repo" class="scroll-link">' . t("repositoryinfos") . '</a><br> - --> ' . t("repositoryinfos") . '<br> - ' . $this->_aPrjConfig["build"]["type"] . '</strong> ' . preg_replace('/.*\@(.*):.*/', '($1)', $this->_aPrjConfig["build"]["url"]) - . ': <strong title="' . t('branch-select') . '">' . count($aBranches) . '</strong>' - . '<br> - </div> - <div> - <img src="/deployment/images/process/bg_vcs.png" alt="' . t("versioncontrol") . '"> + ' // . $this->_aPrjConfig["build"]["type"] + . preg_replace('/.*\@(.*):.*/', '$1', $this->_aPrjConfig["build"]["url"]) + . '<br>(<strong title="' . t('branch-select') . '">' . count($aBranches) . '</strong>)' + . ' </div> </div> <div class="process"> - <div class="title"> </div> <div class="action">' . $sContinue . t("build-hint-overview") . '<br><br>' . ($this->canAcceptPhase() ? $this->renderLink("build") : '') . '</div> </div> @@ -1689,17 +1684,12 @@ class projectgui extends project { <div class="title">' . $this->_oHtml->getIcon('package') . t("archive") . '</div> <div class="details"> ' . $sPackagebar . '<br> - <!-- - <a href="#h3versions" class="scroll-link">' . t("packages") . '</a><br> - --> ' . t("packages") . '<br> (<strong>' . count($this->_getVersionUsage()) . '</strong>) </div> - <div><img src="/deployment/images/process/bg_archive.png" alt="' . t("archive") . '"></div> </div> <div class="process"> - <div class="title"> </div> <div class="action">'.$sContinue . sprintf(t("queue-hint-overview"), $this->getNextPhase()).'</div> </div> @@ -1710,7 +1700,6 @@ class projectgui extends project { </div> <div style="clear:both"></div> '; - return $sReturn; } diff --git a/public_html/deployment/classes/projectlist.class.php b/public_html/deployment/classes/projectlist.class.php index 332f48be6e739eaa99f42107216dcfe2ccc46199..72f7065d2f6c6c5f16bd5e0354002b81e36ddbba 100644 --- a/public_html/deployment/classes/projectlist.class.php +++ b/public_html/deployment/classes/projectlist.class.php @@ -49,7 +49,8 @@ class projectlist extends base{ * @return string */ public function renderOverview() { - + global $renderAdminLTE; + $sOut = ''; // table $sOut2 = ''; // tiles $oPrj = false; @@ -57,7 +58,7 @@ class projectlist extends base{ $sColClass = "tdphase"; $sNone='none'; - $oPrj1 = new project(); + $oPrj1 = new projectgui(); $oHtml=new htmlguielements(); $sPrjFilter = ''; @@ -238,7 +239,7 @@ class projectlist extends base{ $sRowHead1.='<th class="' . $sPhase . ' ' . $sColClass . '" colspan="3">' . $oHtml->getIcon('phase').$sPhase . '</th>'; $sRowHead2.=$oPrj->renderPlacesAsTd($sPhase); } - $sOut = ' + $sOutTop = ' <script> /** @@ -550,9 +551,8 @@ class projectlist extends base{ onclick="resetFilter();">'.$oHtml->getIcon('close').t("overview-filterreset") . '</a> </form> <div style="clear: both; margin-bottom: 1em"></div> - </div> - - '.$sErrors + </div>'; + $sOut=$sErrors /* .' @@ -584,6 +584,21 @@ class projectlist extends base{ . $oPrj1->renderLink("new") ; } + + $sOut='' + .$renderAdminLTE->addRow( + $renderAdminLTE->addCol($sOutTop, 12) + ) + .$renderAdminLTE->addRow( + $renderAdminLTE->addCol( + $renderAdminLTE->getCard([ + 'type'=>'gray', + 'variant'=>'outline', + 'text'=>$sOut, + ]), + 12 + ) + ); return $sOut; } diff --git a/public_html/deployment/classes/rollout.interface.php b/public_html/deployment/classes/rollout.interface.php index 5b84025cd77fc134328c8ae540df994a1957d61c..5b973b933d54f4dcb96bf4554cfb99827c6df57e 100644 --- a/public_html/deployment/classes/rollout.interface.php +++ b/public_html/deployment/classes/rollout.interface.php @@ -30,16 +30,19 @@ interface iRolloutplugin { /** * get configuration for the project .. or more specifi for a given phase - * @param string $sPhase + * @param string $sPhase + * @param boolean $bMask Flag for public output; if true then mask your secrets + * @return array */ - public function getConfig($sPhase=false); + public function getConfig($sPhase=false, $bMask=false); /** * get an array with shell commands to execute - * @param string $sPhase + * @param string $sPhase + * @param boolean $bMask Flag for public output; if true then mask your secrets * @return array */ - public function getDeployCommands($sPhase); + public function getDeployCommands($sPhase, $bMask=false); /** * get name of plugin as string ... language specific diff --git a/public_html/deployment/classes/rollout_base.class.php b/public_html/deployment/classes/rollout_base.class.php index f16760c0b52e95cc945fa078ccc69d66e2991fea..8d804d5516ab12e330695ab34b762f3115520bc1 100644 --- a/public_html/deployment/classes/rollout_base.class.php +++ b/public_html/deployment/classes/rollout_base.class.php @@ -456,12 +456,22 @@ class rollout_base implements iRolloutplugin{ * @param string $sPhase * @return array */ - public function getConfig($sPhase=false){ + public function getConfig($sPhase=false, $bMask=false){ + $aReturn=array_merge($this->_aCfgGlobal, $this->_aCfgProject['plugins']['rollout'][$this->getId()]); + if($sPhase && isset($this->_aCfgProject['phases'][$sPhase]['plugins']['rollout'][$this->getId()])){ + $aReturn=array_merge($aReturn, $this->_aCfgProject['phases'][$sPhase]['plugins']['rollout'][$this->getId()]); + } + if ($bMask && isset($aReturn['password'])){ + $aReturn['password']='**********'; + } + return $aReturn; + /* return ($sPhase && isset($this->_aCfgProject['phases'][$sPhase]['plugins']['rollout'][$this->getId()])) ? array_merge($this->_aCfgGlobal, $this->_aCfgProject['plugins']['rollout'][$this->getId()], $this->_aCfgProject['phases'][$sPhase]['plugins']['rollout'][$this->getId()]) : array_merge($this->_aCfgGlobal, $this->_aCfgProject['plugins']['rollout'][$this->getId()]) ; + */ } /** diff --git a/public_html/deployment/images/process/bg_archive.png b/public_html/deployment/images/process/bg_archive.png deleted file mode 100644 index ed08763510365a868d96887e1bf3b434fd66b0de..0000000000000000000000000000000000000000 Binary files a/public_html/deployment/images/process/bg_archive.png and /dev/null differ diff --git a/public_html/deployment/images/process/bg_phase.png b/public_html/deployment/images/process/bg_phase.png deleted file mode 100644 index 583be7a4f1872ec49c7b8c4f2cd7a67f9bf803cf..0000000000000000000000000000000000000000 Binary files a/public_html/deployment/images/process/bg_phase.png and /dev/null differ diff --git a/public_html/deployment/images/process/bg_vcs.png b/public_html/deployment/images/process/bg_vcs.png deleted file mode 100644 index 305dd07539cd62795aea535572bf2a7f64396188..0000000000000000000000000000000000000000 Binary files a/public_html/deployment/images/process/bg_vcs.png and /dev/null differ diff --git a/public_html/deployment/inc_functions.php b/public_html/deployment/inc_functions.php index ac094fee8c99c0b92fdb46189ad81027639ec266..0d522afc3ebd382c8cc88c14c245c3a317e88b69 100644 --- a/public_html/deployment/inc_functions.php +++ b/public_html/deployment/inc_functions.php @@ -228,7 +228,7 @@ function getTopNavLeft($aEmbed=[]) { $aReturn=[ // ['label'=>'=' ], - ['href'=>$sBaseUrl . '', 'label'=>' CI server <small>v2</small>', 'icon'=>'', 'class'=>'imllogo topbrand' ], + ['href'=>$sBaseUrl . '', 'label'=>' Deployment UI <small>v2</small>', 'icon'=>'', 'class'=>'imllogo topbrand' ], [ 'href'=>$sBaseUrl, 'label'=>t("menu"), 'class'=>(array_key_exists("prj", $aParams) && $aParams['prj']==='all' ? 'active' : ''), 'icon'=>'fa-solid fa-chevron-right', @@ -628,6 +628,9 @@ function getBreadcrumb($sLinkClass="") { // .'<h2 class="'.$sClass.'"> '.$sLabel.'</h2>' ; $sReturn.=($sNav ? '' . $sNav . ' ' . $sDelim . ' <span class="current">'.$sLabel.'</span>':''); + if($sLinkClass){ + $sReturn=str_replace(['btn-default ', 'btn '], ['', ''], $sReturn); + } return $sReturn; } diff --git a/public_html/deployment/index.php b/public_html/deployment/index.php index ed0b89c5ebe2787583fc70288116dd31aec5a9d7..2527c111ff33dcb7ab289ec3683814359d8b2fd1 100644 --- a/public_html/deployment/index.php +++ b/public_html/deployment/index.php @@ -82,11 +82,14 @@ $aReplace=include("./ui/page_replacements.php"); ."<!-- shellcmd scripts -->\n" : '' ; + $aNavRight=[]; foreach ($aEnabledShellPlugins as $sPlugin){ if ($CI_plugins->testPlugin($sPlugin)){ $aPluginConfig=$CI_plugins->getPluginConfig(); $sHeader.=$CI_plugins->getHtmlLoadScript('render.js'); $sShellOuptut.=$CI_plugins->getHtmlOutwindow(); + $aNavRight[]=['href'=>'#' , 'label'=>$sPlugin, 'icon'=>(isset($aPluginConfig['icon']) ? $aPluginConfig['icon'] : ''), 'onclick'=>'toggleShellWindow(\''.$CI_plugins->getHtmlOutId().'\', this);']; + /* $sTopRight.='' .'<li >' .$oHtml->getLink(array( @@ -100,8 +103,12 @@ $aReplace=include("./ui/page_replacements.php"); )) .'</li>' ; + */ } } + if(count($aNavRight)){ + $aNavRight[]=['label'=>'|']; + } // ---------------------------------------------------------------------- @@ -170,7 +177,7 @@ $aReplace=include("./ui/page_replacements.php"); $sLogOutput=$oLog->renderLogs($aFilter); $BODY.=($sLogOutput > ' ' ? $renderAdminLTE->getCard([ - 'type'=>'gray', + 'type'=>'', 'variant'=>'outline', 'text'=>$sLogOutput ]) @@ -238,7 +245,7 @@ $aTopnav=getTopNavLeft(); $aReplace['{{NAVI_TOP}}']='' . $renderAdminLTE->addWrapper( 'nav', ['class'=>'main-header navbar navbar-expand navbar-white navbar-light'], - $renderAdminLTE->getTopNavigation($aTopnav,false, getTopNavRight(), false) + $renderAdminLTE->getTopNavigation($aTopnav,false, array_merge($aNavRight, getTopNavRight()), false) // add 2nd navbar if needed ) ; diff --git a/public_html/deployment/js/functions.js b/public_html/deployment/js/functions.js index 2a68b11fe0c1ac9cca02e9160d1b624d63492f8a..72ed661656eac7c4f0c1b3959c06bd52ab36e407 100644 --- a/public_html/deployment/js/functions.js +++ b/public_html/deployment/js/functions.js @@ -26,7 +26,9 @@ function showModalMessage(sMessage){ $('#divmodalmessage').html(sMessage); $('#divmodal').show(); } -function showIdAsModalMessage(sId){ + +function showIdAsModalMessage(sId, sTitle){ + var o=$('#'+sId); var sHtml='<a href="#" onclick="return hideModalMessage()" class="btn btn-danger" style="float:right"> X </a>' + o.html() @@ -34,7 +36,39 @@ function showIdAsModalMessage(sId){ ; $('#divmodalmessage').html(sHtml); $('#divmodal').show(); - return false; + + /* + var oWrapper=document.getElementById(sId); + new WinBox({ + title: sTitle, + id: 'winbox-'+sId, + border: 5, + background: "#628", + class: [ "no-min", "no-max", "no-full", "ciwinboxinfos" ], + + // modal: true, // collides with bootsrap3 .modal.less + + // position + size + x: "center", + y: "center", + width: 700, + height: 500, + + // viewport + top: 70, + right: 20, + bottom: 20, + left: 20, + + + // take content from existing div + // mount: oWrapper + html: oWrapper.innerHTML + // html: 'hello' + }); + + */ + return false; } function hideModalMessage(){ @@ -57,7 +91,8 @@ function toggleShellWindow(isPluginOutputDiv, oLink){ title: oLink.innerText, id: 'winbox-'+isPluginOutputDiv, border: 5, - background: "#628", + /*background: "#628",*/ + background: "#478", class: [ "no-min", "no-max", /* "no-full", "no-resize", "no-move"*/ "ciwinbox" ], // position + size @@ -77,10 +112,12 @@ function toggleShellWindow(isPluginOutputDiv, oLink){ onclose: function(){ delete aWinBoxes[isPluginOutputDiv]; - $(oLink).parent().removeClass('active'); + $(oLink).removeClass('active'); } }); - $(oLink).parent().addClass('active'); + if(oLink){ + $(oLink).addClass('active'); + } window.setTimeout("aWinBoxes['"+isPluginOutputDiv+"'].resize("+(oWrapper.clientWidth+25)+", "+(oWrapper.clientHeight+150)+").move('center', 'center')", 10); } } diff --git a/public_html/deployment/main.css b/public_html/deployment/main.css index d65f1c3e38be927ab5d3df537734804d2b6fd042..f667b8dcbb9dd936ef0f2b8b75a8ee464ad55fc6 100644 --- a/public_html/deployment/main.css +++ b/public_html/deployment/main.css @@ -104,7 +104,7 @@ h4{color:#666;} */ #imgtop{float:left; margin: 0 20px 20px 0;} -pre{line-height: 1.2em; padding: 5px;} +pre{line-height: 1.2em; padding: 5px; background: #f0f4f4;} pre.cli{ color:#555;} pre.clistrong{color: #000;} td{vertical-align: top; border-left: 1px solid #fff;} @@ -127,10 +127,10 @@ ul li { .viewextended{} .viewsimple{display: none;} -thead{font-size: 130%;} +thead{font-size: 110%;} -#tbloverview th{} -#tbloverview td{} +#tbloverview th{ padding: 0.3em; } +#tbloverview td{padding: 0.2em;} th{/*border-radius: 0.7em 0.7em 0 0; background:#f0f0f0; */ text-align: center; border-right: 1px solid #fff; } thead tr th.prj{border-bottom: none;} th.versioncontrol{background: #eee; } @@ -198,7 +198,7 @@ a.expandable:before{ color:#a00; content: '+'; float: left; - font-size: 150%; + font-size: 120%; margin-right: 0em; text-align: center; transition: ease-in 0.3s; @@ -290,14 +290,14 @@ input[type="radio"]:checked+label, input[type="checkbox"]:checked+label{ .cmdoutbox{display: none;} .ciwinbox .wb-body{ background: #111 !important; - color: #ccf; + color: #cee; font-family: monospace; padding: 0.5em; overflow: scroll; white-space: nowrap; } .ciwinbox .bar{background: rgba(255,255,255,0.1);} -.ciwinbox .progress{background: #85a;} +.ciwinbox .progress{background: #367;} /* showIdAsModalMessage() - when using winbox */ .ciwinboxinfos .wb-body{ @@ -320,15 +320,13 @@ input[type="radio"]:checked+label, input[type="checkbox"]:checked+label{ .cmd-cols-100{width: 100em; max-width: 100em;} /* ----- visualized process ----- */ -.visualprocess{float: left; padding: 1em; box-shadow: 0 0 0em #ddd;} +.visualprocess{float: left; margin-top: 1em;} .visualprocess .process{float:left; text-align: center; padding: 0 0 5px; } -.visualprocess .process.box{border: 80 dashed #ddd; } +.visualprocess .process.box{border: 3px dotted #bcd; padding: 0.5em; min-height: 14em;} -.visualprocess .process img{} -.visualprocess .process img{} .visualprocess .action{float:left;padding: 0em 1em 1em 1em; background: #fff;} -.visualprocess .process .title{margin-bottom: 1em; font-weight: bold; font-size: 150%; color:#aaa;} -.visualprocess .process .details{background: #fff; min-height: 6em;} +.visualprocess .process .title{margin-bottom: 1em; font-weight: bold; font-size: 120%; color:#aaa;} +.visualprocess .process .details{} /* ----- replacemets with templates ----- */ span.replace{background:#fea; font-weight: bold;} diff --git a/public_html/deployment/main_new_ui.css b/public_html/deployment/main_new_ui.css index 63b4cde1c987f0f073b97bbe9bfbdd7ac1349e64..028fe392960efaeaf9d79859e40c1f7697296d7c 100644 --- a/public_html/deployment/main_new_ui.css +++ b/public_html/deployment/main_new_ui.css @@ -8,7 +8,10 @@ pre.config{background:#f4f4f4; color:#448; border-radius: 0.5em; max-height: aut border-color: #dee2e6 #dee2e6 #fff; } +a{color: #06c;} +li a i{color: #699;} a.topbrand{font-size: 150%; margin-top: -0.2em; margin-right: 1em;} +a.topbrand small{margin-left: 0.3em; margin-top: -0.3em; position: absolute;} /* no line break in top menu */ .dropdown-menu a{white-space: nowrap;} \ No newline at end of file diff --git a/public_html/deployment/pages/act_login.php b/public_html/deployment/pages/act_login.php index 08c1461973d86c85e23abb4051f70bf88cf1428e..d760a4f76480a71db8b49e40249137d4c0cd1a2b 100644 --- a/public_html/deployment/pages/act_login.php +++ b/public_html/deployment/pages/act_login.php @@ -61,7 +61,7 @@ if ($oUser->getUsername()) { . '<ul>'.$sGrouplist . '</ul><br>' . '<div style="clear: both; margin-bottom: 1em;"></div>' . ' ' . aPrjHome() . ' ' - . '<a href="?logoff=1" class="btn btn-default btn-danger">' . $oHtml->getIcon('poweroff') . t('logoff') . '</a>' + . '<a href="?logoff=1" class="btn btn-danger">' . $oHtml->getIcon('poweroff') . t('logoff') . '</a>' // . '<br><br>INFO: <pre style="">roles:<br>' . print_r($oUser->getUserPermission(), true) . '</pre>' . '</p>' diff --git a/public_html/deployment/pages/act_overview.php b/public_html/deployment/pages/act_overview.php index c6d2b6af39f6a72f82f25530ba2ebfa638667119..c148cf5d1cc26eea971eabfa723a58f35e03be53 100644 --- a/public_html/deployment/pages/act_overview.php +++ b/public_html/deployment/pages/act_overview.php @@ -23,7 +23,7 @@ if (!array_key_exists("prj", $aParams)) { // ---------------------------------------------------------------------- require_once("./classes/projectlist.class.php"); $oPrjList = new projectlist(); - $sOut = $oPrjList->renderOverview(); + $BODY = $oPrjList->renderOverview(); } else { // ---------------------------------------------------------------------- @@ -108,6 +108,14 @@ if (!array_key_exists("prj", $aParams)) { ]) ; + $sPhaselinks=''; + $sLastPhase = ''; + foreach($oPrj->getActivePhases() as $sPhase){ + $sPhaselinks.='<div class="btn-group w-100">'.$oPrj->renderLink("phase", $sPhase).'</div>' + //. (!$oPrj->canAcceptPhase($sPhase) ? '<div class="btn-group w-100">'.$oPrj->renderLink("accept", $sPhase).'</div>' : '') + .'<br><br>'; + $sLastPhase = $sPhase; + } $BODY= $renderAdminLTE->addRow( $renderAdminLTE->addCol( @@ -127,6 +135,10 @@ if (!array_key_exists("prj", $aParams)) { . t('overview-actions-hint').'<br>' . '<div class="btn-group w-100">'.$oPrj->renderLink("setup").'</div><br><br>' .($oPrj->canAcceptPhase() ? '<div class="btn-group w-100">'.$oPrj->renderLink("build").'</div><br><br>' : '') + .($sPhaselinks + ? t("page-overview-phase-infos").'<br>'.$sPhaselinks + : '' + ) ]), 2 ) diff --git a/public_html/deployment/pages/act_phase.php b/public_html/deployment/pages/act_phase.php index 718c9a804c2a05a364ab0d9c9275249f1a927fae..d67e2be8a0fc02efe1e7192a1abb449ac6eb0df5 100644 --- a/public_html/deployment/pages/act_phase.php +++ b/public_html/deployment/pages/act_phase.php @@ -12,7 +12,7 @@ ###################################################################### */ require_once("./classes/project_gui.class.php"); -require_once("./inc_functions.php"); +// require_once("./inc_functions.php"); require_once("./classes/config-replacement.class.php"); @@ -37,7 +37,7 @@ if ($sPhase) { $aReplacements=$oConfig->getReplacements(); - $sOut.='<h3>' . $oHtml->getIcon('replace') . t("replacements") . '</h3>'; + $sOutReplace.='<h3>' . $oHtml->getIcon('replace') . t("replacements") . '</h3>'; // ---------------------------------------------------------------------- // Links to foreman @@ -48,7 +48,7 @@ if ($sPhase) { // echo '<pre>$aReplacements = '.print_r($aReplacements, 1) . '</pre>'; // echo '<pre>$aForeman = '.print_r($aForeman, 1) . '</pre>'; - $sOut.=($aForeman + $sOutReplace.=($aForeman ? $oConfig->getForemanlink2Hostgroup().' ' .$oConfig->getForemanlink2Host() : t('foreman-no-host') @@ -169,16 +169,18 @@ if ($sPhase) { .'</pre>'; // --- output with tabs for a template file - $sOutReplace.=$oHtml->getNav( - array( + $sOutReplace.='<div>' + .$renderAdminLTE->getTabbedContent( + [ 'options'=>array('type'=>'tabs'), 'tabs'=>array( $oHtml->getIcon('list') . t('replacement-fields') => '<br>'.$oHtml->getTable($aTable), $oHtml->getIcon('file-template') . $tTplFile => $ContentFile, ) - ) - ) - .'<br></div>'; + ]) + .'</div>' + + .'</div>'; } } else { $sOutReplace.=t('none'); @@ -219,9 +221,9 @@ if ($sPhase) { } if (count($aWarnings)){ - $sOut.=$oHtml->getBox('warning', '<ul><li>'.implode('<li>', $aWarnings).'</ul>'); + $sOutReplace.=$oHtml->getBox('warning', '<ul><li>'.implode('<li>', $aWarnings).'</ul>'); } - $sOut.=$sOutReplace; + // ---------------------------------------------------------------------- // versions @@ -248,7 +250,7 @@ if ($sPhase) { // ---------------------------------------------------------------------- // show all phases if there are more than one - $sOut.=(count($oPrj->getActivePhases())>1 + $sOutPhases=(count($oPrj->getActivePhases())>1 ? '<h3>' . $oHtml->getIcon('phase').t("phases") . '</h3>' . $oPrj->renderPhaseInfo() : '' ) @@ -263,7 +265,38 @@ if ($sPhase) { $sOut.=$oHtml->getBox("error", t("error-no-phase")); } + +$BODY=$renderAdminLTE->addRow( + $renderAdminLTE->addCol( + $renderAdminLTE->getCard([ + 'type'=>'gray', + 'variant'=>'outline', + 'text'=>$sOutReplace, + ]), 12 + ) +) +.$renderAdminLTE->addRow( + $renderAdminLTE->addCol( + $renderAdminLTE->getCard([ + 'type'=>'gray', + 'variant'=>'outline', + 'text'=>$sOut, + ]), 12 + ) +) +.$renderAdminLTE->addRow( + $renderAdminLTE->addCol( + $renderAdminLTE->getCard([ + 'type'=>'gray', + 'variant'=>'outline', + 'text'=>$sOutPhases, + ]), 12 + ) +) + +; + // $sOut.= '<div id="navbuttom">' . aPrjHome() . '</div>'; // -- Ausgabe -echo $sOut; +// echo $sOut; diff --git a/public_html/deployment/ui/page_replacements.php b/public_html/deployment/ui/page_replacements.php index 68a225b0296e425144bc05a98e7e901a79156c98..6fb0fb3f15625da0342a878d0cfa54eac0bba11d 100644 --- a/public_html/deployment/ui/page_replacements.php +++ b/public_html/deployment/ui/page_replacements.php @@ -15,7 +15,7 @@ return [ // '{{NAVI_TOP}}' =>'<nav class="main-header navbar navbar-expand navbar-white navbar-light"><ul class="navbar-nav" id="instances"></ul></nav>', '{{BRAND}}' =>'<a href="?" class="brand-link bg-red"> <i class="fa-solid fa-cubes"></i> - IML <span class="brand-text">CI server</span> + IML <span class="brand-text">Deployment UI</span> <span class="brand-text font-weight-light">v2</span> </a>', '{{NAVI_LEFT}}' =>'