summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorwxiaoguang <wxiaoguang@gmail.com>2023-09-04 21:07:32 +0800
committerGitHub <noreply@github.com>2023-09-04 21:07:32 +0800
commitc17fd68be7334368d54d3c16c3720e1f92376479 (patch)
tree82edfd717c521cbac0ea283c60b4df4eea834459 /templates
parent51cfe0e7deb511233ecca331359e8c875448a940 (diff)
downloadgitea-c17fd68be7334368d54d3c16c3720e1f92376479.tar.gz
gitea-c17fd68be7334368d54d3c16c3720e1f92376479.zip
Show queue's active worker number (#26896)
Diffstat (limited to 'templates')
-rw-r--r--templates/admin/queue.tmpl8
-rw-r--r--templates/admin/queue_manage.tmpl8
2 files changed, 10 insertions, 6 deletions
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 @@
<th>{{.locale.Tr "admin.monitor.queue.type"}}</th>
<th>{{.locale.Tr "admin.monitor.queue.exemplar"}}</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></th>
</tr>
@@ -21,9 +22,10 @@
<td>{{$q.GetName}}</td>
<td>{{$q.GetType}}</td>
<td>{{$q.GetItemTypeName}}</td>
- <td>{{$sum := $q.GetWorkerNumber}}{{if lt $sum 0}}-{{else}}{{$sum}}{{end}}</td>
- <td>{{$sum = $q.GetQueueItemNumber}}{{if lt $sum 0}}-{{else}}{{$sum}}{{end}}</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>{{$q.GetWorkerNumber}}</td>
+ <td>{{$q.GetWorkerActiveNumber}}</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>
{{end}}
</tbody>
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 @@
<th>{{.locale.Tr "admin.monitor.queue.type"}}</th>
<th>{{.locale.Tr "admin.monitor.queue.exemplar"}}</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.numberinqueue"}}</th>
</tr>
@@ -20,10 +21,11 @@
<td>{{.Queue.GetName}}</td>
<td>{{.Queue.GetType}}</td>
<td>{{.Queue.GetItemTypeName}}</td>
- <td>{{$sum := .Queue.GetWorkerNumber}}{{if lt $sum 0}}-{{else}}{{$sum}}{{end}}</td>
- <td>{{if lt $sum 0}}-{{else}}{{.Queue.GetWorkerMaxNumber}}{{end}}</td>
+ <td>{{.Queue.GetWorkerNumber}}</td>
+ <td>{{.Queue.GetWorkerActiveNumber}}</td>
+ <td>{{.Queue.GetWorkerMaxNumber}}</td>
<td>
- {{$sum = .Queue.GetQueueItemNumber}}
+ {{$sum := .Queue.GetQueueItemNumber}}
{{if lt $sum 0}}
-
{{else}}