From 14ccad5d6aeef262a5c12ac64715399a488807c0 Mon Sep 17 00:00:00 2001 From: hahn <axel.hahn@iml.unibe.ch> Date: Wed, 29 May 2019 16:08:55 +0200 Subject: [PATCH] Update components font-awesome (change icon syntax from fontawesome 4 --> 5), jquery highlight entered freetext search action button (build, deploy, ...) have the color of the target phase Update appmonitor class files fix checkssh test with multilple targets valuestore: add action show at onclick event in the table row --- public_html/valuestore/browse.php | 6 +++--- public_html/valuestore/index.php | 24 +++++++++++++++++++++++- 2 files changed, 26 insertions(+), 4 deletions(-) diff --git a/public_html/valuestore/browse.php b/public_html/valuestore/browse.php index a3bf2ce9..246d3a06 100644 --- a/public_html/valuestore/browse.php +++ b/public_html/valuestore/browse.php @@ -115,7 +115,7 @@ $sTableHead=''; if(is_array($aData) && count($aData)){ // echo '<pre>' . print_r($aData, 1); foreach ($aData as $aRow){ - $sItemUrl='index.php?project='.$aRow['project'].'&package='.$aRow['package'].'&phase='.$aRow['phase'].'&host='.$aRow['host'].'&variable='.$aRow['variable'].''; + $sItemUrl='index.php?action=show&project='.$aRow['project'].'&package='.$aRow['package'].'&phase='.$aRow['phase'].'&host='.$aRow['host'].'&variable='.$aRow['variable'].''; $sTable.='<tr onclick="location.href=\''.$sItemUrl.'\'">'; // $sTable.='<tr>'; foreach ($aRow as $sKey=>$sValue){ @@ -138,8 +138,8 @@ if(is_array($aData) && count($aData)){ $sOut.='' . '<form method="POST" action="index.php">' . '<input type="hidden" name="action" value="cleanup">' - . '<button>Cleanup</button>' - . '</form>' + . '<button>Cleanup (> 1d)</button>' + . '</form><hr>' . '<table id="tbldata"><thead>' . '<tr>'.$sTableHead. '</tr>' diff --git a/public_html/valuestore/index.php b/public_html/valuestore/index.php index 43d172d9..c94ac0fd 100644 --- a/public_html/valuestore/index.php +++ b/public_html/valuestore/index.php @@ -81,7 +81,12 @@ if (!$_GET || !count($_GET)) { // ---------------------------------------------------------------------- $sAction = getParam('action', '/[^a-z]/'); -if ($sAction !== "delete" && $sAction !== "get" && $sAction !== "update" && $sAction !== "cleanup") { +if ($sAction !== "cleanup" + && $sAction !== "delete" + && $sAction !== "get" + && $sAction !== "show" + && $sAction !== "update" + ) { quit("action is unknown or not implemented yet."); } @@ -149,6 +154,23 @@ switch ($sAction) { break; } break; + case 'show': + $oVersion->setProject($sProject, $sPackage, $sPhase, $sPlace, $sHost); + + echo '<h1>package ['.$sPackage.'] on '.$sHost.'</h1>' + . 'Host: '.$sHost.'<br>' + . 'package: '.$sPackage.'<br>' + . 'phase: '.$sPhase.'<br>' + . 'place: '.$sPlace.'<br>' + . '<br>' + . '<button onclick="history.back();">back</button><br>' + . '<hr>' + . '<pre>'.json_encode($oVersion->getVersion(), JSON_PRETTY_PRINT).'</pre>' + . '<hr>' + . '<button onclick="history.back();">back</button>' + . ''; + + break; default: -- GitLab