Add VIO FC Status monitoring page and enhance server inventory filtering
- Introduced `Storage/VIO.php` for monitoring VIO Fibre Channel status with client balancing checks and table sorting. - Updated `/include/en.php` and `/include/fr.php` to include new translations for ServiceNow and VIO-related navigation elements. - Improved SQL query and filtering logic in `/X/Inventory.php` to exclude VIO entries and add XenSam version data. - Enhanced `/reports/heartbeat.php` with a new mechanism for handling server heartbeat status, allowing better granularity and readability.
This commit is contained in:
@@ -97,6 +97,36 @@
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
function Invoke_Infra_long($request)
|
||||
{
|
||||
error_reporting(E_ALL ^ E_WARNING);
|
||||
$user = "INFRA_dbo";
|
||||
$pwd = decypher("infra");
|
||||
$server = "DUN-PRD-R1MSSQL.armony.net\PRD";
|
||||
$database = "INFRA";
|
||||
$conn = odbc_connect("Driver={ODBC Driver 18 for SQL Server};Server=$server;Database=$database;TrustServerCertificate=yes;", $user, $pwd);
|
||||
if (!($conn)) {
|
||||
echo "Pas de connexion";
|
||||
}
|
||||
$rs = odbc_exec($conn, $request);
|
||||
odbc_longreadlen($rs, 1048576); // 1 Mo, large devant tes 289 Ko max
|
||||
if (str_contains(strtoupper($request), "SELECT")) {
|
||||
while ($row = odbc_fetch_array($rs)) {
|
||||
$answer[] = $row;
|
||||
}
|
||||
}
|
||||
if (isset($answer)) {
|
||||
return $answer;
|
||||
} else {
|
||||
if ($rs) {
|
||||
return "OK";
|
||||
} else {
|
||||
error_reporting(E_ALL);
|
||||
return "ERROR : " . odbc_errormsg($conn);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
function Invoke_WebSelfInfra($request)
|
||||
{
|
||||
@@ -222,6 +252,64 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
function Invoke_Arrets($request)
|
||||
{
|
||||
error_reporting(E_ALL ^ E_WARNING);
|
||||
$user = "kpiamf_arrets_view";
|
||||
$pwd = decypher("arrets");
|
||||
$server = "SQL_DW_PRD_KPIAMF.appliarmony.net";
|
||||
$database = "KPIAMF";
|
||||
$conn = odbc_connect("Driver={SQL Server};Server=$server;Database=$database;", $user, $pwd);
|
||||
if (!($conn)) {
|
||||
echo "Pas de connexion";
|
||||
}
|
||||
$rs = odbc_exec($conn, $request);
|
||||
if (str_contains(strtoupper($request), "SELECT")) {
|
||||
while ($row = odbc_fetch_array($rs)) {
|
||||
$answer[] = $row;
|
||||
}
|
||||
}
|
||||
if (isset($answer)) {
|
||||
return $answer;
|
||||
} else {
|
||||
if ($rs) {
|
||||
return "OK";
|
||||
} else {
|
||||
error_reporting(E_ALL);
|
||||
return "ERROR : " . odbc_errormsg($conn);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
function Invoke_RH($request)
|
||||
{
|
||||
error_reporting(E_ALL ^ E_WARNING);
|
||||
$user = "hrdata_mgr_view";
|
||||
$pwd = decypher("rh");
|
||||
$server = "SQL_DW_PRD_HRDATA.appliarmony.net";
|
||||
$database = "HRDATA";
|
||||
$conn = odbc_connect("Driver={SQL Server};Server=$server;Database=$database;", $user, $pwd);
|
||||
if (!($conn)) {
|
||||
echo "Pas de connexion";
|
||||
}
|
||||
$rs = odbc_exec($conn, $request);
|
||||
if (str_contains(strtoupper($request), "SELECT")) {
|
||||
while ($row = odbc_fetch_array($rs)) {
|
||||
$answer[] = $row;
|
||||
}
|
||||
}
|
||||
if (isset($answer)) {
|
||||
return $answer;
|
||||
} else {
|
||||
if ($rs) {
|
||||
return "OK";
|
||||
} else {
|
||||
error_reporting(E_ALL);
|
||||
return "ERROR : " . odbc_errormsg($conn);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//DB Conn//
|
||||
function DB_SCCM(){
|
||||
@@ -406,9 +494,9 @@
|
||||
}
|
||||
</style>
|
||||
|
||||
<!-- // SNOWFLAKES -->
|
||||
<canvas id="snow-canvas"></canvas>
|
||||
<button id="snow-toggle-btn" title="Activer/Désactiver la neige">❄️</button>
|
||||
|
||||
<script>
|
||||
(function() {
|
||||
// --- 1. GESTION DES DATES (15 Déc au 5 Jan) ---
|
||||
|
||||
@@ -41,6 +41,9 @@
|
||||
$nav_10_1 = "Servers";
|
||||
$nav_10_2 = "Workstations";
|
||||
|
||||
$nav_11 = "On Call";
|
||||
$nav_11_1 = "ServiceNow P1 & P2";
|
||||
|
||||
$nav_links = "Links";
|
||||
$nav_search = "Server Search...";
|
||||
|
||||
@@ -64,6 +67,7 @@
|
||||
$ti_17 = "HeartBeat Map for servers NOT in maintenance";
|
||||
$ti_18 = "Cluster Resources";
|
||||
$ti_19 = "Virtual Machines";
|
||||
$ti_20 = "Service-Now P1 & P2 Incidents. In progress, opened in the 72 last hours";
|
||||
|
||||
// words
|
||||
$w_server = "Server";
|
||||
@@ -157,3 +161,7 @@
|
||||
$w_unclusteredVMs = "Unclustered VM(s)";
|
||||
$w_vmCpuChecked = "VM(s) With 'CPU Compatibility' checked";
|
||||
$w_vmDynamicVHD = "VM(s) with dynamic VHD";
|
||||
$w_group = "Group";
|
||||
$w_assigned = "Assigned to";
|
||||
$w_opened = "Opened on";
|
||||
$w_incFound = "Tickets found";
|
||||
|
||||
@@ -40,6 +40,9 @@
|
||||
$nav_10_1 = "Serveurs";
|
||||
$nav_10_2 = "Postes de Travail";
|
||||
|
||||
$nav_11 = "Astreinte";
|
||||
$nav_11_1 = "P1 et P2 ServiceNow";
|
||||
|
||||
$nav_links = "Liens";
|
||||
$nav_search = "Recherche Serveur...";
|
||||
|
||||
@@ -63,6 +66,7 @@
|
||||
$ti_17 = "Carte des signes de présence pour les Serveurs qui ne sont pas en maintenance";
|
||||
$ti_18 = "Ressources des Grappes de Serveurs";
|
||||
$ti_19 = "Machines Virtuelles";
|
||||
$ti_20 = "Incidents Service-Now P1 & P2. En cours, ouverts depuis moins de 72h";
|
||||
|
||||
// words
|
||||
$w_server = "Serveur";
|
||||
@@ -156,3 +160,7 @@
|
||||
$w_unclusteredVMs = "MV(s) non en ressource";
|
||||
$w_vmCpuChecked = "MV(s) avec 'Compatibilité CPU' coché";
|
||||
$w_vmDynamicVHD = "MV(s) avec VHD dynamique";
|
||||
$w_group = "Groupe";
|
||||
$w_assigned = "Assigné à";
|
||||
$w_opened = "Ouvert le";
|
||||
$w_incFound = "Incidents ouverts";
|
||||
|
||||
Reference in New Issue
Block a user