feat: add explicit event handler for network analysis loading to improve reliability on initial page visits
This commit is contained in:
@@ -150,6 +150,20 @@ class Statistics extends Component
|
||||
$this->fetchGraphData('disk', $this->diskTimeRange, $this->diskAggregation);
|
||||
}
|
||||
|
||||
/**
|
||||
* Explicit event handler for Network Analysis lazy loading.
|
||||
*
|
||||
* This mirrors the Live Telemetry pattern (proxmox:stats) and allows the
|
||||
* frontend to trigger loading via Livewire.dispatch(), which is more
|
||||
* robust than relying on @this in inline scripts – especially on the
|
||||
* first-ever load of the Statistics page for a given server.
|
||||
*/
|
||||
#[On('proxmox:network-analysis-load')]
|
||||
public function handleNetworkAnalysisLoad(): void
|
||||
{
|
||||
$this->loadNetworkAnalysis();
|
||||
}
|
||||
|
||||
public function loadNetworkAnalysis(): void
|
||||
{
|
||||
Log::debug('Network Analysis: loadNetworkAnalysis() called', [
|
||||
|
||||
Reference in New Issue
Block a user