Remove test.php and enhance null safety and sorting across components
- Deleted `test.php` as it was no longer in use. - Enhanced null safety checks in `Inventory.php`, `StdOut-detail.php`, `Backups.php`, and `SwitchsSAN.php` to prevent potential warnings. - Refactored `SwitchsSAN.php` to improve sorting logic for ports based on errors, vFabric, and Port ID. - Added seasonal snow effect script in `all.php` with toggle functionality for user engagement. - Updated navigation bar (`navbar.html`) to include a new VIO page link. - Introduced a new `VIO.php` page to display VIO monitoring details with table export and sorting features.
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user