Refactor configuration files and clean up project structure
Removed unused datasource definitions and redundant module references. Added default settings for code styles and inspection profiles. Adjusted indentation and formatting in HTML and PHP files for better readability and maintainability.
This commit is contained in:
5
.idea/codeStyles/codeStyleConfig.xml
generated
Normal file
5
.idea/codeStyles/codeStyleConfig.xml
generated
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
<component name="ProjectCodeStyleConfiguration">
|
||||||
|
<state>
|
||||||
|
<option name="PREFERRED_PROJECT_CODE_STYLE" value="Default" />
|
||||||
|
</state>
|
||||||
|
</component>
|
||||||
19
.idea/dataSources.xml
generated
19
.idea/dataSources.xml
generated
@@ -1,19 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="DataSourceManagerImpl" format="xml" multifile-model="true">
|
|
||||||
<data-source source="LOCAL" name="GLPI" uuid="06d48534-f219-40f0-abc2-525fb3fb7abb">
|
|
||||||
<driver-ref>mysql.8</driver-ref>
|
|
||||||
<synchronize>true</synchronize>
|
|
||||||
<jdbc-driver>com.mysql.cj.jdbc.Driver</jdbc-driver>
|
|
||||||
<jdbc-url>jdbc:mysql://mys_glpi_prod.appliarmony.net:3306/GLPI</jdbc-url>
|
|
||||||
<working-dir>$ProjectFileDir$</working-dir>
|
|
||||||
</data-source>
|
|
||||||
<data-source source="LOCAL" name="DUN-SUP-ENTRY01" uuid="bfae45b5-d30f-4d9a-89b9-397d849a56ba">
|
|
||||||
<driver-ref>mysql.8</driver-ref>
|
|
||||||
<synchronize>true</synchronize>
|
|
||||||
<jdbc-driver>com.mysql.cj.jdbc.Driver</jdbc-driver>
|
|
||||||
<jdbc-url>jdbc:mysql://DUN-SUP-ENTRY01:3306/infra</jdbc-url>
|
|
||||||
<working-dir>$ProjectFileDir$</working-dir>
|
|
||||||
</data-source>
|
|
||||||
</component>
|
|
||||||
</project>
|
|
||||||
7
.idea/inspectionProfiles/profiles_settings.xml
generated
Normal file
7
.idea/inspectionProfiles/profiles_settings.xml
generated
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
<component name="InspectionProjectProfileManager">
|
||||||
|
<settings>
|
||||||
|
<option name="PROJECT_PROFILE" value="Default" />
|
||||||
|
<option name="USE_PROJECT_PROFILE" value="false" />
|
||||||
|
<version value="1.0" />
|
||||||
|
</settings>
|
||||||
|
</component>
|
||||||
4
.idea/modules.xml
generated
4
.idea/modules.xml
generated
@@ -2,11 +2,7 @@
|
|||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="ProjectModuleManager">
|
<component name="ProjectModuleManager">
|
||||||
<modules>
|
<modules>
|
||||||
<module fileurl="file://$PROJECT_DIR$/../Infra-Tools/.idea/Infra-Tools.iml" filepath="$PROJECT_DIR$/../Infra-Tools/.idea/Infra-Tools.iml" />
|
|
||||||
<module fileurl="file://$PROJECT_DIR$/../web-infra-diy/.idea/web-infra-diy.iml" filepath="$PROJECT_DIR$/../web-infra-diy/.idea/web-infra-diy.iml" />
|
|
||||||
<module fileurl="file://$PROJECT_DIR$/.idea/web-infra-reports.iml" filepath="$PROJECT_DIR$/.idea/web-infra-reports.iml" />
|
<module fileurl="file://$PROJECT_DIR$/.idea/web-infra-reports.iml" filepath="$PROJECT_DIR$/.idea/web-infra-reports.iml" />
|
||||||
<module fileurl="file://$PROJECT_DIR$/../web-pingcastle/.idea/web-pingcastle.iml" filepath="$PROJECT_DIR$/../web-pingcastle/.idea/web-pingcastle.iml" />
|
|
||||||
<module fileurl="file://$PROJECT_DIR$/../web-wintel/.idea/web-wintel.iml" filepath="$PROJECT_DIR$/../web-wintel/.idea/web-wintel.iml" />
|
|
||||||
</modules>
|
</modules>
|
||||||
</component>
|
</component>
|
||||||
</project>
|
</project>
|
||||||
3
.idea/php.xml
generated
3
.idea/php.xml
generated
@@ -10,6 +10,9 @@
|
|||||||
<option name="highlightLevel" value="WARNING" />
|
<option name="highlightLevel" value="WARNING" />
|
||||||
<option name="transferred" value="true" />
|
<option name="transferred" value="true" />
|
||||||
</component>
|
</component>
|
||||||
|
<component name="PhpProjectSharedConfiguration" php_language_level="7.0">
|
||||||
|
<option name="suggestChangeDefaultLanguageLevel" value="false" />
|
||||||
|
</component>
|
||||||
<component name="PhpStanOptionsConfiguration">
|
<component name="PhpStanOptionsConfiguration">
|
||||||
<option name="transferred" value="true" />
|
<option name="transferred" value="true" />
|
||||||
</component>
|
</component>
|
||||||
|
|||||||
6
.idea/sqldialects.xml
generated
Normal file
6
.idea/sqldialects.xml
generated
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="SqlDialectMappings">
|
||||||
|
<file url="file://$PROJECT_DIR$/crossover/GlobalCrossover2.php" dialect="GenericSQL" />
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
2
.idea/vcs.xml
generated
2
.idea/vcs.xml
generated
@@ -2,8 +2,6 @@
|
|||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="VcsDirectoryMappings">
|
<component name="VcsDirectoryMappings">
|
||||||
<mapping directory="" vcs="Git" />
|
<mapping directory="" vcs="Git" />
|
||||||
<mapping directory="$PROJECT_DIR$/../Infra-Tools" vcs="Git" />
|
|
||||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||||
<mapping directory="$PROJECT_DIR$/../web-wintel" vcs="Git" />
|
|
||||||
</component>
|
</component>
|
||||||
</project>
|
</project>
|
||||||
8
.idea/web-infra-reports.iml
generated
8
.idea/web-infra-reports.iml
generated
@@ -1,12 +1,10 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<module type="WEB_MODULE" version="4">
|
<module type="WEB_MODULE" version="4">
|
||||||
<component name="NewModuleRootManager">
|
<component name="NewModuleRootManager">
|
||||||
<content url="file://$MODULE_DIR$" />
|
<content url="file://$MODULE_DIR$">
|
||||||
|
<sourceFolder url="file://$MODULE_DIR$" isTestSource="false" />
|
||||||
|
</content>
|
||||||
<orderEntry type="inheritedJdk" />
|
<orderEntry type="inheritedJdk" />
|
||||||
<orderEntry type="sourceFolder" forTests="false" />
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
<orderEntry type="module" module-name="web-pingcastle" />
|
|
||||||
<orderEntry type="module" module-name="Infra-Tools" />
|
|
||||||
<orderEntry type="module" module-name="web-wintel" />
|
|
||||||
<orderEntry type="module" module-name="web-infra-diy" />
|
|
||||||
</component>
|
</component>
|
||||||
</module>
|
</module>
|
||||||
@@ -28,416 +28,421 @@
|
|||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body class="bg-light text-dark">
|
<body class="bg-light text-dark">
|
||||||
<?php include $_SERVER['DOCUMENT_ROOT'] . "/include/preloader.inc.html"; ?> <!-- Preloader -->
|
<?php include $_SERVER['DOCUMENT_ROOT'] . "/include/preloader.inc.html"; ?> <!-- Preloader -->
|
||||||
<?php include $_SERVER['DOCUMENT_ROOT'] . "/include/db_connect.php"; ?> <!-- Database connexion -->
|
<?php include $_SERVER['DOCUMENT_ROOT'] . "/include/db_connect.php"; ?> <!-- Database connexion -->
|
||||||
<?php //include $_SERVER['DOCUMENT_ROOT']."/include/functions.inc.php" ; ?> <!-- Functions -->
|
<?php //include $_SERVER['DOCUMENT_ROOT']."/include/functions.inc.php" ; ?> <!-- Functions -->
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<div class="row flex-nowrap">
|
<div class="row flex-nowrap">
|
||||||
<!-- Left NAVBAR -->
|
<!-- 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;">
|
<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"; ?> <!-- Left Navbar -->
|
<?php include $_SERVER['DOCUMENT_ROOT'] . "/navbar.html"; ?> <!-- Left Navbar -->
|
||||||
</div>
|
</div>
|
||||||
<!-- Display -->
|
<!-- Display -->
|
||||||
<div class="col py-3">
|
<div class="col py-3">
|
||||||
<!-- Page Title -->
|
<!-- Page Title -->
|
||||||
<h1><span class="badge text-bg-secondary font-weight-bold" style="width:100%;">Global Crossover</span></h1>
|
<h1><span class="badge text-bg-secondary font-weight-bold" style="width:100%;">Global Crossover</span></h1>
|
||||||
|
|
||||||
<!-- Main content -->
|
<!-- Main content -->
|
||||||
<div class="row" style="zoom: 80%">
|
<div class="row" style="zoom: 80%">
|
||||||
<!-- Get DATAs -->
|
<!-- Get DATAs -->
|
||||||
|
<?php
|
||||||
|
DB_ENTRY02();
|
||||||
|
$result = $conn->query("select * from GlobalCrossover where server not like 'WS%' order by server ");
|
||||||
|
if (isset($_GET['filter'])) {
|
||||||
|
switch ($_GET['filter']) {
|
||||||
|
case "AD":
|
||||||
|
$result = $conn->query("select * from GlobalCrossover where AD is null or (ADlu is not null and DATEDIFF(now(),ADlu) > 45) order by server");
|
||||||
|
echo "<h2><center><span class='badge text-bg-danger font-weight-bold'>Filter : AD non compliant</span></center></h2>";
|
||||||
|
break;
|
||||||
|
case "OS":
|
||||||
|
$result = $conn->query("select * from GlobalCrossover where OS like '%2003%' or OS like '%2008%' order by server");
|
||||||
|
echo "<h2><center><span class='badge text-bg-danger font-weight-bold'>Filter : OS non compliant</span></center></h2>";
|
||||||
|
break;
|
||||||
|
case "GLPI":
|
||||||
|
$result = $conn->query("select * from GlobalCrossover where GLPI is null or GLPIlu is null or DATEDIFF(now(),GLPIlu) > 7 order by server");
|
||||||
|
echo "<h2><center><span class='badge text-bg-danger font-weight-bold'>Filter : GLPI/FI non compliant</span></center></h2>";
|
||||||
|
break;
|
||||||
|
case "SCCM":
|
||||||
|
$result = $conn->query("select * from GlobalCrossover where SCCM is null or (SCCMlu is not null and DATEDIFF(now(),SCCMlu) > 7) order by server");
|
||||||
|
echo "<h2><center><span class='badge text-bg-danger font-weight-bold'>Filter : SCCM non compliant</span></center></h2>";
|
||||||
|
break;
|
||||||
|
case "EPO":
|
||||||
|
$result = $conn->query("select * from GlobalCrossover where EPO is null or (EPOlu is not null and DATEDIFF(now(),EPOlu) > 7) order by server");
|
||||||
|
echo "<h2><center><span class='badge text-bg-danger font-weight-bold'>Filter : EPO non compliant</span></center></h2>";
|
||||||
|
break;
|
||||||
|
case "NBU":
|
||||||
|
$result = $conn->query("select * from GlobalCrossover where NBU is null or (NBUlu is not null and DATEDIFF(now(),NBUlu) > 30) order by server");
|
||||||
|
echo "<h2><center><span class='badge text-bg-danger font-weight-bold'>Filter : Backup non compliant</span></center></h2>";
|
||||||
|
break;
|
||||||
|
case "SCOM":
|
||||||
|
$result = $conn->query("select * from GlobalCrossover where SCOM is null order by server");
|
||||||
|
echo "<h2><center><span class='badge text-bg-danger font-weight-bold'>Filter : SCOM non compliant</span></center></h2>";
|
||||||
|
break;
|
||||||
|
case "zabbix":
|
||||||
|
$result = $conn->query("select * from GlobalCrossover where zabbix is null order by server");
|
||||||
|
echo "<h2><center><span class='badge text-bg-danger font-weight-bold'>Filter : Zabbix non compliant</span></center></h2>";
|
||||||
|
break;
|
||||||
|
case "S1":
|
||||||
|
$result = $conn->query("select * from GlobalCrossover where S1 is null or (S1lu is not null and DATEDIFF(now(),S1lu) > 7) order by server");
|
||||||
|
echo "<h2><center><span class='badge text-bg-danger font-weight-bold'>Filter : SentinelOne non compliant</span></center></h2>";
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<table class='table table-bordered table-hover table-sm' id='t1' data-toggle="table" data-search="true"
|
||||||
|
data-show-columns="true" data-pagination="true" data-export-types="['xlsx','csv','json']"
|
||||||
|
data-loading-template="loadingTemplate" data-page-list="[20, 50, 100, All]" data-page-size="Tout"
|
||||||
|
data-height="620" data-show-export="true" data-sortable="true">
|
||||||
|
<thead>
|
||||||
|
<th data-field="Name" data-sortable="true">Name</th>
|
||||||
|
<th data-field="OS" data-sortable="true">Operating System</th>
|
||||||
|
<th data-field="Criticity" data-sortable="true">Criticity</th>
|
||||||
|
<th data-field="Departement" data-sortable="true" data-visible="false">Departement</th>
|
||||||
|
<th data-field="AD" data-sortable="true">AD</th>
|
||||||
|
<th data-field="ADlu" data-sortable="true" data-visible="false">AD Last Logon</th>
|
||||||
|
<th data-field="GLPI" data-sortable="true">GLPI</th>
|
||||||
|
<th data-field="GLPIlu" data-sortable="true" data-visible="false" data-footer-formatter="FI">Last FI
|
||||||
|
Inventory
|
||||||
|
</th>
|
||||||
|
<th data-field="SCCM" data-sortable="true">SCCM<br></th>
|
||||||
|
<th data-field="SCCMlu" data-sortable="true" data-visible="false">SCCM Last Heartbeat</th>
|
||||||
|
<th data-field="Backup" data-sortable="true">Backup</th>
|
||||||
|
<th data-field="NBUlu" data-sortable="true" data-visible="false">Last Backup</th>
|
||||||
|
<th data-field="SCOM" data-sortable="true">SCOM</th>
|
||||||
|
<th data-field="Zabbix" data-sortable="true">Zabbix</th>
|
||||||
|
<th data-field="S1" data-sortable="true">SentinelOne</th>
|
||||||
|
<th data-field="S1lu" data-sortable="true" data-visible="false">S1 Last Update</th>
|
||||||
|
</thead>
|
||||||
|
|
||||||
|
<tbody>
|
||||||
|
<!-- Display DATAs -->
|
||||||
<?php
|
<?php
|
||||||
DB_ENTRY02();
|
|
||||||
$result = $conn->query("select * from GlobalCrossover where server not like 'WS%' order by server ");
|
$ok = 0;
|
||||||
if (isset($_GET['filter'])) {
|
$total = 0;
|
||||||
switch ($_GET['filter']) {
|
$nOS = 0;
|
||||||
case "AD":
|
$nAD = 0;
|
||||||
$result = $conn->query("select * from GlobalCrossover where AD is null or (ADlu is not null and DATEDIFF(now(),ADlu) > 45) order by server");
|
$nSCCM = 0;
|
||||||
echo "<h2><center><span class='badge text-bg-danger font-weight-bold'>Filter : AD non compliant</span></center></h2>";
|
$nGLPI = 0;
|
||||||
break;
|
$nFI = 0;
|
||||||
case "OS":
|
$nNBU = 0;
|
||||||
$result = $conn->query("select * from GlobalCrossover where OS like '%2003%' or OS like '%2008%' order by server");
|
$nDPM = 0;
|
||||||
echo "<h2><center><span class='badge text-bg-danger font-weight-bold'>Filter : OS non compliant</span></center></h2>";
|
$nS1 = 0;
|
||||||
break;
|
while ($row = mysqli_fetch_array($result)) {
|
||||||
case "GLPI":
|
$total++;
|
||||||
$result = $conn->query("select * from GlobalCrossover where GLPI is null or GLPIlu is null or DATEDIFF(now(),GLPIlu) > 7 order by server");
|
echo "<tr>";
|
||||||
echo "<h2><center><span class='badge text-bg-danger font-weight-bold'>Filter : GLPI/FI non compliant</span></center></h2>";
|
if (isset($row['AD']) && isset($row['GLPI']) && isset($row['SCCM']) && isset($row['EPO']) && (isset($row['NBU']) || isset($row['DPM'])) && isset($row['SCOM'])) {
|
||||||
break;
|
echo "<td class='bg-success text-white'><b><a href='\crossover\Detail.php?server=" . $row['Server'] . "' target='_blank' class='link-light'>" . $row['Server'] . "</a></b></td>";
|
||||||
case "SCCM":
|
//echo "<td class='bg-success text-white'><b>".$row['Server']."</b></td>";
|
||||||
$result = $conn->query("select * from GlobalCrossover where SCCM is null or (SCCMlu is not null and DATEDIFF(now(),SCCMlu) > 7) order by server");
|
$ok++;
|
||||||
echo "<h2><center><span class='badge text-bg-danger font-weight-bold'>Filter : SCCM non compliant</span></center></h2>";
|
} else {
|
||||||
break;
|
echo "<td><b><a href='\crossover\Detail.php?server=" . $row['Server'] . "' target='_blank'>" . $row['Server'] . "</a></b></td>";
|
||||||
case "EPO":
|
//echo "<td><b>".$row['Server']."</b></td>";
|
||||||
$result = $conn->query("select * from GlobalCrossover where EPO is null or (EPOlu is not null and DATEDIFF(now(),EPOlu) > 7) order by server");
|
|
||||||
echo "<h2><center><span class='badge text-bg-danger font-weight-bold'>Filter : EPO non compliant</span></center></h2>";
|
|
||||||
break;
|
|
||||||
case "NBU":
|
|
||||||
$result = $conn->query("select * from GlobalCrossover where NBU is null or (NBUlu is not null and DATEDIFF(now(),NBUlu) > 30) order by server");
|
|
||||||
echo "<h2><center><span class='badge text-bg-danger font-weight-bold'>Filter : Backup non compliant</span></center></h2>";
|
|
||||||
break;
|
|
||||||
case "SCOM":
|
|
||||||
$result = $conn->query("select * from GlobalCrossover where SCOM is null order by server");
|
|
||||||
echo "<h2><center><span class='badge text-bg-danger font-weight-bold'>Filter : SCOM non compliant</span></center></h2>";
|
|
||||||
break;
|
|
||||||
case "zabbix":
|
|
||||||
$result = $conn->query("select * from GlobalCrossover where zabbix is null order by server");
|
|
||||||
echo "<h2><center><span class='badge text-bg-danger font-weight-bold'>Filter : Zabbix non compliant</span></center></h2>";
|
|
||||||
break;
|
|
||||||
case "S1":
|
|
||||||
$result = $conn->query("select * from GlobalCrossover where S1 is null or (S1lu is not null and DATEDIFF(now(),S1lu) > 7) order by server");
|
|
||||||
echo "<h2><center><span class='badge text-bg-danger font-weight-bold'>Filter : SentinelOne non compliant</span></center></h2>";
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
}
|
}
|
||||||
|
if ($row['OS']) {
|
||||||
|
if (preg_match('(XP|2003|Windows NT|2000|2008|Windows 7|2012)', $row['OS']) !== 1) {
|
||||||
|
$nOS++;
|
||||||
|
echo "<td>" . $row['OS'] . "</td>";
|
||||||
|
} else {
|
||||||
|
echo "<td class='bg-warning'>" . $row['OS'] . "</td>";
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
echo "<td class='bg-warning'> </td>";
|
||||||
|
}
|
||||||
|
echo "<td>" . $row['crit'] . "</td>";
|
||||||
|
echo "<td>" . $row['dpt'] . "</td>";
|
||||||
|
|
||||||
|
// AD
|
||||||
|
if ($row['AD'] == 'Y') {
|
||||||
|
$date1 = date_create($row['ADlu']);
|
||||||
|
$diff = date_diff($date1, date_create(date("Y-m-d")));
|
||||||
|
if ($diff->format("%R%a") > 45) {
|
||||||
|
echo "<td class='text-white' style='background: linear-gradient(90deg, rgba(25,135,84,1) 50%, rgba(220,53,69,1) 100%);'>OK</td>";
|
||||||
|
echo "<td class='bg-danger text-white'>" . $row['ADlu'] . " (" . $diff->format("%R%a") . " days)</td>";
|
||||||
|
} else {
|
||||||
|
$nAD++;
|
||||||
|
echo "<td class='bg-success text-white'>OK</td>";
|
||||||
|
echo "<td class='bg-success text-white'>" . $row['ADlu'] . "</td>";
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
|
||||||
|
if (isset($row['AD'])) {
|
||||||
|
$nAD++;
|
||||||
|
echo "<td class='bg-secondary'><small>" . $row['AD'] . "</small></td>";
|
||||||
|
echo "<td class='bg-secondary text-secondary'> </td>";
|
||||||
|
$nSCCM++;
|
||||||
|
} else {
|
||||||
|
echo "<td class='bg-warning text-warning'>Missing</td>";
|
||||||
|
echo "<td class='bg-warning text-warning'> </td>";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// GLPI
|
||||||
|
if ($row['GLPI'] == 'Y') {
|
||||||
|
$date1 = date_create($row['GLPIlu']);
|
||||||
|
$diff = date_diff($date1, date_create(date("Y-m-d")));
|
||||||
|
if ($diff->format("%R%a") > 7) {
|
||||||
|
echo "<td class='text-white' style='background: linear-gradient(90deg, rgba(25,135,84,1) 50%, rgba(220,53,69,1) 100%);'>OK</td>";
|
||||||
|
echo "<td class='bg-danger text-white'>" . $row['GLPIlu'] . " (" . $diff->format("%R%a") . " days)</td>";
|
||||||
|
} else {
|
||||||
|
if ($row['GLPIlu'] <> "" || $row['FI'] <> "") {
|
||||||
|
echo "<td class='bg-success text-white'>OK</td>";
|
||||||
|
$nFI++;
|
||||||
|
echo "<td class='bg-success text-white'>" . $row['GLPIlu'] . "</td>";
|
||||||
|
} else {
|
||||||
|
echo "<td class='text-white' style='background: linear-gradient(90deg, rgba(25,135,84,1) 50%, rgba(255,193,7,1) 100%);'>OK</td>";
|
||||||
|
echo "<td class='bg-warning text-warning'>Missing</td>";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$nGLPI++;
|
||||||
|
} else {
|
||||||
|
if (isset($row['GLPI'])) {
|
||||||
|
echo "<td class='bg-secondary'><small>" . $row['GLPI'] . "</small></td>";
|
||||||
|
echo "<td class='bg-secondary text-secondary'> </td>";
|
||||||
|
$nGLPI++;
|
||||||
|
} else {
|
||||||
|
echo "<td class='bg-warning text-warning'>Missing</td>";
|
||||||
|
echo "<td class='bg-warning text-warning'> </td>";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// SCCM
|
||||||
|
if ($row['SCCM'] == 'Y') {
|
||||||
|
$date1 = date_create($row['SCCMlu']);
|
||||||
|
$diff = date_diff($date1, date_create(date("Y-m-d")));
|
||||||
|
if ($diff->format("%R%a") > 7) {
|
||||||
|
echo "<td class='text-white' style='background: linear-gradient(90deg, rgba(25,135,84,1) 50%, rgba(220,53,69,1) 100%);'>OK</td>";
|
||||||
|
echo "<td class='bg-danger text-white'>" . $row['SCCMlu'] . " (" . $diff->format("%R%a") . " days)</td>";
|
||||||
|
} else {
|
||||||
|
echo "<td class='bg-success text-white'>OK</td>";
|
||||||
|
echo "<td class='bg-success text-white'>" . $row['SCCMlu'] . "</td>";
|
||||||
|
$nSCCM++;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (isset($row['SCCM'])) {
|
||||||
|
echo "<td class='bg-secondary'><small>" . $row['SCCM'] . "</small></td>";
|
||||||
|
echo "<td class='bg-secondary text-secondary'> </td>";
|
||||||
|
$nSCCM++;
|
||||||
|
} else {
|
||||||
|
echo "<td class='bg-warning text-warning'>Missing</td>";
|
||||||
|
echo "<td class='bg-warning text-warning'> </td>";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// BACKUP
|
||||||
|
if ($row['NBU'] == 'Y') {
|
||||||
|
$date1 = date_create($row['NBUlu']);
|
||||||
|
$diff = date_diff($date1, date_create(date("Y-m-d")));
|
||||||
|
if ($diff->format("%R%a") > 30) {
|
||||||
|
echo "<td class='text-white' style='background: linear-gradient(90deg, rgba(25,135,84,1) 50%, rgba(220,53,69,1) 100%);'>OK (NBU)</td>";
|
||||||
|
echo "<td class='bg-danger text-white'>" . $row['NBUlu'] . " (" . $diff->format("%R%a") . " days)</td>";
|
||||||
|
} else {
|
||||||
|
echo "<td class='bg-success text-white'>OK (NBU)</td>";
|
||||||
|
echo "<td class='bg-success text-white'>" . $row['NBUlu'] . "</td>";
|
||||||
|
$nNBU++;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if ($row['DPM'] == 'Y') {
|
||||||
|
$date1 = date_create($row['DPMlu']);
|
||||||
|
$diff = date_diff($date1, date_create(date("Y-m-d")));
|
||||||
|
if ($diff->format("%R%a") > 30) {
|
||||||
|
echo "<td class='text-white' style='background: linear-gradient(90deg, rgba(25,135,84,1) 50%, rgba(220,53,69,1) 100%);'>OK (DPM)</td>";
|
||||||
|
echo "<td class='bg-danger text-white'>" . $row['DPMlu'] . " (" . $diff->format("%R%a") . " days)</td>";
|
||||||
|
} else {
|
||||||
|
echo "<td class='bg-success text-white'>OK (DPM)</td>";
|
||||||
|
echo "<td class='bg-success text-white'>" . $row['DPMlu'] . "</td>";
|
||||||
|
$nDPM++;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (isset($row['NBU'])) {
|
||||||
|
echo "<td class='bg-secondary'><small>" . $row['NBU'] . "</small></td>";
|
||||||
|
echo "<td class='bg-secondary text-secondary'> </td>";
|
||||||
|
} else {
|
||||||
|
if (isset($row['DPM'])) {
|
||||||
|
echo "<td class='bg-secondary'><small>" . $row['DPM'] . "</small></td>";
|
||||||
|
echo "<td class='bg-secondary text-secondary'> </td>";
|
||||||
|
}
|
||||||
|
echo "<td class='bg-warning text-warning'>Missing</td>";
|
||||||
|
echo "<td class='bg-warning text-warning'> </td>";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// SCOM
|
||||||
|
if ($row['SCOM'] == 'Y') {
|
||||||
|
echo "<td class='bg-success text-white'>OK</td>";
|
||||||
|
} else {
|
||||||
|
if (isset($row['SCOM'])) {
|
||||||
|
echo "<td class='bg-secondary'><small>" . $row['SCOM'] . "</small></td>";
|
||||||
|
} else {
|
||||||
|
echo "<td class='bg-warning text-warning'>Missing</td>";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// zabbix
|
||||||
|
if ($row['zabbix'] == 'Y' || strpos($row['zabbix'], '.') !== false) {
|
||||||
|
echo "<td class='bg-success text-white'>" . str_replace('Y', 'OK', $row['zabbix']) . "</td>";
|
||||||
|
} else {
|
||||||
|
if (isset($row['zabbix'])) {
|
||||||
|
echo "<td class='bg-secondary'><small>" . $row['zabbix'] . "</small></td>";
|
||||||
|
} else {
|
||||||
|
echo "<td class='bg-warning text-warning'>Missing</td>";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// S1
|
||||||
|
if ($row['S1'] == 'Y') {
|
||||||
|
$date1 = date_create($row['S1lu']);
|
||||||
|
$diff = date_diff($date1, date_create(date("Y-m-d")));
|
||||||
|
if ($diff->format("%R%a") > 7) {
|
||||||
|
echo "<td class='text-white' style='background: linear-gradient(90deg, rgba(25,135,84,1) 50%, rgba(220,53,69,1) 100%);'>OK</td>";
|
||||||
|
echo "<td class='bg-danger text-white'>" . $row['S1lu'] . " (" . $diff->format("%R%a") . " days)</td>";
|
||||||
|
} else {
|
||||||
|
echo "<td class='bg-success text-white'>OK</td>";
|
||||||
|
echo "<td class='bg-success text-white'>" . $row['S1lu'] . "</td>";
|
||||||
|
$nS1++;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (isset($row['S1'])) {
|
||||||
|
echo "<td class='bg-secondary'><small>" . $row['S1'] . "</small></td>";
|
||||||
|
echo "<td class='bg-secondary text-secondary'> </td>";
|
||||||
|
$nS1++;
|
||||||
|
} else {
|
||||||
|
echo "<td class='bg-warning text-warning'>Missing</td>";
|
||||||
|
echo "<td class='bg-warning text-warning'> </td>";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
echo "</tr>";
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
</tbody>
|
||||||
|
|
||||||
<table class='table table-bordered table-hover table-sm' id='t1' data-toggle="table" data-search="true"
|
</table>
|
||||||
data-show-columns="true" data-pagination="true" data-export-types="['xlsx','csv','json']"
|
|
||||||
data-loading-template="loadingTemplate" data-page-list="[20, 50, 100, All]" data-page-size="Tout"
|
|
||||||
data-height="620" data-show-export="true" data-sortable="true">
|
|
||||||
<thead>
|
|
||||||
<th data-field="Name" data-sortable="true">Name</th>
|
|
||||||
<th data-field="OS" data-sortable="true">Operating System</th>
|
|
||||||
<th data-field="Criticity" data-sortable="true">Criticity</th>
|
|
||||||
<th data-field="Departement" data-sortable="true" data-visible="false">Departement</th>
|
|
||||||
<th data-field="AD" data-sortable="true">AD</th>
|
|
||||||
<th data-field="ADlu" data-sortable="true" data-visible="false">AD Last Logon</th>
|
|
||||||
<th data-field="GLPI" data-sortable="true">GLPI</th>
|
|
||||||
<th data-field="GLPIlu" data-sortable="true" data-visible="false" data-footer-formatter="FI">Last FI
|
|
||||||
Inventory</th>
|
|
||||||
<th data-field="SCCM" data-sortable="true">SCCM<br></th>
|
|
||||||
<th data-field="SCCMlu" data-sortable="true" data-visible="false">SCCM Last Heartbeat</th>
|
|
||||||
<th data-field="Backup" data-sortable="true">Backup</th>
|
|
||||||
<th data-field="NBUlu" data-sortable="true" data-visible="false">Last Backup</th>
|
|
||||||
<th data-field="SCOM" data-sortable="true">SCOM</th>
|
|
||||||
<th data-field="Zabbix" data-sortable="true">Zabbix</th>
|
|
||||||
<th data-field="S1" data-sortable="true">SentinelOne</th>
|
|
||||||
<th data-field="S1lu" data-sortable="true" data-visible="false">S1 Last Update</th>
|
|
||||||
</thead>
|
|
||||||
|
|
||||||
<tbody>
|
|
||||||
<!-- Display DATAs -->
|
|
||||||
<?php
|
|
||||||
|
|
||||||
$ok = 0;
|
|
||||||
$total = 0;
|
|
||||||
$nOS = 0;
|
|
||||||
$nAD = 0;
|
|
||||||
$nSCCM = 0;
|
|
||||||
$nGLPI = 0;
|
|
||||||
$nFI = 0;
|
|
||||||
$nNBU = 0;
|
|
||||||
$nDPM = 0;
|
|
||||||
$nS1 = 0;
|
|
||||||
while ($row = mysqli_fetch_array($result)) {
|
|
||||||
$total++;
|
|
||||||
echo "<tr>";
|
|
||||||
if (isset($row['AD']) && isset($row['GLPI']) && isset($row['SCCM']) && isset($row['EPO']) && (isset($row['NBU']) || isset($row['DPM'])) && isset($row['SCOM'])) {
|
|
||||||
echo "<td class='bg-success text-white'><b><a href='\crossover\Detail.php?server=" . $row['Server'] . "' target='_blank' class='link-light'>" . $row['Server'] . "</a></b></td>";
|
|
||||||
//echo "<td class='bg-success text-white'><b>".$row['Server']."</b></td>";
|
|
||||||
$ok++;
|
|
||||||
} else {
|
|
||||||
echo "<td><b><a href='\crossover\Detail.php?server=" . $row['Server'] . "' target='_blank'>" . $row['Server'] . "</a></b></td>";
|
|
||||||
//echo "<td><b>".$row['Server']."</b></td>";
|
|
||||||
}
|
|
||||||
if ($row['OS']) {
|
|
||||||
if (preg_match('(XP|2003|Windows NT|2000|2008|Windows 7|2012)', $row['OS']) !== 1) {
|
|
||||||
$nOS++;
|
|
||||||
echo "<td>" . $row['OS'] . "</td>";
|
|
||||||
} else {
|
|
||||||
echo "<td class='bg-warning'>" . $row['OS'] . "</td>";
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
echo "<td class='bg-warning'> </td>";
|
|
||||||
}
|
|
||||||
echo "<td>" . $row['crit'] . "</td>";
|
|
||||||
echo "<td>" . $row['dpt'] . "</td>";
|
|
||||||
|
|
||||||
// AD
|
|
||||||
if ($row['AD'] == 'Y') {
|
|
||||||
$date1 = date_create($row['ADlu']);
|
|
||||||
$diff = date_diff($date1, date_create(date("Y-m-d")));
|
|
||||||
if ($diff->format("%R%a") > 45) {
|
|
||||||
echo "<td class='text-white' style='background: linear-gradient(90deg, rgba(25,135,84,1) 50%, rgba(220,53,69,1) 100%);'>OK</td>";
|
|
||||||
echo "<td class='bg-danger text-white'>" . $row['ADlu'] . " (" . $diff->format("%R%a") . " days)</td>";
|
|
||||||
} else {
|
|
||||||
$nAD++;
|
|
||||||
echo "<td class='bg-success text-white'>OK</td>";
|
|
||||||
echo "<td class='bg-success text-white'>" . $row['ADlu'] . "</td>";
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
|
|
||||||
if (isset($row['AD'])) {
|
|
||||||
$nAD++;
|
|
||||||
echo "<td class='bg-secondary'><small>" . $row['AD'] . "</small></td>";
|
|
||||||
echo "<td class='bg-secondary text-secondary'> </td>";
|
|
||||||
$nSCCM++;
|
|
||||||
} else {
|
|
||||||
echo "<td class='bg-warning text-warning'>Missing</td>";
|
|
||||||
echo "<td class='bg-warning text-warning'> </td>";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// GLPI
|
|
||||||
if ($row['GLPI'] == 'Y') {
|
|
||||||
$date1 = date_create($row['GLPIlu']);
|
|
||||||
$diff = date_diff($date1, date_create(date("Y-m-d")));
|
|
||||||
if ($diff->format("%R%a") > 7) {
|
|
||||||
echo "<td class='text-white' style='background: linear-gradient(90deg, rgba(25,135,84,1) 50%, rgba(220,53,69,1) 100%);'>OK</td>";
|
|
||||||
echo "<td class='bg-danger text-white'>" . $row['GLPIlu'] . " (" . $diff->format("%R%a") . " days)</td>";
|
|
||||||
} else {
|
|
||||||
if ($row['GLPIlu'] <> "" || $row['FI'] <> "") {
|
|
||||||
echo "<td class='bg-success text-white'>OK</td>";
|
|
||||||
$nFI++;
|
|
||||||
echo "<td class='bg-success text-white'>" . $row['GLPIlu'] . "</td>";
|
|
||||||
} else {
|
|
||||||
echo "<td class='text-white' style='background: linear-gradient(90deg, rgba(25,135,84,1) 50%, rgba(255,193,7,1) 100%);'>OK</td>";
|
|
||||||
echo "<td class='bg-warning text-warning'>Missing</td>";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$nGLPI++;
|
|
||||||
} else {
|
|
||||||
if (isset($row['GLPI'])) {
|
|
||||||
echo "<td class='bg-secondary'><small>" . $row['GLPI'] . "</small></td>";
|
|
||||||
echo "<td class='bg-secondary text-secondary'> </td>";
|
|
||||||
$nGLPI++;
|
|
||||||
} else {
|
|
||||||
echo "<td class='bg-warning text-warning'>Missing</td>";
|
|
||||||
echo "<td class='bg-warning text-warning'> </td>";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// SCCM
|
|
||||||
if ($row['SCCM'] == 'Y') {
|
|
||||||
$date1 = date_create($row['SCCMlu']);
|
|
||||||
$diff = date_diff($date1, date_create(date("Y-m-d")));
|
|
||||||
if ($diff->format("%R%a") > 7) {
|
|
||||||
echo "<td class='text-white' style='background: linear-gradient(90deg, rgba(25,135,84,1) 50%, rgba(220,53,69,1) 100%);'>OK</td>";
|
|
||||||
echo "<td class='bg-danger text-white'>" . $row['SCCMlu'] . " (" . $diff->format("%R%a") . " days)</td>";
|
|
||||||
} else {
|
|
||||||
echo "<td class='bg-success text-white'>OK</td>";
|
|
||||||
echo "<td class='bg-success text-white'>" . $row['SCCMlu'] . "</td>";
|
|
||||||
$nSCCM++;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (isset($row['SCCM'])) {
|
|
||||||
echo "<td class='bg-secondary'><small>" . $row['SCCM'] . "</small></td>";
|
|
||||||
echo "<td class='bg-secondary text-secondary'> </td>";
|
|
||||||
$nSCCM++;
|
|
||||||
} else {
|
|
||||||
echo "<td class='bg-warning text-warning'>Missing</td>";
|
|
||||||
echo "<td class='bg-warning text-warning'> </td>";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// BACKUP
|
|
||||||
if ($row['NBU'] == 'Y') {
|
|
||||||
$date1 = date_create($row['NBUlu']);
|
|
||||||
$diff = date_diff($date1, date_create(date("Y-m-d")));
|
|
||||||
if ($diff->format("%R%a") > 30) {
|
|
||||||
echo "<td class='text-white' style='background: linear-gradient(90deg, rgba(25,135,84,1) 50%, rgba(220,53,69,1) 100%);'>OK (NBU)</td>";
|
|
||||||
echo "<td class='bg-danger text-white'>" . $row['NBUlu'] . " (" . $diff->format("%R%a") . " days)</td>";
|
|
||||||
} else {
|
|
||||||
echo "<td class='bg-success text-white'>OK (NBU)</td>";
|
|
||||||
echo "<td class='bg-success text-white'>" . $row['NBUlu'] . "</td>";
|
|
||||||
$nNBU++;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if ($row['DPM'] == 'Y') {
|
|
||||||
$date1 = date_create($row['DPMlu']);
|
|
||||||
$diff = date_diff($date1, date_create(date("Y-m-d")));
|
|
||||||
if ($diff->format("%R%a") > 30) {
|
|
||||||
echo "<td class='text-white' style='background: linear-gradient(90deg, rgba(25,135,84,1) 50%, rgba(220,53,69,1) 100%);'>OK (DPM)</td>";
|
|
||||||
echo "<td class='bg-danger text-white'>" . $row['DPMlu'] . " (" . $diff->format("%R%a") . " days)</td>";
|
|
||||||
} else {
|
|
||||||
echo "<td class='bg-success text-white'>OK (DPM)</td>";
|
|
||||||
echo "<td class='bg-success text-white'>" . $row['DPMlu'] . "</td>";
|
|
||||||
$nDPM++;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (isset($row['NBU'])) {
|
|
||||||
echo "<td class='bg-secondary'><small>" . $row['NBU'] . "</small></td>";
|
|
||||||
echo "<td class='bg-secondary text-secondary'> </td>";
|
|
||||||
} else {
|
|
||||||
if (isset($row['DPM'])) {
|
|
||||||
echo "<td class='bg-secondary'><small>" . $row['DPM'] . "</small></td>";
|
|
||||||
echo "<td class='bg-secondary text-secondary'> </td>";
|
|
||||||
}
|
|
||||||
echo "<td class='bg-warning text-warning'>Missing</td>";
|
|
||||||
echo "<td class='bg-warning text-warning'> </td>";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// SCOM
|
|
||||||
if ($row['SCOM'] == 'Y') {
|
|
||||||
echo "<td class='bg-success text-white'>OK</td>";
|
|
||||||
} else {
|
|
||||||
if (isset($row['SCOM'])) {
|
|
||||||
echo "<td class='bg-secondary'><small>" . $row['SCOM'] . "</small></td>";
|
|
||||||
} else {
|
|
||||||
echo "<td class='bg-warning text-warning'>Missing</td>";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// zabbix
|
|
||||||
if ($row['zabbix'] == 'Y' || strpos($row['zabbix'], '.') !== false ) {
|
|
||||||
echo "<td class='bg-success text-white'>".str_replace('Y','OK',$row['zabbix'])."</td>";
|
|
||||||
} else {
|
|
||||||
if (isset($row['zabbix'])) {
|
|
||||||
echo "<td class='bg-secondary'><small>" . $row['zabbix'] . "</small></td>";
|
|
||||||
} else {
|
|
||||||
echo "<td class='bg-warning text-warning'>Missing</td>";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// S1
|
|
||||||
if ($row['S1'] == 'Y') {
|
|
||||||
$date1 = date_create($row['S1lu']);
|
|
||||||
$diff = date_diff($date1, date_create(date("Y-m-d")));
|
|
||||||
if ($diff->format("%R%a") > 7) {
|
|
||||||
echo "<td class='text-white' style='background: linear-gradient(90deg, rgba(25,135,84,1) 50%, rgba(220,53,69,1) 100%);'>OK</td>";
|
|
||||||
echo "<td class='bg-danger text-white'>" . $row['S1lu'] . " (" . $diff->format("%R%a") . " days)</td>";
|
|
||||||
} else {
|
|
||||||
echo "<td class='bg-success text-white'>OK</td>";
|
|
||||||
echo "<td class='bg-success text-white'>" . $row['S1lu'] . "</td>";
|
|
||||||
$nS1++;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (isset($row['S1'])) {
|
|
||||||
echo "<td class='bg-secondary'><small>" . $row['S1'] . "</small></td>";
|
|
||||||
echo "<td class='bg-secondary text-secondary'> </td>";
|
|
||||||
$nS1++;
|
|
||||||
} else {
|
|
||||||
echo "<td class='bg-warning text-warning'>Missing</td>";
|
|
||||||
echo "<td class='bg-warning text-warning'> </td>";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
echo "</tr>";
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</tbody>
|
|
||||||
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
<button id="button" type="button" class="btn btn-primary btn-sm invisible"><i
|
|
||||||
class="bi bi-arrow-clockwise"></i><b> Generate KPI</b></button>
|
|
||||||
<div class="row flex-nowrap text-center" style="zoom: 80%">
|
|
||||||
<div class="col"> <!-- CARTE Devices -->
|
|
||||||
<div class="card border-secondary mb-3">
|
|
||||||
<div class="card-header text-dark"><b>All Devices</b></div>
|
|
||||||
<a href="/crossover/GlobalCrossover.php">
|
|
||||||
<div class="card-body">
|
|
||||||
<h2><span class="badge text-bg-primary font-weight-bold" id="KPIDEVICE"></span></h2>
|
|
||||||
</div>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col"> <!-- CARTE OS -->
|
|
||||||
<div class="card border-secondary mb-3">
|
|
||||||
<div class="card-header text-dark"><b>Supported OS</b></div>
|
|
||||||
<a href="/crossover/GlobalCrossover.php?filter=OS">
|
|
||||||
<div class="card-body">
|
|
||||||
<h2><span class="badge text-bg-secondary font-weight-bold" id="KPIOS"></span></h2>
|
|
||||||
</div>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col"> <!-- CARTE AD -->
|
|
||||||
<div class="card border-secondary mb-3">
|
|
||||||
<div class="card-header text-dark"><b>AD</b></div>
|
|
||||||
<a href="/crossover/GlobalCrossover.php?filter=AD">
|
|
||||||
<div class="card-body">
|
|
||||||
<h2><span class="badge text-bg-secondary font-weight-bold" id="KPIAD"></span></h2>
|
|
||||||
</div>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col"> <!-- CARTE GLPI/FI -->
|
|
||||||
<div class="card border-secondary mb-3">
|
|
||||||
<div class="card-header text-dark"><b>GLPI/FI</b></div>
|
|
||||||
<a href="/crossover/GlobalCrossover.php?filter=GLPI">
|
|
||||||
<div class="card-body">
|
|
||||||
<h2><span class="badge text-bg-secondary font-weight-bold" id="KPIGLPI"></span></h2>
|
|
||||||
</div>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col"> <!-- CARTE SCCM -->
|
|
||||||
<div class="card border-secondary mb-3">
|
|
||||||
<div class="card-header text-dark"><b>SCCM</b></div>
|
|
||||||
<a href="/crossover/GlobalCrossover.php?filter=SCCM">
|
|
||||||
<div class="card-body">
|
|
||||||
<h2><span class="badge text-bg-secondary font-weight-bold" id="KPISCCM"></span></h2>
|
|
||||||
</div>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col"> <!-- CARTE Backup (NBU + DPM) -->
|
|
||||||
<div class="card border-secondary mb-3">
|
|
||||||
<div class="card-header text-dark"><b>Backup</b></div>
|
|
||||||
<a href="/crossover/GlobalCrossover.php?filter=NBU">
|
|
||||||
<div class="card-body">
|
|
||||||
<h2><span class="badge text-bg-secondary font-weight-bold" id="KPINBU"></span></h2>
|
|
||||||
</div>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col"> <!-- CARTE SCOM -->
|
|
||||||
<div class="card border-secondary mb-3">
|
|
||||||
<div class="card-header text-dark"><b>SCOM</b></div>
|
|
||||||
<a href="/crossover/GlobalCrossover.php?filter=SCOM">
|
|
||||||
<div class="card-body">
|
|
||||||
<h2><span class="badge text-bg-secondary font-weight-bold" id="KPISCOM"></span></h2>
|
|
||||||
</div>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col"> <!-- CARTE Zabbix -->
|
|
||||||
<div class="card border-secondary mb-3">
|
|
||||||
<div class="card-header text-dark"><b>Zabbix</b></div>
|
|
||||||
<a href="/crossover/GlobalCrossover.php?filter=zabbix">
|
|
||||||
<div class="card-body">
|
|
||||||
<h2><span class="badge text-bg-secondary font-weight-bold" id="KPIzabbix"></span></h2>
|
|
||||||
</div>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col"> <!-- CARTE SentinelOne -->
|
|
||||||
<div class="card border-secondary mb-3">
|
|
||||||
<div class="card-header text-dark"><b>SentinelOne</b></div>
|
|
||||||
<a href="/crossover/GlobalCrossover.php?filter=S1">
|
|
||||||
<div class="card-body">
|
|
||||||
<h2><span class="badge text-bg-secondary font-weight-bold" id="KPIS1"></span></h2>
|
|
||||||
</div>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<!-- End of main content -->
|
|
||||||
</div>
|
</div>
|
||||||
|
<button id="button" type="button" class="btn btn-primary btn-sm invisible"><i
|
||||||
|
class="bi bi-arrow-clockwise"></i><b> Generate KPI</b></button>
|
||||||
|
<div class="row flex-nowrap text-center" style="zoom: 80%">
|
||||||
|
<div class="col"> <!-- CARTE Devices -->
|
||||||
|
<div class="card border-secondary mb-3">
|
||||||
|
<div class="card-header text-dark"><b>All Devices</b></div>
|
||||||
|
<a href="/crossover/GlobalCrossover.php">
|
||||||
|
<div class="card-body">
|
||||||
|
<h2><span class="badge text-bg-primary font-weight-bold" id="KPIDEVICE"></span></h2>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col"> <!-- CARTE OS -->
|
||||||
|
<div class="card border-secondary mb-3">
|
||||||
|
<div class="card-header text-dark"><b>Supported OS</b></div>
|
||||||
|
<a href="/crossover/GlobalCrossover.php?filter=OS">
|
||||||
|
<div class="card-body">
|
||||||
|
<h2><span class="badge text-bg-secondary font-weight-bold" id="KPIOS"></span></h2>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col"> <!-- CARTE AD -->
|
||||||
|
<div class="card border-secondary mb-3">
|
||||||
|
<div class="card-header text-dark"><b>AD</b></div>
|
||||||
|
<a href="/crossover/GlobalCrossover.php?filter=AD">
|
||||||
|
<div class="card-body">
|
||||||
|
<h2><span class="badge text-bg-secondary font-weight-bold" id="KPIAD"></span></h2>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col"> <!-- CARTE GLPI/FI -->
|
||||||
|
<div class="card border-secondary mb-3">
|
||||||
|
<div class="card-header text-dark"><b>GLPI/FI</b></div>
|
||||||
|
<a href="/crossover/GlobalCrossover.php?filter=GLPI">
|
||||||
|
<div class="card-body">
|
||||||
|
<h2><span class="badge text-bg-secondary font-weight-bold" id="KPIGLPI"></span></h2>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col"> <!-- CARTE SCCM -->
|
||||||
|
<div class="card border-secondary mb-3">
|
||||||
|
<div class="card-header text-dark"><b>SCCM</b></div>
|
||||||
|
<a href="/crossover/GlobalCrossover.php?filter=SCCM">
|
||||||
|
<div class="card-body">
|
||||||
|
<h2><span class="badge text-bg-secondary font-weight-bold" id="KPISCCM"></span></h2>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col"> <!-- CARTE Backup (NBU + DPM) -->
|
||||||
|
<div class="card border-secondary mb-3">
|
||||||
|
<div class="card-header text-dark"><b>Backup</b></div>
|
||||||
|
<a href="/crossover/GlobalCrossover.php?filter=NBU">
|
||||||
|
<div class="card-body">
|
||||||
|
<h2><span class="badge text-bg-secondary font-weight-bold" id="KPINBU"></span></h2>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col"> <!-- CARTE SCOM -->
|
||||||
|
<div class="card border-secondary mb-3">
|
||||||
|
<div class="card-header text-dark"><b>SCOM</b></div>
|
||||||
|
<a href="/crossover/GlobalCrossover.php?filter=SCOM">
|
||||||
|
<div class="card-body">
|
||||||
|
<h2><span class="badge text-bg-secondary font-weight-bold" id="KPISCOM"></span></h2>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col"> <!-- CARTE Zabbix -->
|
||||||
|
<div class="card border-secondary mb-3">
|
||||||
|
<div class="card-header text-dark"><b>Zabbix</b></div>
|
||||||
|
<a href="/crossover/GlobalCrossover.php?filter=zabbix">
|
||||||
|
<div class="card-body">
|
||||||
|
<h2><span class="badge text-bg-secondary font-weight-bold" id="KPIzabbix"></span></h2>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col"> <!-- CARTE SentinelOne -->
|
||||||
|
<div class="card border-secondary mb-3">
|
||||||
|
<div class="card-header text-dark"><b>SentinelOne</b></div>
|
||||||
|
<a href="/crossover/GlobalCrossover.php?filter=S1">
|
||||||
|
<div class="card-body">
|
||||||
|
<h2><span class="badge text-bg-secondary font-weight-bold" id="KPIS1"></span></h2>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- End of main content -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<script src="/js/switch.js"></script>
|
</div>
|
||||||
|
<script src="/js/switch.js"></script>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
<script src="/crossover/Crossover-KPI.js"></script>
|
<script src="/crossover/Crossover-KPI.js"></script>
|
||||||
<script>
|
<script>
|
||||||
var $table = $('#t1')
|
var $table = $('#t1')
|
||||||
var $button = $('#button')
|
|
||||||
|
|
||||||
$table.on('search.bs.table', function () {
|
|
||||||
var $button = $('#button')
|
var $button = $('#button')
|
||||||
$button.click();
|
|
||||||
})
|
|
||||||
|
|
||||||
$(window).on('load', function () {
|
$table.on('search.bs.table', function () {
|
||||||
$('.preloader').addClass('preloader-deactivate');
|
var $button = $('#button')
|
||||||
});
|
$button.click();
|
||||||
|
})
|
||||||
|
|
||||||
document.addEventListener("DOMContentLoaded", function () { setTimeout(function () { document.getElementById('button').click(); }, 1000); });
|
$(window).on('load', function () {
|
||||||
|
$('.preloader').addClass('preloader-deactivate');
|
||||||
|
});
|
||||||
|
|
||||||
|
document.addEventListener("DOMContentLoaded", function () {
|
||||||
|
setTimeout(function () {
|
||||||
|
document.getElementById('button').click();
|
||||||
|
}, 1000);
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
</HTML>
|
</HTML>
|
||||||
@@ -11,15 +11,10 @@
|
|||||||
function DB_GLPI() {
|
function DB_GLPI() {
|
||||||
$username="glpi_lect_seule";
|
$username="glpi_lect_seule";
|
||||||
$password="glpi_lect_seule";
|
$password="glpi_lect_seule";
|
||||||
$dbserver="srvv-n4glpi-aim.process.dkm";
|
|
||||||
$dbserver="mys_glpi_prod.appliarmony.net";
|
$dbserver="mys_glpi_prod.appliarmony.net";
|
||||||
$database="glpi";
|
$database="glpi";
|
||||||
global $conn ;
|
global $conn ;
|
||||||
$conn = new mysqli($dbserver,$username,$password,$database);
|
$conn = new mysqli($dbserver,$username,$password,$database);
|
||||||
if (!$conn) {
|
|
||||||
echo "No connection to the database: " ;
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function DB_ENTRY01() {
|
function DB_ENTRY01() {
|
||||||
@@ -29,10 +24,6 @@
|
|||||||
$database="infra";
|
$database="infra";
|
||||||
global $conn ;
|
global $conn ;
|
||||||
$conn = new mysqli($dbserver,$username,$password,$database);
|
$conn = new mysqli($dbserver,$username,$password,$database);
|
||||||
if (!$conn) {
|
|
||||||
echo "No connection to the database: " ;
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function DB_ENTRY02() {
|
function DB_ENTRY02() {
|
||||||
@@ -42,22 +33,9 @@
|
|||||||
$database="web-infra-reports";
|
$database="web-infra-reports";
|
||||||
global $conn ;
|
global $conn ;
|
||||||
$conn = new mysqli($dbserver,$username,$password,$database);
|
$conn = new mysqli($dbserver,$username,$password,$database);
|
||||||
if (!$conn) {
|
|
||||||
echo "No connection to the database: " ;
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function DB_EPO(){
|
|
||||||
$user = "epo_db_read_bdnorth_admin";
|
|
||||||
$pwd = 'Qs$PeBtg5nPJ7J';
|
|
||||||
global $conn ;
|
|
||||||
$conn = odbc_connect("Driver={SQL Server};Server=CORP1PWSR001EDB.agd.agn;Database=epo_ARMEOSDDC001;", $user, $pwd);
|
|
||||||
if(!($conn)){echo "Pas de connexion";}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
?>
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,17 +1,19 @@
|
|||||||
<!-- MODAL WAIT -->
|
<!-- 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 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-dialog modal-sm">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<h4 class="modal-title mb-1 text-dark text-uppercase">
|
<h4 class="modal-title mb-1 text-dark text-uppercase">
|
||||||
<center><i class="bi bi-hourglass-split"></i><br> Work in progress ...</center>
|
<center><i class="bi bi-hourglass-split"></i><br> Work in progress ...</center>
|
||||||
</h4>
|
</h4>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<div class="progress">
|
<div class="progress">
|
||||||
<div class="progress-bar progress-bar-secondary progress-bar-striped progress-bar-animated" style="width: 100%"></div>
|
<div class="progress-bar progress-bar-secondary progress-bar-striped progress-bar-animated"
|
||||||
</div>
|
style="width: 100%"></div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
Reference in New Issue
Block a user