Refactor Proxmox components: optimize data fetching in Server and Overview; enhance macro handling in Firewall; improve task data refresh logic in Statistics and views

This commit is contained in:
2026-03-14 11:44:46 -04:00
parent a8b6e5cfba
commit 91cdaf2a6b
7 changed files with 116 additions and 72 deletions

View File

@@ -790,6 +790,17 @@ class Statistics extends Component
{
$this->goToLifecycleEventsPage($this->lifecycleEventsCurrentPage + 1);
}
/**
* Targeted refresh for task history and lifecycle events sections.
* Replaces wire:poll="$refresh" which would re-evaluate ALL computed
* properties (graphs, network analysis, etc.) causing unnecessary load.
*/
public function refreshTaskData(): void
{
// Invalidate the task history cache so it re-fetches from API
Cache::forget('proxmox_task_history_' . $this->server->id);
}
/**
* Extract IP address from field (handles "IP[port]" and "IP:port" formats)