From 92ebc3f0c60c1e91a3e170e564091a556022e98a Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Mon, 5 Aug 2024 20:08:37 +0200 Subject: [PATCH] refactor --- app/Livewire/Project/Service/Configuration.php | 4 +--- app/Livewire/Server/Proxy/DynamicConfigurations.php | 3 +-- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/app/Livewire/Project/Service/Configuration.php b/app/Livewire/Project/Service/Configuration.php index 47534ded1..c82012aaa 100644 --- a/app/Livewire/Project/Service/Configuration.php +++ b/app/Livewire/Project/Service/Configuration.php @@ -25,7 +25,6 @@ public function getListeners() return [ "echo-private:user.{$userId},ServiceStatusChanged" => 'check_status', 'check_status', - 'refresh' => '$refresh', ]; } @@ -76,8 +75,7 @@ public function check_status() { try { GetContainersStatus::run($this->service->server); - // dispatch_sync(new ContainerStatusJob($this->service->server)); - $this->dispatch('refresh')->self(); + $this->dispatch('$refresh'); } catch (\Exception $e) { return handleError($e, $this); } diff --git a/app/Livewire/Server/Proxy/DynamicConfigurations.php b/app/Livewire/Server/Proxy/DynamicConfigurations.php index c858481db..6277a24bd 100644 --- a/app/Livewire/Server/Proxy/DynamicConfigurations.php +++ b/app/Livewire/Server/Proxy/DynamicConfigurations.php @@ -21,7 +21,6 @@ public function getListeners() return [ "echo-private:team.{$teamId},ProxyStatusChanged" => 'loadDynamicConfigurations', 'loadDynamicConfigurations', - 'refresh' => '$refresh', ]; } @@ -42,7 +41,7 @@ public function loadDynamicConfigurations() $contents[$without_extension] = instant_remote_process(["cat {$proxy_path}/dynamic/{$file}"], $this->server); } $this->contents = $contents; - $this->dispatch('refresh'); + $this->dispatch('$refresh'); } public function mount()