show updates
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
root
2024-09-17 18:25:47 +02:00
parent 1034b71d92
commit 06f51de7d5
2 changed files with 15 additions and 11 deletions

View File

@@ -161,21 +161,25 @@ function show_service($name, $containers) {
function show_service_update($name, $update, $uptodate) { function show_service_update($name, $update, $uptodate) {
$str = '<div>'.$name."</div>"; $str = '<div>'.$name."</div>";
$str .= '<div id="'.$name.'" style="padding-left: 20px">';
$update = trim($update); $update = trim($update);
if (!empty($update)) {
$str .= '<div id="'.$name.'" style="padding-left: 20px">';
$arr = explode(" ",$update); $arr = explode(" ",$update);
foreach ($arr as $container) { foreach ($arr as $container) {
$str .= $container." - UPDATE AVAILABLE<br>"; $str .= $container." - UPDATE AVAILABLE<br>";
} }
$str .= '</div>'; $str .= '</div>';
}
$str .= '<div id="'.$name.'" style="padding-left: 20px">';
$uptodate = trim($uptodate); $uptodate = trim($uptodate);
if (!empty($uptodate)) {
$str .= '<div id="'.$name.'" style="padding-left: 20px">';
$arr = explode(" ",$uptodate); $arr = explode(" ",$uptodate);
foreach ($arr as $container) { foreach ($arr as $container) {
$str .= $container." - Already up to date<br>"; $str .= $container." - Already up to date<br>";
} }
$str .= '</div>'; $str .= '</div>';
}
echo $str; echo $str;
} }

View File

@@ -101,7 +101,7 @@ switch ($_GET["op"]) {
if ($key=="updates") { if ($key=="updates") {
if ($data["INSTALL_STATUS"]==1) { if ($data["INSTALL_STATUS"]==1) {
foreach ($data["INSTALLED_SERVICES"] as $service_name => $object) { foreach ($data["INSTALLED_SERVICES"] as $service_name => $object) {
show_service_update($service_name, $object["update"], $object["uptodate"]); show_service_update($service_name, trim($object["update"]), trim($object["uptodate"]));
} }
echo "<br>"; echo "<br>";
} }