diff --git a/functions.php b/functions.php
index 4fe9668..b053908 100644
--- a/functions.php
+++ b/functions.php
@@ -158,6 +158,28 @@ function show_service($name, $containers) {
echo $str;
}
+function show_service_update($name, $update, $uptodate) {
+ $str = '
'.$name."
";
+
+ $str .= '';
+ $update = trim($update);
+ $arr = explode(" ",$update);
+ foreach ($arr as $container) {
+ $str .= $container." - UPDATE AVAILABLE
";
+ }
+ $str .= '
';
+
+ $str .= '';
+ $uptodate = trim($uptodate);
+ $arr = explode(" ",$uptodate);
+ foreach ($arr as $container) {
+ $str .= $container." - Already up to date
";
+ }
+ $str .= '
';
+
+ echo $str;
+}
+
// not in use
function put_install_envs() {
diff --git a/scan.php b/scan.php
index f6f802b..3bbf77d 100644
--- a/scan.php
+++ b/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 "
";
}