do not load charts on mount

This commit is contained in:
Andras Bacsai 2024-06-19 10:33:34 +02:00
parent 07e55b2636
commit fa99cbce4a
4 changed files with 2 additions and 12 deletions

View File

@ -24,11 +24,6 @@ public function render()
return view('livewire.charts.server-cpu');
}
public function mount()
{
$this->loadData();
}
public function pollData()
{
if ($this->poll || $this->interval <= 10) {

View File

@ -34,11 +34,6 @@ public function pollData()
}
}
public function mount()
{
$this->loadData();
}
public function loadData()
{
try {

View File

@ -1,4 +1,4 @@
<div @if ($poll) wire:poll.5000ms='pollData' @endif>
<div @if ($poll) wire:poll.5000ms='pollData' @endif x-init="$wire.loadData()">
<h3>CPU</h3>
<x-forms.select label="Interval" wire:change="setInterval" id="interval">
<option value="5">5 minutes (live)</option>

View File

@ -1,4 +1,4 @@
<div @if ($poll) wire:poll.5000ms='pollData' @endif>
<div @if ($poll) wire:poll.5000ms='pollData' @endif x-init="$wire.loadData()">
<h3>Memory</h3>
<x-forms.select label="Interval" wire:change="setInterval" id="interval">
<option value="5">5 minutes (live)</option>