refactor: Improve storage mount forms in add.blade.php

This commit is contained in:
Andras Bacsai
2024-08-16 11:36:21 +02:00
parent fcfbba4dc6
commit 9ec7d748df

View File

@@ -1,9 +1,11 @@
<div class="flex flex-col w-full gap-2 rounded"> <div class="flex flex-col w-full gap-2 rounded max-h-[80vh] overflow-y-auto scrollbar">
<div class="p-4">
You can add Volumes, Files and Directories to your resources here. You can add Volumes, Files and Directories to your resources here.
<form class="flex flex-col w-full gap-2 rounded" wire:submit='submitPersistentVolume'> <form class="flex flex-col w-full gap-2 rounded" wire:submit='submitPersistentVolume'>
<h3>Volume Mount</h3> <h3>Volume Mount</h3>
@if ($isSwarm) @if ($isSwarm)
<h5>Swarm Mode detected: You need to set a shared volume (EFS/NFS/etc) on all the worker nodes if you would <h5>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.</h5> like to use a persistent volumes.</h5>
@endif @endif
<x-forms.input placeholder="pv-name" id="name" label="Name" required helper="Volume name." /> <x-forms.input placeholder="pv-name" id="name" label="Name" required helper="Volume name." />
@@ -19,6 +21,7 @@
<x-forms.button type="submit" @click="modalOpen=false"> <x-forms.button type="submit" @click="modalOpen=false">
Save Save
</x-forms.button> </x-forms.button>
</form> </form>
<form class="flex flex-col w-full gap-2 rounded" wire:submit='submitFileStorage'> <form class="flex flex-col w-full gap-2 rounded" wire:submit='submitFileStorage'>
<h3>File Mount</h3> <h3>File Mount</h3>
@@ -34,10 +37,11 @@
<x-forms.input placeholder="{{ application_configuration_dir() }}/{{ $resource->uuid }}/etc/nginx" <x-forms.input placeholder="{{ application_configuration_dir() }}/{{ $resource->uuid }}/etc/nginx"
id="file_storage_directory_source" label="Source Directory" required id="file_storage_directory_source" label="Source Directory" required
helper="Directory on the host system." /> helper="Directory on the host system." />
<x-forms.input placeholder="/etc/nginx" id="file_storage_directory_destination" label="Destination Directory" <x-forms.input placeholder="/etc/nginx" id="file_storage_directory_destination"
required helper="Directory inside the container." /> label="Destination Directory" required helper="Directory inside the container." />
<x-forms.button type="submit" @click="modalOpen=false"> <x-forms.button type="submit" @click="modalOpen=false">
Save Save
</x-forms.button> </x-forms.button>
</form> </form>
</div>
</div> </div>