lasthourcloud/resources/views/livewire/project/shared/storages/add.blade.php

29 lines
1.3 KiB
PHP
Raw Normal View History

2023-07-13 11:16:24 +00:00
<dialog id="newStorage" class="modal">
2023-12-07 18:06:32 +00:00
<form method="dialog" class="flex flex-col gap-2 rounded modal-box" wire:submit='submit'>
2023-07-13 11:19:54 +00:00
<h3 class="text-lg font-bold">Add Storage Volume</h3>
2023-12-18 13:01:25 +00:00
@if ($isSwarm)
<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>
@endif
<x-forms.input placeholder="pv-name" id="name" label="Name" required helper="Volume name." />
@if ($isSwarm)
<x-forms.input placeholder="/root" id="host_path" label="Source Path" required helper="Directory on the host system." />
@else
<x-forms.input placeholder="/root" id="host_path" label="Source Path" helper="Directory on the host system." />
@endif
<x-forms.input placeholder="/tmp/root" id="mount_path" label="Destination Path" required helper="Directory inside the container." />
<x-forms.button type="submit">
2023-07-13 11:16:24 +00:00
Save
</x-forms.button>
</form>
<form method="dialog" class="modal-backdrop">
<button>close</button>
</form>
2023-12-18 13:01:25 +00:00
<script>
document.addEventListener('livewire:initialized', () => {
Livewire.on('closeStorageModal', () => {
document.getElementById('newStorage').close()
})
})
</script>
2023-07-13 11:16:24 +00:00
</dialog>