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

@@ -68,63 +68,63 @@
<!-- TABLE -->
<div>
<?php // DATA
$aix = $linux = $dun = $azt = $other = "Checked";
$where = " and OS_TYPE IN (";
if (isset($_GET['AIX'])) {
if ($_GET['AIX'] == 1) {
$where .= "'AIX',";
$aix = $linux = $dun = $azt = $other = "Checked";
$where = " and OS_TYPE IN (";
if (isset($_GET['AIX'])) {
if ($_GET['AIX'] == 1) {
$where .= "'AIX',";
} else {
$aix = "Unchecked";
}
} else {
$aix = "Unchecked";
}
} else {
$aix = "Unchecked";
}
if (isset($_GET['linux'])) {
if ($_GET['linux'] == 1) {
$where .= "'LINUX',";
if (isset($_GET['linux'])) {
if ($_GET['linux'] == 1) {
$where .= "'LINUX',";
} else {
$linux = "Unchecked";
}
} else {
$linux = "Unchecked";
}
} else {
$linux = "Unchecked";
}
$where = rtrim($where, ',') . ")";
$site = "";
if (isset($_GET['DUN'])) {
if ($_GET['DUN'] == 1) {
$site .= " or UPPER(HOSTNAME) like 'DUN%' or UPPER(HOSTNAME) like 'DMV%' or UPPER(HOSTNAME) like 'MDK%' or UPPER(HOSTNAME) like 'APPQPC%'";
$where = rtrim($where, ',') . ")";
$site = "";
if (isset($_GET['DUN'])) {
if ($_GET['DUN'] == 1) {
$site .= " or UPPER(HOSTNAME) like 'DUN%' or UPPER(HOSTNAME) like 'DMV%' or UPPER(HOSTNAME) like 'MDK%' or UPPER(HOSTNAME) like 'APPQPC%'";
} else {
$dun = "Unchecked";
}
} else {
$dun = "Unchecked";
}
} else {
$dun = "Unchecked";
}
if (isset($_GET['AZT'])) {
if ($_GET['AZT'] == 1) {
$site .= " or UPPER(HOSTNAME) like 'AZT%'";
if (isset($_GET['AZT'])) {
if ($_GET['AZT'] == 1) {
$site .= " or UPPER(HOSTNAME) like 'AZT%'";
} else {
$azt = "Unchecked";
}
} else {
$azt = "Unchecked";
}
} else {
$azt = "Unchecked";
}
if (isset($_GET['other'])) {
if ($_GET['other'] == 1) {
$site .= " or UPPER(HOSTNAME) like 'BAD%' or UPPER(HOSTNAME) like 'FLO%' or UPPER(HOSTNAME) like 'MON%'";
if (isset($_GET['other'])) {
if ($_GET['other'] == 1) {
$site .= " or UPPER(HOSTNAME) like 'BAD%' or UPPER(HOSTNAME) like 'FLO%' or UPPER(HOSTNAME) like 'MON%'";
} else {
$other = "Unchecked";
}
} else {
$other = "Unchecked";
}
} else {
$other = "Unchecked";
}
$site = " and (" . ltrim($site, ' or') . ") ";
$where .= $site;
$site = " and (" . ltrim($site, ' or') . ") ";
$where .= $site;
$sql = "select hostname, os_type from srvall where decomtime is null and (ucase(filter) not like 'X_%' or filter is null) $where order by hostname";
$hosts = Invoke_aixcmdb($sql);
$sql = "select hostname, os_type from srvall where decomtime is null and (ucase(filter) not like 'X_%' or filter is null) $where order by hostname";
$hosts = Invoke_aixcmdb($sql);
$taix = $aixok = $aixko = $tlinux = $linuxok = $linuxko = 0;
#print_r($hosts);
$taix = $aixok = $aixko = $tlinux = $linuxok = $linuxko = 0;
#print_r($hosts);
?>
<form class="row">
<div class="col border rounded">
@@ -168,72 +168,75 @@
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='host' data-sortable='true'>Host</th>
<th data-field='OS' data-sortable='true'>OS</th>
<th data-field='TimeStamp' data-sortable='true'>TimeStamp</th>
<th data-field='RC' data-sortable='true'>RC</th>
<th data-field='Result' data-sortable='true'>StdOut</th>
<tr>
<th data-field='host' data-sortable='true'>Host</th>
<th data-field='OS' data-sortable='true'>OS</th>
<th data-field='TimeStamp' data-sortable='true'>TimeStamp</th>
<th data-field='RC' data-sortable='true'>RC</th>
<th data-field='Result' data-sortable='true'>StdOut</th>
</tr>
</thead>
<tbody> <!-- Body -->
<?php
foreach ($hosts as $h) {
$host = strtoupper($h['HOSTNAME']);
$os = strtoupper($h['OS_TYPE']);
if (strtoupper($h['OS_TYPE']) == "AIX") {
$taix++;
} else {
$tlinux++;
}
$answer = Invoke_infra("SELECT * FROM x_stdout where cmd ='$script' and host ='$host'");
if (is_array($answer)) {
$rc = $answer[0]['rc'];
$stdout = $answer[0]['stdout'];
$ts = $answer[0]['ts'];
foreach ($hosts as $h) {
$host = strtoupper($h['HOSTNAME']);
$os = strtoupper($h['OS_TYPE']);
if (strtoupper($h['OS_TYPE']) == "AIX") {
if ($rc == 0 && (string)$rc <> "") {
$aixok++;
$taix++;
} else {
$tlinux++;
}
$answer = Invoke_infra("SELECT * FROM x_stdout where cmd ='$script' and host ='$host'");
if (is_array($answer)) {
$rc = $answer[0]['rc'];
$stdout = $answer[0]['stdout'];
$ts = $answer[0]['ts'];
if (strtoupper($h['OS_TYPE']) == "AIX") {
if ($rc == 0 && (string)$rc <> "") {
$aixok++;
} else {
if ((string)$rc <> "") {
$aixko++;
}
}
} else {
if ((string)$rc <> "") {
$aixko++;
if ($rc == 0 && (string)$rc <> "") {
$linuxok++;
} else {
if ((string)$rc <> "") {
$linuxko++;
}
}
}
} else {
if ($rc == 0 && (string)$rc <> "") {
$linuxok++;
$rc = $stdout = $ts = "";
}
echo "<tr><td><b>$host</b></td>";
echo "<td>$os</td>";
echo "<td>" . $ts . "</td>";
if ($rc == 0 && (string)$rc <> "") {
echo "<td class='table-success'>" . $rc . "</td>";
} else {
if ((string)$rc <> "") {
echo "<td class='table-danger'>" . $rc . "</td>";
} else {
if ((string)$rc <> "") {
$linuxko++;
}
echo "<td></td>";
}
}
} else {
$rc = $stdout = $ts = "";
echo "<td>" . $stdout . "</td></tr>";
}
echo "<tr><td><b>$host</b></td>";
echo "<td>$os</td>";
echo "<td>" . $ts . "</td>";
if ($rc == 0 && (string)$rc <> "") {
echo "<td class='table-success'>" . $rc . "</td>";
} else {
if ((string)$rc <> "") {
echo "<td class='table-danger'>" . $rc . "</td>";
} else {
echo "<td></td>";
}
}
echo "<td>" . $stdout . "</td></tr>";
}
?>
</tbody>
<br>
<?php
$aixNO = $taix - $aixok - $aixko;
$linuxNO = $tlinux - $linuxok - $linuxko;
echo "<div class='row'><div class='col text-center h4'><b>$taix AIX : </b>";
echo "<span class='badge bg-success'>$aixok</span>&nbsp;<span class='badge bg-danger'>$aixko</span>&nbsp;<span class='badge bg-secondary'>$aixNO</span></div>";
echo "<div class='col text-center h4'><b>$tlinux Linux : </b>";
echo "<span class='badge bg-success'>$linuxok</span>&nbsp;<span class='badge bg-danger'>$linuxko</span>&nbsp;<span class='badge bg-secondary'>$linuxNO</span></div></div> "; ?>
$aixNO = $taix - $aixok - $aixko;
$linuxNO = $tlinux - $linuxok - $linuxko;
echo "<div class='row'><div class='col text-center h4'><b>$taix AIX : </b>";
echo "<span class='badge bg-success'>$aixok</span>&nbsp;<span class='badge bg-danger'>$aixko</span>&nbsp;<span class='badge bg-secondary'>$aixNO</span></div>";
echo "<div class='col text-center h4'><b>$tlinux Linux : </b>";
echo "<span class='badge bg-success'>$linuxok</span>&nbsp;<span class='badge bg-danger'>$linuxko</span>&nbsp;<span class='badge bg-secondary'>$linuxNO</span></div></div> "; ?>
</div>
</div>
<!-- End of main content -->