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