Compare commits

..

3 Commits

Author SHA1 Message Date
e025532
1f1b7dcd22 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.
2026-04-14 13:59:24 +02:00
e025532
e9cf3077fa Add DHCP management pages and update navigation
- Implemented `dhcp_servers.php` for listing DHCP servers with export and search functionalities.
- Added `dhcp_detail.php` for detailed DHCP server configurations, including scopes and reservations.
- Updated `navbar.html` to include a new "Network" section with DHCP navigation links.
- Extended French and English translation files to support new DHCP-related terms.
2026-04-07 15:15:24 +02:00
10c228f255 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.
2026-03-31 11:33:57 +02:00
52 changed files with 1754 additions and 1112 deletions

1
.idea/php.xml generated
View File

@@ -12,6 +12,7 @@
</component>
<component name="PhpIncludePathManager">
<include_path>
<path value="$PROJECT_DIR$/include" />
<path value="$PROJECT_DIR$/../../Include" />
</include_path>
</component>

View File

@@ -36,7 +36,7 @@
<!-- Display -->
<div class="col py-3">
<!-- Page Title -->
<h1><span class="badge text-bg-secondary font-weight-bold" style="width:100%;">Group Review</span></h1>
<h1><span class="badge text-bg-secondary font-weight-bold" style="width:100%;"><?php echo $ti_1; ?></span></h1>
<!-- Main content -->
<div class="container-fluid">

View File

@@ -41,7 +41,7 @@
<!-- Display -->
<div class="col py-3">
<!-- Page Title -->
<h1><span class="badge text-bg-secondary font-weight-bold" style="width:100%;">Group Membership</span></h1>
<h1><span class="badge text-bg-secondary font-weight-bold" style="width:100%;"><?php echo $w_groupMembership ?></span></h1>
<!-- Main content -->
<div class="container-fluid">
@@ -60,11 +60,11 @@
<form id="search-form" class="mb-4" method="POST" action="">
<div class="row">
<div class="col-md-6">
<label for="group-search" class="form-label">Search AD Group</label>
<input type="text" class="form-control" id="group-search" name="group-search" placeholder="Start typing group name ...">
<label for="group-search" class="form-label"><?php echo $w_groupSearch; ?></label>
<input type="text" class="form-control" id="group-search" name="group-search" placeholder="<?php echo $w_startToType; ?>">
</div>
<div class="col-md-2 d-flex align-items-end">
<button type="submit" class="btn btn-primary w-100">Show Members</button>
<button type="submit" class="btn btn-primary w-100"><?php echo $w_seeMembers; ?></button>
</div>
</div>
</form>

View File

@@ -6,7 +6,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Web Infra Reports</title>
<title>Web Infra Reports IT</title>
<link rel="shortcut icon" type="image/png" href="/include/favicon-32x32.png">
<script src="/js/jquery-3.6.1.min.js"></script>
@@ -29,7 +29,7 @@
<div class="col-auto col-md-2 col-xl-2 px-sm-2 px-0 bg-dark vh-100 position-sticky top-0" style="-ms-flex: 0 0 230px;flex: 0 0 230px;">
<?php include $_SERVER['DOCUMENT_ROOT'] . "/navbar.html"; ?> </div>
<div class="col py-3">
<h1><span class="badge text-bg-secondary font-weight-bold" style="width:100%;">Hyper-V Clusters</span></h1>
<h1><span class="badge text-bg-secondary font-weight-bold" style="width:100%;"><?php echo $ti_4;?></span></h1>
<div class="container-fluid" style="zoom:90%">
<div class="row">
<?php
@@ -37,7 +37,6 @@
// STEP 1: Fetch all required data with minimal database queries
// =================================================================
// Query 1: Get aggregated data for all clusters at once. (Unchanged)
$cluster_query = "
SELECT
cluster,
@@ -62,7 +61,6 @@
";
$all_clusters_data = Invoke_Infra($cluster_query);
// Query 2: Get VM distribution for all relevant clusters at once. (Unchanged)
$vm_repart_query = "
SELECT
v.Cluster,
@@ -95,7 +93,6 @@
}
}
// MODIFICATION : Requête finale sans la jointure pour éviter les doublons
$vm_issues_query = "
SELECT
v.Cluster,
@@ -178,11 +175,11 @@
// --- Display Logic ---
if ($vms_left > 2) {
$vleft_html = "<span class='text-success'><b>(" . $vms_left . "</b> VMs left)</span>";
$vleft_html = "<span class='text-success'><b>(" . $vms_left . "</b> $w_VMleft)</span>";
} elseif ($vms_left >= 1) {
$vleft_html = "<span class='text-warning'><b>(" . $vms_left . "</b> VMs left)</span>";
$vleft_html = "<span class='text-warning'><b>(" . $vms_left . "</b> $w_VMleft)</span>";
} else {
$vleft_html = "<span class='text-danger'><b>(" . $vms_left . "</b> VMs left)</span>";
$vleft_html = "<span class='text-danger'><b>(" . $vms_left . "</b> $w_VMleft)</span>";
}
?>
@@ -192,7 +189,7 @@
<div class='card-header text-white bg-dark border-secondary'>
<h4 class="text-center"><?php echo htmlspecialchars($cluster_name); ?></h4>
<h6 class="text-center">
<b><?php echo $node_count; ?></b> Nodes / <b><?php echo $total_vms; ?></b> VMs <?php echo $vleft_html; ?>
<b><?php echo $node_count; ?></b> <?php echo $w_nodes;?> / <b><?php echo $total_vms; ?></b> <?php echo $w_VMs ;?> <?php echo $vleft_html; ?>
</h6>
<?php
@@ -222,7 +219,7 @@
$mem_used_percentage = 100 - $free_mem_percentage;
?>
<div class='row mb-2 align-items-center'>
<div class='col-7'><b>Free Mem:</b> <?php echo $free_mem . " / " . $cluster_usable_mem; ?> GB</div>
<div class='col-7'><b><?php echo $w_freeMem;?> :</b> <?php echo $free_mem . " / " . $cluster_usable_mem; ?> GB</div>
<div class='col-5'>
<div class='progress' style='border: 2px solid <?php echo $mem_border; ?>; height: 20px;'>
<div class='progress-bar bg-dark progress-bar-striped' style='width: <?php echo $mem_used_percentage; ?>%;'></div>
@@ -245,7 +242,7 @@
$disk_used_percentage = 100 - $free_storage_percentage;
?>
<div class='row mb-2 align-items-center'>
<div class='col-7'><b>Free CSV:</b> <?php echo $display_free . " / " . $display_capacity . " " . $disk_unit; ?></div>
<div class='col-7'><b><?php echo $w_freeCSV;?> :</b> <?php echo $display_free . " / " . $display_capacity . " " . $disk_unit; ?></div>
<div class='col-5'>
<div class='progress' style='border: 2px solid <?php echo $disk_border; ?>; height: 20px;'>
<div class='progress-bar bg-dark progress-bar-striped' style='width: <?php echo $disk_used_percentage; ?>%;'></div>
@@ -260,15 +257,15 @@
$wrong_owner_count = $vm_issues[$cluster_name]['wrong_owner'] ?? 0;
if ($unclustered_count > 0) {
echo "<div class='col-7'><span class='badge text-bg-danger'>Unclustered: $unclustered_count</span></div>";
echo "<div class='col-7'><span class='badge text-bg-danger'>$w_unclustered: $unclustered_count</span></div>";
}else{
echo "<div class='col-7'><span class='badge text-bg-success'>Unclustered: $unclustered_count</span></div>";
echo "<div class='col-7'><span class='badge text-bg-success'>$w_unclustered: $unclustered_count</span></div>";
}
if ($wrong_owner_count > 0) {
echo "<div class='col-5'><span class='badge text-bg-warning'>Wrong Owner: {$wrong_owner_count}</span></div>";
echo "<div class='col-5'><span class='badge text-bg-warning'>$w_wrongOwner: {$wrong_owner_count}</span></div>";
}else{
echo "<div class='col-5'><span class='badge text-bg-success'>Wrong Owner: {$wrong_owner_count}</span></div>";
echo "<div class='col-5'><span class='badge text-bg-success'>$w_wrongOwner: {$wrong_owner_count}</span></div>";
}
?>
</div>
@@ -285,7 +282,7 @@
<div class="row">
<div class="col-12">
<br><br>
<h3 class="text-center">Total VMs Left: <?php echo $total_vms_left; ?></h3>
<h3 class="text-center">Total <?php echo $w_VMleft;?>: <?php echo $total_vms_left; ?></h3>
</div>
</div>
</div>

131
Hyper-V/Memory-Hunt-VMs.php Normal file
View File

@@ -0,0 +1,131 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Page Title -->
<title>Web Infra Reports IT</title>
<link rel="shortcut icon" type="image/png" href="/include/favicon-32x32.png">
<!-- JQuery -->
<script src="/js/jquery-3.6.1.min.js"></script>
<!-- Bootstrap -->
<link rel="stylesheet" href="/css/bootstrap.min.css">
<link rel="stylesheet" href="/css/bootstrap-icons/bootstrap-icons.css">
<link rel="stylesheet" href="/css/preloader.css">
<script src="/js/bootstrap.bundle.min.js"></script>
<!-- Bootstrap-tables -->
<link rel="stylesheet" href="/css/bootstrap-table.min.css">
<script src="/js/bootstrap-table.min.js"></script>
<script src="/js/bootstrap-table-fr-FR.min.js"></script>
<script src="/js/tableExport.min.js"></script>
<script src="/js/bootstrap-table-export.min.js"></script>
<script src="/js/libs/js-xlsx/xlsx.core.min.js"></script>
</head>
<body class="bg-light text-dark">
<?php include $_SERVER['DOCUMENT_ROOT'] . "/include/all.php"; ?> <!-- Include All -->
<?php // DATA
$answers = Invoke_Infra("SELECT
m.*, COALESCE(s.OS, CONCAT(x.name, ' ', x.ver)) AS OS,
CASE
WHEN o.model = 'Virtual Machine' OR o.typ = 'MACHINE VIRTUELLE' THEN 'VM'
WHEN o.model IS NOT NULL AND o.model <> '' THEN o.model
ELSE 'Inconnu' -- Ou une autre valeur par défaut si tout est vide
END AS hardware_type
FROM cmdb_memoryusage m
LEFT JOIN cmdb_srvall s ON m.vm_name = s.hostname
LEFT JOIN x_cmdb_OS x ON m.vm_name = x.hostname
LEFT JOIN cmdb_obsolescence o on m.vm_name = o.name
where m.vm_name not like '%-v%-%' order by m.Potential_Savings_GB desc");
?>
<!-- HTML -->
<div class="container-fluid" id="content">
<div class="row flex-nowrap">
<!-- Left NAVBAR -->
<div class="col-auto col-md-2 col-xl-2 px-sm-2 px-0 bg-dark vh-100 position-sticky top-0" style="-ms-flex: 0 0 230px;flex: 0 0 230px;">
<?php include $_SERVER['DOCUMENT_ROOT'] . "/navbar.html"; ?>
</div>
<!-- Display -->
<div class="col py-3">
<!-- Page Title -->
<h1><span class="badge text-bg-secondary font-weight-bold" style="width:100%;"><?php echo $ti_6;?> </span></h1>
<!-- Main content -->
<div class="container-fluid">
<!-- TABLE -->
<div>
<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" data-sort-name="VM">
<thead> <!-- Header -->
<tr>
<th data-field="name" data-sortable="true"><?php echo $w_name;?></th>
<th data-field="Assigned" data-sortable="true"><?php echo $w_assignedGB;?></th>
<th data-field="MinUsed" data-sortable="true"><?php echo $w_minUsedGB;?></th>
<th data-field="AvgUsed" data-sortable="true"><?php echo $w_avgUsedGB;?></th>
<th data-field="MaxUsed" data-sortable="true"><?php echo $w_maxUsedGB;?></th>
<th data-field="Savings" data-sortable="true"><?php echo $w_potentialSavingsGB;?></th>
<th data-field="StorageTotal" data-sortable="true"><?php echo $w_storageTotalGB;?></th>
<th data-field="StorageUsed" data-sortable="true"><?php echo $w_storageUsedGB;?></th>
<th data-field="OS" data-sortable="true" data-visible="false"><?php echo $w_os;?></th>
<th data-field="Hardware" data-sortable="true" data-visible="false"><?php echo $w_hardware;?></th>
</tr>
</thead>
<tbody> <!-- Body -->
<?php
foreach ($answers as $row) {
echo "<tr><td>".$row['VM_Name']."</td>";
echo "<td>".$row['Assigned_GB']."</td>";
echo "<td>".$row['Min_Usage_GB']."</td>";
echo "<td>".$row['Avg_Usage_GB']."</td>";
echo "<td>".$row['Max_Usage_GB']."</td>";
echo "<td>".$row['Potential_Savings_GB']."</td>";
echo "<td>".$row['Storage_Total_GB']."</td>";
echo "<td>".$row['Storage_Used_GB']."</td>";
echo "<td>".$row['OS']."</td>";
echo "<td>".$row['hardware_type']."</td></tr>";
}
?>
</tbody>
</table>
<br>
</div>
</div>
<!-- End of main content -->
</div>
</div>
</div>
</body>
<script src="/js/switch.js"></script>
</HTML>
<SCRIPT>
let table = $('#t1');
$(document).ready(function() {
table.DataTable({
scrollY: '50vh',
scrollCollapse: true,
paging: false,
});
});
$(function () {
let options = table.bootstrapTable('getOptions');
options.height= document.getElementById('content').clientHeight-170;
table.bootstrapTable('refreshOptions',options);
});
function tableresize() {
let options = table.bootstrapTable('getOptions');
options.height= document.getElementById('content').clientHeight-170;
table.bootstrapTable('refreshOptions',options);
}
window.addEventListener("resize", tableresize);
</SCRIPT>

View File

@@ -30,7 +30,7 @@
<body class="bg-light text-dark">
<?php include $_SERVER['DOCUMENT_ROOT'] . "/include/all.php"; ?> <!-- Include All -->
<?php $answers = Invoke_Infra("select * from cmdb_vms where cluster like 'DMV-VMH-SYN%' and decomtime is null order by name"); ?>
<?php $answers = Invoke_Infra("select * from cmdb_vms where decomtime is null order by name"); ?>
<!-- HTML -->
<div class="container-fluid" id="content">
@@ -42,7 +42,7 @@
<!-- Display -->
<div class="col py-3">
<!-- Page Title -->
<h2><span class="badge text-bg-secondary " style="width:100%;" >Synergy VM List - <?php echo count($answers); ?> VMs</span></h2>
<h2><span class="badge text-bg-secondary " style="width:100%;" >VM List - <?php echo count($answers); ?> VMs</span></h2>
<!-- Main content -->
<div class="container-fluid">

View File

@@ -67,13 +67,13 @@
<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" data-sort-name="VM">
<thead> <!-- Header -->
<tr>
<th data-field='vm' data-sortable='true'>VM</th>
<th data-field='Last Backup' data-sortable='true'>Last Backup</th>
<th data-field='Last Result' data-sortable='true'>Last Result</th>
<th data-field='Last Good' data-sortable='true'>Last Good Backup</th>
<th data-field='Size' data-sortable='true'>Size</th>
<th data-field='Host' data-sortable='true'>Host</th>
<th data-field='Policy' data-sortable='true' data-visible='false'>Policy</th>
<th data-field='vm' data-sortable='true'><?php echo $w_VMs;?></th>
<th data-field='Last Backup' data-sortable='true'><?php echo $w_backuplu;?></th>
<th data-field='Last Result' data-sortable='true'><?php echo $w_lastResult;?></th>
<th data-field='Last Good' data-sortable='true'><?php echo $w_lastGoodBackup;?></th>
<th data-field='Size' data-sortable='true'><?php echo $w_size;?></th>
<th data-field='Host' data-sortable='true'><?php echo $w_host;?></th>
<th data-field='Policy' data-sortable='true' data-visible='false'><?php echo $w_policy;?></th>
</tr>
</thead>
@@ -228,7 +228,7 @@
</div>
<?php
$success = $total - $er - $outdated -$excluded ;
$ERR = "VMs backups (<span class='text-light'>".$total." Success</span> - <span class='text-danger'>".$er." issues</span> - <span class='text-warning'>".$outdated." outdated </span>- <span class='text-info'>".$excluded.' excluded</span>)';
$ERR = "$w_vmBackup (<span class='text-light'>".$total." $w_success</span> - <span class='text-danger'>".$er." $w_issues</span> - <span class='text-warning'>".$outdated." $w_outdated </span>- <span class='text-info'>".$excluded." $w_excluded</span>)";
?>
</body>
<script src="/js/switch.js"></script>

186
Hyper-V/VMs.php Normal file
View File

@@ -0,0 +1,186 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Page Title -->
<title>Web Infra Reports IT</title>
<link rel="shortcut icon" type="image/png" href="/include/favicon-32x32.png">
<!-- JQuery -->
<script src="/js/jquery-3.6.1.min.js"></script>
<!-- Bootstrap -->
<link rel="stylesheet" href="/css/bootstrap.min.css">
<link rel="stylesheet" href="/css/bootstrap-icons/bootstrap-icons.css">
<link rel="stylesheet" href="/css/preloader.css">
<script src="/js/bootstrap.bundle.min.js"></script>
<!-- Bootstrap-tables -->
<link rel="stylesheet" href="/css/bootstrap-table.min.css">
<script src="/js/bootstrap-table.min.js"></script>
<script src="/js/bootstrap-table-fr-FR.min.js"></script>
<script src="/js/tableExport.min.js"></script>
<script src="/js/bootstrap-table-export.min.js"></script>
<script src="/js/libs/js-xlsx/xlsx.core.min.js"></script>
</head>
<body class="bg-light text-dark">
<?php include $_SERVER['DOCUMENT_ROOT'] . "/include/all.php"; ?> <!-- Include All -->
<?php $answers = Invoke_Infra("select * from cmdb_vms where decomtime is null order by name"); ?>
<!-- HTML -->
<div class="container-fluid" id="content">
<div class="row flex-nowrap">
<!-- Left NAVBAR -->
<div class="col-auto col-md-2 col-xl-2 px-sm-2 px-0 bg-dark vh-100 position-sticky top-0" style="-ms-flex: 0 0 230px;flex: 0 0 230px;">
<?php include $_SERVER['DOCUMENT_ROOT'] . "/navbar.html"; ?>
</div>
<!-- Display -->
<div class="col py-3">
<!-- Page Title -->
<h2><span class="badge text-bg-secondary " style="width:100%;" ><?php echo $ti_19 . " - " . count($answers). " " .$w_VMs; ?></span></h2>
<!-- Main content -->
<div class="container-fluid">
<!-- MODAL WAIT -->
<div class="modal fade bs-example-modal-sm" id="wait" tabindex="-1" role="dialog" aria-hidden="true" data-backdrop="static" style="padding-top: 15%;">
<div class="modal-dialog modal-sm">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title mb-1 text-dark text-uppercase text-center">
<i class="bi bi-hourglass-split"></i><br> Work in progress ...
</h4>
</div>
<div class="modal-body">
<div class="progress">
<div class="progress-bar progress-bar-secondary progress-bar-striped progress-bar-animated" style="width: 100%"></div>
</div>
</div>
</div>
</div>
</div>
<!-- TABLE -->
<div>
<div id="result" class="text-center"></div>
<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" data-sort-name="vm">
<thead> <!-- Header -->
<tr>
<th data-field='vm' data-sortable='true'><?php echo $w_name; ?></th>
<th data-field='owner' data-sortable='true'><?php echo $w_owner; ?></th>
<th data-field='infos' data-sortable='true'>Infos</th>
<th data-field='PreferedOwner' data-sortable='true'><?php echo $w_prefferedNode; ?></th>
<th data-field='gen-ver' data-sortable='true'>Gen & Version</th>
<th data-field='LastInventory' data-sortable='true'><?php echo $w_lastUpdate; ?></th>
</tr>
</thead>
<tbody> <!-- Body -->
<?php
$wrongOwner = $unclustered = $v10 = 0 ; $msg ="" ; $CpuComp = 0; $DynVHD = 0;
foreach ($answers as $row) {
echo "<tr>";
# Name
$state = '<i class="bi bi-question-square-fill text-primary"></i> ';
if($row['State'] == "Running"){$state = '<i class="bi bi-play-btn-fill text-success"></i> ';}
if($row['State'] == "Off" || $row['State'] == "Stopping"){$state = '<i class="bi bi-stop-btn-fill text-danger"></i> ';}
if($row['State'] == "Paused"){$state = '<i class="bi bi-pause-btn-fill text-warning"></i> ';}
echo "<td>".$state." <b>".$row['Name']."</td>";
# Owner
echo "<td>".$row['Owner']."</td>";
# Infos
echo '<td><span class="badge rounded-pill bg-secondary text-light">'.$row['Memory'].'GB / '.$row['CPU'].' CPU</span> ';
echo '<span class="badge rounded-pill bg-secondary text-light">VHDx(s) : '.$row['TotalDiskSize'].' GB</span> ';
if($row['WWPNs'] != ""){
echo '<span class="badge rounded-pill bg-primary text-light">LUN(s)</span> ';
}
if($row['CPUcomp'] == "True"){
echo '<span class="badge rounded-pill bg-warning text-dark">CPU Comp.</span> '; $CpuComp++;
}
if($row['DynamicVHD'] == "Y"){
echo '<span class="badge rounded-pill bg-secondary text-warning">Dyn. VHDX</span> '; $DynVHD++;
}
echo "</td>";
# Prefered Owner
if($row['Owner'] == $row['PreferredOwner']){
echo '<td><span class="badge rounded-pill bg-success text-light">'.$row['Owner'].'</span></td> ';
}else{
if($row['IsClustered'] == 'True'){
echo '<td><span class="badge rounded-pill bg-warning text-dark">'.$row['Owner'].'</span></td> ';
$wrongOwner++;
}else{
echo '<td><span class="badge rounded-pill bg-danger text-dark">'.$w_unclustered.'</span></td> ';
$unclustered++;
}
}
# Gen & Ver
echo "<td>";
if($row['Generation'] == "2"){
echo '<span class="badge rounded-pill bg-success text-light">Gen '.$row['Generation'].'</span> ';
}else{
echo '<span class="badge rounded-pill bg-warning text-dark">Gen '.$row['Generation'].'</span> ';
}
if($row['Version'] == "10.0"){
echo '<span class="badge rounded-pill bg-success text-light">Ver '.$row['Version'].'</span> ';
}else{
echo '<span class="badge rounded-pill bg-warning text-dark">Ver '.$row['Version'].'</span> ';
$v10++;
}
echo "</td>";
# TS
echo "<td>".$row['LastInventory']."</td>";
echo "</tr>";
}
if($wrongOwner > 0){$msg = "<span class='badge bg-warning text-dark'>$wrongOwner $w_VMOnWrongOwner</span>";}
if($unclustered > 0){$msg .= "&nbsp;<span class='badge bg-danger'>$unclustered $w_unclusteredVMs</span>";}
if($v10 > 0){$msg .= "&nbsp;<span class='badge bg-warning text-dark'>$v10 $w_VMs < Ver 10.0</span>";}
if($CpuComp > 0){$msg .= "&nbsp;<span class='badge bg-warning text-dark'>$CpuComp $w_vmCpuChecked</span>";}
if($DynVHD > 0){$msg .= "&nbsp;<span class='badge bg-secondary text-warning'>$DynVHD $w_vmDynamicVHD</span>";}
?>
</tbody>
</table>
<br>
</div>
</div>
<!-- End of main content -->
</div>
</div>
</div>
</body>
<script src="/js/switch.js"></script>
</HTML>
<SCRIPT>
$(function() {
const table = $('#t1');
// Exécution initiale pour définir la hauteur
adjustTableHeight();
// Événement de redimensionnement
$(window).on('resize', function() {
adjustTableHeight();
});
function adjustTableHeight() {
const windowHeight = $(window).height();
const tableTop = table.offset().top;
const footerHeight = 50; // Hauteur estimée pour d'éventuels éléments en bas
let availableHeight = windowHeight - tableTop - footerHeight;
// Définir une hauteur minimale
availableHeight = Math.max(availableHeight, 400);
table.bootstrapTable('refreshOptions', {
height: availableHeight
});
}
});
document.getElementById("result").innerHTML = "<?php echo "<h4>".$msg."</h4>" ; ?>";
</script>

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>";

View File

@@ -31,7 +31,7 @@
<body class="bg-light text-dark">
<?php include $_SERVER['DOCUMENT_ROOT'] . "/include/all.php"; ?> <!-- Include All -->
<?php // DATA
$folders = Invoke_Infra("SELECT * FROM FLS_and_PRS where typ in('PROJET','TEAMS') order by [server], folder");
$answers = Invoke_Infra("SELECT * FROM v_HyperV_Memory_Optimization order by Total_VM_Savings_GB desc");
?>
<!-- HTML -->
@@ -44,8 +44,7 @@
<!-- Display -->
<div class="col py-3">
<!-- Page Title -->
<h1><span class="badge text-bg-secondary font-weight-bold" style="width:100%;">Project and Team folders <small><small>(<?php echo count($folders); ?> entries)</small></small></span></h1>
<h6>Updated every day at 07:00:00</h6>
<h1><span class="badge text-bg-secondary font-weight-bold" style="width:100%;"><?php echo $ti_5 ;?> </span></h1>
<!-- Main content -->
<div class="container-fluid">
@@ -71,32 +70,22 @@
<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" data-sort-name="VM">
<thead> <!-- Header -->
<tr>
<th data-field="Server" data-sortable="true">Server</th>
<th data-field="Folder" data-sortable="true">Folder</th>
<th data-field="Type" data-sortable="true">Type</th>
<th data-field="ACL" data-sortable="true">ACL</th>
<th data-field="Quota" data-sortable="true">Quota</th>
<th data-field="Size" data-sortable="true">Size</th>
<th data-field="Users" data-sortable="true">Effective Users</th>
<th data-field="name" data-sortable="true"><?php echo $w_host;?></th>
<th data-field="VMs" data-sortable="true"><?php echo $w_VMs;?></th>
<th data-field="Assigned" data-sortable="true"><?php echo $w_vmAssignedGB;?></th>
<th data-field="MaxUsed" data-sortable="true"><?php echo $w_vmMaxUsedGB ;?></th>
<th data-field="Savings" data-sortable="true"><?php echo $w_potentialSavingsGB;?></th>
</tr>
</thead>
<tbody> <!-- Body -->
<?php
foreach ($folders as $answer) {
if($answer['acl'] == "" || $answer['users'] == 0){
echo "<tr class='table-warning'>";
}else{
echo "<tr>";
}
echo "<td class='text-nowrap'>".$answer['server']."</td>";
echo "<td>".$answer['folder']."</td>";
echo "<td>".$answer['typ']."</td>";
echo "<td>".$answer['acl']."</td>";
echo "<td>".$answer['quota']."</td>";
echo "<td>".$answer['size']."</td>";
echo "<td>".$answer['users']."</td>";
echo "</tr>";
foreach ($answers as $row) {
echo "<tr><td>".$row['HyperV_Host']."</td>";
echo "<td>".$row['VM_Count']."</td>";
echo "<td>".$row['Total_VM_Assigned_GB']."</td>";
echo "<td>".$row['Total_VM_Max_Usage_GB']."</td>";
echo "<td>".$row['Total_VM_Savings_GB']."</td></tr>";
}
?>
</tbody>
@@ -115,7 +104,7 @@
<SCRIPT>
let table = $('#t1');
$(document).ready(function() {
$('#t1').DataTable({
table.DataTable({
scrollY: '50vh',
scrollCollapse: true,
paging: false,
@@ -135,5 +124,4 @@
}
window.addEventListener("resize", tableresize);
</script>
</SCRIPT>

View File

@@ -52,7 +52,7 @@
<!-- Display -->
<div class="col py-3">
<!-- Page Title -->
<h1><span class="badge text-bg-secondary font-weight-bold" style="width:100%;">Cluster Resources <small><small>(Hyper-V excluded)</small></small></span></h1>
<h1><span class="badge text-bg-secondary font-weight-bold" style="width:100%;"><?php echo $ti_18; ?></span></h1>
<!-- Main content -->
<div class="container-fluid">
@@ -78,11 +78,11 @@
<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" data-sort-name="VM">
<thead> <!-- Header -->
<tr>
<th data-field="Server" data-sortable="true">Cluster</th>
<th data-field="Folder" data-sortable="true">Resource</th>
<th data-field="ACL" data-sortable="true">Owner Node</th>
<th data-field="AD" data-sortable="true">State</th>
<th data-field="Enabled" data-sortable="true">Last Checked</th>
<th data-field="Server" data-sortable="true"><?php echo $w_cluster; ?></th>
<th data-field="Folder" data-sortable="true"><?php echo $w_resource; ?></th>
<th data-field="ACL" data-sortable="true"><?php echo $w_owner; ?></th>
<th data-field="AD" data-sortable="true"><?php echo $w_state; ?></th>
<th data-field="Enabled" data-sortable="true">Date</th>
</tr>
</thead>

View File

@@ -6,7 +6,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 -->
@@ -105,36 +105,46 @@
?>
<!-- Main content -->
<!-- OS, Host, Site, Maintenance -->
<div id="OS" class="fs-4">
<span class="badge rounded-pill bg-secondary text-light"><?= $OSName ?></span>
<?php if($OSKernel){echo "&nbsp;<span class='badge rounded-pill bg-secondary text-light'>$OSKernel</span>";} ?>
<?php
if(is_array($Qvm)){
$site = Invoke_Infra("SELECT site from cmdb_physical_site where hostname ='".$Qvm[0]['Owner']."'")[0]['site'] ?? "?";
if($Qvm[0]['Owner'] == $Qvm[0]['PreferredOwner']){
echo "&nbsp;<span class='badge rounded-pill bg-success text-light'>Host : ".$Qvm[0]['Owner']."</span>";
<!-- OS, Host, Site, Maintenance -->
<div id="OS" class="fs-4 d-flex justify-content-between align-items-center">
<div>
<span class="badge rounded-pill bg-secondary text-light"><?= $OSName ?></span>
<?php if($OSKernel){echo "&nbsp;<span class='badge rounded-pill bg-secondary text-light'>$OSKernel</span>";} ?>
<?php
if(is_array($Qvm)){
$site = Invoke_Infra("SELECT site from cmdb_physical_site where hostname ='".$Qvm[0]['Owner']."'")[0]['site'] ?? "?";
if($Qvm[0]['Owner'] == $Qvm[0]['PreferredOwner']){
echo "&nbsp;<span class='badge rounded-pill bg-success text-light'>$w_host : ".$Qvm[0]['Owner']."</span>";
}else{
echo "&nbsp;<span class='badge rounded-pill bg-warning text-dark'>$w_host : ".$Qvm[0]['Owner']."</span>";
}
}else{
echo "&nbsp;<span class='badge rounded-pill bg-warning text-dark'>Host : ".$Qvm[0]['Owner']."</span>";
if(is_array($Qx)){
echo "&nbsp;<span class='badge rounded-pill bg-success text-light'>$w_host : ".$Qx[0]['Owner']."</span>";
$site = substr($Qx[0]['Owner'],0,3);
}else{
echo "&nbsp;<span class='badge rounded-pill bg-success text-light'>Physical</span>";
echo "&nbsp;<span class='badge rounded-pill bg-success text-light'>".Invoke_GLPI("select a.name from glpi_computermodels a left join glpi_computers b on a.id = b.computermodels_id where b.name = '$server'")[0]['name']."</span>";
}
}
}else{
if(is_array($Qx)){
echo "&nbsp;<span class='badge rounded-pill bg-success text-light'>Host : ".$Qx[0]['Owner']."</span>";
$site = substr($Qx[0]['Owner'],0,3);
}else{
echo "&nbsp;<span class='badge rounded-pill bg-success text-light'>Physical</span>";
echo "&nbsp;<span class='badge rounded-pill bg-success text-light'>".Invoke_GLPI("select a.name from glpi_computermodels a left join glpi_computers b on a.id = b.computermodels_id where b.name = '$server'")[0]['name']."</span>";
?>
<?php if(isset($site)){echo "<span class='badge rounded-pill bg-secondary text-light'>Site : $site</span>";} ?>
<?php if(is_array($Qvm) && $Qvm[0]['IsClustered'] != 'True'){echo "&nbsp;<span class='badge rounded-pill bg-warning text-dark'>Unclustered VM</span>";} ?>
<?php
if(is_array($m) && ($m[0]['scom'] == "Y" || $m[0]['zabbix'] == "Y" || $m[0]['aixcmdb'] == "Y")){
echo "&nbsp;<span class='badge rounded-pill bg-primary text-dark blinking'>Maintenance ON</span>";
}
}
?>
<?php if(isset($site)){echo "<span class='badge rounded-pill bg-secondary text-light'>Site : $site</span>";} ?>
<?php if(is_array($Qvm) && $Qvm[0]['IsClustered'] != 'True'){echo "&nbsp;<span class='badge rounded-pill bg-warning text-dark'>Unclustered VM</span>";} ?>
<?php
$m = Invoke_Infra("select * from Maintenance_Status where server ='$server'");
if($m[0]['scom'] == "Y" || $m[0]['zabbix'] == "Y" || $m[0]['aixcmdb'] == "Y"){
echo "&nbsp;<span class='badge rounded-pill bg-primary text-dark blinking'>Maintenance ON</span>";
}
?>
?>
</div>
<div class="ms-3">
<a href="https://azt-qat-s1spt.armony.net/servermanager/connections/server/<?= strtoupper($server) ?>.armony.net/tools/overview"
target="_blank"
class="badge rounded-pill bg-primary text-light text-decoration-none">
<i class="bi bi-cpu-fill"></i> Admin Center
</a>
</div>
</div>
<hr>
@@ -154,7 +164,7 @@
<div class="chart-container col">
<div class="card mb-3" style="border: 3px solid black">
<div class="card-header text-dark text-center fs-5 bg-info">
<i class="fs-7 bi-memory text-black"></i><b> Memory : <?= $memory ?></b>
<i class="fs-7 bi-memory text-black"></i><b> <?php echo $w_memory;?> : <?= $memory ?></b>
</div>
<div class="card-body bg-dark fs-4">
<canvas id="ramChart"></canvas>
@@ -226,27 +236,27 @@
<!-- Last boot, last rollup, next rollup -->
<?php
if(is_array($Qw) && $Qw[0]['lastBoot'] != ""){
echo "<span class='badge rounded-pill bg-secondary text-light fs-5'>Last Boot : ".$Qw[0]['lastBoot']."</span>";
echo "<span class='badge rounded-pill bg-secondary text-light fs-5'>$w_lastReboot : ".$Qw[0]['lastBoot']."</span>";
}elseif(is_array($Qx) && $Qx[0]['LastBoot'] != ""){
echo "<span class='badge rounded-pill bg-secondary text-light fs-5'>Last Boot : ".$Qx[0]['LastBoot']."</span>";
echo "<span class='badge rounded-pill bg-secondary text-light fs-5'>$w_lastReboot : ".$Qx[0]['LastBoot']."</span>";
}
if(is_array($Qw) && $Qw[0]['LastKBUpdate'] != ""){
echo "&nbsp;<span class='badge rounded-pill bg-secondary text-light fs-5'>Last Update : ".$Qw[0]['LastKBUpdate']."</span>";
echo "&nbsp;<span class='badge rounded-pill bg-secondary text-light fs-5'>$w_lastUpdate : ".$Qw[0]['LastKBUpdate']."</span>";
}elseif(is_array($Qx) && $Qx[0]['LastUpdate'] != ""){
echo "<span class='badge rounded-pill bg-secondary text-light fs-5'>Last Update : ".$Qx[0]['LastUpdate']."</span>";
echo "<span class='badge rounded-pill bg-secondary text-light fs-5'>$w_lastUpdate : ".$Qx[0]['LastUpdate']."</span>";
}
if($OSType == "Windows"){
$date = Invoke_Entry01("select next from rollupdate where Server='$server'");
if(is_array($date)){
if($date != ""){
echo "&nbsp;<span class='badge rounded-pill bg-secondary text-light fs-5'>Next Rollup : ".$date[0]['next']."</span>";
echo "&nbsp;<span class='badge rounded-pill bg-secondary text-light fs-5'>$w_nextRollup : ".$date[0]['next']."</span>";
}
}
}
if($OSType == "Linux"){
$date = Invoke_Infra("select Next from rollup_linux_calendar where Server='$server'")[0]['Next'];
if($date != ""){
echo "&nbsp;<span class='badge rounded-pill bg-secondary text-light fs-5'>Next Rollup : $date </span>";
echo "&nbsp;<span class='badge rounded-pill bg-secondary text-light fs-5'>$w_nextRollup : $date </span>";
}
}
?>
@@ -309,6 +319,19 @@
}
?>
<!-- Network configuration for Windows -->
<?php
if(is_array($Qw)){
$answer = Invoke_Entry01("SELECT Server,IpAddress,Gateway,DHCP,Subnet,MacAddress,DNSSuffix,DNS FROM networkcards where Server='$server'");
echo "<span class='badge rounded-pill bg-secondary text-light fs-5'>IP : " . $answer[0]['IpAddress'] . "</span>&nbsp;";
echo "<span class='badge rounded-pill bg-secondary text-light fs-5'>Mask : " . $answer[0]['Subnet'] . "</span>&nbsp;";
echo "<span class='badge rounded-pill bg-secondary text-light fs-5'>Gateway : " . $answer[0]['Gateway'] . "</span>&nbsp;";
echo "<span class='badge rounded-pill bg-secondary text-light fs-5'>DNS : " . $answer[0]['DNS'] . "</span>&nbsp;";
echo "<span class='badge rounded-pill bg-secondary text-light fs-5'>Mac : " . $answer[0]['MacAddress'] . "</span>&nbsp;";
}
?>
<!-- End of main content -->
</div>
</div>

View File

@@ -45,7 +45,12 @@
}
if (isset($_GET['term'])) {
$term = $_GET['term'];
$query = "SELECT hostname AS serv FROM cmdb_srvall WHERE hostname LIKE '%$term%' UNION SELECT hostname AS serv FROM x_SRVALL WHERE hostname LIKE '%$term%'";
$query = "SELECT hostname AS serv FROM cmdb_srvall
WHERE hostname LIKE '%$term%' AND (DECOM IS NULL OR DATEDIFF(day, DECOM, GETDATE()) <30)
UNION
SELECT hostname AS serv FROM x_SRVALL
WHERE hostname LIKE '%$term%' AND (DECOM IS NULL OR DATEDIFF(day, DECOM, GETDATE()) <30)";
$conn = DB_INFRA();
$rs = odbc_exec($conn, $query);
while ($row = odbc_fetch_array($rs)) {

View File

@@ -6,7 +6,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>
<!-- JQuery -->
<script src="/js/jquery-3.6.1.min.js"></script>

155
Network/dhcp_detail.php Normal file
View File

@@ -0,0 +1,155 @@
<?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'");
$xmlRaw = $data[0]['dump'] ?? '';
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;
}
try {
$xml = new SimpleXMLElement($xmlString);
} catch (Exception $e) {
echo "Erreur de parsing XML : " . $e->getMessage();
exit;
}
$definitions = [];
foreach ($xml->xpath("//OptionDefinition") as $optDef) {
$definitions[(string)$optDef->OptionId] = (string)$optDef->Name;
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-t">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Web Infra Reports IT</title>
<link rel="shortcut icon" type="image/png" href="/include/favicon-32x32.png">
<script src="/js/jquery-3.6.1.min.js"></script>
<link rel="stylesheet" href="/css/bootstrap.min.css">
<link rel="stylesheet" href="/css/bootstrap-icons/bootstrap-icons.css">
<link rel="stylesheet" href="/css/preloader.css">
<script src="/js/bootstrap.bundle.min.js"></script>
<link rel="stylesheet" href="/css/bootstrap-table.min.css">
<script src="/js/bootstrap-table.min.js"></script>
<script src="/js/bootstrap-table-fr-FR.min.js"></script>
<script src="/js/tableExport.min.js"></script>
<script src="/js/bootstrap-table-export.min.js"></script>
<script src="/js/libs/js-xlsx/xlsx.core.min.js"></script>
</head>
<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">
<?php include $_SERVER['DOCUMENT_ROOT'] . "/navbar.html"; ?>
</div>
<div class="col py-3">
<h1><span class="badge bg-secondary text-white w-100"><?php echo htmlspecialchars($server); ?></span></h1>
<div class="card mb-3 bg-light text-dark">
<div class="card-header bg-info text-white">
<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 bg-white text-black">
<?php
$globalOptions = $xml->xpath("//IPv4/OptionValues/OptionValue");
foreach ($globalOptions as $opt):
$idx = (string)$opt->OptionId;
$vals = [];
foreach ($opt->Value as $v) $vals[] = (string)$v;
?>
<div class="row row-option">
<div class="col-md-3"><strong><?php echo $idx; ?></strong> - <?php echo $definitions[$idx] ?? 'Unknown'; ?></div>
<div class="col-md-6"><?php echo implode(" ; ", $vals); ?></div>
<div class="col-md-3 text-muted small"><?php echo (string)$opt->VendorClass; ?></div>
</div>
<?php endforeach; ?>
</div>
</div>
</div>
<?php
foreach ($xml->xpath("//Scope") as $scope):
$scopeIdRaw = (string)$scope->ScopeId;
$cleanId = "scope_" . str_replace('.', '', $scopeIdRaw);
$scopeName = (string)$scope->Name;
?>
<div class="card mb-2">
<div class="card-header bg-success text-white">
<a class="text-white fw-bold" data-bs-toggle="collapse" href="#<?php echo $cleanId; ?>">
<?php echo "$scopeIdRaw ($scopeName)"; ?>
</a>
</div>
<div id="<?php echo $cleanId; ?>" class="collapse">
<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>
</div>
<h6 class="fw-bold border-bottom"><?php echo $w_scopeOptions; ?></h6>
<?php foreach ($scope->OptionValues->OptionValue as $sOpt):
$sIdx = (string)$sOpt->OptionId;
$sVals = [];
foreach ($sOpt->Value as $sv) $sVals[] = (string)$sv;
?>
<div class="row small row-option">
<div class="col-md-3"><strong><?php echo $sIdx; ?></strong> <?php echo $definitions[$sIdx] ?? ''; ?></div>
<div class="col-md-6"><?php echo implode(" ; ", $sVals); ?></div>
<div class="col-md-3 text-muted"><?php echo (string)$sOpt->VendorClass; ?></div>
</div>
<?php endforeach; ?>
<h6 class="fw-bold border-bottom mt-3"><?php echo $w_reservations; ?></h6>
<div class="table-responsive">
<table class="table table-sm table-hover">
<thead>
<tr class="table-secondary">
<th><?php echo $w_name; ?></th><th>IP</th><th>MAC</th><th>Description</th>
</tr>
</thead>
<tbody>
<?php
$reservations = $scope->Reservations->Reservation ?? null;
if ($reservations):
foreach ($reservations as $res): ?>
<tr>
<td><?php echo (string)$res->Name; ?></td>
<td><?php echo (string)$res->IPAddress; ?></td>
<td><code><?php echo (string)$res->ClientId; ?></code></td>
<td class="text-muted"><?php echo (string)$res->Description; ?></td>
</tr>
<?php endforeach;
else: ?>
<tr><td colspan="4" class="text-center text-muted"><em>Aucune réservation sur ce scope</em></td></tr>
<?php endif; ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
<?php endforeach; ?>
</div>
</div>
</div>
</body>
<script src="/js/switch.js"></script>
</html>

70
Network/dhcp_servers.php Normal file
View File

@@ -0,0 +1,70 @@
<?php
// Include global configurations
include $_SERVER['DOCUMENT_ROOT'] . "/include/all.php";
$ts = date("Y-m-d");
$serversData = Invoke_Entry01("SELECT Server,TS FROM dump_dhcp where ts ='$ts' order by server asc");
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-t">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Web Infra Reports IT</title>
<link rel="shortcut icon" type="image/png" href="/include/favicon-32x32.png">
<script src="/js/jquery-3.6.1.min.js"></script>
<link rel="stylesheet" href="/css/bootstrap.min.css">
<link rel="stylesheet" href="/css/bootstrap-icons/bootstrap-icons.css">
<link rel="stylesheet" href="/css/preloader.css">
<script src="/js/bootstrap.bundle.min.js"></script>
<link rel="stylesheet" href="/css/bootstrap-table.min.css">
<script src="/js/bootstrap-table.min.js"></script>
<script src="/js/bootstrap-table-fr-FR.min.js"></script>
<script src="/js/tableExport.min.js"></script>
<script src="/js/bootstrap-table-export.min.js"></script>
<script src="/js/libs/js-xlsx/xlsx.core.min.js"></script>
</head>
<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">
<?php include $_SERVER['DOCUMENT_ROOT'] . "/navbar.html"; ?>
</div>
<div class="col py-3">
<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-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>
<th data-field="Last" data-sortable="true"><?php echo $w_backuplu; ?></th>
</tr>
</thead>
<tbody>
<?php foreach ($serversData as $row): ?>
<tr>
<td>
<a href="dhcp_detail.php?s=<?php echo urlencode($row['Server']); ?>" class="fw-bold">
<?php echo $row['Server']; ?>
</a>
</td>
<td><?php echo $row['TS']; ?></td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</body>
<script src="/js/switch.js"></script>
</html>

View File

@@ -62,7 +62,7 @@
<!-- Display -->
<div class="col py-3">
<!-- Page Title -->
<h1><span class="badge text-bg-secondary font-weight-bold" style="width:100%;">Rollup Calendar</h6></span></h1>
<h1><span class="badge text-bg-secondary font-weight-bold" style="width:100%;"><?php echo $ti_14;?></h6></span></h1>
<!-- Main content -->
<div class="container-fluid">
@@ -88,20 +88,20 @@
<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" data-sort-name="VM">
<thead> <!-- Header -->
<tr>
<th data-field="Server" data-sortable="true">Server</th>
<th data-field="Server" data-sortable="true"><?php echo $w_server;?></th>
<th data-field="Type" data-sortable="true">Type</th>
<th data-field="January" data-sortable="true">January</th>
<th data-field="February" data-sortable="true">February</th>
<th data-field="March" data-sortable="true">March</th>
<th data-field="April" data-sortable="true">April</th>
<th data-field="May" data-sortable="true">May</th>
<th data-field="June" data-sortable="true">June</th>
<th data-field="July" data-sortable="true">July</th>
<th data-field="August" data-sortable="true">August</th>
<th data-field="September" data-sortable="true">September</th>
<th data-field="October" data-sortable="true">October</th>
<th data-field="November" data-sortable="true">November</th>
<th data-field="December" data-sortable="true">December</th>
<th data-field="January" data-sortable="true">01</th>
<th data-field="February" data-sortable="true">02</th>
<th data-field="March" data-sortable="true">03</th>
<th data-field="April" data-sortable="true">04</th>
<th data-field="May" data-sortable="true">05</th>
<th data-field="June" data-sortable="true">06</th>
<th data-field="July" data-sortable="true">07</th>
<th data-field="August" data-sortable="true">08</th>
<th data-field="September" data-sortable="true">09</th>
<th data-field="October" data-sortable="true">10</th>
<th data-field="November" data-sortable="true">11</th>
<th data-field="December" data-sortable="true">12</th>
</tr>
</thead>

View File

@@ -0,0 +1,44 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Page Title -->
<title>Web Infra Reports IT</title>
<link rel="shortcut icon" type="image/png" href="/include/favicon-32x32.png">
<!-- JQuery -->
<script src="/js/jquery-3.6.1.min.js"></script>
<!-- Bootstrap -->
<link rel="stylesheet" href="/css/bootstrap.min.css">
<link rel="stylesheet" href="/css/bootstrap-icons/bootstrap-icons.css">
<script src="/js/bootstrap.bundle.min.js"></script>
<!-- Bootstrap-tables -->
<link rel="stylesheet" href="/css/bootstrap-table.min.css">
<script src="/js/bootstrap-table.min.js"></script>
<script src="/js/bootstrap-table-fr-FR.min.js"></script>
<!-- Chart -->
<script src="/js/chart.min.js"></script>
</head>
<body class="bg-light text-dark">
<?php include $_SERVER['DOCUMENT_ROOT']."/include/all.php" ; ?> <!-- Database connexion -->
<div class="container-fluid">
<div class="row flex-nowrap">
<!-- Left NAVBAR -->
<div class="col-auto col-md-2 col-xl-2 px-sm-2 px-0 bg-dark vh-100 position-sticky top-0" style="-ms-flex: 0 0 230px;flex: 0 0 230px;">
<?php include $_SERVER['DOCUMENT_ROOT']."/navbar.html" ; ?> <!-- Left Navbar -->
</div>
<!-- Display -->
<div class="col py-3 vh-100">
<iframe src="SecureBoot_Dashboard_Latest_SRV.html" style="width: 100%; height: 100%; border: none;"></iframe>
</div>
</div>
<script src="/js/switch.js"></script>
</body>

View File

@@ -0,0 +1,44 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Page Title -->
<title>Web Infra Reports IT</title>
<link rel="shortcut icon" type="image/png" href="/include/favicon-32x32.png">
<!-- JQuery -->
<script src="/js/jquery-3.6.1.min.js"></script>
<!-- Bootstrap -->
<link rel="stylesheet" href="/css/bootstrap.min.css">
<link rel="stylesheet" href="/css/bootstrap-icons/bootstrap-icons.css">
<script src="/js/bootstrap.bundle.min.js"></script>
<!-- Bootstrap-tables -->
<link rel="stylesheet" href="/css/bootstrap-table.min.css">
<script src="/js/bootstrap-table.min.js"></script>
<script src="/js/bootstrap-table-fr-FR.min.js"></script>
<!-- Chart -->
<script src="/js/chart.min.js"></script>
</head>
<body class="bg-light text-dark">
<?php include $_SERVER['DOCUMENT_ROOT']."/include/all.php" ; ?> <!-- Database connexion -->
<div class="container-fluid">
<div class="row flex-nowrap">
<!-- Left NAVBAR -->
<div class="col-auto col-md-2 col-xl-2 px-sm-2 px-0 bg-dark vh-100 position-sticky top-0" style="-ms-flex: 0 0 230px;flex: 0 0 230px;">
<?php include $_SERVER['DOCUMENT_ROOT']."/navbar.html" ; ?> <!-- Left Navbar -->
</div>
<!-- Display -->
<div class="col py-3 vh-100">
<iframe src="SecureBoot_Dashboard_Latest_WS.html" style="width: 100%; height: 100%; border: none;"></iframe>
</div>
</div>
<script src="/js/switch.js"></script>
</body>

View File

@@ -49,7 +49,7 @@
<!-- Display -->
<div class="col py-3">
<!-- Page Title -->
<h1><span class="badge text-bg-secondary font-weight-bold" style="width:100%;">Home Directories with issues <small><small>(<?php echo count($folders); ?> entries) </small></small></span></h1><h6>Updated every day at 07:00:00</h6>
<h1><span class="badge text-bg-secondary font-weight-bold" style="width:100%;"><?php echo $ti_8;?></span></h1>
<!-- Main content -->
<div class="container-fluid">
@@ -75,15 +75,15 @@
<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" data-sort-name="VM">
<thead> <!-- Header -->
<tr>
<th data-field="Server" data-sortable="true">Server</th>
<th data-field="Folder" data-sortable="true">Folder</th>
<th data-field="Server" data-sortable="true"><?php echo $w_server;?></th>
<th data-field="Folder" data-sortable="true"><?php echo $w_folder;?></th>
<th data-field="ACL" data-sortable="true">ACL</th>
<th data-field="AD" data-sortable="true">in AD</th>
<th data-field="Enabled" data-sortable="true">Account Enabled</th>
<th data-field="AD" data-sortable="true"><?php echo $w_inAD;?></th>
<th data-field="Enabled" data-sortable="true"><?php echo $w_accountEnabled;?></th>
<th data-field="o365" data-sortable="true">o365</th>
<th data-field="Quota" data-sortable="true">Quota</th>
<th data-field="Size" data-sortable="true">Size</th>
<th data-field="LastLogon" data-sortable="true">Last Logon</th>
<th data-field="Size" data-sortable="true"><?php echo $w_size;?></th>
<th data-field="LastLogon" data-sortable="true"><?php echo $w_lastLogon;?></th>
</tr>
</thead>

View File

@@ -44,7 +44,7 @@
<!-- Display -->
<div class="col py-3">
<!-- Page Title -->
<h1><span class="badge text-bg-secondary font-weight-bold" style="width:100%;">Project and Team folders <small><small>(<?php echo count($folders); ?> entries) </small></small></span></h1><h6>Updated every day at 07:00:00</h6>
<h1><span class="badge text-bg-secondary font-weight-bold" style="width:100%;"><?php echo $ti_7;?> <small><small>(<?php echo count($folders); ?> <?php echo $entries; ?>) </small></small></span></h1>
<!-- Main content -->
<div class="container-fluid">
@@ -70,13 +70,13 @@
<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" data-sort-name="VM">
<thead> <!-- Header -->
<tr>
<th data-field="Server" data-sortable="true">Server</th>
<th data-field="Folder" data-sortable="true">Folder</th>
<th data-field="Server" data-sortable="true"><?php echo $w_server; ?></th>
<th data-field="Folder" data-sortable="true"><?php echo $w_folder; ?></th>
<th data-field="Type" data-sortable="true">Type</th>
<th data-field="ACL" data-sortable="true">ACL</th>
<th data-field="Quota" data-sortable="true">Quota</th>
<th data-field="Size" data-sortable="true">Size</th>
<th data-field="Users" data-sortable="true">Effective Users</th>
<th data-field="Size" data-sortable="true"><?php echo $w_size; ?></th>
<th data-field="Users" data-sortable="true"><?php echo $w_users; ?></th>
</tr>
</thead>

View File

@@ -88,7 +88,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 -->
@@ -126,6 +126,10 @@
.gain-item span:last-child {
font-weight: bold;
}
.orphan-btn {
width: 120px;
}
</style>
@@ -141,7 +145,7 @@
<!-- Display -->
<div class="col py-3">
<!-- Page Title -->
<h1><span class="badge text-bg-secondary font-weight-bold" style="width:100%;">SVC Storage Dashboard</span></h1>
<h1><span class="badge text-bg-secondary font-weight-bold" style="width:100%;"><?php echo $ti_15 ;?></span></h1>
<!-- Main content -->
<?php
@@ -209,22 +213,34 @@
}
// Orphan Hosts
// Hosts / clusters without LUNs
$orphanHosts = 0;
$chc = "bg-success";
$lHOST = "";
// Standalone hosts: heuristic only
foreach ($json['Data']['Hosts'] as $host) {
if ($host['protocol'] != "scsi") {
$isStandalone = empty($host['host_cluster_id']);
$isOffline = isset($host['status']) && $host['status'] === 'offline';
$isScsi = isset($host['protocol']) && $host['protocol'] === 'scsi';
if ($isStandalone && $isOffline && $isScsi) {
$orphanHosts++;
$chc = "bg-warning";
$lHOST .= $host['name'] . "<br>";
$lHOST .= "[HOST] " . $host['name'] . "<br>";
}
}
if ($json['Data']['Hostclusters']) {
foreach ($json['Data']['Hostclusters'] as $host) {
if ($host['protocol'] != "scsi") {
// Host clusters: real check with mapping_count
if (!empty($json['Data']['Hostclusters'])) {
foreach ($json['Data']['Hostclusters'] as $cluster) {
$isScsi = isset($cluster['protocol']) && $cluster['protocol'] === 'scsi';
$hasNoMappings = isset($cluster['mapping_count']) && (int)$cluster['mapping_count'] === 0;
if ($isScsi && $hasNoMappings) {
$orphanHosts++;
$chc = "bg-warning";
$lHOST .= $host['name'] . "<br>";
$lHOST .= "[CLUSTER] " . $cluster['name'] . "<br>";
}
}
}
@@ -244,7 +260,7 @@
<div class="card h-100" style="border: none">
<div class="card-body capacity-block bg-dark">
<div>
<h5 class="card-title">Physical Capacity</h5>
<h5 class="card-title"><?php echo $w_physicalCapacity;?></h5>
<div class="d-flex justify-content-between align-items-start mb-2">
<div>
<span class="percent"><?= number_format($data['physical_used_percent']) ?>%</span>
@@ -270,7 +286,7 @@
<div class="card h-100" style="border: none">
<div class="card-body capacity-block bg-dark">
<div>
<h5 class="card-title">Volume Capacity</h5>
<h5 class="card-title"><?php echo $w_volumeCapacity;?></h5>
<div class="d-flex justify-content-between align-items-start mb-2">
<div>
<span class="percent"><?= number_format($data['volume_written_percent']) ?>%</span>
@@ -292,13 +308,13 @@
<div class="card h-100" style="border: none">
<div class="card-body capacity-block bg-dark">
<div>
<h5 class="card-title">Capacity gain</h5>
<h5 class="card-title"><?php echo $w_capacityGain;?></h5>
<div class="gain-item">
<span><?= number_format($data['compression_savings_percent']) ?>% Compression</span>
<span><?= formatBytes($data['compression_savings']) ?></span>
</div>
<div class="gain-item">
<span><?= number_format($data['thin_savings_percent']) ?>% Thin provisioning</span>
<span><?= number_format($data['thin_savings_percent']) ?>% <?php echo $w_thin;?></span>
<span><?= formatBytes($data['thin_savings']) ?></span>
</div>
<hr>
@@ -328,7 +344,7 @@
<div class="card h-100" style="border: none">
<div class="card-body capacity-block bg-dark">
<div>
<h5 class="card-title">Physical Capacity</h5>
<h5 class="card-title"><?php echo $w_physicalCapacity;?></h5>
<div class="d-flex justify-content-between align-items-start mb-2">
<div>
<span class="percent"><?= number_format($data['physical_used_percent']) ?>%</span>
@@ -354,7 +370,7 @@
<div class="card h-100" style="border: none">
<div class="card-body capacity-block bg-dark">
<div>
<h5 class="card-title">Volume Capacity</h5>
<h5 class="card-title"><?php echo $w_volumeCapacity;?></h5>
<div class="d-flex justify-content-between align-items-start mb-2">
<div>
<span class="percent"><?= number_format($data['volume_written_percent']) ?>%</span>
@@ -376,13 +392,13 @@
<div class="card h-100" style="border: none">
<div class="card-body capacity-block bg-dark">
<div>
<h5 class="card-title">Capacity gain</h5>
<h5 class="card-title"><?php echo $w_capacityGain;?></h5>
<div class="gain-item">
<span><?= number_format($data['compression_savings_percent']) ?>% Compression</span>
<span><?= formatBytes($data['compression_savings']) ?></span>
</div>
<div class="gain-item">
<span><?= number_format($data['thin_savings_percent']) ?>% Thin provisioning</span>
<span><?= number_format($data['thin_savings_percent']) ?>% <?php echo $w_thin;?></span>
<span><?= formatBytes($data['thin_savings']) ?></span>
</div>
<hr>
@@ -402,60 +418,64 @@
<hr>
<!-- IO_grp -->
<div class="row flex-nowrap text-center">
<div class="col"><!-- GRP0 -->
<div class="card border-secondary mb-3">
<div class="row flex-nowrap text-center align-items-stretch">
<div class="col d-flex"><!-- GRP0 -->
<div class="card border-secondary mb-3 w-100 h-100">
<div class="card-header text-dark text-center bg-info">
<h5><i class="fs-4 bi-hdd-network text-black"></i> IO_grp 0</h5>
</div>
<div class="card-body bg-dark">
<b>Hosts : </b><?php echo $json['Data']['IOgroups']['io_grp0']['host_count']; ?><br>
<b>Volumes : </b><?php echo $json['Data']['IOgroups']['io_grp0']['vdisk_count']; ?>
<div class="card-body bg-dark text-center">
<div><b><?php echo $w_host; ?> :</b> <?php echo $json['Data']['IOgroups']['io_grp0']['host_count']; ?></div>
<div><b>Volumes :</b> <?php echo $json['Data']['IOgroups']['io_grp0']['vdisk_count']; ?></div>
</div>
</div>
</div>
<div class="col"><!-- GRP1 -->
<div class="card border-secondary mb-3">
<div class="col d-flex"><!-- GRP1 -->
<div class="card border-secondary mb-3 w-100 h-100">
<div class="card-header text-dark text-center bg-info">
<h5><i class="fs-4 bi-hdd-network text-black"></i> IO_grp 1</h5>
</div>
<div class="card-body bg-dark text-left">
<b>Hosts : </b><?php echo $json['Data']['IOgroups']['io_grp1']['host_count']; ?><br>
<b>Volumes : </b><?php echo $json['Data']['IOgroups']['io_grp1']['vdisk_count']; ?>
<div class="card-body bg-dark text-center">
<div><b><?php echo $w_host; ?> :</b> <?php echo $json['Data']['IOgroups']['io_grp1']['host_count']; ?></div>
<div><b>Volumes :</b> <?php echo $json['Data']['IOgroups']['io_grp1']['vdisk_count']; ?></div>
</div>
</div>
</div>
<div class="col"><!-- GRP2 -->
<div class="card border-secondary mb-3">
<div class="col d-flex"><!-- GRP2 -->
<div class="card border-secondary mb-3 w-100 h-100">
<div class="card-header text-dark text-center bg-info">
<h5><i class="fs-4 bi-hdd-network text-black"></i> IO_grp 2</h5>
</div>
<div class="card-body bg-dark">
<b>Hosts : </b><?php echo $json['Data']['IOgroups']['io_grp2']['host_count']; ?><br>
<b>Volumes : </b><?php echo $json['Data']['IOgroups']['io_grp2']['vdisk_count']; ?>
<div class="card-body bg-dark text-center">
<div><b><?php echo $w_host; ?> :</b> <?php echo $json['Data']['IOgroups']['io_grp2']['host_count']; ?></div>
<div><b>Volumes :</b> <?php echo $json['Data']['IOgroups']['io_grp2']['vdisk_count']; ?></div>
</div>
</div>
</div>
<div class="col"><!-- Orphan LUNS -->
<div class="card border-secondary mb-3">
<div class="col d-flex"><!-- Orphan LUNS -->
<div class="card border-secondary mb-3 w-100 h-100">
<div class="card-header text-dark text-center <?php echo $cuc; ?>">
<h5><i class="fs-4 bi-hdd text-black"></i> Unnasigned LUNs</h5>
<h5><i class="fs-4 bi-hdd text-black"></i> <?php echo $w_unassignedLUNs; ?></h5>
</div>
<div class="card-body bg-dark text-center fs-2">
<div class="card-body bg-dark text-center fs-2 d-flex flex-column justify-content-center align-items-center">
<a href="http://infra-tools.appliarmony.net/storage/svc-orphan-luns.php" target="_blank">
<button type="button" class="btn btn-secondary" data-bs-html="true" data-toggle="tooltip"
data-placement="top" title="<?php echo $lLUN; ?>"><b><?php echo $unnasigned; ?></b></button>
<button type="button" class="btn btn-secondary orphan-btn" data-bs-html="true" data-toggle="tooltip"
data-placement="top" title="<?php echo $lLUN; ?>"><b><?php echo $unnasigned; ?></b></button>
</a>
</div>
</div>
</div>
<div class="col"><!-- Orphan Hosts -->
<div class="card border-secondary mb-3">
<div class="col d-flex"><!-- Orphan Hosts -->
<div class="card border-secondary mb-3 w-100 h-100">
<div class="card-header text-dark text-center <?php echo $chc; ?>">
<h5><i class="fs-4 bi-hdd text-black"></i> Hosts w/o LUNs</h5>
<h5><i class="fs-4 bi-hdd text-black"></i> <?php echo $w_hostsWoLUNs; ?></h5>
</div>
<div class="card-body bg-dark text-center fs-2">
<button type="button" class="btn btn-secondary" data-bs-html="true" data-toggle="tooltip"
<div class="card-body bg-dark text-center fs-2 d-flex flex-column justify-content-center align-items-center">
<button type="button" class="btn btn-secondary orphan-btn" data-bs-html="true" data-toggle="tooltip"
data-placement="top" title="<?php echo $lHOST; ?>"><b><?php echo $orphanHosts; ?></b></button>
</div>
</div>

View File

@@ -1,68 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Page Title -->
<title>Web Infra Reports</title>
<link rel="shortcut icon" type="image/png" href="/include/favicon-32x32.png">
<!-- JQuery -->
<script src="/js/jquery-3.6.1.min.js"></script>
<!-- Bootstrap -->
<link rel="stylesheet" href="/css/bootstrap.min.css">
<link rel="stylesheet" href="/css/bootstrap-icons/bootstrap-icons.css">
<script src="/js/bootstrap.bundle.min.js"></script>
<!-- Bootstrap-tables -->
<link rel="stylesheet" href="/css/bootstrap-table.min.css">
<script src="/js/bootstrap-table.min.js"></script>
<script src="/js/bootstrap-table-fr-FR.min.js"></script>
<!-- Chart -->
<script src="/js/chart.min.js"></script>
</head>
<body class="bg-light text-dark">
<?php include $_SERVER['DOCUMENT_ROOT']."/include/all.php" ; ?>
<?php
//get full data
$json = json_decode(PostJson("$bdnuss/Storage/SVC/SVC_INVENTORY.php",''),true);
// Unnasigned Luns
$unnasigned = 0 ;
$list = "";
foreach($json['Data']['Volumes'] as $volume){
if($volume['protocol'] != "scsi"){$unnasigned++;$list.="<tr><td>".$volume['name']."</td></tr>";}
}
?>
<div class="container-fluid">
<div class="row flex-nowrap">
<!-- Left NAVBAR -->
<div class="col-auto col-md-2 col-xl-2 px-sm-2 px-0 bg-dark vh-100 position-sticky top-0" style="-ms-flex: 0 0 230px;flex: 0 0 230px;">
<?php include $_SERVER['DOCUMENT_ROOT']."/navbar.html" ; ?> <!-- Left Navbar -->
</div>
<!-- Display -->
<div class="col py-3">
<!-- Page Title -->
<h1><span class="badge text-bg-secondary font-weight-bold" style="width:100%;"><?php echo "$unnasigned SVC Orphan LUN(s)" ; ?></span></h1>
<!-- Main content -->
<br>
<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" data-sort-name="VM">
<thead> <!-- Header -->
<tr>
<th data-field="luns" data-sortable="true">Luns</th>
</tr>
</thead>
<tbody>
<?php echo $list; ?>
</tbody>
</table>
</div>
<!-- End of main content -->
</div>
</div>
<script src="/js/switch.js"></script>
</body>

View File

@@ -44,7 +44,7 @@
<!-- Display -->
<div class="col py-3">
<!-- Page Title -->
<h1><span class="badge text-bg-secondary font-weight-bold" style="width:100%;">AutoRemediation Logs</span></h1>
<h1><span class="badge text-bg-secondary font-weight-bold" style="width:100%;"><?php echo $ti_11;?></span></h1>
<!-- Main content -->
<div class="container-fluid">
@@ -70,9 +70,9 @@
<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" data-sort-name="VM">
<thead> <!-- Header -->
<tr>
<th data-field='ts' data-sortable='true'>TimeStamp</th>
<th data-field='host' data-sortable='true'>Host</th>
<th data-field='command' data-sortable='true'>Command</th>
<th data-field='ts' data-sortable='true'>Date</th>
<th data-field='host' data-sortable='true'><?php echo $w_host;?></th>
<th data-field='command' data-sortable='true'><?php echo $w_command;?></th>
</tr>
</thead>

View File

@@ -6,7 +6,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Web Infra Reports</title>
<title>Web Infra Reports IT</title>
<link rel="shortcut icon" type="image/png" href="/include/favicon-32x32.png">
<script src="/js/jquery-3.6.1.min.js"></script>
@@ -25,7 +25,7 @@
<body class="bg-light text-dark">
<?php
include $_SERVER['DOCUMENT_ROOT'] . "/include/global.php";
include $_SERVER['DOCUMENT_ROOT'] . "/include/all.php";
$list = Invoke_Infra("select * from X_cmdb_backupsys order by HOSTNAME");
$all = $_POST['show_all'] ?? 0;
@@ -45,7 +45,7 @@
<?php include $_SERVER['DOCUMENT_ROOT'] . "/navbar.html"; ?>
</div>
<div class="col py-3">
<h1><span class="badge text-bg-secondary font-weight-bold" style="width:100%;">Backups Linux/AIX</span></h1>
<h1><span class="badge text-bg-secondary font-weight-bold" style="width:100%;"><?php echo $w_backup;?> Linux/AIX</span></h1>
<div class="d-flex justify-content-start align-items-center mb-2 p-2 rounded bg-secondary-subtle">
<form class="form-inline d-flex gap-4" action="Backups.php" method="post" >
@@ -53,14 +53,14 @@
<input class="form-check-input" type="checkbox" role="switch"
id="showAll" name="show_all" value="1"
<?php echo ($all == 1) ? 'checked' : ''; ?>>
<label class="form-check-label" for="showAll"><strong>All</strong></label>
<label class="form-check-label" for="showAll"><strong><?php echo $w_all ;?></strong></label>
</div>
<div class="form-check form-switch" <?php echo ($all == 1) ? 'style="display:none;"' : ''; ?>>
<input class="form-check-input" type="checkbox" role="switch"
id="showSize" name="show_size" value="1"
<?php echo ($showSize == 1) ? 'checked' : ''; ?>>
<label class="form-check-label" for="showSize"><strong>Size >= 15GB</strong></label>
<label class="form-check-label" for="showSize"><strong><?php echo $w_size ;?> >= 15GB</strong></label>
</div>
</form>
</div>
@@ -68,11 +68,11 @@
<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" data-sort-name="VM">
<thead>
<tr>
<th data-field="Name" data-sortable="true">Name</th>
<th data-field="ts" data-sortable="true">TS</th>
<th data-field="Name" data-sortable="true"><?php echo $w_name ;?></th>
<th data-field="ts" data-sortable="true">Date</th>
<th data-field="Log" data-sortable="true">Log</th>
<th data-field="Type" data-sortable="true">Type</th>
<th data-field="Location" data-sortable="true">Location</th>
<th data-field="Location" data-sortable="true"><?php echo $w_location ;?></th>
</tr>
</thead>

View File

@@ -6,7 +6,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Web Infra Reports</title>
<title>Web Infra Reports IT</title>
<link rel="shortcut icon" type="image/png" href="/include/favicon-32x32.png">
<script src="/js/jquery-3.6.1.min.js"></script>
@@ -25,7 +25,7 @@
<body class="bg-light text-dark">
<?php
include $_SERVER['DOCUMENT_ROOT'] . "/include/global.php";
include $_SERVER['DOCUMENT_ROOT'] . "/include/all.php";
// NOUVEAU : Gérer les filtres
// Par défaut, tout est coché (true)
@@ -75,7 +75,7 @@
<?php include $_SERVER['DOCUMENT_ROOT'] . "/navbar.html"; ?>
</div>
<div class="col py-3">
<h1><span class="badge text-bg-secondary font-weight-bold" style="width:100%;">AIX / Linux inventory</span></h1>
<h1><span class="badge text-bg-secondary font-weight-bold" style="width:100%;"><?php echo $ti_9;?></span></h1>
<div class="container-fluid">
<div class="d-flex justify-content-start align-items-center mb-2 p-2 rounded bg-secondary-subtle">
@@ -95,13 +95,13 @@
<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" data-sort-name="VM">
<thead>
<tr>
<th data-field="Name" data-sortable="true">Name</th>
<th data-field="Heartbeat" data-sortable="true" data-visible="false">Heartbeat</th>
<th data-field="Host" data-sortable="true">Host</th>
<th data-field="OS" data-sortable="true">OS Type</th>
<th data-field="Name" data-sortable="true"><?php echo $w_name ;?></th>
<th data-field="Heartbeat" data-sortable="true" data-visible="false"><?php echo $w_heartbeat ;?></th>
<th data-field="Host" data-sortable="true"><?php echo $w_host ;?></th>
<th data-field="OS" data-sortable="true"><?php echo $w_os ;?></th>
<th data-field="distrib" data-sortable="true">Distrib</th>
<th data-field="Last Boot" data-sortable="true">Last reboot</th>
<th data-field="Last Backup" data-sortable="true">Last backup</th>
<th data-field="Last Boot" data-sortable="true"><?php echo $w_lastReboot ;?></th>
<th data-field="Last Backup" data-sortable="true"><?php echo $w_backuplu ;?></th>
<th data-field="Auth" data-sortable="true">Auth</th>
<th data-field="SentinelOne" data-sortable="true">SentinelOne</th>
<th data-field="Nessus" data-sortable="true">Nessus</th>
@@ -326,7 +326,7 @@
?>
</tbody>
</table><br>
<h5 class="text-center"><?php echo $total; ?> servers</h5>
<h5 class="text-center"><?php echo $total; ?> <?php echo $w_server;?></h5>
</div>
</div>
</div>

View File

@@ -132,7 +132,7 @@
<form class="row">
<div class="col border rounded">
<b>Filters : </b>
<b><?php echo $w_filter;?> : </b>
<div class="form-check form-check-inline form-switch">
<input class="form-check-input" type="checkbox" role="switch" id="AIX" <?php echo $aix; ?> name="AIX" value="1">
<label class="form-check-label" for="AIX">AIX</label>
@@ -155,7 +155,7 @@
&nbsp;
<div class="form-check form-check-inline form-switch">
<input class="form-check-input" type="checkbox" role="switch" id="other" <?php echo $other; ?> name="other" value="1">
<label class="form-check-label" for="other">Other</label>
<label class="form-check-label" for="other"><?php echo $w_other;?></label>
</div>
<input type="hidden" name="s" value="<?php echo $script; ?>">
<button type="submit" class="btn btn-success btn-small mb-2 mt-2">Apply</button>
@@ -165,10 +165,10 @@
<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" data-sort-name="vm">
<thead> <tr>
<th data-field='host' data-sortable='true'>Host</th>
<th data-field='OS' data-sortable='true'>OS</th>
<th data-field='OSVer' data-sortable='true'>Distrib</th>
<th data-field='TimeStamp' data-sortable='true'>TimeStamp</th>
<th data-field='host' data-sortable='true'><?php echo $w_host;?></th>
<th data-field='OS' data-sortable='true'><?php echo $w_os;?></th>
<th data-field='OSVer' data-sortable='true'>Distrib.</th>
<th data-field='TimeStamp' data-sortable='true'>Date</th>
<th data-field='RC' data-sortable='true'>RC</th>
<th data-field='Result' data-sortable='true'>StdOut</th>
</tr>

View File

@@ -40,7 +40,7 @@
<!-- Display -->
<div class="col py-3">
<!-- Page Title -->
<h1><span class="badge text-bg-secondary font-weight-bold" style="width:100%;">Script Execution Follow-up</span></h1>
<h1><span class="badge text-bg-secondary font-weight-bold" style="width:100%;"><?php echo $ti_12;?></span></h1>
<!-- Main content -->
<div class="container-fluid">

View File

@@ -129,7 +129,7 @@ usort($displayRows, function($a, $b) {
</div>
<div class="col py-3">
<h1><span class="badge text-bg-secondary w-100">VIO Monitoring</span></h1>
<h1><span class="badge text-bg-secondary w-100"><?php echo $ti_13;?></span></h1>
<div class="container-fluid">
<div>
@@ -142,14 +142,14 @@ usort($displayRows, function($a, $b) {
data-sortable="true"> <thead>
<tr>
<th data-field="clintname" data-sortable="true">Clint Name</th>
<th data-field="name">Name</th>
<th data-field="name"><?php echo $w_name;?></th>
<th data-field="vioerr">VIOErr</th>
<th data-field="inerr">InErr</th>
<th data-field="vfcclientname">VFC Client Name</th>
<th data-field="vio">VIO</th>
<th data-field="clintid">ClintID</th>
<th data-field="fcname">FC Name</th>
<th data-field="ts">Last Update</th>
<th data-field="ts"><?php echo $w_lastUpdate;?></th>
</tr>
</thead>

View File

@@ -44,7 +44,7 @@
<!-- Display -->
<div class="col py-3">
<!-- Page Title -->
<h1><span class="badge text-bg-secondary font-weight-bold" style="width:100%;">SVA & SCU Accounts Attributes </span></h1><h6>Updated every hour</h6>
<h1><span class="badge text-bg-secondary font-weight-bold" style="width:100%;"><?php echo $ti_10 ;?> </span></h1>
<!-- Main content -->
<div class="container-fluid">
@@ -70,16 +70,16 @@
<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" data-sort-name="VM">
<thead> <!-- Header -->
<tr>
<th data-field='account' data-sortable='true'>Account</th>
<th data-field='Displayname' data-sortable='true'>Displayname</th>
<th data-field='account' data-sortable='true'><?php echo $w_account;?></th>
<th data-field='Displayname' data-sortable='true'><?php echo $w_name;?></th>
<th data-field='Uid' data-sortable='true'>Uid</th>
<th data-field='UidNumber' data-sortable='true'>UidNumber</th>
<th data-field='UidNumber' data-sortable='true'>Uid #</th>
<th data-field='Gecos' data-sortable='true'>Gecos</th>
<th data-field='UnixHD' data-sortable='true'>Unix Home Directory</th>
<th data-field='Login Shell' data-sortable='true'>Login Shell</th>
<th data-field='GID Number' data-sortable='true'>GID Number</th>
<th data-field='Enabled' data-sortable='true'>Enabled</th>
<th data-field='LastLogon' data-sortable='true'>Last Logon</th>
<th data-field='UnixHD' data-sortable='true'><?php echo $w_homeDirectory;?></th>
<th data-field='Login Shell' data-sortable='true'><?php echo $w_loginShell;?></th>
<th data-field='GID Number' data-sortable='true'>GID #</th>
<th data-field='Enabled' data-sortable='true'><?php echo $w_enabled;?></th>
<th data-field='LastLogon' data-sortable='true'><?php echo $w_lastLogon;?></th>
</tr>
</thead>

View File

@@ -1,29 +1,59 @@
function dateDiffInDays(a) {
const _MS_PER_DAY = 1000 * 60 * 60 * 24;
return Math.floor((Date.now() - new Date(a)) / _MS_PER_DAY);
if (!a || a === 'Missing' || a === '&nbsp;') return 999; // Sécurité
const _MS_PER_DAY = 1000 * 60 * 60 * 24;
return Math.floor((Date.now() - new Date(a)) / _MS_PER_DAY);
}
$(function() {
$button.click(function () {
$data = $table.bootstrapTable('getData')
$dl = $data.length
$nSCCM=0; $nAD=0; $nGLPI=0;$nEPO=0;$nNBU=0;$nOS=0;$nSCOM=0;$nZabbix=0;$nS1=0;
for( $i=0 ; $i < $dl ; $i++ ){
if ($data[$i]['AD'] !== 'Missing') { $nAD++ ; }
if ((dateDiffInDays($data[$i]['ADlu'].split(" ")[0]) > 45 || $data[$i]['ADlu'] == 'Missing') && $data[$i]['AD'] !== 'Missing'){ $nAD-- ;}
if ($data[$i]['SCCM'] !== 'Missing') { $nSCCM++ ; }
if ((dateDiffInDays($data[$i]['SCCMlu'].split(" ")[0]) > 7 || $data[$i]['SCCMlu'] == 'Missing') && $data[$i]['SCCM'] !== 'Missing'){ $nSCCM-- ;}
if ($data[$i]['GLPI'] !== 'Missing') { $nGLPI++ ; }
if ((dateDiffInDays($data[$i]['GLPIlu'].split(" ")[0]) > 7 || $data[$i]['GLPIlu'] == 'Missing') && $data[$i]['GLPI'] !== 'Missing'){ $nGLPI-- ;}
if ($data[$i]['NESSUS'] !== 'Missing') { $nEPO++ ; }
if ($data[$i]['Backup'] !== 'Missing') { $nNBU++ ; }
if ((dateDiffInDays($data[$i]['NBUlu'].split(" ")[0]) > 30 || $data[$i]['NBUlu'] == 'Missing') && $data[$i]['Backup'].split(" ")[0] !== 'Missing'){ $nNBU-- ;}
if (($data[$i]['OS'].includes('XP') || $data[$i]['OS'].includes('2000') || $data[$i]['OS'].includes('2003') || $data[$i]['OS'].includes('2008') || $data[$i]['OS'].includes('2012') || $data[$i]['OS'].includes('7') || $data[$i]['OS'].includes('Windows NT')) == false && $data[$i]['OS'] !=='&nbsp;') { $nOS++ ;}
if ($data[$i]['SCOM'] !== 'Missing') { $nSCOM++ ; }
if ($data[$i]['Zabbix'] !== 'Missing') { $nZabbix++ ; }
if ($data[$i]['S1'] !== 'Missing') { $nS1++ ; }
if ((dateDiffInDays($data[$i]['S1lu'].split(" ")[0]) > 7 || $data[$i]['S1lu'] == 'Missing') && $data[$i]['S1'] !== 'Missing'){ $nS1-- ;}
}
$('#button').click(function () {
var $data = $('#t1').bootstrapTable('getData');
var $dl = $data.length;
if ($dl === 0) return;
var $nSCCM=0, $nAD=0, $nGLPI=0, $nEPO=0, $nNBU=0, $nOS=0, $nSCOM=0, $nZabbix=0, $nS1=0;
for(var $i=0 ; $i < $dl ; $i++ ){
// Vérification AD
if ($data[$i]['AD'] !== 'Missing') {
$nAD++;
var adDate = ($data[$i]['ADlu'] || '').split(" ")[0];
if (dateDiffInDays(adDate) > 45 || adDate === '') { $nAD--; }
}
// Vérification SCCM
if ($data[$i]['SCCM'] !== 'Missing') {
$nSCCM++;
var sccmDate = ($data[$i]['SCCMlu'] || '').split(" ")[0];
if (dateDiffInDays(sccmDate) > 7 || sccmDate === '') { $nSCCM--; }
}
// Vérification GLPI
if ($data[$i]['GLPI'] !== 'Missing') {
$nGLPI++;
var glpiDate = ($data[$i]['GLPIlu'] || '').split(" ")[0];
if (dateDiffInDays(glpiDate) > 7 || glpiDate === '') { $nGLPI--; }
}
// NESSUS
if ($data[$i]['NESSUS'] !== 'Missing' && $data[$i]['NESSUS'] !== '&nbsp;') { $nEPO++; }
// BACKUP
if ($data[$i]['Backup'] !== 'Missing') {
$nNBU++;
var nbuDate = ($data[$i]['NBUlu'] || '').split(" ")[0];
if (dateDiffInDays(nbuDate) > 30 || nbuDate === '') { $nNBU--; }
}
// OS (Supporté)
var os = $data[$i]['OS'] || '';
if (!(os.includes('XP') || os.includes('2000') || os.includes('2003') || os.includes('2008') || os.includes('2012') || os.includes('7')) && os !== '&nbsp;') { $nOS++; }
// SCOM & Zabbix
if ($data[$i]['SCOM'] !== 'Missing') { $nSCOM++; }
if ($data[$i]['Zabbix'] !== 'Missing') { $nZabbix++; }
// S1
if ($data[$i]['S1'] !== 'Missing') {
$nS1++;
var s1Date = ($data[$i]['S1lu'] || '').split(" ")[0];
if (dateDiffInDays(s1Date) > 7 || s1Date === '') { $nS1--; }
}
}
document.getElementById("KPIAD").innerHTML = Math.round($nAD/$dl*1000)/10 + "%";
if(Math.round($nAD/$dl*100) >=90){

View File

@@ -6,7 +6,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 -->
@@ -84,7 +84,7 @@
echo "</div><hr style='border-top: 3px solid black'>";
// Active Directory
echo "<h3><span class='font-weight-bold'>Active Directory</span></h3>" ;
echo "<h3><span class='font-weight-bold'>$w_ad</span></h3>" ;
echo "<div class='row'>";
if(isset($row['AD'])){
if($row['AD']=="Y"){
@@ -96,17 +96,17 @@
echo "<div class='col-md-3'><div class='input-group'><span class='input-group-text'><i class='bi bi-pencil-square text-primary'></i></span><input type='text' class='form-control' id='AD' name ='AD' placeholder='Missing' maxlength = '20'></div></div>";
}
if(isset($row['ADlu'])){
echo "<div class='col-md-2 text-end text-bottom'><b>Last Logon</b></div>";
echo "<div class='col-md-2 text-end text-bottom'><b>$w_adlu</b></div>";
$date1=date_create($row['ADlu']);
$diff=date_diff($date1,date_create(date("Y-m-d")));
if($diff->format("%R%a") > 60){
echo "<div class='col-md-3'><input type='text' class='form-control bg-danger text-white' disabled value='".$row['ADlu']." (".abs($diff->format("%R%a"))." days)'></div>";
echo "<div class='col-md-3'><input type='text' class='form-control bg-danger text-white' disabled value='".$row['ADlu']." (".abs($diff->format("%R%a"))." $w_days)'></div>";
}else{
echo "<div class='col-md-3'><input type='text' class='form-control bg-success text-white' disabled value='".$row['ADlu']." (".abs($diff->format("%R%a"))." days)'></div>";
echo "<div class='col-md-3'><input type='text' class='form-control bg-success text-white' disabled value='".$row['ADlu']." (".abs($diff->format("%R%a"))." $w_days)'></div>";
}
}else{
if(!(isset($row['AD']) && $row['AD'] !=="Y")){
echo "<div class='col-md-2 text-end text-bottom'><b>Last Logon</b></div>";
echo "<div class='col-md-2 text-end text-bottom'><b>$w_adlu</b></div>";
echo "<div class='col-md-3'><input type='text' class='form-control bg-warning' disabled value='Missing'></div>";
}
}
@@ -143,15 +143,15 @@
$date1=date_create($row['GLPIlu']);
$diff=date_diff($date1,date_create(date("Y-m-d")));
if(isset($row['GLPIlu']) && $row['GLPIlu'] !== ''){
echo "<div class='col-md-2 text-end text-bottom'><b>Last Inventory</b></div>";
echo "<div class='col-md-2 text-end text-bottom'><b>$w_filu</b></div>";
if($diff->format("%R%a") > 7){
echo "<div class='col-md-3'><input type='text' class='form-control bg-danger text-white' disabled value='".$row['GLPIlu']." (".abs($diff->format("%R%a"))." days)'></div>";
echo "<div class='col-md-3'><input type='text' class='form-control bg-danger text-white' disabled value='".$row['GLPIlu']." (".abs($diff->format("%R%a"))." $w_days)'></div>";
}else{
echo "<div class='col-md-3'><input type='text' class='form-control bg-success text-white' disabled value='".$row['GLPIlu']." (".abs($diff->format("%R%a"))." days)'></div>";
echo "<div class='col-md-3'><input type='text' class='form-control bg-success text-white' disabled value='".$row['GLPIlu']." (".abs($diff->format("%R%a"))." $w_days)'></div>";
}
}else{
if(!(isset($row['FI']) && $row['FI'] !=="Y")){
echo "<div class='col-md-2 text-end text-bottom'><b>Last Inventory</b></div>";
echo "<div class='col-md-2 text-end text-bottom'><b>$w_filu</b></div>";
echo "<div class='col-md-3'><input type='text' class='form-control bg-warning' disabled value='Missing'></div>";
}
}
@@ -171,17 +171,17 @@
echo "<div class='col-md-3'><div class='input-group'><span class='input-group-text'><i class='bi bi-pencil-square text-primary'></i></span><input type='text' class='form-control' id='SCCM' name ='SCCM' placeholder='Missing' maxlength = '20'></div></div>";
}
if(isset($row['SCCMlu'])){
echo "<div class='col-md-2 text-end text-bottom'><b>Last Heartbeat</b></div>";
echo "<div class='col-md-2 text-end text-bottom'><b>$w_sccmlu</b></div>";
$date1=date_create($row['SCCMlu']);
$diff=date_diff($date1,date_create(date("Y-m-d")));
if($diff->format("%R%a") > 7){
echo "<div class='col-md-3'><input type='text' class='form-control bg-danger text-white' disabled value='".$row['SCCMlu']." (".abs($diff->format("%R%a"))." days)'></div>";
echo "<div class='col-md-3'><input type='text' class='form-control bg-danger text-white' disabled value='".$row['SCCMlu']." (".abs($diff->format("%R%a"))." $w_days)'></div>";
}else{
echo "<div class='col-md-3'><input type='text' class='form-control bg-success text-white' disabled value='".$row['SCCMlu']." (".abs($diff->format("%R%a"))." days)'></div>";
echo "<div class='col-md-3'><input type='text' class='form-control bg-success text-white' disabled value='".$row['SCCMlu']." (".abs($diff->format("%R%a"))." $w_days)'></div>";
}
}else{
if(!(isset($row['SCCM']) && $row['SCCM'] !=="Y")){
echo "<div class='col-md-2 text-end text-bottom'><b>Last Heartbeat</b></div>";
echo "<div class='col-md-2 text-end text-bottom'><b>$w_sccmlu</b></div>";
echo "<div class='col-md-3'><input type='text' class='form-control bg-warning' disabled value='Missing'></div>";
}
}
@@ -204,7 +204,7 @@
echo "</div><br>";
// NBU
echo "<h3><span class='font-weight-bold'>NetBackup</span></h3>" ;
echo "<h3><span class='font-weight-bold'>$w_backup</span></h3>" ;
echo "<div class='row'>";
if(isset($row['NBU'])){
if($row['NBU']=="Y"){
@@ -216,13 +216,13 @@
echo "<div class='col-md-3'><div class='input-group'><span class='input-group-text'><i class='bi bi-pencil-square text-primary'></i></span><input type='text' class='form-control' id='NBU' name ='NBU' placeholder='Missing' maxlength = '20'></div></div>";
}
if(isset($row['NBUlu'])){
echo "<div class='col-md-2 text-end text-bottom'><b>Last Backup</b></div>";
echo "<div class='col-md-2 text-end text-bottom'><b>$w_backuplu</b></div>";
$date1=date_create($row['NBUlu']);
$diff=date_diff($date1,date_create(date("Y-m-d")));
if($diff->format("%R%a") > 30){
echo "<div class='col-md-3'><input type='text' class='form-control bg-danger text-white' disabled value='".$row['NBUlu']." (".abs($diff->format("%R%a"))." days)'></div>";
echo "<div class='col-md-3'><input type='text' class='form-control bg-danger text-white' disabled value='".$row['NBUlu']." (".abs($diff->format("%R%a"))." $w_days)'></div>";
}else{
echo "<div class='col-md-3'><input type='text' class='form-control bg-success text-white' disabled value='".$row['NBUlu']." (".abs($diff->format("%R%a"))." days)'></div>";
echo "<div class='col-md-3'><input type='text' class='form-control bg-success text-white' disabled value='".$row['NBUlu']." (".abs($diff->format("%R%a"))." $w_days)'></div>";
}
}else{
if(!(isset($row['NBU']) && $row['NBU'] !=="Y")){
@@ -283,7 +283,7 @@
?>
<label for="server"></label><input type='text' class='form-control visually-hidden' name="server" id="server" value='<?php echo $_GET['server']; ?>'>
<hr>
<div style="text-align: center;"><button id="button" type="submit" class="btn btn-primary btn-lg"><i class="bi bi-arrow-clockwise"></i><b> Submit</b></button></div>
<div style="text-align: center;"><button id="button" type="submit" class="btn btn-primary btn-lg"><i class="bi bi-arrow-clockwise"></i><b> <?php echo $w_submit; ?></b></button></div>
</form>
</div>

View File

@@ -6,7 +6,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 -->

View File

@@ -6,448 +6,360 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<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 -->
<script src="/js/jquery-3.6.1.min.js"></script>
<!-- Bootstrap -->
<link rel="stylesheet" href="/css/bootstrap.min.css">
<link rel="stylesheet" href="/css/bootstrap-icons/bootstrap-icons.css">
<link rel="stylesheet" href="/css/preloader.css">
<script src="/js/bootstrap.bundle.min.js"></script>
<!-- Bootstrap-tables -->
<link rel="stylesheet" href="/css/bootstrap-table.min.css">
<script src="/js/bootstrap-table.min.js"></script>
<script src="/js/bootstrap-table-fr-FR.min.js"></script>
<script src="/js/tableExport.min.js"></script>
<script src="/js/bootstrap-table-export.min.js"></script>
<script src="/js/libs/js-xlsx/xlsx.core.min.js"></script>
<!-- test -->
</head>
<body class="bg-light text-dark">
<?php include $_SERVER['DOCUMENT_ROOT'] . "/include/all.php"; ?> <!-- Include All -->
<div class="container-fluid">
<div class="row flex-nowrap">
<!-- Left NAVBAR -->
<div class="col-auto col-md-2 col-xl-2 px-sm-2 px-0 bg-dark vh-100 position-sticky top-0" style="-ms-flex: 0 0 230px;flex: 0 0 230px;">
<?php include $_SERVER['DOCUMENT_ROOT'] . "/navbar.html"; ?> <!-- Left Navbar -->
<?php include $_SERVER['DOCUMENT_ROOT'] . "/include/all.php"; ?>
<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" style="-ms-flex: 0 0 230px;flex: 0 0 230px;">
<?php include $_SERVER['DOCUMENT_ROOT'] . "/navbar.html"; ?>
</div>
<div class="col py-3">
<h1><span class="badge text-bg-secondary font-weight-bold" style="width:100%;"><?php echo $ti_3; ?></span></h1>
<div class="row" style="zoom: 80%">
<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-loading-template="loadingTemplate"
data-show-export="true" data-sortable="true">
<thead>
<tr>
<th data-field="Name" data-sortable="true"><?php echo $w_name; ?></th>
<th data-field="OS" data-sortable="true"><?php echo $w_os; ?></th>
<th data-field="Criticity" data-sortable="true"><?php echo $w_crit; ?></th>
<th data-field="AD" data-sortable="true"><?php echo $w_ad; ?></th>
<th data-field="ADlu" data-sortable="true" data-visible="false"><?php echo $w_adlu; ?></th>
<th data-field="GLPI" data-sortable="true">GLPI</th>
<th data-field="GLPIlu" data-sortable="true" data-visible="false" data-footer-formatter="FI"><?php echo $w_filu; ?></th>
<th data-field="SCCM" data-sortable="true">SCCM<br></th>
<th data-field="SCCMlu" data-sortable="true" data-visible="false"><?php echo $w_sccmlu; ?></th>
<th data-field="NESSUS" data-sortable="true">NESSUS</th>
<th data-field="Backup" data-sortable="true"><?php echo $w_backup; ?></th>
<th data-field="NBUlu" data-sortable="true" data-visible="false"><?php echo $w_backuplu; ?></th>
<th data-field="SCOM" data-sortable="true">SCOM</th>
<th data-field="Zabbix" data-sortable="true">Zabbix</th>
<th data-field="S1" data-sortable="true">SentinelOne</th>
<th data-field="S1lu" data-sortable="true" data-visible="false"><?php echo $w_s1lu; ?></th>
</tr>
</thead>
<tbody>
<?php
$conn = DB_ENTRY02();
$sql = "SELECT * FROM GlobalCrossover";
$whereClauses = ["server NOT LIKE 'WS%'"];
if (isset($_GET['filter'])) {
$filter = $_GET['filter'];
$filterTitle = "$w_filter : " . htmlspecialchars($filter) . " $w_nonCompliant";
switch ($filter) {
case "AD": $whereClauses[] = "AD IS NULL OR (ADlu IS NOT NULL AND DATEDIFF(now(), ADlu) > 45)"; break;
case "OS": $whereClauses[] = "OS LIKE '%2003%' OR OS LIKE '%2008%'"; break;
case "GLPI": $whereClauses[] = "GLPI IS NULL OR GLPIlu IS NULL OR DATEDIFF(now(), GLPIlu) > 7"; break;
case "SCCM": $whereClauses[] = "SCCM IS NULL OR (SCCMlu IS NOT NULL AND DATEDIFF(now(), SCCMlu) > 7)"; break;
case "NESSUS": $whereClauses[] = "EPO IS NULL"; break;
case "NBU": $whereClauses[] = "NBU IS NULL OR (NBUlu IS NOT NULL AND DATEDIFF(now(), NBUlu) > 30)"; break;
case "SCOM": $whereClauses[] = "SCOM IS NULL"; break;
case "zabbix": $whereClauses[] = "zabbix IS NULL"; break;
case "S1": $whereClauses[] = "S1 IS NULL OR (S1lu IS NOT NULL AND DATEDIFF(now(), S1lu) > 7)"; break;
default: $filterTitle = null; break;
}
if ($filterTitle) {
echo "<h2><div style=\"text-align: center;\"><span class='badge text-bg-danger font-weight-bold'>$filterTitle</span></div></h2>";
}
}
if (!empty($whereClauses)) { $sql .= " WHERE " . implode(' AND ', $whereClauses); }
$sql .= " ORDER BY server";
$stmt = $conn->prepare($sql);
$stmt->execute();
$result = $stmt->get_result();
// --- PART 2: HELPER FUNCTIONS ---
function renderStatusCellWithDate(?string $status, ?string $lastUpdate, int $daysThreshold, string $okText = 'OK'): string {
$status = htmlspecialchars($status ?? '', ENT_QUOTES, 'UTF-8');
$lastUpdate = htmlspecialchars($lastUpdate ?? '', ENT_QUOTES, 'UTF-8');
$okText = htmlspecialchars($okText, ENT_QUOTES, 'UTF-8');
if ($status === 'Y') {
if (empty($lastUpdate)) {
return "<td class='text-white' style='background: linear-gradient(90deg, rgba(25,135,84,1) 50%, rgba(255,193,7,1) 100%);'>$okText</td><td class='bg-warning text-black'>Missing</td>";
}
try {
$diff = date_diff(date_create($lastUpdate), date_create());
$days = (int) $diff->format("%R%a");
if ($days > $daysThreshold) {
return "<td class='text-white' style='background: linear-gradient(90deg, rgba(25,135,84,1) 50%, rgba(220,53,69,1) 100%);'>$okText</td><td class='bg-danger text-white'>$lastUpdate ($days days)</td>";
} else {
return "<td class='bg-success text-white'>$okText</td><td class='bg-success text-white'>$lastUpdate</td>";
}
} catch (Exception) {
return "<td class='bg-danger text-white'>Invalid Date</td><td class='bg-danger text-white'>$lastUpdate</td>";
}
}
if ($status !== '') {
return "<td class='bg-secondary'><small>$status</small></td><td class='bg-secondary text-secondary'>&nbsp;</td>";
}
return "<td class='bg-warning text-black'>Missing</td><td class='bg-warning text-warning'>&nbsp;</td>";
}
// --- PART 3: DATA PROCESSING & DISPLAY ---
$counters = [
'total' => 0, 'ok' => 0, 'nOS' => 0, 'nAD' => 0, 'nSCCM' => 0, 'nGLPI' => 0,
'nFI' => 0, 'nNESSUS' => 0, 'nNBU' => 0, 'nDPM' => 0, 'nS1' => 0,
'nzabbix' => 0, 'nSCOM' => 0
];
$maxS1Win = "0"; $maxS1Lin = "0";
$dataRows = [];
while ($row = $result->fetch_assoc()) {
$dataRows[] = $row;
$currentV = $row['S1'] ?? '';
$os = $row['OS'] ?? '';
if (str_contains($currentV, '.')) {
if (stripos($os, 'Windows') !== false) {
if (version_compare($currentV, $maxS1Win, '>')) { $maxS1Win = $currentV; }
} else {
if (version_compare($currentV, $maxS1Lin, '>')) { $maxS1Lin = $currentV; }
}
}
}
foreach ($dataRows as $row) {
// KPI Calculation
$counters['total']++;
$isCompliant = isset($row['AD'], $row['GLPI'], $row['SCCM'], $row['EPO']) && (isset($row['NBU']) || isset($row['DPM'])) && isset($row['SCOM']);
if ($isCompliant) { $counters['ok']++; }
if (!empty($row['OS']) && !preg_match('(XP|2003|2000|2008|Windows 7|2012)', $row['OS'])) { $counters['nOS']++; }
if (!isset($row['AD'])) $counters['nAD']++;
if (!isset($row['SCCM'])) $counters['nSCCM']++;
if (!isset($row['GLPI'])) $counters['nGLPI']++;
if (!isset($row['EPO'])) $counters['nNESSUS']++;
if (!isset($row['NBU']) && !isset($row['DPM'])) $counters['nNBU']++;
if (!isset($row['SCOM'])) $counters['nSCOM']++;
if (!isset($row['zabbix'])) $counters['nzabbix']++;
if (!isset($row['S1'])) $counters['nS1']++;
// Row Rendering
$serverName = htmlspecialchars($row['Server'] ?? '', ENT_QUOTES, 'UTF-8');
$serverUrl = urlencode($row['Server'] ?? '');
if ($isCompliant) {
$serverCell = "<td class='bg-success text-white'><b><a href='/crossover/Detail.php?server=$serverUrl' target='_blank' class='link-light'>$serverName</a></b></td>";
} else {
$serverCell = "<td><b><a href='/crossover/Detail.php?server=$serverUrl' target='_blank'>$serverName</a></b></td>";
}
$osCell = "<td class='bg-warning'>&nbsp;</td>";
if (!empty($row['OS'])) {
$os = htmlspecialchars($row['OS']);
$osCell = preg_match('(XP|2003|2000|2008|Windows 7|2012)', $row['OS']) ? "<td class='bg-warning text-black'>$os</td>" : "<td>$os</td>";
}
echo "<tr>";
echo $serverCell . $osCell;
echo "<td>" . htmlspecialchars($row['crit'] ?? '') . "</td>";
echo renderStatusCellWithDate($row['AD'], $row['ADlu'], 45);
echo renderStatusCellWithDate($row['GLPI'], $row['GLPIlu'], 7);
echo renderStatusCellWithDate($row['SCCM'], $row['SCCMlu'], 7);
// NESSUS
if (str_contains($row['EPO'] ?? '', '.')) { echo "<td class='bg-success text-white'>".htmlspecialchars($row['EPO'])."</td>"; }
elseif (isset($row['EPO']) && !in_array($row['EPO'], ['Y', 'N'])) { echo "<td class='bg-secondary'><small>".htmlspecialchars($row['EPO'])."</small></td>"; }
else { echo "<td class='bg-warning text-black'>Missing</td>"; }
// BACKUP
if (($row['NBU'] ?? '') === 'Y') { echo renderStatusCellWithDate($row['NBU'], $row['NBUlu'], 30, 'OK (NBU)'); }
elseif (($row['DPM'] ?? '') === 'Y') { echo renderStatusCellWithDate($row['DPM'], $row['DPMlu'], 30, 'OK (DPM)'); }
else { echo renderStatusCellWithDate($row['NBU'] ?? $row['DPM'] ?? null, null, 30); }
// SCOM
if (($row['SCOM'] ?? '') === 'Y') { echo "<td class='bg-success text-white'>OK</td>"; }
elseif (isset($row['SCOM'])) { echo "<td class='bg-secondary'><small>".htmlspecialchars($row['SCOM'])."</small></td>"; }
else { echo "<td class='bg-warning text-black'>Missing</td>"; }
// Zabbix
$zabbixStatus = $row['zabbix'] ?? '';
if ($zabbixStatus === 'Y' || str_contains($zabbixStatus, '.')) { echo "<td class='bg-success text-white'>".htmlspecialchars(str_replace('Y', 'OK', $zabbixStatus))."</td>"; }
elseif (isset($row['zabbix'])) { echo "<td class='bg-secondary'><small>".htmlspecialchars($zabbixStatus)."</small></td>"; }
else { echo "<td class='bg-warning text-black'>Missing</td>"; }
// S1 (Comparison)
$s1Status = $row['S1'] ?? '';
$osRaw = $row['OS'] ?? '';
$targetMax = (stripos($osRaw, 'Windows') !== false) ? $maxS1Win : $maxS1Lin;
if (!empty($s1Status) && $s1Status === $targetMax && $targetMax !== "0") {
echo "<td class='bg-success text-white'>" . htmlspecialchars($s1Status) . " <i class='bi bi-check-all'></i></td>";
} elseif (str_contains($s1Status, '.')) {
echo "<td class='bg-warning text-black'>" . htmlspecialchars($s1Status) . "</td>";
} else {
echo renderStatusCellWithDate($s1Status, $row['S1lu'] ?? null, 7, ($s1Status === 'Y' ? 'OK' : $s1Status));
}
echo "</tr>";
}
//echo "<script>let kpiData = " . json_encode($counters) . ";</script>";
$stmt->close(); $conn->close();
?>
</tbody>
</table>
</div>
<!-- Display -->
<div class="col py-3">
<!-- Page Title -->
<h1><span class="badge text-bg-secondary font-weight-bold" style="width:100%;">Global Crossover <small>(Updated every 15mn)</small></span></h1>
<!-- Main content -->
<div class="row" style="zoom: 80%">
<table class='table table-bordered table-hover table-sm' id='t1' data-toggle="table" data-search="true"
data-show-columns="true" data-pagination="true" data-export-types="['xlsx','csv','json']"
data-loading-template="loadingTemplate" data-page-list="[20, 50, 100, All]" data-page-size="Tout"
data-show-export="true" data-sortable="true">
<thead>
<tr>
<th data-field="Name" data-sortable="true">Name</th>
<th data-field="OS" data-sortable="true">Operating System</th>
<th data-field="Criticity" data-sortable="true">Criticity</th>
<th data-field="Departement" data-sortable="true" data-visible="false">Departement</th>
<th data-field="AD" data-sortable="true">AD</th>
<th data-field="ADlu" data-sortable="true" data-visible="false">AD Last Logon</th>
<th data-field="GLPI" data-sortable="true">GLPI</th>
<th data-field="GLPIlu" data-sortable="true" data-visible="false" data-footer-formatter="FI">Last FI
Inventory</th>
<th data-field="SCCM" data-sortable="true">SCCM<br></th>
<th data-field="SCCMlu" data-sortable="true" data-visible="false">SCCM Last Heartbeat</th>
<th data-field="NESSUS" data-sortable="true">NESSUS</th>
<th data-field="Backup" data-sortable="true">Backup</th>
<th data-field="NBUlu" data-sortable="true" data-visible="false">Last Backup</th>
<th data-field="SCOM" data-sortable="true">SCOM</th>
<th data-field="Zabbix" data-sortable="true">Zabbix</th>
<th data-field="S1" data-sortable="true">SentinelOne</th>
<th data-field="S1lu" data-sortable="true" data-visible="false">S1 Last Update</th>
</tr>
</thead>
<button id="button" type="button" class="btn btn-primary btn-sm invisible"><i class="bi bi-arrow-clockwise"></i><b> Generate KPI</b></button>
<tbody>
<!-- Display DATAs -->
<?php
$conn = DB_ENTRY02();
// Base query
$sql = "SELECT * FROM GlobalCrossover";
$whereClauses = ["server NOT LIKE 'WS%'"];
$params = [];
$types = "";
// Handle filters securely using prepared statements
if (isset($_GET['filter'])) {
$filter = $_GET['filter'];
$filterTitle = "Filter : " . htmlspecialchars($filter) . " non compliant";
switch ($filter) {
case "AD":
$whereClauses[] = "AD IS NULL OR (ADlu IS NOT NULL AND DATEDIFF(now(), ADlu) > 45)";
break;
case "OS":
$whereClauses[] = "OS LIKE '%2003%' OR OS LIKE '%2008%'";
break;
case "GLPI":
$whereClauses[] = "GLPI IS NULL OR GLPIlu IS NULL OR DATEDIFF(now(), GLPIlu) > 7";
break;
case "SCCM":
$whereClauses[] = "SCCM IS NULL OR (SCCMlu IS NOT NULL AND DATEDIFF(now(), SCCMlu) > 7)";
break;
case "NESSUS":
$whereClauses[] = "EPO IS NULL";
break;
case "NBU":
$whereClauses[] = "NBU IS NULL OR (NBUlu IS NOT NULL AND DATEDIFF(now(), NBUlu) > 30)";
break;
case "SCOM":
$whereClauses[] = "SCOM IS NULL";
break;
case "zabbix":
$whereClauses[] = "zabbix IS NULL";
break;
case "S1":
$whereClauses[] = "S1 IS NULL OR (S1lu IS NOT NULL AND DATEDIFF(now(), S1lu) > 7)";
break;
default:
$filterTitle = null; // No valid filter
break;
}
if ($filterTitle) {
echo "<h2><div style=\"text-align: center;\"><span class='badge text-bg-danger font-weight-bold'>$filterTitle</span></div></h2>";
}
}
// Combine all WHERE clauses
if (!empty($whereClauses)) {
$sql .= " WHERE " . implode(' AND ', $whereClauses);
}
$sql .= " ORDER BY server";
// Prepare and execute the query
$stmt = $conn->prepare($sql);
// Note: If you had parameters, you would bind them here, e.g., $stmt->bind_param($types, ...$params);
$stmt->execute();
$result = $stmt->get_result();
// --- PART 2: HELPER FUNCTIONS FOR RENDERING ---
/**
* Renders a standard status cell based on a value and its last update date.
* @param string|null $status The status value (e.g., 'Y', 'N').
* @param string|null $lastUpdate The date of the last update.
* @param int $daysThreshold The number of days to be considered "out of date".
* @param string $okText Text to display for OK status (e.g., "OK", "OK (NBU)").
* @return string The generated HTML for two <td> cells.
*/
function renderStatusCellWithDate(?string $status, ?string $lastUpdate, int $daysThreshold, string $okText = 'OK'): string {
// Sanitize output to prevent XSS
$status = htmlspecialchars($status ?? '', ENT_QUOTES, 'UTF-8');
$lastUpdate = htmlspecialchars($lastUpdate ?? '', ENT_QUOTES, 'UTF-8');
$okText = htmlspecialchars($okText, ENT_QUOTES, 'UTF-8');
if ($status === 'Y') {
if (empty($lastUpdate)) {
// Status is OK, but date is missing
return "<td class='text-white' style='background: linear-gradient(90deg, rgba(25,135,84,1) 50%, rgba(255,193,7,1) 100%);'>$okText</td>"
. "<td class='bg-warning text-black'>Missing</td>";
}
try {
$diff = date_diff(date_create($lastUpdate), date_create());
$days = (int) $diff->format("%R%a");
if ($days > $daysThreshold) {
// Out of date
return "<td class='text-white' style='background: linear-gradient(90deg, rgba(25,135,84,1) 50%, rgba(220,53,69,1) 100%);'>$okText</td>"
. "<td class='bg-danger text-white'>$lastUpdate ($days days)</td>";
} else {
// Compliant
return "<td class='bg-success text-white'>$okText</td>"
. "<td class='bg-success text-white'>$lastUpdate</td>";
}
} catch (Exception) {
// Handle invalid date format gracefully
return "<td class='bg-danger text-white'>Invalid Date</td><td class='bg-danger text-white'>$lastUpdate</td>";
}
}
if ($status !== '') {
// Not applicable, non-supported, etc.
return "<td class='bg-secondary'><small>$status</small></td><td class='bg-secondary text-secondary'>&nbsp;</td>";
}
// Missing
return "<td class='bg-warning text-black'>Missing</td><td class='bg-warning text-warning'>&nbsp;</td>";
}
// --- PART 3: CLEAN DATA DISPLAY LOOP ---
// Initialize counters
$counters = [
'total' => 0, 'ok' => 0, 'nOS' => 0, 'nAD' => 0, 'nSCCM' => 0, 'nGLPI' => 0,
'nFI' => 0, 'nNESSUS' => 0, 'nNBU' => 0, 'nDPM' => 0, 'nS1' => 0
];
while ($row = $result->fetch_assoc()) {
$counters['total']++;
// Sanitize server name for URL and display
$serverName = htmlspecialchars($row['Server'], ENT_QUOTES, 'UTF-8');
$serverUrl = urlencode($row['Server']);
// Determine overall row status
$isCompliant = isset($row['AD'], $row['GLPI'], $row['SCCM'], $row['EPO']) && (isset($row['NBU']) || isset($row['DPM'])) && isset($row['SCOM']);
if ($isCompliant) {
$counters['ok']++;
$serverCell = "<td class='bg-success text-white'><b><a href='/crossover/Detail.php?server=$serverUrl' target='_blank' class='link-light'>$serverName</a></b></td>";
} else {
$serverCell = "<td><b><a href='/crossover/Detail.php?server=$serverUrl' target='_blank'>$serverName</a></b></td>";
}
// OS Cell
$osCell = "<td class='bg-warning'>&nbsp;</td>";
if (!empty($row['OS'])) {
$os = htmlspecialchars($row['OS']);
if (preg_match('(XP|2003|2000|2008|Windows 7|2012)', $row['OS'])) {
$osCell = "<td class='bg-warning text-black'>$os</td>";
} else {
$counters['nOS']++;
$osCell = "<td>$os</td>";
}
}
echo "<tr>";
echo $serverCell;
echo $osCell;
echo "<td>" . htmlspecialchars($row['crit'] ?? '') . "</td>";
echo "<td>" . htmlspecialchars($row['dpt'] ?? '') . "</td>";
// Use helper function for status columns
echo renderStatusCellWithDate($row['AD'], $row['ADlu'], 45);
echo renderStatusCellWithDate($row['GLPI'], $row['GLPIlu'], 7);
echo renderStatusCellWithDate($row['SCCM'], $row['SCCMlu'], 7);
// NESSUS (EPO) Cell - Custom logic
if (str_contains($row['EPO'] ?? '', '.')) {
echo "<td class='bg-success text-white'>" . htmlspecialchars($row['EPO']) . "</td>";
} elseif (isset($row['EPO']) && !in_array($row['EPO'], ['Y', 'N'])) {
echo "<td class='bg-secondary'><small>" . htmlspecialchars($row['EPO']) . "</small></td>";
} else {
echo "<td class='bg-warning text-black'>Missing</td>";
$counters['nNESSUS']++;
}
// BACKUP Cell - Custom logic for NBU/DPM
if ($row['NBU'] === 'Y') {
echo renderStatusCellWithDate($row['NBU'], $row['NBUlu'], 30, 'OK (NBU)');
} elseif ($row['DPM'] === 'Y') {
echo renderStatusCellWithDate($row['DPM'], $row['DPMlu'], 30, 'OK (DPM)');
} else {
// Handle non-Y cases for NBU or DPM, or missing
$backupStatus = $row['NBU'] ?? $row['DPM'] ?? null;
echo renderStatusCellWithDate($backupStatus, null, 30);
}
// SCOM Cell - Simple logic
if ($row['SCOM'] === 'Y') {
echo "<td class='bg-success text-white'>OK</td>";
} elseif (isset($row['SCOM'])) {
echo "<td class='bg-secondary'><small>" . htmlspecialchars($row['SCOM']) . "</small></td>";
} else {
echo "<td class='bg-warning text-black'>Missing</td>";
}
// Zabbix Cell - Simple logic
$zabbixStatus = $row['zabbix'] ?? '';
if ($zabbixStatus === 'Y' || str_contains($zabbixStatus, '.')) {
echo "<td class='bg-success text-white'>" . htmlspecialchars(str_replace('Y', 'OK', $zabbixStatus)) . "</td>";
} elseif (isset($row['zabbix'])) {
echo "<td class='bg-secondary'><small>" . htmlspecialchars($zabbixStatus) . "</small></td>";
} else {
echo "<td class='bg-warning text-black'>Missing</td>";
}
// S1 Cell
$s1Status = $row['S1'] ?? '';
$s1Text = ($s1Status === 'Y' || str_contains($s1Status, '.')) ? str_replace('Y', 'OK', $s1Status) : 'OK';
echo renderStatusCellWithDate($s1Status, $row['S1lu'], 7, $s1Text);
echo "</tr>";
}
// You can now use the $counters array to pass data to your JS for the KPIs
// For example:
echo "<script>let kpiData = " . json_encode($counters) . ";</script>";
$stmt->close();
$conn->close();
?>
</tbody>
</table>
</div>
<button id="button" type="button" class="btn btn-primary btn-sm invisible"><i
class="bi bi-arrow-clockwise"></i><b> Generate KPI</b></button>
<div class="row flex-nowrap text-center" style="zoom: 80%">
<div class="col"> <!-- CARTE Devices -->
<div class="card border-secondary mb-3">
<div class="card-header text-dark"><b>All Devices</b></div>
<a href="/crossover/GlobalCrossover.php">
<div class="card-body">
<h2><span class="badge text-bg-primary font-weight-bold" id="KPIDEVICE"></span></h2>
</div>
</a>
</div>
</div>
<div class="col"> <!-- CARTE OS -->
<div class="card border-secondary mb-3">
<div class="card-header text-dark"><b>Supported OS</b></div>
<a href="/crossover/GlobalCrossover.php?filter=OS">
<div class="card-body">
<h2><span class="badge text-bg-secondary font-weight-bold" id="KPIOS"></span></h2>
</div>
</a>
</div>
</div>
<div class="col"> <!-- CARTE AD -->
<div class="card border-secondary mb-3">
<div class="card-header text-dark"><b>AD</b></div>
<a href="/crossover/GlobalCrossover.php?filter=AD">
<div class="card-body">
<h2><span class="badge text-bg-secondary font-weight-bold" id="KPIAD"></span></h2>
</div>
</a>
</div>
</div>
<div class="col"> <!-- CARTE GLPI/FI -->
<div class="card border-secondary mb-3">
<div class="card-header text-dark"><b>GLPI/FI</b></div>
<a href="/crossover/GlobalCrossover.php?filter=GLPI">
<div class="card-body">
<h2><span class="badge text-bg-secondary font-weight-bold" id="KPIGLPI"></span></h2>
</div>
</a>
</div>
</div>
<div class="col"> <!-- CARTE SCCM -->
<div class="card border-secondary mb-3">
<div class="card-header text-dark"><b>SCCM</b></div>
<a href="/crossover/GlobalCrossover.php?filter=SCCM">
<div class="card-body">
<h2><span class="badge text-bg-secondary font-weight-bold" id="KPISCCM"></span></h2>
</div>
</a>
</div>
</div>
<div class="col"> <!-- CARTE EPO -->
<div class="card border-secondary mb-3">
<div class="card-header text-dark"><b>NESSUS</b></div>
<a href="/crossover/GlobalCrossover.php?filter=NESSUS">
<div class="card-body">
<h2><span class="badge text-bg-secondary font-weight-bold" id="KPIEPO"></span></h2>
</div>
</a>
</div>
</div>
<div class="col"> <!-- CARTE Backup (NBU + DPM) -->
<div class="card border-secondary mb-3">
<div class="card-header text-dark"><b>Backup</b></div>
<a href="/crossover/GlobalCrossover.php?filter=NBU">
<div class="card-body">
<h2><span class="badge text-bg-secondary font-weight-bold" id="KPINBU"></span></h2>
</div>
</a>
</div>
</div>
<div class="col"> <!-- CARTE SCOM -->
<div class="card border-secondary mb-3">
<div class="card-header text-dark"><b>SCOM</b></div>
<a href="/crossover/GlobalCrossover.php?filter=SCOM">
<div class="card-body">
<h2><span class="badge text-bg-secondary font-weight-bold" id="KPISCOM"></span></h2>
</div>
</a>
</div>
</div>
<div class="col"> <!-- CARTE Zabbix -->
<div class="card border-secondary mb-3">
<div class="card-header text-dark"><b>Zabbix</b></div>
<a href="/crossover/GlobalCrossover.php?filter=zabbix">
<div class="card-body">
<h2><span class="badge text-bg-secondary font-weight-bold" id="KPIzabbix"></span></h2>
</div>
</a>
</div>
</div>
<div class="col"> <!-- CARTE SentinelOne -->
<div class="card border-secondary mb-3">
<div class="card-header text-dark"><b>SentinelOne</b></div>
<a href="/crossover/GlobalCrossover.php?filter=S1">
<div class="card-body">
<h2><span class="badge text-bg-secondary font-weight-bold" id="KPIS1"></span></h2>
</div>
</a>
</div>
<div class="row flex-nowrap text-center" style="zoom: 80%">
<div class="col"> <!-- CARTE Devices -->
<div class="card border-secondary mb-3">
<div class="card-header text-dark"><b><?php echo $w_allDevice; ?></b></div>
<a href="/crossover/GlobalCrossover.php">
<div class="card-body">
<h2><span class="badge text-bg-primary font-weight-bold" id="KPIDEVICE"></span></h2>
</div>
</a>
</div>
</div>
<div class="col"> <!-- CARTE OS -->
<div class="card border-secondary mb-3">
<div class="card-header text-dark"><b><?php echo $w_supportedOS; ?></b></div>
<a href="/crossover/GlobalCrossover.php?filter=OS">
<div class="card-body">
<h2><span class="badge text-bg-secondary font-weight-bold" id="KPIOS"></span></h2>
</div>
</a>
</div>
</div>
<div class="col"> <!-- CARTE AD -->
<div class="card border-secondary mb-3">
<div class="card-header text-dark"><b>AD</b></div>
<a href="/crossover/GlobalCrossover.php?filter=AD">
<div class="card-body">
<h2><span class="badge text-bg-secondary font-weight-bold" id="KPIAD"></span></h2>
</div>
</a>
</div>
</div>
<div class="col"> <!-- CARTE GLPI/FI -->
<div class="card border-secondary mb-3">
<div class="card-header text-dark"><b>GLPI/FI</b></div>
<a href="/crossover/GlobalCrossover.php?filter=GLPI">
<div class="card-body">
<h2><span class="badge text-bg-secondary font-weight-bold" id="KPIGLPI"></span></h2>
</div>
</a>
</div>
</div>
<div class="col"> <!-- CARTE SCCM -->
<div class="card border-secondary mb-3">
<div class="card-header text-dark"><b>SCCM</b></div>
<a href="/crossover/GlobalCrossover.php?filter=SCCM">
<div class="card-body">
<h2><span class="badge text-bg-secondary font-weight-bold" id="KPISCCM"></span></h2>
</div>
</a>
</div>
</div>
<div class="col"> <!-- CARTE EPO -->
<div class="card border-secondary mb-3">
<div class="card-header text-dark"><b>NESSUS</b></div>
<a href="/crossover/GlobalCrossover.php?filter=NESSUS">
<div class="card-body">
<h2><span class="badge text-bg-secondary font-weight-bold" id="KPIEPO"></span></h2>
</div>
</a>
</div>
</div>
<div class="col"> <!-- CARTE Backup (NBU + DPM) -->
<div class="card border-secondary mb-3">
<div class="card-header text-dark"><b><?php echo $w_backup; ?></b></div>
<a href="/crossover/GlobalCrossover.php?filter=NBU">
<div class="card-body">
<h2><span class="badge text-bg-secondary font-weight-bold" id="KPINBU"></span></h2>
</div>
</a>
</div>
</div>
<div class="col"> <!-- CARTE SCOM -->
<div class="card border-secondary mb-3">
<div class="card-header text-dark"><b>SCOM</b></div>
<a href="/crossover/GlobalCrossover.php?filter=SCOM">
<div class="card-body">
<h2><span class="badge text-bg-secondary font-weight-bold" id="KPISCOM"></span></h2>
</div>
</a>
</div>
</div>
<div class="col"> <!-- CARTE Zabbix -->
<div class="card border-secondary mb-3">
<div class="card-header text-dark"><b>Zabbix</b></div>
<a href="/crossover/GlobalCrossover.php?filter=zabbix">
<div class="card-body">
<h2><span class="badge text-bg-secondary font-weight-bold" id="KPIzabbix"></span></h2>
</div>
</a>
</div>
</div>
<div class="col"> <!-- CARTE SentinelOne -->
<div class="card border-secondary mb-3">
<div class="card-header text-dark"><b>SentinelOne</b></div>
<a href="/crossover/GlobalCrossover.php?filter=S1">
<div class="card-body">
<h2><span class="badge text-bg-secondary font-weight-bold" id="KPIS1"></span></h2>
</div>
</a>
</div>
</div>
<!-- End of main content -->
</div>
</div>
</div>
<script src="/js/switch.js"></script>
</div>
<script src="/js/switch.js"></script>
</body>
<script src="/crossover/Crossover-KPI.js"></script>
<script>
let $table = $('#t1');
const $button = $('#button');
$table.on('search.bs.table', function () {
let $button = $('#button');
$button.click();
})
$(window).on('load', function () {
$('.preloader').addClass('preloader-deactivate');
});
document.addEventListener("DOMContentLoaded", function () { setTimeout(function () { $('#button').click(); }, 1000); });
</script>
<SCRIPT>
$(function() {
// Exécution initiale pour définir la hauteur
adjustTableHeight();
// Événement de redimensionnement
$(window).on('resize', function() {
adjustTableHeight();
});
// 1. Déclenchement du calcul
setTimeout(function () {
$('#button').trigger('click');
}, 500);
// 2. Gestion du redimensionnement
function adjustTableHeight() {
const table = $('#t1');
const windowHeight = $(window).height();
const tableTop = table.offset().top;
const footerHeight = -50; // Hauteur estimée pour d'éventuels éléments en bas
let availableHeight = windowHeight - tableTop - footerHeight;
// Définir une hauteur minimale
availableHeight = Math.max(availableHeight, 400);
table.bootstrapTable('refreshOptions', {
height: availableHeight
});
const $table = $('#t1');
if ($table.length && $table.offset()) {
const windowHeight = $(window).height();
const tableTop = $table.offset().top;
$table.bootstrapTable('refreshOptions', { height: Math.max(windowHeight - tableTop - 50, 400) });
}
}
$table = $('#t1');
$table.on('search.bs.table', function () { $('#button').trigger('click'); });
adjustTableHeight();
$(window).on('resize', adjustTableHeight);
});
</script>
</HTML>
</html>

View File

@@ -6,7 +6,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 -->
@@ -36,7 +36,7 @@
<!-- Display -->
<div class="col py-3">
<!-- Page Title -->
<h1><span class="badge text-bg-secondary font-weight-bold" style="width:100%;">Active Directory</span></h1>
<h1><span class="badge text-bg-secondary font-weight-bold" style="width:100%;"><?php echo $w_ad;?></span></h1>
<!-- Main content -->
<div class="row">
@@ -54,10 +54,10 @@
>
<thead>
<tr>
<th data-field="Name" data-sortable="true">Name</th>
<th data-field="OS" data-sortable="true">OS</th>
<th data-field="Enabled" data-sortable="true">Enabled</th>
<th data-field="LasLogon" data-sortable="true">Last Logon</th>
<th data-field="Name" data-sortable="true"><?php echo $w_name;?></th>
<th data-field="OS" data-sortable="true"><?php echo $w_os;?></th>
<th data-field="Enabled" data-sortable="true"><?php echo $w_enabled;?></th>
<th data-field="LasLogon" data-sortable="true"><?php echo $w_lastLogon;?></th>
<th data-field="OU" data-visible="false">OU</th>
</tr>
</thead>

View File

@@ -6,7 +6,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 -->

View File

@@ -6,7 +6,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 -->

View File

@@ -6,7 +6,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 -->

View File

@@ -6,7 +6,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 -->

View File

@@ -6,7 +6,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 -->

View File

@@ -6,7 +6,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 -->

BIN
favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 MiB

View File

@@ -1,6 +1,18 @@
<?php
// LANGUAGE MANAGEMENT
if (session_status() === PHP_SESSION_NONE) {
session_start();
}
$lang = $_GET['lang'] ?? $_SESSION['lang'] ?? 'fr'; // "en" as default
$allowed_langs = ['en', 'fr'];
if (!in_array($lang, $allowed_langs)) {
$lang = 'fr'; // DEFAULT failback
}
$_SESSION['lang'] = $lang;
include $_SERVER['DOCUMENT_ROOT'] . "/include/" . $lang . ".php";
// CONSTANTS //
$BaseUrl = "http://".$_SERVER['SERVER_NAME'];
$BaseUrl = "https://".$_SERVER['SERVER_NAME'];
$root = $_SERVER['DOCUMENT_ROOT'];
$bdnuss = "http://web-bdnuss-sys-dev.appliarmony.net";
$opwsinf = "https://wsopinf.appliarmony.net";
@@ -323,7 +335,7 @@
}
// --- exposer des constantes pour le reste du code ---
// Priorité: si on a REMOTE_USER on lutilise; sinon on retombe sur le cookie existant; sinon vide/anonyme.
// Priorité: si on a REMOTE_USER, on lutilise; sinon on retombe sur le cookie existant; sinon vide/anonyme.
$currentUser = $hasUser ? $user : ($cookie['user'] ?? 'Anonymous');
$currentIp = $hasUser ? $ip : ($cookie['ip'] ?? ($_SERVER['HTTP_X_FORWARDED_FOR'] ?? $_SERVER['REMOTE_ADDR'] ?? ''));
@@ -404,7 +416,7 @@
const month = now.getMonth() + 1; // JS compte les mois de 0 à 11, donc on ajoute 1
const day = now.getDate();
// La condition : (Mois = 12 ET Jour >= 15) OU (Mois = 1 ET Jour <= 5)
// La condition : (Mois = 12 ET Jour >= 15) OU (Mois = 1 ET Jour 5)
const isSeason = (month === 12 && day >= 15) || (month === 1 && day <= 5);
const canvas = document.getElementById('snow-canvas');
@@ -556,3 +568,5 @@

159
include/en.php Normal file
View File

@@ -0,0 +1,159 @@
<?php
// navbar
$nav_home = "Home";
$nav_1 = "Active Directory";
$nav_1_1 = "Group Review";
$nav_1_2 = "Group Membership";
$nav_2 = "Global Crossover";
$nav_3 = "Hyper-V";
$nav_3_1 = "Clusters";
$nav_3_2 = "VMs Backup";
$nav_3_3 = "VMs Mem hunt";
$nav_3_4 = "Hosts Mem hunt";
$nav_3_5 = "VMs List";
$nav_4 = "Shared Folders";
$nav_4_1 = "Projects & Teams";
$nav_4_2 = "HomeDirectories";
$nav_5_1 = "Inventory";
$nav_5_2 = "SVA/SCU Accounts";
$nav_5_3 = "Autoremediation Logs";
$nav_5_4 = "Script results";
$nav_6 = "Rollups";
$nav_6_1 = "Yearly Calendar";
$nav_7 = "Storage";
$nav_7_1 = "Dashboard";
$nav_7_2 = "Switchs FC";
$nav_8 = "Workstations";
$nav_9 = "Clusters";
$nav_9_1 ="Resources";
$nav_10 = "SecureBoot";
$nav_10_1 = "Servers";
$nav_10_2 = "Workstations";
$nav_links = "Links";
$nav_search = "Server Search...";
// titles
$ti_1 = "Group Review";
$ti_2 = "Group Membership";
$ti_3 = "Global Crossover";
$ti_4 = "Hyper-V Clusters";
$ti_5 = "Memory Hunt - Hyper-V Only";
$ti_6 = "Memory Hunt - All but Hyper-V";
$ti_7 = "Project and Team folders";
$ti_8 = "Home Directories";
$ti_9 = "AIX / Linux inventory";
$ti_10 = "SVA & SCU Accounts Attributes";
$ti_11 = "Autoremediation Logs";
$ti_12 = "Script Execution Follow-up";
$ti_13 = "VIO Monitoring";
$ti_14 = "Rollup Yearly Calendar";
$ti_15 = "SVC Storage Dashboard";
$ti_16 = "Workstation Global Crossover";
$ti_17 = "HeartBeat Map for servers NOT in maintenance";
$ti_18 = "Cluster Resources";
$ti_19 = "Virtual Machines";
// words
$w_server = "Server";
$w_name = "Name";
$w_groupMembership = "Group Membership";
$w_groupSearch = "Find group in Active Directory";
$w_startToType = "Start to type ...";
$w_seeMembers = "See Members";
$w_os = "Operating System";
$w_crit = "Criticality";
$w_ad = "Active Directory";
$w_adlu = "AD last update";
$w_filu = "FI last update";
$w_sccmlu = "SCCM last update";
$w_backup = "Backup";
$w_backuplu = "Last Backup";
$w_s1lu = "S1 last update";
$w_allDevice = "All Devices";
$w_supportedOS = "Supported OS";
$w_nonCompliant = "Non-compliant";
$w_filter ="Filter";
$w_submit = "Submit";
$w_days = "days";
$w_devices = "Devices";
$w_inactives = "Inactives";
$w_enabled = "Enabled";
$w_lastLogon = "Last Logon";
$w_VMleft = "VMs left";
$w_VMs = "VMs";
$w_nodes = "Nodes";
$w_freeMem = "Free Mem";
$w_freeCSV = "Free CSV";
$w_unclustered = "Unclustered";
$w_wrongOwner = "Wrong Owner";
$w_worstScenario = "Worst Failover scenario available memory";
$w_lastResult = "Last Result";
$w_lastGoodBackup = "Last Good Backup";
$w_size = "Size";
$w_host = "Host";
$w_policy = "Policy";
$w_vmBackup = "VMs Backup";
$w_success = "Success";
$w_issues = "Issues";
$w_outdated = "Outdated";
$w_excluded = "Excluded";
$w_vmAssignedGB = "VMs assigned GB";
$w_vmMaxUsedGB = "VMs max used GB";
$w_potentialSavingsGB = "Potential Savings GB";
$w_assignedGB = "Assigned GB";
$w_minUsedGB = "Min Used GB";
$w_maxUsedGB = "Max Used GB";
$w_avgUsedGB = "Avg Used GB";
$w_hardware = "Hardware";
$w_entries = "Entries";
$w_folder = "Folder";
$w_users = "Users";
$w_inAD = "In AD";
$w_accountEnabled = "Account Enabled";
$w_heartbeat = "Heartbeat";
$w_lastReboot = "Last Reboot";
$w_account = "Account";
$w_homeDirectory = "Home Directory";
$w_loginShell = "Login Shell";
$w_command = "Command";
$w_other = "Other";
$w_all = "All";
$w_location = "Location";
$w_physicalCapacity = "Physical Capacity";
$w_volumeCapacity = "Volume Capacity";
$w_capacityGain = "Capacity Gain";
$w_thin ="Thin Provisioning";
$w_unassignedLUNs = "Unassigned LUNs";
$w_hostsWoLUNs = "Hosts w/o LUNs";
$w_resource = "Resource";
$w_owner = "Owner";
$w_state = "State";
$w_memory = "Memory";
$w_lastUpdate = "Last Update";
$w_nextRollup = "Next Rollup";
$w_storageTotalGB = "Storage Total GB";
$w_storageUsedGB = "Storage Used GB";
$w_network = "Network";
$w_start = "Start";
$w_end = "End";
$w_mask = "Mask";
$w_scopeOptions = "Scope Options";
$w_reservations = "Reservations";
$w_globalOptionValues = "Global Options Values";
$w_prefferedNode = "Preffered Node";
$w_VMOnWrongOwner = "VM(s) on Wrong Owner";
$w_unclusteredVMs = "Unclustered VM(s)";
$w_vmCpuChecked = "VM(s) With 'CPU Compatibility' checked";
$w_vmDynamicVHD = "VM(s) with dynamic VHD";

Binary file not shown.

Before

Width:  |  Height:  |  Size: 851 B

After

Width:  |  Height:  |  Size: 3.2 MiB

158
include/fr.php Normal file
View File

@@ -0,0 +1,158 @@
<?php
// navbar
$nav_home = "Accueil";
$nav_1 = "Service d'annuaire";
$nav_1_1 = "Revue des Groupes";
$nav_1_2 = "Membres des Groupes";
$nav_2 = "<small>Consolid. Multiple</small>";
$nav_3 = "Hyper-V";
$nav_3_1 = "Grappes de Serveurs";
$nav_3_2 = "Sauvegardes MVs";
$nav_3_3 = "Chasse Mem MVs";
$nav_3_4 = "Chasse Mem Hôtes";
$nav_3_5 = "Liste des MVs";
$nav_4 = "Dossiers Partagés";
$nav_4_1 = "Projets & Equipes";
$nav_4_2 = "Dossiers Personnels";
$nav_5_1 = "Inventaire";
$nav_5_2 = "Comptes SVA/SCU";
$nav_5_3 = "Journaux d'autorépar.";
$nav_5_4 = "Résultat des Scripts";
$nav_6 = "Cumulatifs";
$nav_6_1 = "Calendrier annuel";
$nav_7 = "Disques Réseau";
$nav_7_1 = "Tableau de Bord";
$nav_7_2 = "Commutateurs FC";
$nav_8 = "Postes de travail";
$nav_9 = "Grappes de Serveurs";
$nav_9_1 ="Ressources";
$nav_10 = "Démarrage Sécurisé";
$nav_10_1 = "Serveurs";
$nav_10_2 = "Postes de Travail";
$nav_links = "Liens";
$nav_search = "Recherche Serveur...";
// titles
$ti_1 = "Revue des Groupes";
$ti_2 = "Membres des Groupes";
$ti_3 = "Consolidation Multisources";
$ti_4 = "Grappes de Serveurs Hyper-V";
$ti_5 = "Chasse à la mémoire - Hôtes Hyper-V";
$ti_6 = "Chasse à la mémoire - Tout sauf les Hyper-V";
$ti_7 = "Dossiers Projets et Equipes";
$ti_8 = "Dossiers Utilisateurs";
$ti_9 = "Inventaire AIX / Linux";
$ti_10 = "Détails des comptes SVA & SCU";
$ti_11 = "Journaux de remédiation automatique";
$ti_12 = "Suivi d'exécution des Scripts";
$ti_13 = "Surveillance VIO";
$ti_14 = "Calendrier Annuel des Cumulatifs";
$ti_15 = "Tableau de Bord SVC";
$ti_16 = "Consolidation Multisources des Postes de Travail";
$ti_17 = "Carte des signes de présence pour les Serveurs qui ne sont pas en maintenance";
$ti_18 = "Ressources des Grappes de Serveurs";
$ti_19 = "Machines Virtuelles";
// words
$w_server = "Serveur";
$w_name = "Nom";
$w_groupMembership = "Membres du groupe";
$w_groupSearch = "Trouver un groupe dans le Service d'Annuaire";
$w_startToType = "Commencez à taper ...";
$w_seeMembers = "Voir les membres";
$w_os = "Système d'Exploitation";
$w_crit = "Criticité";
$w_ad = "Service d'annuaire";
$w_adlu = "Dernière connexion à l'Annuaire";
$w_filu = "Dernier inventaire FI";
$w_sccmlu = "Dernier inventaire SCCM";
$w_backup = "Sauvegarde";
$w_backuplu = "Dernière Sauvegarde";
$w_s1lu = "Dernier inventaire S1";
$w_allDevice = "Tous les appareils";
$w_supportedOS = "Systèmes supportés";
$w_nonCompliant ="Non-conforme";
$w_filter = "Filtre";
$w_submit = "Soumettre";
$w_days = "jours";
$w_devices = "Appareils";
$w_inactives = "Inactifs";
$w_enabled = "Actif";
$w_lastLogon = "Dernière connexion";
$w_VMleft = "MVs restantes";
$w_VMs = "MVs";
$w_nodes = "Nœuds";
$w_freeMem = "Mém. libre";
$w_freeCSV = "CSV libre";
$w_unclustered = "Pas en ressource";
$w_wrongOwner = "Mauvais Nœud";
$w_worstScenario = "Mémoire disponible en cas de pire basculement";
$w_lastResult = "Dernier Résultat";
$w_lastGoodBackup = "Dernière Sauvegarde Réussie";
$w_size = "Taille";
$w_host = "Hôte";
$w_policy = "Politique";
$w_vmBackup = "Sauvegarde des MVs";
$w_success = "Succès";
$w_issues = "Problème";
$w_outdated = "En retard";
$w_excluded = "Exclusion";
$w_vmAssignedGB = "GB Assignés aux MVs";
$w_vmMaxUsedGB = "GB Max utilisés par MVs";
$w_potentialSavingsGB = "Gain de GB potentiel";
$w_assignedGB = "GB assignés";
$w_minUsedGB = "Utilisation Min GB";
$w_maxUsedGB = "Utilisation Max GB";
$w_avgUsedGB = "Utilisation Moyenne GB";
$w_hardware = "Matériel";
$w_entries = "Entrées";
$w_folder = "Dossier";
$w_users = "Utilisateurs";
$w_inAD = "Dans l'annuaire";
$w_accountEnabled = "Compte Actif";
$w_heartbeat = "Signe de Présence";
$w_lastReboot = "Dernier Redémarrage";
$w_account = "Compte";
$w_homeDirectory = "Dossier Personnel";
$w_loginShell = "Interpéteur de connexion";
$w_command = "Commande";
$w_other = "Autre";
$w_all = "Tous";
$w_location = "Emplacement";
$w_physicalCapacity = "Capacité Physique";
$w_volumeCapacity = "Capacité du Volume";
$w_capacityGain = "Gain de Capacité";
$w_thin = "Provisionnement dynamique";
$w_unassignedLUNs = "LUNs non assignées";
$w_hostsWoLUNs = "Hôtes sans LUNs";
$w_resource = "Ressource";
$w_owner = "Propriétaire";
$w_state = "Etat";
$w_memory = "Mémoire";
$w_lastUpdate = "Dernière Mise à Jour";
$w_nextRollup = "Prochain Cumulatif";
$w_storageTotalGB = "Stockage Total GB";
$w_storageUsedGB = "Stockage Utilisé GB";
$w_network = "Réseau";
$w_start = "Début";
$w_end = "Fin";
$w_mask = "Masque";
$w_scopeOptions = "Options de portée";
$w_reservations = "Réservations";
$w_globalOptionValues = "Valeurs des Options Globales";
$w_prefferedNode = "Noeud préféré";
$w_VMOnWrongOwner = "MV(s) sur le mauvais noeud";
$w_unclusteredVMs = "MV(s) non en ressource";
$w_vmCpuChecked = "MV(s) avec 'Compatibilité CPU' coché";
$w_vmDynamicVHD = "MV(s) avec VHD dynamique";

View File

@@ -6,7 +6,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 -->
@@ -35,7 +35,7 @@
<!-- Display -->
<div class="col py-3">
<!-- Page Title -->
<h1><span class="badge text-bg-secondary font-weight-bold" style="width:100%;">HOME</span></h1>
<h1><span class="badge text-bg-secondary font-weight-bold" style="width:100%;"><?php echo $nav_home; ?></span></h1>
<!-- Main content -->
<?php
@@ -69,7 +69,7 @@
<div class="row flex-nowrap text-center">
<div class="col"> <!-- CARTE AD -->
<div class="card border-primary mb-3">
<div class="card-header text-dark"><h5><i class="fs-4 bi-pc text-primary"></i> ActiveDirectory</h5></div>
<div class="card-header text-dark"><h5><i class="fs-4 bi-pc text-primary"></i> <?php echo $w_ad; ?></h5></div>
<div class="card-body">
<?php
DB_ENTRY02();
@@ -78,7 +78,7 @@
$result = $conn->query("SELECT count(*) as nbADinactive FROM adcomputers WHERE enabled = 'False'");
$nbADinactive = mysqli_fetch_array($result)['nbADinactive'];
?>
<p class="card-text text-center"><b><a href="/dashboard/AD-Detail.php""><?php echo $nbADactive; ?></b> Devices <small>(<?php echo $nbADinactive; ?> inactifs)</small></a></p>
<p class="card-text text-center"><b><a href="/dashboard/AD-Detail.php""><?php echo $nbADactive; ?></b> <?php echo $w_devices; ?> <small>(<?php echo $nbADinactive; ?> <?php echo $w_inactives; ?>)</small></a></p>
</div>
</div>
</div>
@@ -93,7 +93,7 @@
$nbglpi = mysqli_fetch_array($result)['nbglpi'];
mysqli_close($conn);
?>
<p class="card-text text-center"><b><a href="/dashboard/GLPI-Detail.php"><?php echo $nbglpi; ?></b> Devices</a></p>
<p class="card-text text-center text-dark"><b><?php echo $nbglpi; ?></b> <?php echo $w_devices; ?></p>
</div>
</div>
</div>
@@ -108,7 +108,7 @@
$rs=odbc_exec($conn,$sql);
$nbsccm = odbc_result($rs,"nbsccm");
?>
<p class="card-text text-center"><b><a href="/dashboard/SCCM-Detail.php"><?php echo $nbsccm; ?></b> Agents</a></p>
<p class="card-text text-center text-dark"><b><?php echo $nbsccm; ?></b> Agents</p>
</div>
</div>
</div>
@@ -122,7 +122,7 @@
$result = $conn->query("SELECT count(*) as nbnessus FROM GlobalCrossover where epo like '%.%'");
$nbnessus = mysqli_fetch_array($result)['nbnessus'];
?>
<p class="card-text text-center"><b><a href="/dashboard/Nessus-Detail.php"><?php echo $nbnessus; ?></b> Agents</a></p>
<p class="card-text text-center text-dark"><b><?php echo $nbnessus; ?></b> Agents</p>
</div>
</div>
</div>
@@ -135,7 +135,7 @@
$result = $conn->query("SELECT count(*) as nbS1 FROM GlobalCrossover where S1 like '%.%'");
$nbS1 = mysqli_fetch_array($result)['nbS1'];
?>
<p class="card-text text-center"><b><a href="/dashboard/S1-Detail.php"><?php echo $nbS1; ?></b> Agents</a></p>
<p class="card-text text-center text-dark"><b><?php echo $nbS1; ?></b> Agents</p>
</div>
</div>
</div>
@@ -150,7 +150,7 @@
$nbnbu = mysqli_fetch_array($result)['nbnbu'];
mysqli_close($conn);
?>
<p class="card-text text-center"><b><a href="/dashboard/NBU-Detail.php"><?php echo $nbnbu; ?></b> Clients</a></p>
<p class="card-text text-center text-dark"><b><?php echo $nbnbu; ?></b> Clients</p>
</div>
</div>
</div>
@@ -161,7 +161,7 @@
<div class="row flex-nowrap text-center">
<div class="col">
<div class="card border-secondary mb-3">
<div class="card-header text-dark"><h3>OS Windows INFRA</h3></div>
<div class="card-header text-dark"><h3>Windows INFRA</h3></div>
<div class="card-body">
<canvas id="ChartServer" ></canvas>
</div>
@@ -169,7 +169,7 @@
</div>
<div class="col">
<div class="card border-secondary mb-3">
<div class="card-header text-dark"><h3>OS Windows APPLI</h3></div>
<div class="card-header text-dark"><h3>Windows APPLI</h3></div>
<div class="card-body">
<canvas id="ChartServerA" ></canvas>
</div>
@@ -177,7 +177,7 @@
</div>
<div class="col">
<div class="card border-secondary mb-3">
<div class="card-header text-dark"><h3>OS Linux/AIX</h3></div>
<div class="card-header text-dark"><h3>Linux/AIX</h3></div>
<div class="card-body">
<canvas id="ChartLinux"></canvas>
</div>
@@ -185,7 +185,7 @@
</div>
<div class="col">
<div class="card border-secondary mb-3">
<div class="card-header text-dark"><h3>Device Type</h3></div>
<div class="card-header text-dark"><h3>Type</h3></div>
<div class="card-body">
<canvas id="ChartType"></canvas>
</div>
@@ -240,7 +240,7 @@
});
let dataType = document.getElementById("dataType").innerHTML.split(",");
let labelsType = ['Physical', 'Virtual'];
let labelsType = ['Phys.', 'Virt.'];
new Chart("ChartType", {
type: 'doughnut',
data: {

View File

@@ -3,38 +3,70 @@
<script src="/js/JQueryUI.js"></script>
<div class="d-flex flex-column align-items-center align-items-sm-start px-3 pt-2 text-white min-vh-100 border-end border-primary">
<a href="/" class="d-flex align-items-center pb-3 mb-md-0 me-md-auto text-white text-decoration-none">
<span class="fs-5 d-none d-sm-inline text-primary h3">INFRA REPORTS IT</span>
</a>
<span class="badge bg-primary fs-6">INFRA REPORTS <b>IT</b></span>
<div class="d-flex align-items-center ms-auto">
<?php
$allowedUsers = array(
'armony\c08816',
'armony\e025532',
'armony\e028005',
'armony\e034710',
'armony\p035262',
'armony\u005852',
'armony\u010166',
'armony\u016841',
'armony\u016842',
'armony\u037059',
'armony\u049761',
'armony\u049762',
'armony\A0884805'
);
$currentUser = isset($_SERVER['REMOTE_USER']) ? strtolower($_SERVER['REMOTE_USER']) : '';
if (in_array($currentUser, $allowedUsers)) :
?>
<div class="form-check form-switch mt-2 me-3">
<input class="form-check-input" type="checkbox" id="langSwitch" <?php echo ($lang == 'fr') ? 'checked' : ''; ?> onchange="toggleLanguage()">
<label class="form-check-label text-white" style="font-size: 0.8rem;" for="langSwitch">
<?php echo ($lang == 'fr') ? "🇺🇸-<b>FR</b>" : "<b>US</b>-🇫🇷"; ?>
</label>
</div>
<?php endif; ?>
<div class="form-check form-switch mt-2 me-3">
<input class="form-check-input" type="checkbox" id="lightSwitch" />
<label class="form-check-label text-white" style="font-size: 0.8rem;" for="lightSwitch">
<i class="bi bi-sun"></i>/<i class="bi bi-moon"></i>
</label>
</div>
<div class="form-check form-switch ms-auto mt-3 me-3">
<label class="form-check-label ms-3" for="lightSwitch">
<i class="bi bi-sun"></i>/<i class="bi bi-moon"></i>
</label>
<input class="form-check-input" type="checkbox" id="lightSwitch" />
</div>
<div class="position-relative bottom-0 start-0 p-3">
<input type="text" id="searchServer" class="form-control" placeholder="Server Search..." style="font-size: 0.75rem !important">
<input type="text" id="searchServer" class="form-control" placeholder="<?php echo $nav_search; ?>" style="font-size: 0.75rem !important">
</div>
<hr class="w-100">
<ul class="nav nav-pills flex-column mb-sm-auto mb-0 align-items-center align-items-sm-start" id="menu">
<li class="nav-item">
<a href="/index.php" class="nav-link align-middle px-0">
<i class="fs-6 bi-house text-white"></i> <span class="ms-1 d-none d-sm-inline text-white h7">Home</span>
<i class="fs-6 bi-house text-white"></i> <span class="ms-1 d-none d-sm-inline text-white h7"><?php echo $nav_home; ?></span>
</a>
</li>
<li>
<a href="/crossover/GlobalCrossover.php" class="nav-link px-0 align-middle">
<i class="fs-6 bi-table text-white"></i> <span class="ms-1 d-none d-sm-inline text-white h7">DB Crossover</span></a>
<i class="fs-6 bi-table text-white"></i> <span class="ms-1 d-none d-sm-inline text-white h7"><?php echo $nav_2; ?></span></a>
</li>
<li>
<a href="#SharedFolders" data-bs-toggle="collapse" class="nav-link px-0 align-middle">
<i class="fs-6 bi bi-folder-symlink-fill text-white"></i> <span class="ms-1 d-none d-sm-inline text-white h7">Shared Folders</span><i class="bi bi-caret-down"></i> </a>
<i class="fs-6 bi bi-folder-symlink-fill text-white"></i> <span class="ms-1 d-none d-sm-inline text-white h7"><?php echo $nav_4; ?></span><i class="bi bi-caret-down"></i> </a>
<ul class="collapse nav flex-column ms-1" id="SharedFolders" data-bs-parent="#menu">
<li class="w-100">
<a href="/Shared-Folders/eqp-prj.php" class="nav-link px-0"> <span class="d-none d-sm-inline text-white h7">- PRJ & EQP Folders</span></a>
<a href="/Shared-Folders/HomeDirectories.php" class="nav-link px-0"> <span class="d-none d-sm-inline text-white h7">- HomeDirectories</span></a>
<a href="/Shared-Folders/eqp-prj.php" class="nav-link px-0"> <span class="d-none d-sm-inline text-white h7">- <?php echo $nav_4_1; ?></span></a>
<a href="/Shared-Folders/HomeDirectories.php" class="nav-link px-0"> <span class="d-none d-sm-inline text-white h7">- <?php echo $nav_4_2; ?></span></a>
</li>
</ul>
</li>
@@ -43,90 +75,119 @@
<i class="fs-6 bi bi-pc text-white"></i> <span class="ms-1 d-none d-sm-inline text-white h7">Unix/Linux</span><i class="bi bi-caret-down"></i> </a>
<ul class="collapse nav flex-column ms-1" id="Unix" data-bs-parent="#menu">
<li class="w-100">
<a href="/X/inventory.php" class="nav-link px-0"> <span class="d-none d-sm-inline text-white h7">- Server Inventory</span></a>
<a href="/X/SVA-SCU.php" class="nav-link px-0"> <span class="d-none d-sm-inline text-white h7">- SVA/SCU Accounts</span></a>
<a href="/X/autoremediationlog.php" class="nav-link px-0"> <span class="d-none d-sm-inline text-white h7">- AutoRemediation Logs</span></a>
<a href="/X/stdout.php" class="nav-link px-0"> <span class="d-none d-sm-inline text-white h7">- Scripts Result</span></a>
<a href="/X/backups.php" class="nav-link px-0"> <span class="d-none d-sm-inline text-white h7">- Backups</span></a>
<a href="/X/inventory.php" class="nav-link px-0"> <span class="d-none d-sm-inline text-white h7">- <?php echo $nav_5_1; ?></span></a>
<a href="/X/SVA-SCU.php" class="nav-link px-0"> <span class="d-none d-sm-inline text-white h7">- <?php echo $nav_5_2; ?></span></a>
<a href="/X/autoremediationlog.php" class="nav-link px-0"> <span class="d-none d-sm-inline text-white h7">- <?php echo $nav_5_3; ?></span></a>
<a href="/X/stdout.php" class="nav-link px-0"> <span class="d-none d-sm-inline text-white h7">- <?php echo $nav_5_4; ?></span></a>
<a href="/X/backups.php" class="nav-link px-0"> <span class="d-none d-sm-inline text-white h7">- <?php echo $w_backup; ?></span></a>
<a href="/X/VIO.php" class="nav-link px-0"> <span class="d-none d-sm-inline text-white h7">- VIO</span></a>
</li>
</ul>
</li>
<li>
<a href="#rollup" data-bs-toggle="collapse" class="nav-link px-0 align-middle">
<i class="fs-6 bi bi-calendar text-white"></i> <span class="ms-1 d-none d-sm-inline text-white h7">Rollups</span><i class="bi bi-caret-down"></i> </a>
<i class="fs-6 bi bi-calendar text-white"></i> <span class="ms-1 d-none d-sm-inline text-white h7"><?php echo $nav_6; ?></span><i class="bi bi-caret-down"></i> </a>
<ul class="collapse nav flex-column ms-1" id="rollup" data-bs-parent="#menu">
<li class="w-100">
<a href="/Rollups/rollup-calendar.php" class="nav-link px-0"> <span class="d-none d-sm-inline text-white h7">- Full Calendar</span></a>
<a href="/Rollups/rollup-calendar.php" class="nav-link px-0"> <span class="d-none d-sm-inline text-white h7">- <?php echo $nav_6_1; ?></span></a>
</li>
</ul>
</li>
<li>
<a href="#HyperV" data-bs-toggle="collapse" class="nav-link px-0 align-middle">
<i class="fs-6 bi bi-pc text-white"></i> <span class="ms-1 d-none d-sm-inline text-white h7">Hyper-V</span><i class="bi bi-caret-down"></i> </a>
<i class="fs-6 bi bi-pc text-white"></i> <span class="ms-1 d-none d-sm-inline text-white h7"><?php echo $nav_3;?></span><i class="bi bi-caret-down"></i> </a>
<ul class="collapse nav flex-column ms-1" id="HyperV" data-bs-parent="#menu">
<li class="w-100">
<a href="/Hyper-V/clusters.php" class="nav-link px-0"> <span class="d-none d-sm-inline text-white h7">- Hyper-V Clusters</span></a>
<a href="/Hyper-V/VMs-Backups.php" class="nav-link px-0"> <span class="d-none d-sm-inline text-white h7">- VMs Backups</span></a>
<a href="/Hyper-V/Clusters.php" class="nav-link px-0"> <span class="d-none d-sm-inline text-white h7">- <?php echo $nav_3_1 ;?></span></a>
<a href="/Hyper-V/VMs-Backups.php" class="nav-link px-0"> <span class="d-none d-sm-inline text-white h7">- <?php echo $nav_3_2 ;?></span></a>
<!--
<a href="/Hyper-V/SYN-VMList.php" class="nav-link px-0"> <span class="d-none d-sm-inline text-white h7">- Synergy VMs</span></a>
<a href="/Hyper-V/Legacy-VMList.php" class="nav-link px-0"> <span class="d-none d-sm-inline text-white h7">- Legacy Hyper-V VMs</span></a>
<a href="/Hyper-V/migration.php" class="nav-link px-0"> <span class="d-none d-sm-inline text-white h7">- Migration FollowUp</span></a>
-->
<a href="/Hyper-V/memory-hunt-vms.php" class="nav-link px-0"> <span class="d-none d-sm-inline text-white h7">- <?php echo $nav_3_3 ;?></span></a>
<a href="/Hyper-V/memory-hunt-HV.php" class="nav-link px-0"> <span class="d-none d-sm-inline text-white h7">- <?php echo $nav_3_4 ;?></span></a>
<a href="/Hyper-V/VMs.php" class="nav-link px-0"> <span class="d-none d-sm-inline text-white h7">- <?php echo $nav_3_5 ;?></span></a>
</li>
</ul>
</li>
<li>
<a href="#Storage" data-bs-toggle="collapse" class="nav-link px-0 align-middle">
<i class="fs-6 bi bi-server text-white"></i> <span class="ms-1 d-none d-sm-inline text-white h7">Storage</span><i class="bi bi-caret-down"></i> </a>
<i class="fs-6 bi bi-server text-white"></i> <span class="ms-1 d-none d-sm-inline text-white h7"><?php echo $nav_7; ?></span><i class="bi bi-caret-down"></i> </a>
<ul class="collapse nav flex-column ms-1" id="Storage" data-bs-parent="#menu">
<li class="w-100">
<a href="/Storage/Dashboard.php" class="nav-link px-0"> <span class="d-none d-sm-inline text-white h7">- Dashboard IBM SAN</span></a>
<a href="/Storage/switchssan.php" class="nav-link px-0"> <span class="d-none d-sm-inline text-white h7">- Switchs FC</span></a>
<a href="/Storage/Dashboard.php" class="nav-link px-0"> <span class="d-none d-sm-inline text-white h7">- <?php echo $nav_7_1; ?></span></a>
<a href="/Storage/switchssan.php" class="nav-link px-0"> <span class="d-none d-sm-inline text-white h7">- <?php echo $nav_7_2; ?></span></a>
</li>
</ul>
</li>
<li>
<a href="#Workstation" data-bs-toggle="collapse" class="nav-link px-0 align-middle">
<i class="fs-6 bi bi-pc-display-horizontal text-white"></i> <span class="ms-1 d-none d-sm-inline text-white h7">Workstations</span><i class="bi bi-caret-down"></i> </a>
<i class="fs-6 bi bi-pc-display-horizontal text-white"></i> <span class="ms-1 d-none d-sm-inline text-white h7"><?php echo $nav_8; ?></span><i class="bi bi-caret-down"></i> </a>
<ul class="collapse nav flex-column ms-1" id="Workstation" data-bs-parent="#menu">
<li class="w-100">
<a href="/workstation/globalcrossover.php" class="nav-link px-0"> <span class="d-none d-sm-inline text-white h7">- Crossover</span></a>
<a href="/workstation/globalcrossover.php" class="nav-link px-0"> <span class="d-none d-sm-inline text-white h7">- <?php echo $nav_2; ?></span></a>
</li>
</ul>
</li>
<li>
<a href="#Heartbeat" data-bs-toggle="collapse" class="nav-link px-0 align-middle">
<i class="fs-6 bi bi-activity text-white"></i> <span class="ms-1 d-none d-sm-inline text-white h7">Heartbeat</span><i class="bi bi-caret-down"></i> </a>
<i class="fs-6 bi bi-activity text-white"></i> <span class="ms-1 d-none d-sm-inline text-white h7"><?php echo $w_heartbeat;?></span><i class="bi bi-caret-down"></i> </a>
<ul class="collapse nav flex-column ms-1" id="Heartbeat" data-bs-parent="#menu">
<li class="w-100">
<a href="/reports/heartbeat.php" class="nav-link px-0" target="_blank"> <span class="d-none d-sm-inline text-white h7">- Heartbeat Map</span></a>
<a href="/reports/heartbeat.php" class="nav-link px-0" > <span class="d-none d-sm-inline text-white h7">- <?php echo $w_heartbeat;?></span></a>
</li>
</ul>
</li>
<li>
<a href="#AD" data-bs-toggle="collapse" class="nav-link px-0 align-middle">
<i class="fs-6 bi bi-people text-white"></i> <span class="ms-1 d-none d-sm-inline text-white h7">ActiveDirectory</span><i class="bi bi-caret-down"></i> </a>
<i class="fs-6 bi bi-people text-white"></i> <span class="ms-1 d-none d-sm-inline text-white h7"><?php echo $nav_1; ?></span><i class="bi bi-caret-down"></i> </a>
<ul class="collapse nav flex-column ms-1" id="AD" data-bs-parent="#menu">
<li class="w-100">
<a href="/AD/GroupReview.php" class="nav-link px-0" target="_blank"> <span class="d-none d-sm-inline text-white h7">- Group Review</span></a>
<a href="/AD/GroupSearch.php" class="nav-link px-0" target="_blank"> <span class="d-none d-sm-inline text-white h7">- Group Membership</span></a>
<a href="/AD/GroupReview.php" class="nav-link px-0" > <span class="d-none d-sm-inline text-white h7">- <?php echo $nav_1_1; ?></span></a>
<a href="/AD/GroupSearch.php" class="nav-link px-0" > <span class="d-none d-sm-inline text-white h7">- <?php echo $nav_1_2; ?></span></a>
</li>
</ul>
</li>
<li>
<a href="#cluster" data-bs-toggle="collapse" class="nav-link px-0 align-middle">
<i class="fs-6 bi bi-pc text-white"></i> <span class="ms-1 d-none d-sm-inline text-white h7">Clusters</span><i class="bi bi-caret-down"></i> </a>
<i class="fs-6 bi bi-hdd-network text-white"></i> <span class="ms-1 d-none d-sm-inline text-white h7"><small><?php echo $nav_9; ?></small></span><i class="bi bi-caret-down"></i> </a>
<ul class="collapse nav flex-column ms-1" id="cluster" data-bs-parent="#menu">
<li class="w-100">
<a href="/Inventory/ClusterResource.php" class="nav-link px-0" target="_blank"> <span class="d-none d-sm-inline text-white h7">- Cluster Ressources</span></a>
<a href="/Inventory/ClusterResource.php" class="nav-link px-0" > <span class="d-none d-sm-inline text-white h7">- <?php echo $nav_9_1; ?></span></a>
</li>
</ul>
</li>
<li>
<a href="#network" data-bs-toggle="collapse" class="nav-link px-0 align-middle">
<i class="fs-6 bi bi-diagram-3 text-white"></i> <span class="ms-1 d-none d-sm-inline text-white h7"><small><?php echo $w_network; ?></small></span><i class="bi bi-caret-down"></i> </a>
<ul class="collapse nav flex-column ms-1" id="network" data-bs-parent="#menu">
<li class="w-100">
<a href="/Network/dhcp_servers.php" class="nav-link px-0" > <span class="d-none d-sm-inline text-white h7">- DHCP</span></a>
</li>
</ul>
</li>
<li>
<a href="#secureboot" data-bs-toggle="collapse" class="nav-link px-0 align-middle">
<i class="fs-6 bi bi-shield-lock text-white"></i> <span class="ms-1 d-none d-sm-inline text-white h7"><small><?php echo $nav_10; ?></small></span><i class="bi bi-caret-down"></i> </a>
<ul class="collapse nav flex-column ms-1" id="secureboot" data-bs-parent="#menu">
<li class="w-100">
<a href="/SecureBoot/SecureBoot-SRV.php" class="nav-link px-0"> <span class="d-none d-sm-inline text-white h7">- <?php echo $nav_10_1; ?></span></a>
<a href="/SecureBoot/SecureBoot-WS.php" class="nav-link px-0"> <span class="d-none d-sm-inline text-white h7">- <?php echo $nav_10_2; ?></span></a>
</li>
</ul>
</li>
<br>
<br>
<li class="nav-item">
<a href="http://infra-tools.appliarmony.net/index.php" class="nav-link align-middle px-0" target="_blank">
<i class="fs-5 bi-link text-white"></i> <span class="ms-1 d-none d-sm-inline text-white h6">Infra-Tools</span>
</a>
</li>
<li>
<a href="#link" data-bs-toggle="collapse" class="nav-link px-0 align-middle">
<i class="fs-6 bi bi-link text-white"></i> <span class="ms-1 d-none d-sm-inline text-white h7">Links</span><i class="bi bi-caret-down"></i> </a>
<i class="fs-6 bi bi-link text-white"></i> <span class="ms-1 d-none d-sm-inline text-white h7"><?php echo $nav_links; ?></span><i class="bi bi-caret-down"></i> </a>
<ul class="collapse nav flex-column ms-1" id="link" data-bs-parent="#menu">
<li class="w-100">
<a href="http://dash-dtd-systemdk.appliarmony.net/index-it-dark.html" class="nav-link px-0" target="_blank"> <span class="d-none d-sm-inline text-white h7">- Dashboard IT</span></a>
@@ -139,6 +200,13 @@
</div>
<script>
function toggleLanguage() {
let searchParams = new URLSearchParams(window.location.search);
let currentLang = '<?php echo $lang; ?>';
let newLang = (currentLang === 'en') ? 'fr' : 'en';
searchParams.set('lang', newLang);
window.location.search = searchParams.toString();
}
$(document).ready(function() {
$("#searchServer").autocomplete({
source: "/Inventory/search_servers.php",

View File

@@ -1,149 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Page Title -->
<title>Web Infra Reports IT</title>
<link rel="shortcut icon" type="image/png" href="/include/favicon-32x32.png">
<!-- JQuery -->
<script src="/js/jquery-3.6.1.min.js"></script>
<!-- Bootstrap -->
<link rel="stylesheet" href="/css/bootstrap.min.css">
<link rel="stylesheet" href="/css/bootstrap-icons/bootstrap-icons.css">
<link rel="stylesheet" href="/css/preloader.css">
<script src="/js/bootstrap.bundle.min.js"></script>
<!-- Bootstrap-tables -->
<link rel="stylesheet" href="/css/bootstrap-table.min.css">
<script src="/js/bootstrap-table.min.js"></script>
<script src="/js/bootstrap-table-fr-FR.min.js"></script>
<script src="/js/tableExport.min.js"></script>
<script src="/js/bootstrap-table-export.min.js"></script>
<script src="/js/libs/js-xlsx/xlsx.core.min.js"></script>
</head>
<body class="bg-light text-dark">
<?php include $_SERVER['DOCUMENT_ROOT'] . "/include/all.php"; ?> <!-- Include All -->
<?php // DATA
$folders = Invoke_Infra("select * from fls_and_prs f
left join ad_all_users u on u.cn = f.folder
where typ = 'HomeDirectory'
and (enabled <> 'True' or acl not like 'ARMONY%' or o365 <> 'N')
order by [server],folder");
?>
<!-- HTML -->
<div class="container-fluid" id="content">
<div class="row flex-nowrap">
<!-- Left NAVBAR -->
<div class="col-auto col-md-2 col-xl-2 px-sm-2 px-0 bg-dark vh-100 position-sticky top-0" style="-ms-flex: 0 0 230px;flex: 0 0 230px;">
<?php include $_SERVER['DOCUMENT_ROOT'] . "/navbar.html"; ?>
</div>
<!-- Display -->
<div class="col py-3">
<!-- Page Title -->
<h1><span class="badge text-bg-secondary font-weight-bold" style="width:100%;">Home Directories with issues <small><small>(<?php echo count($folders); ?> entries) </small></small><br><h6>Updated every day at 07:00:00</h6></span></h1>
<!-- Main content -->
<div class="container-fluid">
<!-- MODAL WAIT -->
<div class="modal fade bs-example-modal-sm" id="wait" tabindex="-1" role="dialog" aria-hidden="true" data-backdrop="static" style="padding-top: 15%;">
<div class="modal-dialog modal-sm">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title mb-1 text-dark text-uppercase">
<center><i class="bi bi-hourglass-split"></i><br> Work in progress ...</center>
</h4>
</div>
<div class="modal-body">
<div class="progress">
<div class="progress-bar progress-bar-secondary progress-bar-striped progress-bar-animated" style="width: 100%"></div>
</div>
</div>
</div>
</div>
</div>
<!-- TABLE -->
<div>
<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" data-sort-name="VM">
<thead> <!-- Header -->
<th data-field="Server" data-sortable="true">Server</th>
<th data-field="Folder" data-sortable="true">Folder</th>
<th data-field="ACL" data-sortable="true">ACL</th>
<th data-field="AD" data-sortable="true">in AD</th>
<th data-field="Enabled" data-sortable="true">Account Enabled</th>
<th data-field="o365" data-sortable="true">o365</th>
<th data-field="Quota" data-sortable="true">Quota</th>
<th data-field="Size" data-sortable="true">Size</th>
<th data-field="LastLogon" data-sortable="true">Last Logon</th>
</thead>
<tbody> <!-- Body -->
<?php
foreach ($folders as $answer) {
if(str_contains($answer['acl'],"S-1-5")){$acl="<td class='table-warning'>?</td>";}else{$acl="<td>".$answer['acl']."</td>";}
if($answer['enabled'] != 'True'){$enabled="<td class='table-warning'><b>N</b></td>";}else{$enabled="<td>Y</td>";}
if($answer['cn'] == ''){$inAD="<td class='table-warning'><b>N</b></td>";}else{$inAD="<td>Y</td>";}
if($answer['o365'] != 'N'){$o365="<td class='table-warning'><b>".$answer['o365']."</b></td>";}else{$o365="<td>N</td>";}
echo "<td class='text-nowrap'>".$answer['server']."</td>";
echo "<td>".$answer['folder']."</td>";
echo $acl;
echo $inAD;
echo $enabled;
echo $o365;
echo "<td>".$answer['quota']."</td>";
echo "<td>".$answer['size']."</td>";
echo "<td class='text-nowrap'>".$answer['lastlogon']."</td>";
echo "</tr>";
}
?>
</tbody>
</table>
<br>
</div>
</div>
<!-- End of main content -->
</div>
</div>
</div>
</body>
<script src="/js/switch.js"></script>
</HTML>
<SCRIPT>
$(document).ready(function() {
$('#t1').DataTable({
scrollY: '50vh',
scrollCollapse: true,
paging: false,
});
});
$(function () {
var options = $('#t1').bootstrapTable('getOptions');
options.height= document.getElementById('content').clientHeight-170;
$('#t1').bootstrapTable('refreshOptions',options);
});
function tableresize() {
var options = $('#t1').bootstrapTable('getOptions');
options.height= document.getElementById('content').clientHeight-170;
$('#t1').bootstrapTable('refreshOptions',options);
};
window.addEventListener("resize", tableresize);
</script>
</SCRIPT>

View File

@@ -85,7 +85,7 @@
<!-- Display -->
<div class="col py-3">
<!-- Page Title -->
<h1><span class="badge text-bg-secondary font-weight-bold" style="width:100%;">HeartBeat Map for servers NOT in maintenance</span></h1>
<h1><span class="badge text-bg-secondary font-weight-bold" style="width:100%;"><?php echo $ti_17;?></span></h1>
<!-- Main content -->
<div class="container">
@@ -95,7 +95,7 @@
<?php if($wcount){$color = "DarkOrange";$msg = "<b> --> ".$wcount." issue(s)</b>";}else{$color = "green";$msg = "OK";} ?>
<div class="card" style='background-color:<?php echo $color ?>;'>
<h4 class="card-header">
<a class="btn text-white fs-3" data-bs-toggle="collapse" href="#windows"><b>Windows : <?php echo count($windows)." Devices ". $msg; ?></b></a>
<a class="btn text-white fs-3" data-bs-toggle="collapse" href="#windows"><b>Windows : <?php echo count($windows)." $w_devices ". $msg; ?></b></a>
</h4>
</div>
<div id="windows" class="collapse" data-bs-parent="#accordion">
@@ -106,7 +106,7 @@
<?php if($lcount){$color = "DarkOrange";$msg = "<b> --> ".$lcount." issue(s)</b>";}else{$color = "green";$msg = "OK";} ?>
<div class="card" style='background-color:<?php echo $color ?>;'>
<h4 class="card-header">
<a class="btn text-white fs-3" data-bs-toggle="collapse" href="#linux"><b>Linux : <?php echo count($linux)." Devices ". $msg; ?></b></a>
<a class="btn text-white fs-3" data-bs-toggle="collapse" href="#linux"><b>Linux : <?php echo count($linux)." $w_devices ". $msg; ?></b></a>
</h4>
</div>
<div id="linux" class="collapse" data-bs-parent="#accordion">
@@ -117,7 +117,7 @@
<?php if($acount){$color = "DarkOrange";$msg = "<b> --> ".$acount." issue(s)</b>";}else{$color = "green";$msg = "OK";} ?>
<div class="card" style='background-color:<?php echo $color ?>;'>
<h4 class="card-header text-white">
<a class="btn text-white fs-3" data-bs-toggle="collapse" href="#aix"><b>AIX : <?php echo count($aix)." Devices ". $msg; ?></b></a>
<a class="btn text-white fs-3" data-bs-toggle="collapse" href="#aix"><b>AIX : <?php echo count($aix)." $w_devices ". $msg; ?></b></a>
</h4>
</div>
<div id="aix" class="collapse" data-bs-parent="#accordion">
@@ -128,7 +128,7 @@
<?php if($ocount){$color = "DarkOrange";$msg = "<b> --> ".$ocount." issue(s)</b>";}else{$color = "green";$msg = "OK";} ?>
<div class="card" style='background-color:<?php echo $color ?>;'>
<h4 class="card-header text-white">
<a class="btn text-white fs-3" data-bs-toggle="collapse" href="#other"><b>Other : <?php echo count($other)." Devices ". $msg; ?></b></a>
<a class="btn text-white fs-3" data-bs-toggle="collapse" href="#other"><b>Other : <?php echo count($other)." $w_devices ". $msg; ?></b></a>
</h4>
</div>
<div id="other" class="collapse" data-bs-parent="#accordion">

View File

@@ -1,143 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Page Title -->
<title>Web Infra Reports IT</title>
<link rel="shortcut icon" type="image/png" href="/include/favicon-32x32.png">
<!-- JQuery -->
<script src="/js/jquery-3.6.1.min.js"></script>
<!-- Bootstrap -->
<link rel="stylesheet" href="/css/bootstrap.min.css">
<link rel="stylesheet" href="/css/bootstrap-icons/bootstrap-icons.css">
<link rel="stylesheet" href="/css/preloader.css">
<script src="/js/bootstrap.bundle.min.js"></script>
<!-- Bootstrap-tables -->
<link rel="stylesheet" href="/css/bootstrap-table.min.css">
<script src="/js/bootstrap-table.min.js"></script>
<script src="/js/bootstrap-table-fr-FR.min.js"></script>
<script src="/js/tableExport.min.js"></script>
<script src="/js/bootstrap-table-export.min.js"></script>
<script src="/js/libs/js-xlsx/xlsx.core.min.js"></script>
</head>
<body class="bg-light text-dark">
<?php include $_SERVER['DOCUMENT_ROOT'] . "/include/all.php"; ?> <!-- Include All -->
<?php // DATA
$answers = Invoke_WebInfraTools("SELECT * FROM sva_attributes order by sva");
?>
<!-- HTML -->
<div class="container-fluid" id="content">
<div class="row flex-nowrap">
<!-- Left NAVBAR -->
<div class="col-auto col-md-2 col-xl-2 px-sm-2 px-0 bg-dark vh-100 position-sticky top-0" style="-ms-flex: 0 0 230px;flex: 0 0 230px;">
<?php include $_SERVER['DOCUMENT_ROOT'] . "/navbar.html"; ?>
</div>
<!-- Display -->
<div class="col py-3">
<!-- Page Title -->
<h1><span class="badge text-bg-secondary font-weight-bold" style="width:100%;">SVA & SCU Accounts Attributes </span></h1><h6>Updated every hour</h6>
<!-- Main content -->
<div class="container-fluid">
<!-- MODAL WAIT -->
<div class="modal fade bs-example-modal-sm" id="wait" tabindex="-1" role="dialog" aria-hidden="true" data-backdrop="static" style="padding-top: 15%;">
<div class="modal-dialog modal-sm">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title mb-1 text-dark text-uppercase">
<center><i class="bi bi-hourglass-split"></i><br> Work in progress ...</center>
</h4>
</div>
<div class="modal-body">
<div class="progress">
<div class="progress-bar progress-bar-secondary progress-bar-striped progress-bar-animated" style="width: 100%"></div>
</div>
</div>
</div>
</div>
</div>
<!-- TABLE -->
<div>
<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" data-sort-name="VM">
<thead> <!-- Header -->
<tr>
<th data-field='account' data-sortable='true'>Account</th>
<th data-field='Displayname' data-sortable='true'>Displayname</th>
<th data-field='Uid' data-sortable='true'>Uid</th>
<th data-field='UidNumber' data-sortable='true'>UidNumber</th>
<th data-field='Gecos' data-sortable='true'>Gecos</th>
<th data-field='UnixHD' data-sortable='true'>Unix Home Directory</th>
<th data-field='Login Shell' data-sortable='true'>Login Shell</th>
<th data-field='GID Number' data-sortable='true'>GID Number</th>
<th data-field='Enabled' data-sortable='true'>Enabled</th>
<th data-field='LastLogon' data-sortable='true'>Last Logon</th>
</tr>
</thead>
<tbody> <!-- Body -->
<?php
foreach ($answers as $row) {
if ($row['enabled'] != 'True') {echo '<tr class="table-danger">';}else{echo '<tr>';}
echo '<td class="text-nowrap"><b>'.$row['SVA'].'</b></td>';
echo '<td><small>'.$row['displayname'].'</small></td>';
echo '<td><small>'.$row['uid'].'</small></td>';
echo '<td><small>'.$row['uidnumber'].'</small></td>';
echo '<td><small>'.$row['gecos'].'</small></td>';
echo '<td><small>'.$row['unixHD'].'</small></td>';
echo '<td><small>'.$row['loginshell'].'</small></td>';
echo '<td><small>'.$row['gidnumber'].'</small></td>';
echo '<td><small>'.$row['enabled'].'</small></td>';
if($row['lastlogon'] == ""){
echo '<td class="table-warning"><small><b>NEVER</b></small></td>';
}else{
echo '<td class="text-nowrap"><small>'.date_format(date_create($row['lastlogon']),"Y-m-d H:i:s").'</small></td>';
}
echo '</tr>' ;
}
?>
</tbody>
</table>
<br>
</div>
</div>
<!-- End of main content -->
</div>
</div>
</div>
</body>
<script src="/js/switch.js"></script>
</HTML>
<SCRIPT>
let table = $('#t1');
$(document).ready(function() {
table.DataTable({
scrollY: '50vh',
scrollCollapse: true,
paging: false,
});
});
$(function () {
let options = table.bootstrapTable('getOptions');
options.height= document.getElementById('content').clientHeight-170;
table.bootstrapTable('refreshOptions',options);
});
function tableresize() {
let options = table.bootstrapTable('getOptions');
options.height= document.getElementById('content').clientHeight-170;
table.bootstrapTable('refreshOptions',options);
}
window.addEventListener("resize", tableresize);
</SCRIPT>

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 -->
@@ -39,7 +39,7 @@
<!-- Display -->
<div class="col py-3">
<!-- Page Title -->
<h1><span class="badge text-bg-secondary font-weight-bold" style="width:100%;">Workstations Crossover</span></h1>
<h1><span class="badge text-bg-secondary font-weight-bold" style="width:100%;"><?php echo $ti_16;?></span></h1>
<!-- Main content -->
<div class="row" style="zoom: 80%">
@@ -54,17 +54,16 @@
data-height="620" data-show-export="true" data-sortable="true">
<thead>
<tr>
<th data-field="Name" data-sortable="true">Name</th>
<th data-field="OS" data-sortable="true">Operating System</th>
<th data-field="AD" data-sortable="true">AD</th>
<th data-field="ADlu" data-sortable="true" data-visible="false">AD Last Logon</th>
<th data-field="Name" data-sortable="true"><?php echo $w_name;?></th>
<th data-field="OS" data-sortable="true"><?php echo $w_os;?></th>
<th data-field="AD" data-sortable="true"><?php echo $w_ad;?></th>
<th data-field="ADlu" data-sortable="true" data-visible="false"><?php echo $w_adlu;?></th>
<th data-field="GLPI" data-sortable="true">GLPI</th>
<th data-field="GLPIlu" data-sortable="true" data-visible="false" data-footer-formatter="FI">Last FI
Inventory</th>
<th data-field="GLPIlu" data-sortable="true" data-visible="false" data-footer-formatter="FI"><?php echo $w_filu;?></th>
<th data-field="SCCM" data-sortable="true">SCCM<br></th>
<th data-field="SCCMlu" data-sortable="true" data-visible="false">SCCM Last Heartbeat</th>
<th data-field="SCCMlu" data-sortable="true" data-visible="false"><?php echo $w_sccmlu;?></th>
<th data-field="S1" data-sortable="true">SentinelOne<br></th>
<th data-field="S1lu" data-sortable="true" data-visible="false">SentinelOne Last Heartbeat</th>
<th data-field="S1lu" data-sortable="true" data-visible="false"><?php echo $w_s1lu;?></th>
</tr>
</thead>