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:
@@ -24,82 +24,85 @@
|
||||
<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 top(500) * FROM x_remediation_log order by ts desc");
|
||||
?>
|
||||
<?php include $_SERVER['DOCUMENT_ROOT'] . "/include/all.php"; ?> <!-- Include All -->
|
||||
<?php // DATA
|
||||
$answers = Invoke_infra("SELECT top(500) * FROM x_remediation_log order by ts 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" 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%;">AutoRemediation Logs</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%;">AutoRemediation Logs</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>
|
||||
<!-- 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>
|
||||
<!-- 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='ts' data-sortable='true'>TimeStamp</th>
|
||||
<th data-field='host' data-sortable='true'>Host</th>
|
||||
<th data-field='command' data-sortable='true'>Command</th>
|
||||
</thead>
|
||||
|
||||
<tbody> <!-- Body -->
|
||||
<?php
|
||||
foreach ($answers as $row) {
|
||||
echo '<tr>';
|
||||
echo '<td class="text-nowrap">'.$row['ts'].'</td>';
|
||||
echo '<td>'.$row['hostname'].'</td>';
|
||||
echo '<td><small>'.$row['command'].'</small></td>';
|
||||
echo '</tr>' ;
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
<br>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End of main content -->
|
||||
<!-- 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='ts' data-sortable='true'>TimeStamp</th>
|
||||
<th data-field='host' data-sortable='true'>Host</th>
|
||||
<th data-field='command' data-sortable='true'>Command</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody> <!-- Body -->
|
||||
<?php
|
||||
foreach ($answers as $row) {
|
||||
echo '<tr>';
|
||||
echo '<td class="text-nowrap">'.$row['ts'].'</td>';
|
||||
echo '<td>'.$row['hostname'].'</td>';
|
||||
echo '<td><small>'.$row['command'].'</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() {
|
||||
$('#t1').DataTable({
|
||||
table.DataTable({
|
||||
scrollY: '50vh',
|
||||
scrollCollapse: true,
|
||||
paging: false,
|
||||
@@ -107,22 +110,16 @@
|
||||
});
|
||||
|
||||
$(function () {
|
||||
var options = $('#t1').bootstrapTable('getOptions');
|
||||
let options = table.bootstrapTable('getOptions');
|
||||
options.height= document.getElementById('content').clientHeight-170;
|
||||
$('#t1').bootstrapTable('refreshOptions',options);
|
||||
table.bootstrapTable('refreshOptions',options);
|
||||
});
|
||||
|
||||
function tableresize() {
|
||||
var options = $('#t1').bootstrapTable('getOptions');
|
||||
let options = table.bootstrapTable('getOptions');
|
||||
options.height= document.getElementById('content').clientHeight-170;
|
||||
$('#t1').bootstrapTable('refreshOptions',options);
|
||||
};
|
||||
table.bootstrapTable('refreshOptions',options);
|
||||
}
|
||||
|
||||
window.addEventListener("resize", tableresize);
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
</SCRIPT>
|
||||
@@ -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> <span class='badge bg-danger'>$aixko</span> <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> <span class='badge bg-danger'>$linuxko</span> <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> <span class='badge bg-danger'>$aixko</span> <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> <span class='badge bg-danger'>$linuxko</span> <span class='badge bg-secondary'>$linuxNO</span></div></div> "; ?>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End of main content -->
|
||||
|
||||
92
X/StdOut.php
92
X/StdOut.php
@@ -24,63 +24,63 @@
|
||||
<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 -->
|
||||
<!-- 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%;">Script Execution Follow-up</span></h1>
|
||||
<?php include $_SERVER['DOCUMENT_ROOT'] . "/include/all.php"; ?> <!-- Include All -->
|
||||
<!-- 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%;">Script Execution Follow-up</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 text-center" style="font-size: 1.5rem;">
|
||||
<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>
|
||||
<!-- 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" style="font-size: 1.5rem;">
|
||||
<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>
|
||||
<!-- TABLE -->
|
||||
<div>
|
||||
<?php // DATA
|
||||
$answers = Invoke_infra("SELECT distinct(cmd),max(ts) from x_stdout group by cmd order by max(ts) desc");
|
||||
echo "<div class='row'>";
|
||||
foreach($answers as $cmd){
|
||||
$ts = Invoke_infra("SELECT max(ts) as fin, min(ts) as debut FROM x_stdout where cmd = '".$cmd['cmd']."'");
|
||||
echo "<div class='col-3 mb-3'><a href='StdOut-detail.php?s=".$cmd['cmd']."&AIX=1&linux=1&DUN=1' class='btn btn-primary btn-lg' role='button'>";
|
||||
echo "<b>".$cmd['cmd']."</b><br><small>".$ts[0]['debut']." --> ".$ts[0]['fin']."</small>";
|
||||
echo "</a></div> ";
|
||||
|
||||
}
|
||||
echo "</div>";
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End of main content -->
|
||||
<!-- TABLE -->
|
||||
<div>
|
||||
<?php // DATA
|
||||
$answers = Invoke_infra("SELECT distinct(cmd),max(ts) from x_stdout group by cmd order by max(ts) desc");
|
||||
echo "<div class='row'>";
|
||||
foreach($answers as $cmd){
|
||||
$ts = Invoke_infra("SELECT max(ts) as fin, min(ts) as debut FROM x_stdout where cmd = '".$cmd['cmd']."'");
|
||||
echo "<div class='col-3 mb-3'><a href='StdOut-detail.php?s=".$cmd['cmd']."&AIX=1&linux=1&DUN=1' class='btn btn-primary btn-lg' role='button'>";
|
||||
echo "<b>".$cmd['cmd']."</b><br><small>".$ts[0]['debut']." --> ".$ts[0]['fin']."</small>";
|
||||
echo "</a></div> ";
|
||||
|
||||
}
|
||||
echo "</div>";
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End of main content -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
<script src="/js/switch.js"></script>
|
||||
</HTML>
|
||||
171
X/sva-scu.php
171
X/sva-scu.php
@@ -24,100 +24,103 @@
|
||||
<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");
|
||||
?>
|
||||
<?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" 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 <br><h6>Updated every hour</h6></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%;">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>
|
||||
<!-- 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>
|
||||
<!-- 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='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>
|
||||
</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 -->
|
||||
<!-- 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() {
|
||||
$('#t1').DataTable({
|
||||
table.DataTable({
|
||||
scrollY: '50vh',
|
||||
scrollCollapse: true,
|
||||
paging: false,
|
||||
@@ -125,22 +128,16 @@
|
||||
});
|
||||
|
||||
$(function () {
|
||||
var options = $('#t1').bootstrapTable('getOptions');
|
||||
let options = table.bootstrapTable('getOptions');
|
||||
options.height= document.getElementById('content').clientHeight-170;
|
||||
$('#t1').bootstrapTable('refreshOptions',options);
|
||||
table.bootstrapTable('refreshOptions',options);
|
||||
});
|
||||
|
||||
function tableresize() {
|
||||
var options = $('#t1').bootstrapTable('getOptions');
|
||||
let options = table.bootstrapTable('getOptions');
|
||||
options.height= document.getElementById('content').clientHeight-170;
|
||||
$('#t1').bootstrapTable('refreshOptions',options);
|
||||
};
|
||||
table.bootstrapTable('refreshOptions',options);
|
||||
}
|
||||
|
||||
window.addEventListener("resize", tableresize);
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
</SCRIPT>
|
||||
Reference in New Issue
Block a user