diff --git a/Storage/Dashboard.php b/Storage/Dashboard.php index c5ea8b2..31e1390 100644 --- a/Storage/Dashboard.php +++ b/Storage/Dashboard.php @@ -442,8 +442,10 @@
Unnasigned LUNs
+ +
diff --git a/Storage/SwitchsSAN.php b/Storage/SwitchsSAN.php new file mode 100644 index 0000000..c49402f --- /dev/null +++ b/Storage/SwitchsSAN.php @@ -0,0 +1,181 @@ + + + + + + + + + Infra Reports IT - SAN Status + + + + + + + + + + + + + +
+
+
+ +
+ +
+

Fibre Channel Switch Status

+ +
+ + +
+ + +
+ $ports) { + $switchIndex++; + $collapseId = "collapse_" . $switchIndex; // Unique ID for Bootstrap + + // Initialize counters + $upCount = 0; + $downCount = 0; + $errorCount = 0; + + // Arrays to store HTML rows (for sorting logic) + $errorRows = []; + $normalRows = []; + + // 4. Loop through Ports to calculate stats and build rows + foreach ($ports as $portId => $portData) { + $state = $portData['State']; + $errors = (int)$portData['Errors']; // Cast to int for safety + + if ($state === 'UP') { + $upCount++; + + // Determine row color + $rowClass = "table-success"; + if ($errors > 0) { + $errorCount++; + $rowClass = "table-danger"; + } + + // Build the HTML for this row + // Note: Using variables in double quotes for cleaner syntax + $rowHtml = " + + {$portId} + {$portData['Status']} + {$portData['State']} + {$portData['Speed']} + {$portData['Nego']} + {$portData['FrameTX']} + {$portData['FrameRX']} + {$portData['Errors']} + "; + + // Sort into appropriate array + if ($errors > 0) { + $errorRows[] = $rowHtml; + } else { + $normalRows[] = $rowHtml; + } + + } elseif ($state === 'DN') { + $downCount++; + } + } + + // 5. Merge rows: Errors first + $finalRows = array_merge($errorRows, $normalRows); + $tableBody = implode("\n", $finalRows); + + // 6. Determine Header Style + $headerColor = "green"; + $msg = "OK"; + if ($errorCount > 0) { + $headerColor = "DarkOrange"; + $msg = " --> {$errorCount} issue(s)"; + } + + // 7. Output the Accordion Item (Card) + ?> + + +
+
+
+ + + + + + + + + + + + + + + + +
PortStatusStateSpeedNegoFrameTXFrameRXErrors
+
+
+
+
+ + No data available via API.
"; + } + ?> +
+
+
+ + + \ No newline at end of file diff --git a/X/Backups.php b/X/Backups.php new file mode 100644 index 0000000..fc8b43e --- /dev/null +++ b/X/Backups.php @@ -0,0 +1,157 @@ + + + + + + + + + Web Infra Reports + + + + + + + + + + + + + + + + + + + + +
+
+
+ +
+
+

Backups Linux/AIX

+ +
+
+
+ > + +
+ +
> + > + +
+
+
+
+ + + + + + + + + + + + + 16106127360) { + $log = "Size : $size GB"; + if($showSize == 0){ continue; } + }else{ + $log = "OK - $size GB"; + if($all == 0){ continue; } + } + } + + if(str_contains($log, "Total bytes written:")) { + $size = floor(explode(" ",$log)[3] / 1024 / 1024 / 1024); + if(explode(" ",$log)[3] > 16106127360) { + $log = "Size : $size GB"; + if($showSize == 0){ continue; } + }else{ + $log = "OK - $size GB"; + if($all == 0){ continue; } + } + } + echo ""; + + echo ""; + echo ""; + if(str_contains($log, "waiting")) { + echo ""; + }elseif(str_contains($log, "error")){ + echo ""; + }elseif(str_contains($log, "progress")){ + echo ""; + }elseif(str_contains($log, "OK -")){ + echo ""; + }elseif(str_contains($log, "Size : ")){ + echo ""; + }else{echo ""; } + echo ""; + echo ""; + echo ""; + } + + ?> + +
NameTSLogTypeLocation
$name$ts$log$log$log$log$log$log$backuptype$location

+
+
+
+
+ + + + + + + + \ No newline at end of file diff --git a/navbar.html b/navbar.html index 6d3ae43..c1636f1 100644 --- a/navbar.html +++ b/navbar.html @@ -47,6 +47,7 @@ - SVA/SCU Accounts - AutoRemediation Logs - Scripts Result + - Backups @@ -78,6 +79,8 @@