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.

This commit is contained in:
2025-11-05 10:09:03 +01:00
parent ea46ba5c8f
commit 9afc833361
3 changed files with 21 additions and 13 deletions

View File

@@ -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 = "<span class='text-warning'>In Progress</span>";
}elseif (str_contains(strtolower($s['backuplog']), 'waiting')){
$size = "<span class='text-warning'><br>".$s['backuplog']."</span>";
}elseif (str_contains(strtolower($s['backuplog']), 'error')){
$size = "<span class='text-danger'><b> ERROR !!!</b></span>";
}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 = "<span class='text-danger'><b>$size GB</b></span>";
} else {
$size = "$size GB";
}
$size = floor($size / 1024 / 1024 / 1024);
}
if ($size >= 15) {
$size = "<span class='text-danger'><b>$size GB</b></span>";
} else {
$size = "$size GB";
}
try {
$lrDate = new DateTime($lr);