From 2846e049fa8569f63745726025fe1bd3e08aa6dc Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Mon, 11 Dec 2023 10:29:03 +0100 Subject: [PATCH] fix: ui --- app/Livewire/Project/Shared/ExecuteContainerCommand.php | 4 +++- .../project/shared/execute-container-command.blade.php | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/app/Livewire/Project/Shared/ExecuteContainerCommand.php b/app/Livewire/Project/Shared/ExecuteContainerCommand.php index 00798eb51..5e0745490 100644 --- a/app/Livewire/Project/Shared/ExecuteContainerCommand.php +++ b/app/Livewire/Project/Shared/ExecuteContainerCommand.php @@ -80,7 +80,9 @@ class ExecuteContainerCommand extends Component $this->resource = $resource; $this->server = $this->resource->destination->server; $this->container = $this->resource->uuid; - $this->containers->push($this->container); + if (data_get($this,'resource.status') == 'running') { + $this->containers->push($this->container); + } } else if (data_get($this->parameters, 'service_uuid')) { $this->type = 'service'; $this->resource = Service::where('uuid', $this->parameters['service_uuid'])->firstOrFail(); diff --git a/resources/views/livewire/project/shared/execute-container-command.blade.php b/resources/views/livewire/project/shared/execute-container-command.blade.php index 1f8fd692c..89e32ae7a 100644 --- a/resources/views/livewire/project/shared/execute-container-command.blade.php +++ b/resources/views/livewire/project/shared/execute-container-command.blade.php @@ -7,6 +7,8 @@ @elseif ($type === 'database')

Execute Command

+

Command Details

+
Run any one-shot command inside a container.
@elseif ($type === 'service')

Execute Command

@endif