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:
@@ -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 " <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 " <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 " <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 " <span class='badge rounded-pill bg-success text-light'>$w_host : ".$Qvm[0]['Owner']."</span>";
|
||||
}else{
|
||||
echo " <span class='badge rounded-pill bg-warning text-dark'>$w_host : ".$Qvm[0]['Owner']."</span>";
|
||||
}
|
||||
}else{
|
||||
echo " <span class='badge rounded-pill bg-warning text-dark'>Host : ".$Qvm[0]['Owner']."</span>";
|
||||
if(is_array($Qx)){
|
||||
echo " <span class='badge rounded-pill bg-success text-light'>$w_host : ".$Qx[0]['Owner']."</span>";
|
||||
$site = substr($Qx[0]['Owner'],0,3);
|
||||
}else{
|
||||
echo " <span class='badge rounded-pill bg-success text-light'>Physical</span>";
|
||||
echo " <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 " <span class='badge rounded-pill bg-success text-light'>Host : ".$Qx[0]['Owner']."</span>";
|
||||
$site = substr($Qx[0]['Owner'],0,3);
|
||||
}else{
|
||||
echo " <span class='badge rounded-pill bg-success text-light'>Physical</span>";
|
||||
echo " <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 " <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 " <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 " <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 " <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 " <span class='badge rounded-pill bg-secondary text-light fs-5'>Last Update : ".$Qw[0]['LastKBUpdate']."</span>";
|
||||
echo " <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 " <span class='badge rounded-pill bg-secondary text-light fs-5'>Next Rollup : ".$date[0]['next']."</span>";
|
||||
echo " <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 " <span class='badge rounded-pill bg-secondary text-light fs-5'>Next Rollup : $date </span>";
|
||||
echo " <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> ";
|
||||
echo "<span class='badge rounded-pill bg-secondary text-light fs-5'>Mask : " . $answer[0]['Subnet'] . "</span> ";
|
||||
echo "<span class='badge rounded-pill bg-secondary text-light fs-5'>Gateway : " . $answer[0]['Gateway'] . "</span> ";
|
||||
echo "<span class='badge rounded-pill bg-secondary text-light fs-5'>DNS : " . $answer[0]['DNS'] . "</span> ";
|
||||
echo "<span class='badge rounded-pill bg-secondary text-light fs-5'>Mac : " . $answer[0]['MacAddress'] . "</span> ";
|
||||
}
|
||||
?>
|
||||
|
||||
<!-- End of main content -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user