{{ extends "_base" }} {{ import "../_modules/detail" }} {{ block script() }} {{ end }} {{ block body_content() }}

{{ .Service.Spec.Name }}

{{ if .Service.Spec.Mode.Replicated }} {{ end }}
ID
{{ .Service.ID }}
{{ i18n("field.image") }}
{{ .Service.Spec.TaskTemplate.ContainerSpec.Image }}
Mode
{{if .Service.Spec.Mode.Replicated}}replicated{{else}}global{{end}} {{if .Service.Spec.Mode.Replicated}} {{.Service.Replicas}} {{end}}
{{ if .Service.Spec.TaskTemplate.ContainerSpec.Command }}
Command
{{ json(.Service.Spec.TaskTemplate.ContainerSpec.Command) }}
{{ end }} {{ if .Service.Spec.TaskTemplate.ContainerSpec.Args }}
Args
{{ json(.Service.Spec.TaskTemplate.ContainerSpec.Args) }}
{{ end }} {{ if .Service.Spec.TaskTemplate.ContainerSpec.Dir }}
Work directory
{{ .Service.Spec.TaskTemplate.ContainerSpec.Dir }}
{{ end }} {{ if .Service.Spec.TaskTemplate.ContainerSpec.User }}
User
{{ .Service.Spec.TaskTemplate.ContainerSpec.User }}
{{ end }}
{{ i18n("field.created-at") }}
{{ time(.Service.CreatedAt) }}
{{ i18n("field.updated-at") }}
{{ time(.Service.UpdatedAt) }}
{{ if .Service.UpdateStatus }}
{{ i18n("service.field.update-status") }}
{{ .Service.UpdateStatus.State }}({{ .Service.UpdateStatus.Message }})
{{ end }}

Command line

{{ .Command }}
{{if .Service.Endpoint.VirtualIPs}}

Networks

{{range .Service.Networks}} {{end}}
Name ID Address
{{.Name}} {{.ID}} {{.Address}}
{{end}} {{ yield tags(title="Environment variables", tags=.Service.Env) }} {{ yield tags(title="Service labels", tags=.Service.Spec.Annotations.Labels) }} {{ yield tags(title="Container labels", tags=.Service.Spec.TaskTemplate.ContainerSpec.Labels) }} {{if .Service.Spec.TaskTemplate.ContainerSpec.Mounts}}

Mounts

{{range .Service.Spec.TaskTemplate.ContainerSpec.Mounts}} {{end}}
Type Source Target Read only
{{.Type}} {{.Source}} {{.Target}} {{.ReadOnly ? "Yes" : "No"}}
{{end}}
Resolution mode
{{ .Service.Endpoint.Spec.Mode }}
Port config
{{range i, p := .Service.Endpoint.Spec.Ports}} {{end}}
Host Container Protocol Mode
{{p.PublishedPort}} {{p.TargetPort}} {{p.Protocol}} {{p.PublishMode}}
{{ if .Service.Spec.TaskTemplate.ContainerSpec.Secrets }}

Secrets

{{ range .Service.Spec.TaskTemplate.ContainerSpec.Secrets }} {{ end }}
Name File name UID GID Mode
{{ .SecretName }} {{ .File.Name }} {{ .File.UID }} {{ .File.GID }} {{ .File.Mode }}
{{ end }} {{ if .Service.Spec.TaskTemplate.ContainerSpec.Configs }}

Configs

{{ range .Service.Spec.TaskTemplate.ContainerSpec.Configs }} {{ end }}
Name File name UID GID Mode
{{ .ConfigName }} {{ .File.Name }} {{ .File.UID }} {{ .File.GID }} {{ .File.Mode }}
{{ end }}
{{ if .Service.Spec.TaskTemplate.Resources }}

Limits

{{ if .Service.Spec.TaskTemplate.Resources.Limits }}
CPU
{{ .Service.Spec.TaskTemplate.Resources.Limits.NanoCPUs / 1e9 }}
Memory
{{ .Service.Spec.TaskTemplate.Resources.Limits.MemoryBytes / 1024 / 1024 }}M
{{ end }}

Reservations

{{ if .Service.Spec.TaskTemplate.Resources.Reservations }}
CPU
{{ .Service.Spec.TaskTemplate.Resources.Reservations.NanoCPUs / 1e9 }}
Memory
{{ .Service.Spec.TaskTemplate.Resources.Reservations.MemoryBytes / 1024 / 1024 }}M
{{ end }}
{{ end }}
{{ if .Service.Spec.TaskTemplate.Placement }}

Constraints

{{ range .Service.Spec.TaskTemplate.Placement.Constraints }} {{ end }}
{{ . }}

Preferences

{{ range .Service.Spec.TaskTemplate.Placement.Preferences }} {{ end }}
{{ .Spread }}
{{ end }}

Update

{{ if .Service.Spec.UpdateConfig }}
Parallelism
{{ .Service.Spec.UpdateConfig.Parallelism }}
Delay
{{ .Service.Spec.UpdateConfig.Delay }}
Failure action
{{ .Service.Spec.UpdateConfig.FailureAction }}
Order
{{ .Service.Spec.UpdateConfig.Order }}
{{ end }}

Rollback

{{ if .Service.Spec.RollbackConfig }}
Parallelism
{{ .Service.Spec.RollbackConfig.Parallelism }}
Delay
{{ .Service.Spec.RollbackConfig.Delay }}
Failure action
{{ .Service.Spec.RollbackConfig.FailureAction }}
Order
{{ .Service.Spec.RollbackConfig.Order }}
{{ end }}

Restart

{{ if .Service.Spec.TaskTemplate.RestartPolicy }}
Condition
{{ .Service.Spec.TaskTemplate.RestartPolicy.Condition }}
{{ if .Service.Spec.TaskTemplate.RestartPolicy.MaxAttempts }}
Max attempts
{{ elem(.Service.Spec.TaskTemplate.RestartPolicy.MaxAttempts) }}
{{ end }} {{ if .Service.Spec.TaskTemplate.RestartPolicy.Delay }}
Delay
{{ .Service.Spec.TaskTemplate.RestartPolicy.Delay }}
{{ end }} {{ if .Service.Spec.TaskTemplate.RestartPolicy.Window }}
Window
{{ .Service.Spec.TaskTemplate.RestartPolicy.Window }}
{{ end }}
{{ end }}
{{ if .Service.Spec.TaskTemplate.LogDriver }}
Name
{{ .Service.Spec.TaskTemplate.LogDriver.Name }}
Options
{{range k, v := .Service.Spec.TaskTemplate.LogDriver.Options}} {{end}}
Name Value
{{ k }} {{ v }}
{{end}}
{{ if .Service.Spec.TaskTemplate.ContainerSpec.Hostname }}
Hostname
{{ .Service.Spec.TaskTemplate.ContainerSpec.Hostname }}
{{ end }} {{ if .Service.Spec.TaskTemplate.ContainerSpec.Hosts }}
Hosts
{{ range .Service.Spec.TaskTemplate.ContainerSpec.Hosts }}
{{ . }}
{{ end }} {{ end }} {{ if .Service.Spec.TaskTemplate.ContainerSpec.DNSConfig }} {{ if .Service.Spec.TaskTemplate.ContainerSpec.DNSConfig.Nameservers }}
Name servers
{{ join(.Service.Spec.TaskTemplate.ContainerSpec.DNSConfig.Nameservers, ",") }}
{{ end }} {{ if .Service.Spec.TaskTemplate.ContainerSpec.DNSConfig.Search }}
Search
{{ join(.Service.Spec.TaskTemplate.ContainerSpec.DNSConfig.Search, ",") }}
{{ end }} {{ if .Service.Spec.TaskTemplate.ContainerSpec.DNSConfig.Options }}
Options
{{ join(.Service.Spec.TaskTemplate.ContainerSpec.DNSConfig.Options, ",") }}
{{ end }} {{ end }}
{{if .Tasks}}

Tasks

{{range .Tasks}} {{end}}
ID Status Node Networks Updated
{{.ID}} {{.Status.State}} {{ if .NodeName }}{{.NodeName}}{{ end }}
{{ range .NetworksAttachments }}
{{ .Network.Spec.Name }}{{ .Addresses }}
{{ end }}
{{time(.UpdatedAt)}}
{{end}} {{ i18n("button.return") }}
{{ end }}