From 94b6c0c49e0a10534e2d1d350ae05d86aae47931 Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Wed, 12 Apr 2023 15:42:01 +0200 Subject: [PATCH] fix: status not needed --- app/Http/Livewire/DeployApplication.php | 12 ------------ .../views/livewire/deploy-application.blade.php | 8 +++++--- 2 files changed, 5 insertions(+), 15 deletions(-) diff --git a/app/Http/Livewire/DeployApplication.php b/app/Http/Livewire/DeployApplication.php index dfaa9a725..8e1ac41f3 100644 --- a/app/Http/Livewire/DeployApplication.php +++ b/app/Http/Livewire/DeployApplication.php @@ -58,16 +58,4 @@ class DeployApplication extends Component { $this->application->refresh(); } - - public function checkStatus() - { - $output = runRemoteCommandSync($this->destination->server, ["docker ps -a --format '{{.State}}' --filter 'name={$this->application->uuid}'"]); - if ($output == '') { - $this->application->status = 'exited'; - $this->application->save(); - } else { - $this->application->status = $output; - $this->application->save(); - } - } } diff --git a/resources/views/livewire/deploy-application.blade.php b/resources/views/livewire/deploy-application.blade.php index 21ba7248e..f6330e21f 100644 --- a/resources/views/livewire/deploy-application.blade.php +++ b/resources/views/livewire/deploy-application.blade.php @@ -1,6 +1,8 @@
- - - + @if ($application->status === 'running') + + @else + + @endif status: {{ $application->status }}