aboutsummaryrefslogtreecommitdiffstats
path: root/templates/admin/monitor.tmpl
blob: 4d66d3bfbb64a75e9959ca0ccc06cf85a25714df (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
{{template "base/head" .}}
<div role="main" aria-label="{{.Title}}" class="page-content admin monitor">
	{{template "admin/navbar" .}}
	<div class="ui container">
		{{template "base/alert" .}}
		{{template "admin/cron" .}}
		<h4 class="ui top attached header">
			{{.locale.Tr "admin.monitor.queues"}}
		</h4>
		<div class="ui attached table segment">
			<table class="ui very basic striped table unstackable">
				<thead>
					<tr>
						<th>{{.locale.Tr "admin.monitor.queue.name"}}</th>
						<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.numberinqueue"}}</th>
						<th></th>
					</tr>
				</thead>
				<tbody>
					{{range .Queues}}
						<tr>
							<td>{{.Name}}</td>
							<td>{{.Type}}</td>
							<td>{{.ExemplarType}}</td>
							<td>{{$sum := .NumberOfWorkers}}{{if lt $sum 0}}-{{else}}{{$sum}}{{end}}</td>
							<td>{{$sum := .NumberInQueue}}{{if lt $sum 0}}-{{else}}{{$sum}}{{end}}</td>
							<td><a href="{{$.Link}}/queue/{{.QID}}" class="button">{{if lt $sum 0}}{{$.locale.Tr "admin.monitor.queue.review"}}{{else}}{{$.locale.Tr "admin.monitor.queue.review_add"}}{{end}}</a>
						</tr>
					{{end}}
				</tbody>
			</table>
		</div>

		{{template "admin/process" .}}
	</div>
</div>
<div class="ui gitea-confirm-modal delete modal">
	<div class="header">
		{{.locale.Tr "admin.monitor.process.cancel"}}
	</div>
	<div class="content">
		<p>{{$.locale.Tr "admin.monitor.process.cancel_notices" `<span class="name"></span>` | Safe}}</p>
		<p>{{$.locale.Tr "admin.monitor.process.cancel_desc"}}</p>
	</div>
	{{template "base/modal_actions_confirm" .}}
</div>
{{template "base/footer" .}}