From 87421e9736268f57c38c198a8dd5a6388385a85e Mon Sep 17 00:00:00 2001
From: "Hahn Axel (hahn)" <axel.hahn@unibe.ch>
Date: Tue, 28 Nov 2023 16:24:49 +0100
Subject: [PATCH] update server project overview

---
 .../deployment/classes/project_gui.class.php     | 16 +++++++++-------
 public_html/deployment/main.css                  |  3 ++-
 2 files changed, 11 insertions(+), 8 deletions(-)

diff --git a/public_html/deployment/classes/project_gui.class.php b/public_html/deployment/classes/project_gui.class.php
index 01fb6492..6d458ff1 100644
--- a/public_html/deployment/classes/project_gui.class.php
+++ b/public_html/deployment/classes/project_gui.class.php
@@ -40,7 +40,7 @@ class projectgui extends project {
      * @param string $sContent   optional: text to show
      * @return string
      */
-    private function _getChecksumDiv($sText, $sContent='') {
+    private function _getChecksumDiv($sText, $sContent='', $sBarHeight='3px') {
         if ($sText){
             
             // color ranges in decimal values for RGB from ... to
@@ -72,7 +72,7 @@ class projectgui extends project {
         } else {
             $sColor = "color: #888; background: #ccc;";
         }
-        return '<div style="' . $sColor . ' border-top: 3px solid;">'.($sContent ? $sContent : ' ').'</div>';
+        return '<div style="' . $sColor . ' border-top: '.$sBarHeight.' solid;">'.($sContent ? $sContent : ' ').'</div>';
     }
 
 
@@ -82,13 +82,13 @@ class projectgui extends project {
      * @param string $sPlace  place in the given phase
      * @return string
      */
-    private function _renderBar($sPhase, $sPlace) {
+    private function _renderBar($sPhase, $sPlace, $sBarHeight='3px') {
         $aDataPhase = $this->getPhaseInfos($sPhase);
         $aData = $aDataPhase[$sPlace];
         if (!array_key_exists("revision", $aData)) {
             return false;
         }
-        return $this->_getChecksumDiv($aData["revision"]);
+        return $this->_getChecksumDiv($aData["revision"], '', $sBarHeight);
     }
 
     private function _renderHostsData($aData) {
@@ -1618,6 +1618,8 @@ class projectgui extends project {
      */
     public function renderVisual() {
         $sReturn = '';
+        $sBarHeightBg = '1.0em';
+        $sBarHeight = '0.8em';
         $sContinue = '<span style="font-size: 300%; color:#ace;">&raquo;&raquo;</span><br>';
 
         $aBranches=$this->getRemoteBranches();
@@ -1640,8 +1642,8 @@ class projectgui extends project {
         $sPackagebar = '';
         $aVersions = $this->_getVersionUsage();
         foreach ($aVersions as $sVersion => $aData) {
-            $sBar = $aData["info"]["revision"] ? $this->_getChecksumDiv($aData["info"]["revision"]) : '';
-            $sPackagebar.='<span title="' . $sVersion . '" style="float: left; background:#eee; height: 3px; width:' . (100 / count($aVersions)) . '%">' . $sBar . '&nbsp;</span>';
+            $sBar = $aData["info"]["revision"] ? $this->_getChecksumDiv($aData["info"]["revision"], '' , $sBarHeight) : '';
+            $sPackagebar.='<span title="' . $sVersion . '" style="float: left; background:#eee; height: '.$sBarHeightBg.'; width:' . (100 / count($aVersions)) . '%">' . $sBar . '&nbsp;</span>';
         }
 
         $sPhaseImg = '';
@@ -1658,7 +1660,7 @@ class projectgui extends project {
 
             $sFullbar = '';
             foreach (array_keys($this->_aPlaces) as $sPlace) {
-                $sFullbar.='<span title="' . $this->_aPlaces[$sPlace] . '" style="float: left; background:#eee; height: 3px; width:' . (100 / count($this->_aPlaces)) . '%">' . $this->_renderBar($sPhase, $sPlace) . '&nbsp;</span>';
+                $sFullbar.='<span title="' . $this->_aPlaces[$sPlace] . '" style="float: left; background:#eee; height: '.$sBarHeightBg.'; width:' . (100 / count($this->_aPlaces)) . '%">' . $this->_renderBar($sPhase, $sPlace, $sBarHeight) . '&nbsp;</span>';
             }
             // $sDetail = $sFullbar . '<br><a href="#h3phases" class="scroll-link">' . $sPhase . '</a>';
             $sDetail = $sFullbar . '<br>' . $sPhase;
diff --git a/public_html/deployment/main.css b/public_html/deployment/main.css
index a1b07021..2b1d01c8 100644
--- a/public_html/deployment/main.css
+++ b/public_html/deployment/main.css
@@ -629,6 +629,7 @@ input[type="checkbox"]:checked+label {
     float: left;
     text-align: center;
     padding: 0 0 5px;
+    min-width: 5em;
 }
 
 .visualprocess .process.box {
@@ -650,7 +651,7 @@ input[type="checkbox"]:checked+label {
     color: #aaa;
 }
 
-.visualprocess .process .details {}
+.visualprocess .process .details span {border-right: 3px solid #fff;}
 
 /* ----- replacemets with templates ----- */
 span.replace {
-- 
GitLab