Remove unused PHP files related to Hyper-V and Storage dashboards

- Deleted `cluster-detail2.php`, `constants.inc copy.php`, `D.php`, and `Dashboard2.php`. These files were no longer in use and contributed to unnecessary clutter in the codebase.
- Cleaned up references to removed files.
This commit is contained in:
e025532
2025-07-29 14:02:06 +02:00
parent 1f794e2273
commit 5c7ea9f3fc
70 changed files with 14141 additions and 6259 deletions

View File

@@ -24,89 +24,89 @@
<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"; ?>
<?php // DATA
$windows = Invoke_Infra("select * from cmdb_srvall where DECOM is null and hostname not in (select server from maintenance_status where scom = 'Y' or zabbix = 'Y') and hostname <> '' order by hostname asc");
$linux = Invoke_aixcmdb("select h.hostname, h.hbtime, h.prevtime from heartbeat h left join srvall s on s.hostname = h.hostname where h.mainttime is null and h.decomtime is null and s.os_type = 'LINUX' order by h.hostname");
$aix = Invoke_aixcmdb("select h.hostname, h.hbtime, h.prevtime from heartbeat h left join srvall s on s.hostname = h.hostname where h.mainttime is null and h.decomtime is null and s.os_type = 'AIX' order by h.hostname");
$other = Invoke_aixcmdb("select h.hostname, h.hbtime, h.prevtime from heartbeat h left join srvall s on s.hostname = h.hostname where h.mainttime is null and h.decomtime is null and s.os_type is null order by h.hostname");
$lok = "<div class='row'>";$lko = "<div class='row'>";$lcount=0;
foreach($linux as $s){
if($s['HBTIME'] < date('Y-m-d H:i:s', strtotime(' -11 minutes '))){
$lko .= "<div class='col-6'><span class='badge bg-danger'>".strtoupper($s['HOSTNAME'])." since ".explode(".",$s['PREVTIME'])[0]."</span></div>";
$lcount++;
}else{
$lok .= "<div class='col-2'><span class='badge bg-success'>".strtoupper($s['HOSTNAME']." ")."</span></div>";
}
<?php include $_SERVER['DOCUMENT_ROOT'] . "/include/all.php"; ?>
<?php // DATA
$windows = Invoke_Infra("select * from cmdb_srvall where DECOM is null and hostname not in (select server from maintenance_status where scom = 'Y' or zabbix = 'Y') and hostname <> '' order by hostname asc");
$linux = Invoke_aixcmdb("select h.hostname, h.hbtime, h.prevtime from heartbeat h left join srvall s on s.hostname = h.hostname where h.mainttime is null and h.decomtime is null and s.os_type = 'LINUX' order by h.hostname");
$aix = Invoke_aixcmdb("select h.hostname, h.hbtime, h.prevtime from heartbeat h left join srvall s on s.hostname = h.hostname where h.mainttime is null and h.decomtime is null and s.os_type = 'AIX' order by h.hostname");
$other = Invoke_aixcmdb("select h.hostname, h.hbtime, h.prevtime from heartbeat h left join srvall s on s.hostname = h.hostname where h.mainttime is null and h.decomtime is null and s.os_type is null order by h.hostname");
$lok = "<div class='row'>";$lko = "<div class='row'>";$lcount=0;
foreach($linux as $s){
if($s['HBTIME'] < date('Y-m-d H:i:s', strtotime(' -11 minutes '))){
$lko .= "<div class='col-6'><span class='badge bg-danger'>".strtoupper($s['HOSTNAME'])." since ".explode(".",$s['PREVTIME'])[0]."</span></div>";
$lcount++;
}else{
$lok .= "<div class='col-2'><span class='badge bg-success'>".strtoupper($s['HOSTNAME']." ")."</span></div>";
}
if($lcount){$color = "DarkOrange";$msg = $lcount." issues";}else{$color = "green";$msg = "OK";}
$aok = "<div class='row'>";$ako = "<div class='row'>";$acount=0;
foreach($aix as $s){
if($s['HBTIME'] < date('Y-m-d H:i:s', strtotime(' -11 minutes '))){
$ako .= "<div class='col-6'><span class='badge bg-danger'>".strtoupper($s['HOSTNAME'])." since".explode(".",$s['PREVTIME'])[0]."</span></div>";
$acount++;
}else{
$aok .= "<div class='col-2'><span class='badge bg-success'>".strtoupper($s['HOSTNAME']." ")."</span></div>";
}
}
if($lcount){$color = "DarkOrange";$msg = $lcount." issues";}else{$color = "green";$msg = "OK";}
$aok = "<div class='row'>";$ako = "<div class='row'>";$acount=0;
foreach($aix as $s){
if($s['HBTIME'] < date('Y-m-d H:i:s', strtotime(' -11 minutes '))){
$ako .= "<div class='col-6'><span class='badge bg-danger'>".strtoupper($s['HOSTNAME'])." since".explode(".",$s['PREVTIME'])[0]."</span></div>";
$acount++;
}else{
$aok .= "<div class='col-2'><span class='badge bg-success'>".strtoupper($s['HOSTNAME']." ")."</span></div>";
}
$ook = "<div class='row'>";$oko = "<div class='row'>";$ocount=0;
foreach($other as $s){
if($s['HBTIME'] < date('Y-m-d H:i:s', strtotime(' -11 minutes '))){
$oko .= "<div class='col-6'><span class='badge bg-danger'>".strtoupper($s['HOSTNAME'])." since".explode(".",$s['PREVTIME'])[0]."</span></div>";
$ocount++;
}else{
$ook .= "<div class='col-2'><span class='badge bg-success'>".strtoupper($s['HOSTNAME']." ")."</span></div>";
}
}
$ook = "<div class='row'>";$oko = "<div class='row'>";$ocount=0;
foreach($other as $s){
if($s['HBTIME'] < date('Y-m-d H:i:s', strtotime(' -11 minutes '))){
$oko .= "<div class='col-6'><span class='badge bg-danger'>".strtoupper($s['HOSTNAME'])." since".explode(".",$s['PREVTIME'])[0]."</span></div>";
$ocount++;
}else{
$ook .= "<div class='col-2'><span class='badge bg-success'>".strtoupper($s['HOSTNAME']." ")."</span></div>";
}
$wok = "<div class='row'>";$wko = "<div class='row'>";$wcount=0;
foreach($windows as $s){
if($s['heartbeat'] < date('Y-m-d H:i:s', strtotime(' -16 minutes '))){
$wko .= "<div class='col-6'><span class='badge bg-danger'>".strtoupper($s['hostname'])." since ".explode(".",$s['heartbeat'])[0]."</span></div>";
$wcount++;
}else{
$wok .= "<div class='col-2'><span class='badge bg-success'>".strtoupper($s['hostname']." ")."</span></div>";
}
}
$wok = "<div class='row'>";$wko = "<div class='row'>";$wcount=0;
foreach($windows as $s){
if($s['heartbeat'] < date('Y-m-d H:i:s', strtotime(' -16 minutes '))){
$wko .= "<div class='col-6'><span class='badge bg-danger'>".strtoupper($s['hostname'])." since ".explode(".",$s['heartbeat'])[0]."</span></div>";
$wcount++;
}else{
$wok .= "<div class='col-2'><span class='badge bg-success'>".strtoupper($s['hostname']." ")."</span></div>";
}
}
?>
?>
<!-- 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" 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%;">HeartBeat Map for servers NOT in maintenance</span></h1>
<!-- 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" 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%;">HeartBeat Map for servers NOT in maintenance</span></h1>
<!-- Main content -->
<div class="container">
<!-- TABLE -->
<div>
<!-- Main content -->
<div class="container">
<!-- TABLE -->
<div>
<div id="accordion">
<?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" data-bs-toggle="collapse" href="#windows"><b><h3>Windows : <?php echo count($windows)." Devices ". $msg; ?></h3></b></a>
<a class="btn text-white fs-3" data-bs-toggle="collapse" href="#windows"><b>Windows : <?php echo count($windows)." Devices ". $msg; ?></b></a>
</h4>
</div>
<div id="windows" class="collapse" data-bs-parent="#accordion">
<?php echo "<br><h5>".$wko.'</div><br><br>'.$wok."</div></h5>"; ?>
</div>
<br>
<br>
<?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" data-bs-toggle="collapse" href="#linux"><b><h3>Linux : <?php echo count($linux)." Devices ". $msg; ?></h3></b></a>
<a class="btn text-white fs-3" data-bs-toggle="collapse" href="#linux"><b>Linux : <?php echo count($linux)." 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" data-bs-toggle="collapse" href="#aix"><b><h3>AIX : <?php echo count($aix)." Devices ". $msg; ?></h3></b></a>
<a class="btn text-white fs-3" data-bs-toggle="collapse" href="#aix"><b>AIX : <?php echo count($aix)." 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" data-bs-toggle="collapse" href="#other"><b><h3>Other : <?php echo count($other)." Devices ". $msg; ?></h3></b></a>
<a class="btn text-white fs-3" data-bs-toggle="collapse" href="#other"><b>Other : <?php echo count($other)." Devices ". $msg; ?></b></a>
</h4>
</div>
<div id="other" class="collapse" data-bs-parent="#accordion">
@@ -148,8 +148,9 @@
</HTML>
<SCRIPT>
let table = $('#t1');
$(document).ready(function() {
$('#t1').DataTable({
table.DataTable({
scrollY: '50vh',
scrollCollapse: true,
paging: false,
@@ -157,18 +158,18 @@
});
$(function () {
var options = $('#t1').bootstrapTable('getOptions');
options.height= document.getElementById('content').clientHeight-170;
$('#t1').bootstrapTable('refreshOptions',options);
});
let options = table.bootstrapTable('getOptions');
options.height= document.getElementById('content').clientHeight-170;
table.bootstrapTable('refreshOptions',options);
});
function tableresize() {
var options = $('#t1').bootstrapTable('getOptions');
options.height= document.getElementById('content').clientHeight-170;
$('#t1').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);
window.addEventListener("resize", tableresize);
</SCRIPT>