Refactor and enhance code readability across multiple components
- Updated SQL query in `VMs-Backups.php` to include `policy` condition. - Improved formatting and indentation in `StdOut-detail.php`, `StdOut.php`, and `Server-Detail.php`. - Simplified conditional checks and removed redundant spaces for better clarity. - Modified `.idea/sqldialects.xml` file to add new SQL dialect mappings.
This commit is contained in:
@@ -95,7 +95,7 @@
|
||||
echo "</div></div></body></HTML>";
|
||||
exit;
|
||||
}
|
||||
if(strpos($Qw[0]['DECOM'],'-') != false || strpos($Qx[0]['Decom'],'-') != false){
|
||||
if(strpos($Qw[0]['DECOM'], '-') || strpos($Qx[0]['Decom'], '-')){
|
||||
echo '<h1><span class="badge text-bg-danger font-weight-bold blinking" style="width:100%;">'. strtoupper($server) .' : DECOMMISSIONED !</span></h1>';
|
||||
echo '<script src="/js/switch.js"></script>';
|
||||
echo "</div></div></body></HTML>";
|
||||
@@ -124,6 +124,7 @@
|
||||
$site = substr($Qx[0]['Owner'],0,3);
|
||||
}else{
|
||||
echo " <span class='badge rounded-pill bg-success text-light'>Physical</span>";
|
||||
echo " <span class='badge rounded-pill bg-success text-light'>".Invoke_GLPI("select a.name from glpi_computermodels a left join glpi_computers b on a.id = b.computermodels_id where b.name = '$server'")[0]['name']."</span>";
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -242,17 +243,17 @@
|
||||
<!-- Last boot, last rollup, next rollup -->
|
||||
<?php
|
||||
if(is_array($Qw)){
|
||||
if(strpos($Qw[0]['zabbix'],'.') != false){
|
||||
if(strpos($Qw[0]['zabbix'], '.')){
|
||||
echo "<span class='badge rounded-pill bg-secondary text-light fs-5'>Zabbix : ".$Qw[0]['zabbix']."</span>";
|
||||
}else{
|
||||
echo "<span class='badge rounded-pill bg-warning text-dark fs-5'>Zabbix : Not Installed</span>";
|
||||
}
|
||||
if(strpos($Qw[0]['sentinel'],'.') != false){
|
||||
if(strpos($Qw[0]['sentinel'], '.')){
|
||||
echo " <span class='badge rounded-pill bg-secondary text-light fs-5'>SentinelOne : ".$Qw[0]['sentinel']."</span>";
|
||||
}else{
|
||||
echo " <span class='badge rounded-pill bg-warning text-dark fs-5'>SentinelOne : Not Installed</span>";
|
||||
}
|
||||
if(strpos($Qw[0]['zabbix'],'.') != false){
|
||||
if(strpos($Qw[0]['zabbix'], '.')){
|
||||
echo " <span class='badge rounded-pill bg-secondary text-light fs-5'>Nessus : ".$Qw[0]['nessus']."</span>";
|
||||
}else{
|
||||
echo " <span class='badge rounded-pill bg-warning text-dark fs-5'>Nessus : Not Installed</span>";
|
||||
@@ -260,19 +261,19 @@
|
||||
}
|
||||
if(is_array($Qx)){
|
||||
$a = Invoke_Infra("select * from X_cmdb_Product where HOSTNAME='$server' and Name ='zabbix'");
|
||||
if(is_array($a) && strpos($a[0]['Ver'],'.') != false){
|
||||
if(is_array($a) && strpos($a[0]['Ver'], '.')){
|
||||
echo "<span class='badge rounded-pill bg-secondary text-light fs-5'>Zabbix : ".$a[0]['Ver']." - ".$a[0]['State']."</span>";
|
||||
}else{
|
||||
echo "<span class='badge rounded-pill bg-warning text-dark fs-5'>Zabbix : Not Installed</span>";
|
||||
}
|
||||
$a = Invoke_Infra("select * from X_cmdb_Product where HOSTNAME='$server' and Name ='s1'");
|
||||
if(is_array($a) && strpos($a[0]['Ver'],'.') != false){
|
||||
if(is_array($a) && strpos($a[0]['Ver'], '.')){
|
||||
echo " <span class='badge rounded-pill bg-secondary text-light fs-5'>SentinelOne : ".$a[0]['Ver']." - ".$a[0]['State']."</span>";
|
||||
}else{
|
||||
echo " <span class='badge rounded-pill bg-warning text-dark fs-5'>SentinelOne : Not Installed</span>";
|
||||
}
|
||||
$a = Invoke_Infra("select * from X_cmdb_Product where HOSTNAME='$server' and Name ='nessus'");
|
||||
if(is_array($a) && strpos($a[0]['Ver'],'.') != false){
|
||||
if(is_array($a) && strpos($a[0]['Ver'], '.')){
|
||||
echo " <span class='badge rounded-pill bg-secondary text-light fs-5'>Nessus : ".$a[0]['Ver']." - ".$a[0]['State']."</span>";
|
||||
}else{
|
||||
echo " <span class='badge rounded-pill bg-warning text-dark fs-5'>Nessus : Not Installed</span>";
|
||||
|
||||
Reference in New Issue
Block a user