2023-08-07 20:14:21 +00:00
< div >
2025-10-01 06:23:21 +00:00
< form wire : submit = 'submit' class = " flex flex-col items-center gap-4 p-4 bg-white border lg:items-start dark:bg-base dark:border-coolgray-300 border-neutral-200 " >
2023-09-22 09:23:49 +00:00
@ if ( $isReadOnly )
2025-12-11 20:25:33 +00:00
@ if ( ! $storage -> isServiceResource () && ! $storage -> isDockerComposeResource ())
< div class = " w-full p-2 text-sm rounded bg-warning/10 text-warning " >
This volume is mounted as read - only and cannot be modified from the UI .
</ div >
@ endif
2023-10-03 06:48:07 +00:00
@ if ( $isFirst )
2025-03-28 21:10:15 +00:00
< div class = " flex gap-2 items-end w-full md:flex-row flex-col " >
@ if (
$storage -> resource_type === 'App\Models\ServiceApplication' ||
$storage -> resource_type === 'App\Models\ServiceDatabase' )
2025-10-13 13:38:59 +00:00
< x - forms . input id = " name " label = " Volume Name " required readonly
2025-03-28 21:10:15 +00:00
helper = " Warning: Changing the volume name after the initial start could cause problems. Only use it when you know what are you doing. " />
@ else
2025-10-13 13:38:59 +00:00
< x - forms . input id = " name " label = " Volume Name " required readonly
2025-03-28 21:10:15 +00:00
helper = " Warning: Changing the volume name after the initial start could cause problems. Only use it when you know what are you doing. " />
@ endif
@ if ( $isService || $startedAt )
2025-10-13 13:38:59 +00:00
< x - forms . input id = " hostPath " readonly helper = " Directory on the host system. "
2025-03-28 21:10:15 +00:00
label = " Source Path "
helper = " Warning: Changing the source path after the initial start could cause problems. Only use it when you know what are you doing. " />
2025-10-13 13:38:59 +00:00
< x - forms . input id = " mountPath " label = " Destination Path "
2025-03-28 21:10:15 +00:00
helper = " Directory inside the container. " required readonly />
@ else
2025-10-13 13:38:59 +00:00
< x - forms . input id = " hostPath " readonly helper = " Directory on the host system. "
2025-08-26 08:27:31 +00:00
label = " Source Path "
2025-03-28 21:10:15 +00:00
helper = " Warning: Changing the source path after the initial start could cause problems. Only use it when you know what are you doing. " />
2025-10-13 13:38:59 +00:00
< x - forms . input id = " mountPath " label = " Destination Path "
2025-03-28 21:10:15 +00:00
helper = " Directory inside the container. " required readonly />
@ endif
</ div >
2023-10-03 06:48:07 +00:00
@ else
2025-03-28 21:10:15 +00:00
< div class = " flex gap-2 items-end w-full " >
2025-10-13 13:38:59 +00:00
< x - forms . input id = " name " required readonly />
< x - forms . input id = " hostPath " readonly />
< x - forms . input id = " mountPath " required readonly />
2025-03-28 21:10:15 +00:00
</ div >
2023-10-03 06:48:07 +00:00
@ endif
2026-03-16 20:10:00 +00:00
@ if ( ! $isService )
@ can ( 'update' , $resource )
< div class = " w-96 " >
< x - forms . checkbox instantSave canGate = " update " : canResource = " $resource " label = " Add suffix for PR deployments "
id = " isPreviewSuffixEnabled "
helper = " When enabled, a -pr-N suffix is added to this volume's name for preview deployments (e.g. myvolume becomes myvolume-pr-1). Disable this for volumes that should be shared between the main and preview deployments. " ></ x - forms . checkbox >
</ div >
@ endcan
@ endif
2023-08-07 20:14:21 +00:00
@ else
2025-08-26 08:27:31 +00:00
@ can ( 'update' , $resource )
@ if ( $isFirst )
< div class = " flex gap-2 items-end w-full " >
2025-10-13 13:38:59 +00:00
< x - forms . input id = " name " label = " Volume Name " required />
< x - forms . input id = " hostPath " helper = " Directory on the host system. " label = " Source Path " />
< x - forms . input id = " mountPath " label = " Destination Path "
2025-08-26 08:27:31 +00:00
helper = " Directory inside the container. " required />
</ div >
@ else
< div class = " flex gap-2 items-end w-full " >
2025-10-13 13:38:59 +00:00
< x - forms . input id = " name " required />
< x - forms . input id = " hostPath " />
< x - forms . input id = " mountPath " required />
2025-08-26 08:27:31 +00:00
</ div >
@ endif
2026-03-16 20:10:00 +00:00
@ if ( ! $isService )
2026-03-16 13:54:22 +00:00
< div class = " w-96 " >
2026-03-16 20:10:00 +00:00
< x - forms . checkbox instantSave canGate = " update " : canResource = " $resource " label = " Add suffix for PR deployments "
2026-03-16 13:54:22 +00:00
id = " isPreviewSuffixEnabled "
helper = " When enabled, a -pr-N suffix is added to this volume's name for preview deployments (e.g. myvolume becomes myvolume-pr-1). Disable this for volumes that should be shared between the main and preview deployments. " ></ x - forms . checkbox >
</ div >
@ endif
2025-08-26 08:27:31 +00:00
< div class = " flex gap-2 " >
< x - forms . button type = " submit " >
Update
</ x - forms . button >
< x - modal - confirmation title = " Confirm persistent storage deletion? " isErrorButton buttonTitle = " Delete "
submitAction = " delete " : actions = " [
'The selected persistent storage/volume will be permanently deleted.' ,
'If the persistent storage/volume is actvily used by a resource data will be lost.' ,
] " confirmationText= " {{ $storage -> name }} "
confirmationLabel = " Please confirm the execution of the actions by entering the Storage Name below "
shortConfirmationLabel = " Storage Name " />
2025-03-28 21:10:15 +00:00
</ div >
2023-10-03 06:48:07 +00:00
@ else
2025-08-26 08:27:31 +00:00
@ if ( $isFirst )
< div class = " flex gap-2 items-end w-full " >
2025-10-13 13:38:59 +00:00
< x - forms . input id = " name " label = " Volume Name " required disabled />
< x - forms . input id = " hostPath " helper = " Directory on the host system. " label = " Source Path "
2025-08-26 08:27:31 +00:00
disabled />
2025-10-13 13:38:59 +00:00
< x - forms . input id = " mountPath " label = " Destination Path "
2025-08-26 08:27:31 +00:00
helper = " Directory inside the container. " required disabled />
</ div >
@ else
< div class = " flex gap-2 items-end w-full " >
2025-10-13 13:38:59 +00:00
< x - forms . input id = " name " required disabled />
< x - forms . input id = " hostPath " disabled />
< x - forms . input id = " mountPath " required disabled />
2025-08-26 08:27:31 +00:00
</ div >
@ endif
@ endcan
2023-08-07 20:14:21 +00:00
@ endif
</ form >
</ div >