diff --git a/app/Livewire/Project/Service/Configuration.php b/app/Livewire/Project/Service/Configuration.php index ea0e804b7..2cbda4e02 100644 --- a/app/Livewire/Project/Service/Configuration.php +++ b/app/Livewire/Project/Service/Configuration.php @@ -66,7 +66,7 @@ public function check_status() try { dispatch_sync(new ContainerStatusJob($this->service->server)); $this->dispatch('refresh')->self(); - $this->dispatch('serviceStatusChanged'); + $this->dispatch('updateStatus'); } catch (\Exception $e) { return handleError($e, $this); } diff --git a/app/Livewire/Project/Service/Navbar.php b/app/Livewire/Project/Service/Navbar.php index 85a8da69f..141859ed4 100644 --- a/app/Livewire/Project/Service/Navbar.php +++ b/app/Livewire/Project/Service/Navbar.php @@ -30,23 +30,20 @@ public function getListeners() $userId = auth()->user()->id; return [ "echo-private:user.{$userId},ServiceStatusChanged" => 'serviceStarted', - "serviceStatusChanged" + "updateStatus"=> '$refresh', ]; } public function serviceStarted() { $this->dispatch('success', 'Service status changed.'); + if (is_null($this->service->config_hash) || $this->service->isConfigurationChanged()) { + $this->service->isConfigurationChanged(true); + $this->dispatch('configurationChanged'); + } else { + $this->dispatch('configurationChanged'); + } } - public function serviceStatusChanged() - { - $this->dispatch('refresh')->self(); - // if (is_null($this->service->config_hash) || $this->service->isConfigurationChanged()) { - // $this->service->isConfigurationChanged(true); - // $this->dispatch('configurationChanged'); - // } else { - // $this->dispatch('configurationChanged'); - // } - } + public function check_status() { $this->dispatch('check_status'); diff --git a/resources/views/components/helper.blade.php b/resources/views/components/helper.blade.php index 43c49491d..394f6275f 100644 --- a/resources/views/components/helper.blade.php +++ b/resources/views/components/helper.blade.php @@ -1,9 +1,14 @@ -