mirror of
https://github.com/ershisan99/coolify.git
synced 2025-12-16 20:49:28 +00:00
fix: file storages (dir/file mount) handled properly
This commit is contained in:
@@ -14,16 +14,30 @@
|
||||
<div class="flex gap-2">
|
||||
@if ($fileStorage->is_directory)
|
||||
<x-modal-confirmation action="convertToFile" buttonTitle="Convert to file">
|
||||
This will delete all files in this directory. It is not reversible. <br>Please think again.
|
||||
<div>This will delete all files in this directory. It is not reversible. <strong
|
||||
class="text-error">Please think
|
||||
again.</strong><br><br></div>
|
||||
</x-modal-confirmation>
|
||||
@else
|
||||
<x-modal-confirmation action="convertToDirectory" buttonTitle="Convert to directory">
|
||||
This will convert this to a directory. If it was a file, it will be deleted. It is not reversible.
|
||||
<br>Please think again.
|
||||
<div>This will delete the file and make a directory instead. It is not reversible.
|
||||
<strong class="text-error">Please think
|
||||
again.</strong><br><br>
|
||||
</div>
|
||||
</x-modal-confirmation>
|
||||
@endif
|
||||
<x-modal-confirmation isErrorButton buttonTitle="Delete">
|
||||
This file / directory will be deleted. It is not reversible. <br>Please think again.
|
||||
<div class="px-2">This resource will be deleted. It is not reversible. <strong
|
||||
class="text-error">Please think
|
||||
again.</strong><br><br></div>
|
||||
<h4>Actions</h4>
|
||||
@if ($fileStorage->is_directory)
|
||||
<x-forms.checkbox id="permanently_delete"
|
||||
label="Permanently delete directory from the server?"></x-forms.checkbox>
|
||||
@else
|
||||
<x-forms.checkbox id="permanently_delete"
|
||||
label="Permanently delete file from the server?"></x-forms.checkbox>
|
||||
@endif
|
||||
</x-modal-confirmation>
|
||||
</div>
|
||||
@if (!$fileStorage->is_directory)
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
<span class="dark:text-warning text-coollabs">Please modify storage layout in your Docker Compose
|
||||
file or reload the compose file to reread the storage layout.</span>
|
||||
@else
|
||||
@if ($resource->persistentStorages()->get()->count() === 0 && $resource->fileStorages()->get()->count() == 0)
|
||||
@if ($resource->persistentStorages()->get()->count() === 0 && $fileStorage->count() == 0)
|
||||
<div class="pt-4">No storage found.</div>
|
||||
@endif
|
||||
@endif
|
||||
@@ -33,9 +33,9 @@
|
||||
@if ($resource->persistentStorages()->get()->count() > 0)
|
||||
<livewire:project.shared.storages.all :resource="$resource" />
|
||||
@endif
|
||||
@if ($resource->fileStorages()->get()->count() > 0)
|
||||
@if ($fileStorage->count() > 0)
|
||||
<div class="flex flex-col gap-4 pt-4">
|
||||
@foreach ($resource->fileStorages()->get()->sort() as $fileStorage)
|
||||
@foreach ($fileStorage->sort() as $fileStorage)
|
||||
<livewire:project.service.file-storage :fileStorage="$fileStorage"
|
||||
wire:key="resource-{{ $fileStorage->uuid }}" />
|
||||
@endforeach
|
||||
@@ -48,9 +48,9 @@
|
||||
@if ($resource->persistentStorages()->get()->count() > 0)
|
||||
<livewire:project.shared.storages.all :resource="$resource" />
|
||||
@endif
|
||||
@if ($resource->fileStorages()->get()->count() > 0)
|
||||
@if ($fileStorage->count() > 0)
|
||||
<div class="flex flex-col gap-4 pt-4">
|
||||
@foreach ($resource->fileStorages()->get()->sort() as $fileStorage)
|
||||
@foreach ($fileStorage->sort() as $fileStorage)
|
||||
<livewire:project.service.file-storage :fileStorage="$fileStorage"
|
||||
wire:key="resource-{{ $fileStorage->uuid }}" />
|
||||
@endforeach
|
||||
|
||||
Reference in New Issue
Block a user