2023-12-07 19:06:32 +01:00
< form wire : submit = 'submit' class = " flex flex-col gap-4 pb-2 " >
2023-10-12 09:12:46 +02:00
< div class = " flex gap-2 " >
< div >
< h2 > Service Stack </ h2 >
< div > Configuration </ div >
</ div >
< x - forms . button type = " submit " > Save </ x - forms . button >
2023-12-06 15:50:13 +01:00
< x - forms . button class = " w-64 "
2023-12-08 00:16:22 +01:00
onclick = " Livewire.dispatch('openModal', { component: 'modal.edit-compose', arguments: { { json_encode(['serviceId' => $service->id ]) }} }) " > Edit
2023-12-06 15:50:13 +01:00
Compose
2023-10-12 09:12:46 +02:00
File </ x - forms . button >
</ div >
< div class = " flex gap-2 " >
2023-11-11 21:32:41 +01:00
< x - forms . input id = " service.name " required label = " Service Name " placeholder = " My super wordpress site " />
2023-10-12 09:12:46 +02:00
< x - forms . input id = " service.description " label = " Description " />
</ div >
2024-01-21 14:30:03 +01:00
< div class = " w-96 " >
2024-02-15 20:44:01 +01:00
< x - forms . checkbox instantSave id = " service.connect_to_docker_network " label = " Connect To Predefined Network "
helper = " By default, you do not reach the Coolify defined networks.<br>Starting a docker compose based resource will have an internal network. <br>If you connect to a Coolify defined network, you maybe need to use different internal DNS names to connect to a resource.<br><br>For more information, check <a class='text-white underline' href='https://coolify.io/docs/docker/compose#connect-to-predefined-networks'>this</a>. " />
2024-01-21 14:30:03 +01:00
</ div >
2023-11-13 11:09:21 +01:00
@ if ( $fields )
< div >
< h3 > Service Specific Configuration </ h3 >
</ div >
< div class = " grid grid-cols-2 gap-2 " >
2023-11-20 15:01:35 +01:00
@ foreach ( $fields as $serviceName => $field )
2023-11-24 21:04:15 +01:00
< x - forms . input type = " { { data_get( $field , 'isPassword') ? 'password' : 'text' }} "
required = " { { str(data_get( $field , 'rules'))?->contains('required') }} "
2023-11-13 11:09:21 +01:00
helper = " Variable name: { { $serviceName }} "
2023-11-20 15:01:35 +01:00
label = " { { data_get( $field , 'serviceName') }} { { data_get( $field , 'name') }} "
2023-11-13 11:09:21 +01:00
id = " fields. { { $serviceName }}.value " ></ x - forms . input >
@ endforeach
2023-11-11 21:32:41 +01:00
</ div >
2023-11-13 11:09:21 +01:00
@ endif
2023-10-12 09:12:46 +02:00
</ form >