From c17fd68be7334368d54d3c16c3720e1f92376479 Mon Sep 17 00:00:00 2001 From: wxiaoguang Date: Mon, 4 Sep 2023 21:07:32 +0800 Subject: [PATCH] Show queue's active worker number (#26896) --- options/locale/locale_en-US.ini | 4 ++-- templates/admin/queue.tmpl | 8 +++++--- templates/admin/queue_manage.tmpl | 8 +++++--- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index 66f67d4896..08aa320cc2 100644 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -3164,10 +3164,10 @@ monitor.queue.name = Name monitor.queue.type = Type monitor.queue.exemplar = Exemplar Type monitor.queue.numberworkers = Number of Workers +monitor.queue.activeworkers = Active Workers monitor.queue.maxnumberworkers = Max Number of Workers monitor.queue.numberinqueue = Number in Queue -monitor.queue.review = Review Config -monitor.queue.review_add = Review/Add Workers +monitor.queue.review_add = Review / Add Workers monitor.queue.settings.title = Pool Settings monitor.queue.settings.desc = Pools dynamically grow in response to their worker queue blocking. monitor.queue.settings.maxnumberworkers = Max Number of workers diff --git a/templates/admin/queue.tmpl b/templates/admin/queue.tmpl index 4ed9dbb9aa..efca8c1f2f 100644 --- a/templates/admin/queue.tmpl +++ b/templates/admin/queue.tmpl @@ -11,6 +11,7 @@ {{.locale.Tr "admin.monitor.queue.type"}} {{.locale.Tr "admin.monitor.queue.exemplar"}} {{.locale.Tr "admin.monitor.queue.numberworkers"}} + {{.locale.Tr "admin.monitor.queue.activeworkers"}} {{.locale.Tr "admin.monitor.queue.numberinqueue"}} @@ -21,9 +22,10 @@ {{$q.GetName}} {{$q.GetType}} {{$q.GetItemTypeName}} - {{$sum := $q.GetWorkerNumber}}{{if lt $sum 0}}-{{else}}{{$sum}}{{end}} - {{$sum = $q.GetQueueItemNumber}}{{if lt $sum 0}}-{{else}}{{$sum}}{{end}} - {{if lt $sum 0}}{{$.locale.Tr "admin.monitor.queue.review"}}{{else}}{{$.locale.Tr "admin.monitor.queue.review_add"}}{{end}} + {{$q.GetWorkerNumber}} + {{$q.GetWorkerActiveNumber}} + {{$sum := $q.GetQueueItemNumber}}{{if lt $sum 0}}-{{else}}{{$sum}}{{end}} + {{$.locale.Tr "admin.monitor.queue.review_add"}} {{end}} diff --git a/templates/admin/queue_manage.tmpl b/templates/admin/queue_manage.tmpl index c8ae07a19a..a46d9462ec 100644 --- a/templates/admin/queue_manage.tmpl +++ b/templates/admin/queue_manage.tmpl @@ -11,6 +11,7 @@ {{.locale.Tr "admin.monitor.queue.type"}} {{.locale.Tr "admin.monitor.queue.exemplar"}} {{.locale.Tr "admin.monitor.queue.numberworkers"}} + {{.locale.Tr "admin.monitor.queue.activeworkers"}} {{.locale.Tr "admin.monitor.queue.maxnumberworkers"}} {{.locale.Tr "admin.monitor.queue.numberinqueue"}} @@ -20,10 +21,11 @@ {{.Queue.GetName}} {{.Queue.GetType}} {{.Queue.GetItemTypeName}} - {{$sum := .Queue.GetWorkerNumber}}{{if lt $sum 0}}-{{else}}{{$sum}}{{end}} - {{if lt $sum 0}}-{{else}}{{.Queue.GetWorkerMaxNumber}}{{end}} + {{.Queue.GetWorkerNumber}} + {{.Queue.GetWorkerActiveNumber}} + {{.Queue.GetWorkerMaxNumber}} - {{$sum = .Queue.GetQueueItemNumber}} + {{$sum := .Queue.GetQueueItemNumber}} {{if lt $sum 0}} - {{else}}