Remove test.php and enhance null safety and sorting across components

- Deleted `test.php` as it was no longer in use.
- Enhanced null safety checks in `Inventory.php`, `StdOut-detail.php`, `Backups.php`, and `SwitchsSAN.php` to prevent potential warnings.
- Refactored `SwitchsSAN.php` to improve sorting logic for ports based on errors, vFabric, and Port ID.
- Added seasonal snow effect script in `all.php` with toggle functionality for user engagement.
- Updated navigation bar (`navbar.html`) to include a new VIO page link.
- Introduced a new `VIO.php` page to display VIO monitoring details with table export and sorting features.
This commit is contained in:
2026-03-31 11:33:57 +02:00
parent d5b45dbc22
commit 10c228f255
47 changed files with 950 additions and 702 deletions

View File

@@ -7,7 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Page Title -->
<title>Web Infra Reports</title>
<title>Web Infra Reports IT</title>
<link rel="shortcut icon" type="image/png" href="/include/favicon-32x32.png">
<!-- JQuery -->
@@ -41,7 +41,7 @@
<div class="col py-3">
<!-- Page Title -->
<h1><span class="badge text-bg-secondary font-weight-bold"
style="width:100%;"><?php echo $_GET['cluster'] . " Details"; ?></span></h1>
style="width:100%;"><?php echo $_GET['cluster']; ?></span></h1>
<!-- Main content -->
<?php
@@ -56,10 +56,8 @@
?>
<div class="container-fluid" style="zoom:100%">
<h2><span class="badge text-bg-secondary font-weight-bold"
style="width:100%;"><?php echo $_GET['cluster']; ?></span></h2>
<?php
echo "<b>Worst Failover scenario available memory : </b>" . ($clmem - $vmmem) . " / " . $clmem . " GB";
echo "<b>$w_worstScenario : </b>" . ($clmem - $vmmem) . " / " . $clmem . " GB";
$pcent = round(($clmem - $vmmem) / $clmem * 100);
$pcent_restant = 100 - $pcent;
if ($pcent <= 5) {
@@ -86,11 +84,11 @@
foreach ($clusters as $cluster) {
echo "<div class='col-6'>";
$nbvm = Invoke_Infra("select count(*) as nbvm, sum(memory) as vmmem from cmdb_vms where owner ='" . $cluster['node'] . "' and decomtime is null");
echo '<h3><span class="badge text-bg-secondary font-weight-bold" style="width:100%;">' . $cluster['node'] . " - " . $nbvm[0]['nbvm'] . " VMs <small><small> <i class='bi bi-clock'></i> " . $cluster['ts'] . "</small></small></span></h3><br>";
echo '<h3><span class="badge text-bg-secondary font-weight-bold" style="width:100%;">' . $cluster['node'] . " - " . $nbvm[0]['nbvm'] . " $w_VMs <small><small> <i class='bi bi-clock'></i> " . $cluster['ts'] . "</small></small></span></h3><br>";
#Memory
echo "<div class='row'>";
echo "<div class='col'>";
echo "<b>Free Memory : </b>" . ($cluster['node_ram'] - 32 - $nbvm[0]['vmmem']) . " / " . ($cluster['node_ram'] - 32) . " GB";
echo "<b>$w_freeMem : </b>" . ($cluster['node_ram'] - 32 - $nbvm[0]['vmmem']) . " / " . ($cluster['node_ram'] - 32) . " GB";
$pcent = round(($cluster['node_ram'] - 32 - $nbvm[0]['vmmem']) / ($cluster['node_ram'] - 32) * 100);
$pcent_restant = 100 - $pcent;
if ($pcent <= 5) {
@@ -138,7 +136,7 @@
$total = explode(";", $csv)[1];
$used = explode(";", $csv)[2];
$free = $total - $used;
echo " Free : </b>" . $free . "/" . $total . " GB";
echo " : </b>" . $free . "/" . $total . " GB";
echo "</div>";
echo "<div class='col'>";
$pcent = round($free / $total * 100);
@@ -157,7 +155,7 @@
<div class='progress-bar bg-dark progress-bar-striped' role='progressbar' style='width: $pcent_restant%;' aria-valuenow='$pcent_restant' aria-valuemin='0' aria-valuemax='100'></div>
<div class='progress-bar $color' role='progressbar' style='width: $pcent%;' aria-valuenow='$pcent' aria-valuemin='0' aria-valuemax='100'></div>
</div>";
echo "</div>";
echo "</small></div>";
} else {
echo "<div class='col'></div><br>";
}
@@ -193,10 +191,10 @@
echo '<span class="badge rounded-pill bg-primary text-light">LUN(s)</span> ';
}
if ($vm['IsClustered'] != "True") {
echo '<span class="badge rounded-pill bg-danger text-dark"><small>Unclustered</small></span> ';
echo "<span class='badge rounded-pill bg-danger text-dark'><small>$w_unclustered</small></span> ";
} else {
if ($vm['Owner'] != $vm['PreferredOwner']) {
echo '<span class="badge rounded-pill bg-warning text-dark"><small>Wrong Owner</small></span> ';
echo "<span class='badge rounded-pill bg-warning text-dark'><small>$w_wrongOwner</small></span> ";
}
}
echo "</div>";