2023-10-04 07:58:39 +00:00
|
|
|
<div>
|
|
|
|
@if (
|
|
|
|
$resource->getMorphClass() == 'App\Models\Application' ||
|
2023-10-12 15:18:33 +00:00
|
|
|
$resource->getMorphClass() == 'App\Models\StandalonePostgresql' ||
|
2023-11-10 08:54:40 +00:00
|
|
|
$resource->getMorphClass() == 'App\Models\StandaloneRedis' ||
|
|
|
|
$resource->getMorphClass() == 'App\Models\StandaloneMariadb' ||
|
2024-04-10 13:00:46 +00:00
|
|
|
$resource->getMorphClass() == 'App\Models\StandaloneKeydb' ||
|
|
|
|
$resource->getMorphClass() == 'App\Models\StandaloneDragonfly' ||
|
|
|
|
$resource->getMorphClass() == 'App\Models\StandaloneClickhouse' ||
|
2023-11-10 08:54:40 +00:00
|
|
|
$resource->getMorphClass() == 'App\Models\StandaloneMongodb')
|
2023-10-04 07:58:39 +00:00
|
|
|
<div class="flex items-center gap-2">
|
|
|
|
<h2>Storages</h2>
|
|
|
|
<x-helper
|
|
|
|
helper="For Preview Deployments, storage has a <span class='text-helper'>-pr-#PRNumber</span> in their
|
|
|
|
volume
|
|
|
|
name, example: <span class='text-helper'>-pr-1</span>" />
|
2024-04-15 17:47:17 +00:00
|
|
|
@if ($resource?->build_pack !== 'dockercompose')
|
2024-05-27 12:14:44 +00:00
|
|
|
<x-modal-input :closeOutside="false" buttonTitle="+ Add" title="New Persistent Storage">
|
|
|
|
<livewire:project.shared.storages.add :resource="$resource"/>
|
2024-04-15 17:47:17 +00:00
|
|
|
</x-modal-input>
|
|
|
|
@endif
|
2023-10-04 07:58:39 +00:00
|
|
|
</div>
|
|
|
|
<div class="pb-4">Persistent storage to preserve data between deployments.</div>
|
2024-04-15 17:47:17 +00:00
|
|
|
@if ($resource?->build_pack === 'dockercompose')
|
|
|
|
<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>
|
|
|
|
@endif
|
2024-03-20 11:54:06 +00:00
|
|
|
@if ($resource->persistentStorages()->get()->count() === 0 && $resource->fileStorages()->get()->count() == 0)
|
2024-04-15 17:47:17 +00:00
|
|
|
<div class="pt-4">No storage found.</div>
|
|
|
|
@endif
|
|
|
|
@if ($resource->persistentStorages()->get()->count() > 0)
|
|
|
|
<livewire:project.shared.storages.all :resource="$resource" />
|
|
|
|
@endif
|
|
|
|
@if ($resource->fileStorages()->get()->count() > 0)
|
|
|
|
<div class="flex flex-col gap-4 pt-4">
|
|
|
|
@foreach ($resource->fileStorages()->get()->sort() as $fileStorage)
|
|
|
|
<livewire:project.service.file-storage :fileStorage="$fileStorage"
|
|
|
|
wire:key="resource-{{ $fileStorage->uuid }}" />
|
|
|
|
@endforeach
|
|
|
|
</div>
|
2023-10-04 07:58:39 +00:00
|
|
|
@endif
|
|
|
|
@else
|
2024-04-08 07:51:14 +00:00
|
|
|
@if ($resource->persistentStorages()->get()->count() > 0)
|
2023-10-04 07:58:39 +00:00
|
|
|
<h3 class="pt-4">{{ Str::headline($resource->name) }} </h3>
|
|
|
|
@endif
|
|
|
|
@if ($resource->persistentStorages()->get()->count() > 0)
|
|
|
|
<livewire:project.shared.storages.all :resource="$resource" />
|
|
|
|
@endif
|
|
|
|
@if ($resource->fileStorages()->get()->count() > 0)
|
|
|
|
<div class="flex flex-col gap-4 pt-4">
|
|
|
|
@foreach ($resource->fileStorages()->get()->sort() as $fileStorage)
|
2024-04-15 17:47:17 +00:00
|
|
|
<livewire:project.service.file-storage :fileStorage="$fileStorage"
|
|
|
|
wire:key="resource-{{ $fileStorage->uuid }}" />
|
2023-10-04 07:58:39 +00:00
|
|
|
@endforeach
|
|
|
|
</div>
|
|
|
|
@endif
|
|
|
|
@endif
|
|
|
|
</div>
|