Add new Cluster Resources report page and update navbar links accordingly
This commit is contained in:
119
Inventory/ClusterResource.php
Normal file
119
Inventory/ClusterResource.php
Normal file
@@ -0,0 +1,119 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||||
|
|
||||||
|
<!-- Page Title -->
|
||||||
|
<title>Web Infra Reports IT</title>
|
||||||
|
<link rel="shortcut icon" type="image/png" href="/include/favicon-32x32.png">
|
||||||
|
|
||||||
|
<!-- JQuery -->
|
||||||
|
<script src="/js/jquery-3.6.1.min.js"></script>
|
||||||
|
<!-- Bootstrap -->
|
||||||
|
<link rel="stylesheet" href="/css/bootstrap.min.css">
|
||||||
|
<link rel="stylesheet" href="/css/bootstrap-icons/bootstrap-icons.css">
|
||||||
|
<link rel="stylesheet" href="/css/preloader.css">
|
||||||
|
<script src="/js/bootstrap.bundle.min.js"></script>
|
||||||
|
<!-- Bootstrap-tables -->
|
||||||
|
<link rel="stylesheet" href="/css/bootstrap-table.min.css">
|
||||||
|
<script src="/js/bootstrap-table.min.js"></script>
|
||||||
|
<script src="/js/bootstrap-table-fr-FR.min.js"></script>
|
||||||
|
<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>
|
||||||
|
<style>
|
||||||
|
.cluster-separator td {
|
||||||
|
border-top: 3px solid lightseagreen; /* Bordure épaisse et sombre */
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body class="bg-light text-dark">
|
||||||
|
<?php include $_SERVER['DOCUMENT_ROOT'] . "/include/all.php"; ?> <!-- Include All -->
|
||||||
|
<?php // DATA
|
||||||
|
set_time_limit(300);
|
||||||
|
$Clusters = Invoke_Infra(" select * from cmdb_clusterResources
|
||||||
|
where Name not in('Available Storage')
|
||||||
|
order by Cluster, name");
|
||||||
|
?>
|
||||||
|
|
||||||
|
<!-- 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 vh-100 position-sticky top-0" 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%;">Cluster Resources <small><small>(Hyper-V excluded)</small></small></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">
|
||||||
|
<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>
|
||||||
|
</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 -->
|
||||||
|
<tr>
|
||||||
|
<th data-field="Server" data-sortable="true">Cluster</th>
|
||||||
|
<th data-field="Folder" data-sortable="true">Resource</th>
|
||||||
|
<th data-field="ACL" data-sortable="true">Owner Node</th>
|
||||||
|
<th data-field="AD" data-sortable="true">State</th>
|
||||||
|
<th data-field="Enabled" data-sortable="true">Last Checked</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
|
||||||
|
<tbody> <!-- Body -->
|
||||||
|
<?php
|
||||||
|
$last = "";
|
||||||
|
foreach ($Clusters as $answer) {
|
||||||
|
$current = $answer['Cluster'];
|
||||||
|
if($current != $last) {
|
||||||
|
echo "<tr class='cluster-separator'>";
|
||||||
|
echo "<td class='text-nowrap table-secondary'><b>" . $answer['Cluster'] . "</td>";
|
||||||
|
$last = $current;
|
||||||
|
}else{
|
||||||
|
echo "<tr><td></td>";
|
||||||
|
}
|
||||||
|
echo "<td>".$answer['Name']."</td>";
|
||||||
|
echo "<td>".$answer['Owner']."</td>";
|
||||||
|
echo "<td>".$answer['State']."</td>";
|
||||||
|
echo "<td>".$answer['ts']."</td>";
|
||||||
|
echo "</tr>";
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<br>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- End of main content -->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
<script src="/js/switch.js"></script>
|
||||||
|
</HTML>
|
||||||
@@ -1,6 +1,4 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
|
||||||
// CONSTANTS //
|
// CONSTANTS //
|
||||||
$BaseUrl = "http://".$_SERVER['SERVER_NAME'];
|
$BaseUrl = "http://".$_SERVER['SERVER_NAME'];
|
||||||
$root = $_SERVER['DOCUMENT_ROOT'];
|
$root = $_SERVER['DOCUMENT_ROOT'];
|
||||||
@@ -212,9 +210,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//DB Conn//
|
//DB Conn//
|
||||||
function DB_SCCM(){
|
function DB_SCCM(){
|
||||||
$user = "infra";
|
$user = "infra";
|
||||||
|
|||||||
13
navbar.html
13
navbar.html
@@ -33,8 +33,8 @@
|
|||||||
<i class="fs-6 bi bi-folder-symlink-fill text-white"></i> <span class="ms-1 d-none d-sm-inline text-white h7">Shared Folders</span><i class="bi bi-caret-down"></i> </a>
|
<i class="fs-6 bi bi-folder-symlink-fill text-white"></i> <span class="ms-1 d-none d-sm-inline text-white h7">Shared Folders</span><i class="bi bi-caret-down"></i> </a>
|
||||||
<ul class="collapse nav flex-column ms-1" id="SharedFolders" data-bs-parent="#menu">
|
<ul class="collapse nav flex-column ms-1" id="SharedFolders" data-bs-parent="#menu">
|
||||||
<li class="w-100">
|
<li class="w-100">
|
||||||
<a href="/shared-folders/eqp-prj.php" class="nav-link px-0"> <span class="d-none d-sm-inline text-white h7">- PRJ & EQP Folders</span></a>
|
<a href="/Shared-Folders/eqp-prj.php" class="nav-link px-0"> <span class="d-none d-sm-inline text-white h7">- PRJ & EQP Folders</span></a>
|
||||||
<a href="/shared-folders/homedirectories.php" class="nav-link px-0"> <span class="d-none d-sm-inline text-white h7">- HomeDirectories</span></a>
|
<a href="/Shared-Folders/HomeDirectories.php" class="nav-link px-0"> <span class="d-none d-sm-inline text-white h7">- HomeDirectories</span></a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
@@ -110,6 +110,15 @@
|
|||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="#cluster" data-bs-toggle="collapse" class="nav-link px-0 align-middle">
|
||||||
|
<i class="fs-6 bi bi-pc text-white"></i> <span class="ms-1 d-none d-sm-inline text-white h7">Clusters</span><i class="bi bi-caret-down"></i> </a>
|
||||||
|
<ul class="collapse nav flex-column ms-1" id="cluster" data-bs-parent="#menu">
|
||||||
|
<li class="w-100">
|
||||||
|
<a href="/Inventory/clusterresource.php" class="nav-link px-0" target="_blank"> <span class="d-none d-sm-inline text-white h7">- Cluster Ressources</span></a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
<br>
|
<br>
|
||||||
<br>
|
<br>
|
||||||
<li>
|
<li>
|
||||||
|
|||||||
Reference in New Issue
Block a user