Fix statistics graphPayloads never being populated and add redesigned telemetry partial
Made-with: Cursor
This commit is contained in:
@@ -906,7 +906,8 @@ class Statistics extends Component
|
||||
// Reduced cache TTL from 60 to 30 seconds for fresher data and faster updates
|
||||
$data = Cache::remember($cacheKey, 30, function () use ($timeRange, $aggregation) {
|
||||
$proxmox = new Proxmox;
|
||||
$stats = $proxmox->request('/nodes/' . $this->server->node->name . '/qemu/' . $this->server->vm_id . '/rrddata', data: [
|
||||
$vmType = $this->server->node->vmType();
|
||||
$stats = $proxmox->request('/nodes/' . $this->server->node->name . '/' . $vmType . '/' . $this->server->vm_id . '/rrddata', data: [
|
||||
'timeframe' => $timeRange,
|
||||
'cf' => $aggregation === 'maximum' ? 'MAX' : 'AVERAGE',
|
||||
]);
|
||||
@@ -938,7 +939,9 @@ class Statistics extends Component
|
||||
$data = [];
|
||||
}
|
||||
|
||||
$this->dispatch('proxmox:stats:' . $this->server->id . ':' . $graphType, $data);
|
||||
$this->graphPayloads[$graphType] = is_array($data) ? $data : [];
|
||||
|
||||
$this->dispatch('proxmox:stats:' . $this->server->id . ':' . $graphType, $this->graphPayloads[$graphType]);
|
||||
}
|
||||
|
||||
#[On('render-chart-events')]
|
||||
|
||||
Reference in New Issue
Block a user