{{ import "form" }} {{ block form_mode() }}
{{ end }} {{ block form_network() }}
{{ set := .CheckedNetworks }} {{range .Networks}}
{{ yield checkbox(name="networks", value=.Name, label=.Name, checked=set.Contains(.Name)) }}
{{end}}
{{ end }} {{ block form_main_right() }}
{{ end }} {{ block form_others() }}
{{ yield radios(name="endpoint.mode", values=slice("vip", "dnsrr"), labels=slice("VIP", "DNS-RR"), checked=.Service.Endpoint.Mode) }}
{{range i, p := .Service.Endpoint.Ports}} {{end}}
Host Container Protocol Mode
{{range i, m := .Service.Mounts}} {{end}}
Type Source Target ReadOnly Propagation
{{ yield select(name="mounts["+i+"].type", values=slice("bind", "volume", "tmpfs"), labels=slice("Bind", "Volume", "TempFS"), selected=m.Type) }}
{{ yield select(name="mounts["+i+"].read_only", values=slice("false", "true"), labels=slice("No", "Yes"), selected=m.ReadOnly, dt="bool") }}
{{range i, c := .Service.Secrets}} {{end}}
Name File name UID GID Mode
{{ c.Name }}

Secrets will be mounted as /run/secrets/$FILE_NAME in containers by default, You can specify a custom location in Docker 17.06 and higher.

{{range i, c := .Service.Configs}} {{end}}
Name File name UID GID Mode
{{ c.Name }}

Configs will be mounted as /$FILE_NAME in containers by default, You can specify a custom location.

Limits
Reservations
{{ range i, c := .Service.Placement.Constraints }} {{ end }}
Name Operator Value
{{ yield select(name="placement.constraints["+i+"].op", values=slice("==", "!="), selected=c.Operator) }}
{{ range i, p := .Service.Placement.Preferences }} {{ end }}
Spread
Update
{{ yield radios(name="update_policy.failure_action", values=slice("pause", "continue", "rollback"), checked=.Service.UpdatePolicy.FailureAction) }}
{{ yield radios(name="update_policy.order", values=slice("start-first", "stop-first"), checked=.Service.UpdatePolicy.Order) }}
Rollback
{{ yield radios(name="rollback_policy.failure_action", values=slice("pause", "continue"), checked=.Service.RollbackPolicy.FailureAction) }}
{{ yield radios(name="rollback_policy.order", values=slice("start-first", "stop-first"), checked=.Service.RollbackPolicy.Order) }}
Restart
{{ yield radios(name="restart_policy.condition", values=slice("any", "on-failure", "none"), checked=.Service.RestartPolicy.Condition) }}
{{ yield radio(id="log_driver.name-default", name="log_driver.name", value="", label="default", checked=.Service.LogDriver.Name) }} {{ yield radios(name="log_driver.name", values=slice("json-file", "syslog", "journald", "gelf", "fluentd", "awslogs", "splunk", "etwlogs", "gcplogs", "none"), checked=.Service.LogDriver.Name) }}
{{ yield options_table(name="log_driver.option", items=.Service.LogDriver.Options) }}
{{ end }} {{ block dialog(name, items) }} {{ end }}