.
This commit is contained in:
@@ -15,8 +15,7 @@ $(function() {
|
||||
if ((dateDiffInDays($data[$i]['SCCMlu'].split(" ")[0]) > 7 || $data[$i]['SCCMlu'] == 'Missing') && $data[$i]['SCCM'] !== 'Missing'){ $nSCCM-- ;}
|
||||
if ($data[$i]['GLPI'] !== 'Missing') { $nGLPI++ ; }
|
||||
if ((dateDiffInDays($data[$i]['GLPIlu'].split(" ")[0]) > 7 || $data[$i]['GLPIlu'] == 'Missing') && $data[$i]['GLPI'] !== 'Missing'){ $nGLPI-- ;}
|
||||
if ($data[$i]['EPO'] !== 'Missing') { $nEPO++ ; }
|
||||
if ((dateDiffInDays($data[$i]['EPOlu'].split(" ")[0]) > 7 || $data[$i]['EPOlu'] == 'Missing') && $data[$i]['EPO'] !== 'Missing'){ $nEPO-- ;}
|
||||
if ($data[$i]['NESSUS'] !== 'Missing') { $nEPO++ ; }
|
||||
if ($data[$i]['Backup'] !== 'Missing') { $nNBU++ ; }
|
||||
if ((dateDiffInDays($data[$i]['NBUlu'].split(" ")[0]) > 30 || $data[$i]['NBUlu'] == 'Missing') && $data[$i]['Backup'].split(" ")[0] !== 'Missing'){ $nNBU-- ;}
|
||||
if (($data[$i]['OS'].includes('XP') || $data[$i]['OS'].includes('2000') || $data[$i]['OS'].includes('2003') || $data[$i]['OS'].includes('2008') || $data[$i]['OS'].includes('2012') || $data[$i]['OS'].includes('7') || $data[$i]['OS'].includes('Windows NT')) == false && $data[$i]['OS'] !==' ') { $nOS++ ;}
|
||||
|
||||
@@ -188,8 +188,8 @@
|
||||
echo "<div class='col-md-4'></div>";
|
||||
echo "</div><br>";
|
||||
|
||||
// EPO
|
||||
echo "<h3><span class='font-weight-bold'>EPO</span></h3>" ;
|
||||
// Nessus
|
||||
echo "<h3><span class='font-weight-bold'>Nessus</span></h3>" ;
|
||||
echo "<div class='row'>";
|
||||
if(isset($row['EPO'])){
|
||||
if($row['EPO']=="Y"){
|
||||
@@ -198,24 +198,9 @@
|
||||
echo "<div class='col-md-3'><input type='text' class='form-control bg-secondary text-white' disabled value='".$row['EPO']."'></div>";
|
||||
}
|
||||
}else{
|
||||
echo "<div class='col-md-3'><div class='input-group'><span class='input-group-text'><i class='bi bi-pencil-square text-primary'></i></span><input type='text' class='form-control' id='EPO' name ='EPO' Placeholder='Missing' maxlength = '20'></div></div>";
|
||||
echo "<div class='col-md-3'><div class='input-group'><span class='input-group-text'><i class='bi bi-pencil-square text-primary'></i></span><input type='text' class='form-control' id='EPO' name ='EPO' placeholder='Missing' maxlength = '20'></div></div>";
|
||||
}
|
||||
if(isset($row['EPOlu'])){
|
||||
echo "<div class='col-md-2 text-end text-bottom'><b>Last Update</b></div>";
|
||||
$date1=date_create($row['EPOlu']);
|
||||
$diff=date_diff($date1,date_create(date("Y-m-d")));
|
||||
if($diff->format("%R%a") > 7){
|
||||
echo "<div class='col-md-3'><input type='text' class='form-control bg-danger text-white' disabled value='".$row['EPOlu']." (".abs($diff->format("%R%a"))." days)'></div>";
|
||||
}else{
|
||||
echo "<div class='col-md-3'><input type='text' class='form-control bg-success text-white' disabled value='".$row['EPOlu']." (".abs($diff->format("%R%a"))." days)'></div>";
|
||||
}
|
||||
}else{
|
||||
if(!(isset($row['EPO']) && $row['EPO'] !=="Y")){
|
||||
echo "<div class='col-md-2 text-end text-bottom'><b>Last Update</b></div>";
|
||||
echo "<div class='col-md-3'><input type='text' class='form-control bg-warning' disabled value='Missing'></div>";
|
||||
}
|
||||
}
|
||||
echo "<div class='col-md-4'></div>";
|
||||
echo "<div class='col-md-9'></div>";
|
||||
echo "</div><br>";
|
||||
|
||||
// NBU
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
<!-- Display -->
|
||||
<div class="col py-3">
|
||||
<!-- 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 <small>(Updated every 15mn)</small></span></h1>
|
||||
|
||||
<!-- Main content -->
|
||||
<div class="row" style="zoom: 80%">
|
||||
@@ -66,9 +66,9 @@
|
||||
$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>";
|
||||
case "NESSUS":
|
||||
$result = $conn->query("select * from GlobalCrossover where EPO is null order by server");
|
||||
echo "<h2><center><span class='badge text-bg-danger font-weight-bold'>Filter : NESSUS 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");
|
||||
@@ -107,8 +107,7 @@
|
||||
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="EPO" data-sortable="true">EPO</th>
|
||||
<th data-field="EPOlu" data-sortable="true" data-visible="false">EPO Last Update</th>
|
||||
<th data-field="NESSUS" data-sortable="true">NESSUS</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>
|
||||
@@ -128,7 +127,7 @@
|
||||
$nSCCM = 0;
|
||||
$nGLPI = 0;
|
||||
$nFI = 0;
|
||||
$nEPO = 0;
|
||||
$nNESSUS = 0;
|
||||
$nNBU = 0;
|
||||
$nDPM = 0;
|
||||
$nS1 = 0;
|
||||
@@ -148,7 +147,7 @@
|
||||
$nOS++;
|
||||
echo "<td>" . $row['OS'] . "</td>";
|
||||
} else {
|
||||
echo "<td class='bg-warning'>" . $row['OS'] . "</td>";
|
||||
echo "<td class='bg-warning text-black'>" . $row['OS'] . "</td>";
|
||||
}
|
||||
} else {
|
||||
echo "<td class='bg-warning'> </td>";
|
||||
@@ -176,7 +175,7 @@
|
||||
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-black'>Missing</td>";
|
||||
echo "<td class='bg-warning text-warning'> </td>";
|
||||
}
|
||||
}
|
||||
@@ -195,7 +194,7 @@
|
||||
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>";
|
||||
echo "<td class='bg-warning text-black'>Missing</td>";
|
||||
}
|
||||
}
|
||||
$nGLPI++;
|
||||
@@ -205,7 +204,7 @@
|
||||
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-black'>Missing</td>";
|
||||
echo "<td class='bg-warning text-warning'> </td>";
|
||||
}
|
||||
}
|
||||
@@ -228,31 +227,20 @@
|
||||
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-black'>Missing</td>";
|
||||
echo "<td class='bg-warning text-warning'> </td>";
|
||||
}
|
||||
}
|
||||
|
||||
// EPO
|
||||
if ($row['EPO'] == 'Y') {
|
||||
$date1 = date_create($row['EPOlu']);
|
||||
$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['EPOlu'] . " (" . $diff->format("%R%a") . " days)</td>";
|
||||
} else {
|
||||
echo "<td class='bg-success text-white'>OK</td>";
|
||||
echo "<td class='bg-success text-white'>" . $row['EPOlu'] . "</td>";
|
||||
$nEPO++;
|
||||
}
|
||||
// NESSUS
|
||||
if (strpos($row['EPO'], '.') !== false ) {
|
||||
echo "<td class='bg-success text-white'>".$row['EPO']."</td>";
|
||||
} else {
|
||||
if (isset($row['EPO'])) {
|
||||
if (isset($row['EPO']) && $row['EPO'] != 'Y' && $row['EPO'] != 'N') {
|
||||
echo "<td class='bg-secondary'><small>" . $row['EPO'] . "</small></td>";
|
||||
echo "<td class='bg-secondary text-secondary'> </td>";
|
||||
$nEPO++;
|
||||
} else {
|
||||
echo "<td class='bg-warning text-warning'>Missing</td>";
|
||||
echo "<td class='bg-warning text-warning'> </td>";
|
||||
echo "<td class='bg-warning text-black'>Missing</td>";
|
||||
$nNESSUS++;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -289,7 +277,7 @@
|
||||
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-black'>Missing</td>";
|
||||
echo "<td class='bg-warning text-warning'> </td>";
|
||||
}
|
||||
}
|
||||
@@ -302,41 +290,42 @@
|
||||
if (isset($row['SCOM'])) {
|
||||
echo "<td class='bg-secondary'><small>" . $row['SCOM'] . "</small></td>";
|
||||
} else {
|
||||
echo "<td class='bg-warning text-warning'>Missing</td>";
|
||||
echo "<td class='bg-warning text-black'>Missing</td>";
|
||||
}
|
||||
}
|
||||
|
||||
// zabbix
|
||||
if ($row['zabbix'] == 'Y') {
|
||||
echo "<td class='bg-success text-white'>OK</td>";
|
||||
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>";
|
||||
echo "<td class='bg-warning text-black'>Missing</td>";
|
||||
}
|
||||
}
|
||||
|
||||
// S1
|
||||
if ($row['S1'] == 'Y') {
|
||||
if ($row['S1'] == 'Y' || strpos($row['S1'], '.') !== false) {
|
||||
$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='text-white' style='background: linear-gradient(90deg, rgba(25,135,84,1) 50%, rgba(220,53,69,1) 100%);'>".str_replace('Y','OK',$row['S1'])."</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'>".str_replace('Y','OK',$row['S1'])."</td>";
|
||||
echo "<td class='bg-success text-white'>" . $row['S1lu'] . "</td>";
|
||||
$nS1++;
|
||||
}
|
||||
} else {
|
||||
if (isset($row['S1'])) {
|
||||
if($row['S1'] == "N"){$row['S1'] = "Non Supported OS";}
|
||||
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 "<td class='bg-warning text-black'>Missing</td>";
|
||||
echo "<td class='bg-warning text-black'> </td>";
|
||||
}
|
||||
}
|
||||
echo "</tr>";
|
||||
@@ -401,8 +390,8 @@
|
||||
</div>
|
||||
<div class="col"> <!-- CARTE EPO -->
|
||||
<div class="card border-secondary mb-3">
|
||||
<div class="card-header text-dark"><b>EPO</b></div>
|
||||
<a href="/crossover/GlobalCrossover.php?filter=EPO">
|
||||
<div class="card-header text-dark"><b>NESSUS</b></div>
|
||||
<a href="/crossover/GlobalCrossover.php?filter=NESSUS">
|
||||
<div class="card-body">
|
||||
<h2><span class="badge text-bg-secondary font-weight-bold" id="KPIEPO"></span></h2>
|
||||
</div>
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
|
||||
<!-- Page Title -->
|
||||
<title>Web Infra Reports</title>
|
||||
<link rel="shortcut icon" type="image/png" href="/include/favicon-32x32.png">
|
||||
|
||||
<!-- JQuery -->
|
||||
<script src="/js/jquery-3.6.1.min.js"></script>
|
||||
@@ -106,8 +107,6 @@
|
||||
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="EPO" data-sortable="true">EPO</th>
|
||||
<th data-field="EPOlu" data-sortable="true" data-visible="false">EPO Last Update</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>
|
||||
@@ -127,7 +126,6 @@
|
||||
$nSCCM = 0;
|
||||
$nGLPI = 0;
|
||||
$nFI = 0;
|
||||
$nEPO = 0;
|
||||
$nNBU = 0;
|
||||
$nDPM = 0;
|
||||
$nS1 = 0;
|
||||
@@ -232,28 +230,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
// EPO
|
||||
if ($row['EPO'] == 'Y') {
|
||||
$date1 = date_create($row['EPOlu']);
|
||||
$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['EPOlu'] . " (" . $diff->format("%R%a") . " days)</td>";
|
||||
} else {
|
||||
echo "<td class='bg-success text-white'>OK</td>";
|
||||
echo "<td class='bg-success text-white'>" . $row['EPOlu'] . "</td>";
|
||||
$nEPO++;
|
||||
}
|
||||
} else {
|
||||
if (isset($row['EPO'])) {
|
||||
echo "<td class='bg-secondary'><small>" . $row['EPO'] . "</small></td>";
|
||||
echo "<td class='bg-secondary text-secondary'> </td>";
|
||||
$nEPO++;
|
||||
} else {
|
||||
echo "<td class='bg-warning text-warning'>Missing</td>";
|
||||
echo "<td class='bg-warning text-warning'> </td>";
|
||||
}
|
||||
}
|
||||
|
||||
// BACKUP
|
||||
if ($row['NBU'] == 'Y') {
|
||||
@@ -306,8 +282,8 @@
|
||||
}
|
||||
|
||||
// zabbix
|
||||
if ($row['zabbix'] == 'Y') {
|
||||
echo "<td class='bg-success text-white'>OK</td>";
|
||||
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>";
|
||||
@@ -398,16 +374,6 @@
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col"> <!-- CARTE EPO -->
|
||||
<div class="card border-secondary mb-3">
|
||||
<div class="card-header text-dark"><b>EPO</b></div>
|
||||
<a href="/crossover/GlobalCrossover.php?filter=EPO">
|
||||
<div class="card-body">
|
||||
<h2><span class="badge text-bg-secondary font-weight-bold" id="KPIEPO"></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>
|
||||
|
||||
Reference in New Issue
Block a user