Add VIO FC Status monitoring page and enhance server inventory filtering

- Introduced `Storage/VIO.php` for monitoring VIO Fibre Channel status with client balancing checks and table sorting.
- Updated `/include/en.php` and `/include/fr.php` to include new translations for ServiceNow and VIO-related navigation elements.
- Improved SQL query and filtering logic in `/X/Inventory.php` to exclude VIO entries and add XenSam version data.
- Enhanced `/reports/heartbeat.php` with a new mechanism for handling server heartbeat status, allowing better granularity and readability.
This commit is contained in:
2026-09-14 10:32:15 +02:00
parent 1f1b7dcd22
commit c185d099d6
25 changed files with 6646 additions and 437 deletions

View File

@@ -1,27 +1,29 @@
<?php
include $_SERVER['DOCUMENT_ROOT'] . "/include/all.php";
$server = $_GET['s'] ?? '';
$ts = date("Y-m-d");
$data = Invoke_Entry01("SELECT dump FROM dump_dhcp where ts ='$ts' and server = '$server'");
$data = Invoke_Infra_long("SELECT dump FROM dump_dhcp where ts ='$ts' and server = '$server'");
$xmlRaw = $data[0]['dump'] ?? '';
if (!mb_check_encoding($xmlRaw, 'UTF-8')) {
$xmlRaw = mb_convert_encoding($xmlRaw, 'UTF-8', 'Windows-1252');
}
if (!$xmlRaw) {
die("Aucune donnée trouvée pour le serveur $server à la date $ts");
}
if ($xmlRaw === '') {
die("Aucune donnée trouvée pour le serveur $server à la date $ts");
}
$xmlString = mb_convert_encoding($xmlRaw, 'UTF-8', 'ISO-8859-1');
if (!str_contains($xmlString, '<?xml')) {
$xmlString = '<?xml version="1.0" encoding="UTF-8"?>' . $xmlString;
}
libxml_use_internal_errors(true);
$xml = simplexml_load_string($xmlRaw);
if ($xml === false) {
echo '<pre>';
foreach (libxml_get_errors() as $e) {
echo trim($e->message) . " (ligne {$e->line}, col {$e->column})\n";
}
libxml_clear_errors();
exit;
}
try {
$xml = new SimpleXMLElement($xmlString);
} catch (Exception $e) {
echo "Erreur de parsing XML : " . $e->getMessage();
exit;
}
$definitions = [];
foreach ($xml->xpath("//OptionDefinition") as $optDef) {