From c80944b5b6668311c99017c76551d3f077b31c82 Mon Sep 17 00:00:00 2001 From: hael Date: Thu, 9 Jan 2025 12:02:52 +0100 Subject: [PATCH] check_deploy mod --- functions.php | 2 +- manage.html | 4 ++-- scan.php | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/functions.php b/functions.php index 9bcfe01..e655917 100644 --- a/functions.php +++ b/functions.php @@ -28,7 +28,7 @@ function check_deploy($application) { // is an application deploy in progress if (!empty($arr)) return "deploy-".$application; // deploy in progress install has started else { $arr = check_response("deploy-".$application); // application install in progress PID exists - if (!empty($arr)) return "deploy-".$application; + if (!empty($arr)) return $arr; else return 0; } } diff --git a/manage.html b/manage.html index 2ae755d..c270c03 100644 --- a/manage.html +++ b/manage.html @@ -250,9 +250,9 @@ function uninstall(additional) { } function check_deployment(additional) { - var url = 'scan.php?op=check_deployment'; + var url = 'scan.php?op=check_deployment&additional='+additional; jQuery.get(url, function(data) { - console.log('check_deployment '+additional+': '+data); + console.log('check_deployment '+additional+': '+data); if (data!="") { jQuery("#"+additional).html(data); } diff --git a/scan.php b/scan.php index f52bffc..c055275 100644 --- a/scan.php +++ b/scan.php @@ -227,11 +227,11 @@ switch ($_GET["op"]) { } } else { - $arr = check_request("deployment"); + $arr = check_deploy($_GET["additional"]); if (!empty($arr)) { // deployment in progress foreach ($arr as $key=>$data) { - if ($key=="deployment") { - if ($data["STATUS"]=="1") { // TODO - current state message??? + if ($key=="deploy-".$_GET["additional"]) { + if ($data["STATUS"]=="1") { echo "Install in progress... Please wait..."; } elseif ($data["STATUS"]=="2") {