From 9afc8333618bf543a3fcf3f23e7bbf6270a828f4 Mon Sep 17 00:00:00 2001 From: sva-e025532 Date: Wed, 5 Nov 2025 10:09:03 +0100 Subject: [PATCH] Enhance `/X/Inventory.php` with detailed backup log handling and dynamic styling, add new `opwsinf` URL in `include/all.php`, and remove unused Orphan LUNs link from the navbar. --- X/Inventory.php | 32 ++++++++++++++++++++------------ include/all.php | 1 + navbar.html | 1 - 3 files changed, 21 insertions(+), 13 deletions(-) diff --git a/X/Inventory.php b/X/Inventory.php index c83f66b..e38a309 100644 --- a/X/Inventory.php +++ b/X/Inventory.php @@ -179,19 +179,27 @@ //LastBackup $lr = explode(".", $s['backuplast'] ?? "")[0]; - $size = 0; - if ($s['backuplog'] != "") { - if (str_contains($s['backuplog'], "Length")) { - $size = explode(" ", $s['backuplog'])[1]; - } else { - $size = explode(" ", $s['backuplog'])[3]; + if(str_contains(strtolower($s['backuplog']), 'progress')){ + $size = "In Progress"; + }elseif (str_contains(strtolower($s['backuplog']), 'waiting')){ + $size = "
".$s['backuplog']."
"; + }elseif (str_contains(strtolower($s['backuplog']), 'error')){ + $size = " ERROR !!!"; + }else { + $size = 0; + if ($s['backuplog'] != "") { + if (str_contains($s['backuplog'], "Length")) { + $size = explode(" ", $s['backuplog'])[1]; + } else { + $size = explode(" ", $s['backuplog'])[3]; + } + $size = floor($size / 1024 / 1024 / 1024); + } + if ($size >= 15) { + $size = "$size GB"; + } else { + $size = "$size GB"; } - $size = floor($size / 1024 / 1024 / 1024); - } - if ($size >= 15) { - $size = "$size GB"; - } else { - $size = "$size GB"; } try { $lrDate = new DateTime($lr); diff --git a/include/all.php b/include/all.php index 1d64a32..cd23c8f 100644 --- a/include/all.php +++ b/include/all.php @@ -3,6 +3,7 @@ $BaseUrl = "http://".$_SERVER['SERVER_NAME']; $root = $_SERVER['DOCUMENT_ROOT']; $bdnuss = "http://web-bdnuss-sys-dev.appliarmony.net"; + $opwsinf = "https://wsopinf.appliarmony.net"; // FUNCTIONS // //tools// diff --git a/navbar.html b/navbar.html index 6056082..6d3ae43 100644 --- a/navbar.html +++ b/navbar.html @@ -78,7 +78,6 @@