diff --git a/app/Livewire/Project/Shared/Storages/Show.php b/app/Livewire/Project/Shared/Storages/Show.php index 2091eca14..e90476195 100644 --- a/app/Livewire/Project/Shared/Storages/Show.php +++ b/app/Livewire/Project/Shared/Storages/Show.php @@ -88,4 +88,13 @@ class Show extends Component $this->storage->delete(); $this->dispatch('refreshStorages'); } + + public function clearHostPath() + { + $this->authorize('update', $this->resource); + $this->hostPath = null; + $this->storage->host_path = null; + $this->storage->save(); + $this->dispatch('success', 'Source path removed. Use Directory Mount for host directory bindings.'); + } } diff --git a/resources/views/livewire/project/service/storage.blade.php b/resources/views/livewire/project/service/storage.blade.php index 9e32cd22d..a33d9b005 100644 --- a/resources/views/livewire/project/service/storage.blade.php +++ b/resources/views/livewire/project/service/storage.blade.php @@ -118,25 +118,9 @@
Docker Volumes mounted to the container.
- @if ($isSwarm) -
Swarm Mode detected: You need to set a shared - volume - (EFS/NFS/etc) on all the worker nodes if you would like to use a - persistent - volumes.
- @endif
- @if ($isSwarm) - - @else - - @endif diff --git a/resources/views/livewire/project/shared/storages/show.blade.php b/resources/views/livewire/project/shared/storages/show.blade.php index 694f7d4f2..7b7e58dc5 100644 --- a/resources/views/livewire/project/shared/storages/show.blade.php +++ b/resources/views/livewire/project/shared/storages/show.blade.php @@ -17,24 +17,20 @@ @endif - @if ($isService || $startedAt) + @if ($hostPath) - - @else - - @endif +
@else
- + @if ($hostPath) + + @endif
@endif @@ -43,14 +39,18 @@ @if ($isFirst)
- + @if ($hostPath) + + @endif
@else
- + @if ($hostPath) + + @endif
@endif @@ -58,6 +58,13 @@ Update + @if ($hostPath) + + @endif - + @if ($hostPath) + + @endif @else
- + @if ($hostPath) + + @endif
@endif