{{template "base/head" .}}
{{template "admin/navbar" .}}
{{template "base/alert" .}}

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

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

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

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

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

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

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

{{else}}

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

{{end}}
{{else}}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

{{$.CsrfTokenHtml}}

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

{{range .Queue.Workers}} {{else}} {{end}}
{{.i18n.Tr "admin.monitor.queue.numberworkers"}} {{.i18n.Tr "admin.monitor.start"}} {{.i18n.Tr "admin.monitor.queue.pool.timeout"}}
{{.Workers}}{{if .IsFlusher}}{{svg "octicon-sync"}}{{end}} {{DateFmtLong .Start}} {{if .HasTimeout}}{{DateFmtLong .Timeout}}{{else}}-{{end}} {{svg "octicon-trash"}}
{{.i18n.Tr "admin.monitor.queue.pool.workers.none" }}
{{end}}

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

{{.Queue.Configuration | JsonPrettyPrint}}
		
{{template "base/footer" .}}