Show queue's active worker number (#26896)

This commit is contained in:
wxiaoguang 2023-09-04 21:07:32 +08:00 committed by GitHub
parent 51cfe0e7de
commit c17fd68be7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 8 deletions

View file

@ -3164,10 +3164,10 @@ monitor.queue.name = Name
monitor.queue.type = Type monitor.queue.type = Type
monitor.queue.exemplar = Exemplar Type monitor.queue.exemplar = Exemplar Type
monitor.queue.numberworkers = Number of Workers monitor.queue.numberworkers = Number of Workers
monitor.queue.activeworkers = Active Workers
monitor.queue.maxnumberworkers = Max Number of Workers monitor.queue.maxnumberworkers = Max Number of Workers
monitor.queue.numberinqueue = Number in Queue 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.title = Pool Settings
monitor.queue.settings.desc = Pools dynamically grow in response to their worker queue blocking. monitor.queue.settings.desc = Pools dynamically grow in response to their worker queue blocking.
monitor.queue.settings.maxnumberworkers = Max Number of workers monitor.queue.settings.maxnumberworkers = Max Number of workers

View file

@ -11,6 +11,7 @@
<th>{{.locale.Tr "admin.monitor.queue.type"}}</th> <th>{{.locale.Tr "admin.monitor.queue.type"}}</th>
<th>{{.locale.Tr "admin.monitor.queue.exemplar"}}</th> <th>{{.locale.Tr "admin.monitor.queue.exemplar"}}</th>
<th>{{.locale.Tr "admin.monitor.queue.numberworkers"}}</th> <th>{{.locale.Tr "admin.monitor.queue.numberworkers"}}</th>
<th>{{.locale.Tr "admin.monitor.queue.activeworkers"}}</th>
<th>{{.locale.Tr "admin.monitor.queue.numberinqueue"}}</th> <th>{{.locale.Tr "admin.monitor.queue.numberinqueue"}}</th>
<th></th> <th></th>
</tr> </tr>
@ -21,9 +22,10 @@
<td>{{$q.GetName}}</td> <td>{{$q.GetName}}</td>
<td>{{$q.GetType}}</td> <td>{{$q.GetType}}</td>
<td>{{$q.GetItemTypeName}}</td> <td>{{$q.GetItemTypeName}}</td>
<td>{{$sum := $q.GetWorkerNumber}}{{if lt $sum 0}}-{{else}}{{$sum}}{{end}}</td> <td>{{$q.GetWorkerNumber}}</td>
<td>{{$sum = $q.GetQueueItemNumber}}{{if lt $sum 0}}-{{else}}{{$sum}}{{end}}</td> <td>{{$q.GetWorkerActiveNumber}}</td>
<td><a href="{{$.Link}}/{{$qid}}" class="button">{{if lt $sum 0}}{{$.locale.Tr "admin.monitor.queue.review"}}{{else}}{{$.locale.Tr "admin.monitor.queue.review_add"}}{{end}}</a></td> <td>{{$sum := $q.GetQueueItemNumber}}{{if lt $sum 0}}-{{else}}{{$sum}}{{end}}</td>
<td><a href="{{$.Link}}/{{$qid}}" class="button">{{$.locale.Tr "admin.monitor.queue.review_add"}}</a></td>
</tr> </tr>
{{end}} {{end}}
</tbody> </tbody>

View file

@ -11,6 +11,7 @@
<th>{{.locale.Tr "admin.monitor.queue.type"}}</th> <th>{{.locale.Tr "admin.monitor.queue.type"}}</th>
<th>{{.locale.Tr "admin.monitor.queue.exemplar"}}</th> <th>{{.locale.Tr "admin.monitor.queue.exemplar"}}</th>
<th>{{.locale.Tr "admin.monitor.queue.numberworkers"}}</th> <th>{{.locale.Tr "admin.monitor.queue.numberworkers"}}</th>
<th>{{.locale.Tr "admin.monitor.queue.activeworkers"}}</th>
<th>{{.locale.Tr "admin.monitor.queue.maxnumberworkers"}}</th> <th>{{.locale.Tr "admin.monitor.queue.maxnumberworkers"}}</th>
<th>{{.locale.Tr "admin.monitor.queue.numberinqueue"}}</th> <th>{{.locale.Tr "admin.monitor.queue.numberinqueue"}}</th>
</tr> </tr>
@ -20,10 +21,11 @@
<td>{{.Queue.GetName}}</td> <td>{{.Queue.GetName}}</td>
<td>{{.Queue.GetType}}</td> <td>{{.Queue.GetType}}</td>
<td>{{.Queue.GetItemTypeName}}</td> <td>{{.Queue.GetItemTypeName}}</td>
<td>{{$sum := .Queue.GetWorkerNumber}}{{if lt $sum 0}}-{{else}}{{$sum}}{{end}}</td> <td>{{.Queue.GetWorkerNumber}}</td>
<td>{{if lt $sum 0}}-{{else}}{{.Queue.GetWorkerMaxNumber}}{{end}}</td> <td>{{.Queue.GetWorkerActiveNumber}}</td>
<td>{{.Queue.GetWorkerMaxNumber}}</td>
<td> <td>
{{$sum = .Queue.GetQueueItemNumber}} {{$sum := .Queue.GetQueueItemNumber}}
{{if lt $sum 0}} {{if lt $sum 0}}
- -
{{else}} {{else}}