{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin monitor")}}

{{.locale.Tr "admin.monitor.queue" .Queue.Name}}

{{.locale.Tr "admin.monitor.queue.name"}} {{.locale.Tr "admin.monitor.queue.type"}} {{.locale.Tr "admin.monitor.queue.exemplar"}} {{.locale.Tr "admin.monitor.queue.numberworkers"}} {{.locale.Tr "admin.monitor.queue.maxnumberworkers"}} {{.locale.Tr "admin.monitor.queue.numberinqueue"}}
{{.Queue.Name}} {{.Queue.Type}} {{.Queue.ExemplarType}} {{$sum := .Queue.NumberOfWorkers}}{{if lt $sum 0}}-{{else}}{{$sum}}{{end}} {{if lt $sum 0}}-{{else}}{{.Queue.MaxNumberOfWorkers}}{{end}} {{$sum = .Queue.NumberInQueue}}{{if lt $sum 0}}-{{else}}{{$sum}}{{end}}
{{if lt $sum 0}}

{{.locale.Tr "admin.monitor.queue.nopool.title"}}

{{if eq .Queue.Type "wrapped"}}

{{.locale.Tr "admin.monitor.queue.wrapped.desc"}}

{{else if eq .Queue.Type "persistable-channel"}}

{{.locale.Tr "admin.monitor.queue.persistable-channel.desc"}}

{{else}}

{{.locale.Tr "admin.monitor.queue.nopool.desc"}}

{{end}}
{{else}}

{{.locale.Tr "admin.monitor.queue.settings.title"}}

{{.locale.Tr "admin.monitor.queue.settings.desc"}}

{{$.CsrfTokenHtml}}
{{.locale.Tr "admin.monitor.queue.settings.blocktimeout.value" .Queue.BlockTimeout}}

{{.locale.Tr "admin.monitor.queue.pool.addworkers.title"}}

{{.locale.Tr "admin.monitor.queue.pool.addworkers.desc"}}

{{$.CsrfTokenHtml}}
{{if .Queue.Pausable}} {{if .Queue.IsPaused}}

{{.locale.Tr "admin.monitor.queue.pool.resume.title"}}

{{.locale.Tr "admin.monitor.queue.pool.resume.desc"}}

{{$.CsrfTokenHtml}}
{{else}}

{{.locale.Tr "admin.monitor.queue.pool.pause.title"}}

{{.locale.Tr "admin.monitor.queue.pool.pause.desc"}}

{{$.CsrfTokenHtml}}
{{end}} {{end}}

{{.locale.Tr "admin.monitor.queue.pool.flush.title"}}

{{.locale.Tr "admin.monitor.queue.pool.flush.desc"}}

{{$.CsrfTokenHtml}}

{{.locale.Tr "admin.monitor.queue.pool.workers.title"}}

{{range .Queue.Workers}} {{else}} {{end}}
{{.locale.Tr "admin.monitor.queue.numberworkers"}} {{.locale.Tr "admin.monitor.start"}} {{.locale.Tr "admin.monitor.queue.pool.timeout"}}
{{.Workers}}{{if .IsFlusher}}{{svg "octicon-sync"}}{{end}} {{template "shared/datetime/full" (dict "Datetime" (DateFmtLong .Start) "Fallback" (DateFmtLong .Start) )}} {{if .HasTimeout}}{{template "shared/datetime/full" (dict "Datetime" (DateFmtLong .Timeout) "Fallback" (DateFmtLong .Timeout) )}}{{else}}-{{end}} {{svg "octicon-trash"}}
{{.locale.Tr "admin.monitor.queue.pool.workers.none"}}
{{end}}

{{.locale.Tr "admin.monitor.queue.configuration"}}

{{.Queue.Configuration | JsonPrettyPrint}}
{{template "admin/layout_footer" .}}