fix: status not needed
This commit is contained in:
parent
7954b892bc
commit
94b6c0c49e
@ -58,16 +58,4 @@ public function pollingStatus()
|
||||
{
|
||||
$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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,8 @@
|
||||
<div>
|
||||
<button wire:click='deploy'>Deploy</button>
|
||||
<button wire:click='stop'>Stop</button>
|
||||
<button wire:click='checkStatus'>CheckStatus</button>
|
||||
@if ($application->status === 'running')
|
||||
<button wire:click='stop'>Stop</button>
|
||||
@else
|
||||
<button wire:click='deploy'>Deploy</button>
|
||||
@endif
|
||||
<span wire:poll='pollingStatus'>status: {{ $application->status }}</span>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user