Optimize database queries, add resilience with is_countable, refine UI for progress bars and tables, update scripts for dynamic resizing, and correct navbar link case sensitivity.

This commit is contained in:
2025-08-20 20:38:01 +02:00
parent 70af042b7b
commit a17bb63889
6 changed files with 96 additions and 51 deletions

View File

@@ -145,7 +145,7 @@
// Backup OK
$answers = Invoke_infra("SELECT * FROM VMs_Backup where ( Owner like 'DUN-VMH%' or Owner like 'MDK-VMH%' ) and name not like 'WS%' and owner not like '%WKG%' and owner not like '%VMH-WM%' and Exclusion ='' and LastResult = 'OK' and TRY_CAST(lastknowngood AS DATE) >= CAST(DATEADD(DAY, -2, GETDATE()) AS DATE) order by name");
$total = count($answers);
$total = is_countable($answers) ? count($answers) : 0;
foreach ($answers as $row) {
$date1 = date_create($row['LastKnownGood']); $diff = date_diff($date1, date_create(date("Y-m-d")));
if(date('w') >= 2 && date('w') <= 6 ){