From d1912871d31595bc807963413bd2a2f0ca743760 Mon Sep 17 00:00:00 2001 From: "Joseph.Rawlings" Date: Wed, 17 Dec 2025 20:04:51 -0500 Subject: [PATCH] refactor: update caching duration for network analysis and enhance layout structure in statistics view for improved readability --- .../Servers/Proxmox/Livewire/Statistics.php | 5 +- .../Proxmox/views/components/layout.blade.php | 149 ++++++++---------- .../Proxmox/views/statistics.blade.php | 75 ++++++--- 3 files changed, 129 insertions(+), 100 deletions(-) diff --git a/extensions/Servers/Proxmox/Livewire/Statistics.php b/extensions/Servers/Proxmox/Livewire/Statistics.php index 7842e2e52..6a84219a1 100644 --- a/extensions/Servers/Proxmox/Livewire/Statistics.php +++ b/extensions/Servers/Proxmox/Livewire/Statistics.php @@ -419,7 +419,10 @@ class Statistics extends Component $this->topPortsCurrentPage = 1; // Persist the computed analysis for a short period to speed up subsequent loads - Cache::put($cacheKey, $analysis, now()->addSeconds(30)); + // Cache duration is set to 25 seconds (slightly less than the 30s poll interval) + // This ensures fresh data is fetched on each poll cycle while still preventing + // duplicate requests within the same cycle + Cache::put($cacheKey, $analysis, now()->addSeconds(25)); // Reset retry count on successful load $this->networkAnalysisRetryCount = 0; diff --git a/extensions/Servers/Proxmox/views/components/layout.blade.php b/extensions/Servers/Proxmox/views/components/layout.blade.php index 6c417356e..5bae5e700 100644 --- a/extensions/Servers/Proxmox/views/components/layout.blade.php +++ b/extensions/Servers/Proxmox/views/components/layout.blade.php @@ -1229,98 +1229,87 @@
- + + + +
+ Start +
+
- + + + +
+ Stop (ACPI) +
+
- + + + +
+ Reboot (ACPI) +
+
- + + + +
+ Power Off +
+
diff --git a/extensions/Servers/Proxmox/views/statistics.blade.php b/extensions/Servers/Proxmox/views/statistics.blade.php index 585daf3ba..490feecbf 100644 --- a/extensions/Servers/Proxmox/views/statistics.blade.php +++ b/extensions/Servers/Proxmox/views/statistics.blade.php @@ -149,13 +149,15 @@ -
+
+ + +
- -
-
+
@@ -245,11 +247,14 @@
-
+
- -
-
+ +
+
@@ -339,11 +344,14 @@
-
+
- -
-
+ +
+
@@ -433,11 +441,14 @@
-
+
- -
-
+ +
+
@@ -527,7 +538,9 @@
-
+
+ +
@@ -2185,6 +2198,7 @@
Deep visibility into firewall sessions, security threats, and top consumers of bandwidth powered by the Core Router API.

+ @if($networkAnalysis['lastUpdated']) +
+ + + + +

+ Streaming ยท Last updated {{ \Carbon\Carbon::parse($networkAnalysis['lastUpdated'])->diffForHumans() }} +

+
+ @endif
+