From af8e8c93bbd5487d729f2829b3c263771371710a Mon Sep 17 00:00:00 2001 From: Jess Archer Date: Fri, 6 Oct 2023 12:21:56 +1000 Subject: [PATCH] Rename generic event --- resources/views/livewire/servers.blade.php | 6 +++--- src/Livewire/Servers.php | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/resources/views/livewire/servers.blade.php b/resources/views/livewire/servers.blade.php index 51ec41d4..932c8834 100644 --- a/resources/views/livewire/servers.blade.php +++ b/resources/views/livewire/servers.blade.php @@ -120,7 +120,7 @@ class="w-full max-w-xs h-9 relative" } ) - Livewire.on('chart-update', ({ servers }) => { + Livewire.on('servers-chart-update', ({ servers }) => { // TODO: Figure out how to destroy the Alpine instance and remove this listener. if (chart === undefined) { @@ -220,7 +220,7 @@ class="w-full max-w-xs h-9 relative" } ) - Livewire.on('chart-update', ({ servers }) => { + Livewire.on('servers-chart-update', ({ servers }) => { // TODO: Figure out how to destroy the Alpine instance and remove this listener. if (chart === undefined) { @@ -300,7 +300,7 @@ class="w-full max-w-xs h-9 relative" } ) - Livewire.on('chart-update', ({ servers }) => { + Livewire.on('servers-chart-update', ({ servers }) => { // TODO: Figure out how to destroy the Alpine instance and remove this listener. const storage = servers['{{ $server->slug }}']?.storage?.find(storage => storage.directory === '{{ $storage->directory }}') diff --git a/src/Livewire/Servers.php b/src/Livewire/Servers.php index 4d3c513f..42c12d8c 100644 --- a/src/Livewire/Servers.php +++ b/src/Livewire/Servers.php @@ -21,7 +21,7 @@ public function render(callable $query): Renderable $servers = $query($this->periodAsInterval()); if (request()->hasHeader('X-Livewire')) { - $this->dispatch('chart-update', servers: $servers); + $this->dispatch('servers-chart-update', servers: $servers); } return View::make('pulse::livewire.servers', [