show service update and up to date
This commit is contained in:
@@ -158,6 +158,28 @@ function show_service($name, $containers) {
|
||||
echo $str;
|
||||
}
|
||||
|
||||
function show_service_update($name, $update, $uptodate) {
|
||||
$str = '<div>'.$name."</div>";
|
||||
|
||||
$str .= '<div id="'.$name.'" style="padding-left: 20px">';
|
||||
$update = trim($update);
|
||||
$arr = explode(" ",$update);
|
||||
foreach ($arr as $container) {
|
||||
$str .= $container." - UPDATE AVAILABLE<br>";
|
||||
}
|
||||
$str .= '</div>';
|
||||
|
||||
$str .= '<div id="'.$name.'" style="padding-left: 20px">';
|
||||
$uptodate = trim($uptodate);
|
||||
$arr = explode(" ",$uptodate);
|
||||
foreach ($arr as $container) {
|
||||
$str .= $container." - Already up to date<br>";
|
||||
}
|
||||
$str .= '</div>';
|
||||
|
||||
echo $str;
|
||||
}
|
||||
|
||||
// not in use
|
||||
function put_install_envs() {
|
||||
|
||||
|
6
scan.php
6
scan.php
@@ -99,11 +99,9 @@ switch ($_GET["op"]) {
|
||||
if (!empty($arr)) {
|
||||
foreach ($arr as $key=>$data) {
|
||||
if ($key=="updates") {
|
||||
if ($data["INSTALL_STATUS"]==2) echo "NEW";
|
||||
elseif ($data["INSTALL_STATUS"]==1) {
|
||||
if ($data["INSTALL_STATUS"]==1) {
|
||||
foreach ($data["INSTALLED_SERVICES"] as $service_name => $object) {
|
||||
//echo base64_decode($object["content"]);
|
||||
show_service($service_name, $object["running"]);
|
||||
show_service_update($service_name, $object["update"], $object["uptodate"]);
|
||||
}
|
||||
echo "<br>";
|
||||
}
|
||||
|
Reference in New Issue
Block a user