check_deploy mod
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
2025-01-09 12:02:52 +01:00
parent d58b681918
commit c80944b5b6
3 changed files with 6 additions and 6 deletions

View File

@@ -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 if (!empty($arr)) return "deploy-".$application; // deploy in progress install has started
else { else {
$arr = check_response("deploy-".$application); // application install in progress PID exists $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; else return 0;
} }
} }

View File

@@ -250,9 +250,9 @@ function uninstall(additional) {
} }
function check_deployment(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) { jQuery.get(url, function(data) {
console.log('check_deployment '+additional+': '+data); console.log('check_deployment '+additional+': '+data);
if (data!="") { if (data!="") {
jQuery("#"+additional).html(data); jQuery("#"+additional).html(data);
} }

View File

@@ -227,11 +227,11 @@ switch ($_GET["op"]) {
} }
} }
else { else {
$arr = check_request("deployment"); $arr = check_deploy($_GET["additional"]);
if (!empty($arr)) { // deployment in progress if (!empty($arr)) { // deployment in progress
foreach ($arr as $key=>$data) { foreach ($arr as $key=>$data) {
if ($key=="deployment") { if ($key=="deploy-".$_GET["additional"]) {
if ($data["STATUS"]=="1") { // TODO - current state message??? if ($data["STATUS"]=="1") {
echo "Install in progress... Please wait..."; echo "Install in progress... Please wait...";
} }
elseif ($data["STATUS"]=="2") { elseif ($data["STATUS"]=="2") {