Update VM and DHCP management pages, optimize code

- Modified VM queries in `SYN-VMList.php` to remove unnecessary cluster filtering.
- Adjusted page titles for better context in `SYN-VMList.php`.
- Updated `dhcp_servers.php` with enhanced table export and added new JavaScript (`switch.js`).
- Extended French translations in `fr.php` with new VM-related terms.
- Enhanced KPI calculations in `Crossover-KPI.js` with improved checks and parameter handling.
- Refactored and streamlined `GlobalCrossover.php` for cleaner and more efficient code, improving readability and maintainability.
This commit is contained in:
e025532
2026-04-14 13:59:24 +02:00
parent e9cf3077fa
commit 1f1b7dcd22
9 changed files with 587 additions and 439 deletions

View File

@@ -51,7 +51,7 @@ foreach ($xml->xpath("//OptionDefinition") as $optDef) {
<script src="/js/libs/js-xlsx/xlsx.core.min.js"></script>
</head>
<body class="bg-light">
<body class="bg-light text-dark">
<div class="container-fluid">
<div class="row flex-nowrap">
<div class="col-auto col-md-2 col-xl-2 px-sm-2 px-0 bg-dark vh-100 position-sticky top-0">
@@ -59,14 +59,14 @@ foreach ($xml->xpath("//OptionDefinition") as $optDef) {
</div>
<div class="col py-3">
<h1><span class="badge text-bg-dark w-100"><?php echo htmlspecialchars($server); ?></span></h1>
<h1><span class="badge bg-secondary text-white w-100"><?php echo htmlspecialchars($server); ?></span></h1>
<div class="card mb-3">
<div class="card mb-3 bg-light text-dark">
<div class="card-header bg-info text-white">
<a class="text-white fw-bold" data-bs-toggle="collapse" href="#OptVal"><?php echo $w_globalOptionValues ; ?></a>
<a class="fw-bold text-black" data-bs-toggle="collapse" href="#OptVal"><?php echo $w_globalOptionValues ; ?></a>
</div>
<div id="OptVal" class="collapse show">
<div class="card-body">
<div class="card-body bg-white text-black">
<?php
$globalOptions = $xml->xpath("//IPv4/OptionValues/OptionValue");
foreach ($globalOptions as $opt):
@@ -97,8 +97,8 @@ foreach ($xml->xpath("//OptionDefinition") as $optDef) {
</a>
</div>
<div id="<?php echo $cleanId; ?>" class="collapse">
<div class="card-body">
<div class="row mb-3 text-center bg-light py-2">
<div class="card-body bg-white text-black">
<div class="row mb-3 text-center bg-secondary text-light py-2">
<div class="col-md-4"><strong><?php echo $w_start; ?>:</strong> <?php echo (string)$scope->StartRange; ?></div>
<div class="col-md-4"><strong><?php echo $w_end; ?>:</strong> <?php echo (string)$scope->EndRange; ?></div>
<div class="col-md-4"><strong><?php echo $w_mask; ?>:</strong> <?php echo (string)$scope->SubnetMask; ?></div>
@@ -151,4 +151,5 @@ foreach ($xml->xpath("//OptionDefinition") as $optDef) {
</div>
</div>
</body>
<script src="/js/switch.js"></script>
</html>

View File

@@ -40,7 +40,7 @@ $serversData = Invoke_Entry01("SELECT Server,TS FROM dump_dhcp where ts ='$ts' o
<h1><span class="badge text-bg-secondary w-100"><?php echo count($serversData); ?> DHCP <?php echo $w_server; ?></span></h1>
<div class="container mt-4">
<table class='table table-bordered table-hover table-sm' id='t1' data-height="620" data-toggle="table" data-search="true" data-show-columns="true" data-export-types="['xlsx','csv','json']" data-show-export="true" data-sortable="true">
<table class='table table-bordered table-hover table-sm' id='t1' data-toggle="table" data-search="true" data-show-columns="true" data-export-types="['xlsx','csv','json']" data-show-export="true" data-sortable="true">
<thead class="table-light">
<tr>
<th data-field="Server" data-sortable="true"><?php echo $w_server; ?></th>
@@ -66,4 +66,5 @@ $serversData = Invoke_Entry01("SELECT Server,TS FROM dump_dhcp where ts ='$ts' o
</div>
</div>
</body>
<script src="/js/switch.js"></script>
</html>