diff --git a/app/Livewire/Project/Service/Configuration.php b/app/Livewire/Project/Service/Configuration.php index 33aac21d0..69d158c04 100644 --- a/app/Livewire/Project/Service/Configuration.php +++ b/app/Livewire/Project/Service/Configuration.php @@ -18,6 +18,7 @@ public function getListeners() $userId = auth()->user()->id; return [ "echo-private:user.{$userId},ServiceStatusChanged" => 'check_status', + "check_status" ]; } public function render() diff --git a/app/Livewire/Project/Service/Navbar.php b/app/Livewire/Project/Service/Navbar.php index 70c304de0..30e96b838 100644 --- a/app/Livewire/Project/Service/Navbar.php +++ b/app/Livewire/Project/Service/Navbar.php @@ -6,7 +6,6 @@ use App\Actions\Service\StartService; use App\Actions\Service\StopService; use App\Events\ServiceStatusChanged; -use App\Jobs\ContainerStatusJob; use App\Models\Service; use Livewire\Component; use Spatie\Activitylog\Models\Activity; @@ -27,6 +26,10 @@ public function serviceStatusChanged() { $this->dispatch('refresh')->self(); } + public function check_status() { + $this->dispatch('check_status'); + $this->dispatch('success', 'Service status updated.'); + } public function render() { return view('livewire.project.service.navbar');