admin control features and admin dashboard
This commit is contained in:
1 parent
c630f13c57
commit
37910e410b
69 files changed
+4959
-400
No files matched your search
@@ -0,0 +1,55 @@
|
||||
{{define "overview_fragment"}}
|
||||
<div class="stat-grid">
|
||||
<div class="stat-tile"><span class="value">{{.Status.TotalIPs}}</span><span class="label">всего IP</span></div>
|
||||
<div class="stat-tile"><span class="value">{{.Status.TotalValidators}}</span><span class="label">валидаторов</span></div>
|
||||
{{range $state, $count := .Status.IPsByState}}
|
||||
<div class="stat-tile"><span class="value">{{$count}}</span><span class="label">{{$state}}</span></div>
|
||||
{{end}}
|
||||
</div>
|
||||
|
||||
<h2>Текущая проверка</h2>
|
||||
{{if .CurrentItems}}
|
||||
<table class="compact" role="grid">
|
||||
<thead><tr><th>Адрес</th><th>Состояние</th><th>Валидатор</th><th>Попытка</th><th>Назначено</th></tr></thead>
|
||||
<tbody>
|
||||
{{range .CurrentItems}}
|
||||
{{$b := ipBadge .State .OverallResult}}
|
||||
<tr>
|
||||
<td><a href="/ips/{{.IPAddress}}">{{.IPAddress}}</a></td>
|
||||
<td><span class="{{$b.Class}}">{{$b.Label}}</span></td>
|
||||
<td>{{deref .OwnerValidatorID}}</td>
|
||||
<td>{{.AttemptNumber}}</td>
|
||||
<td>{{fmtTime .AssignedAt}}</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
{{else}}
|
||||
<p class="muted">Сейчас нет адресов в обработке.</p>
|
||||
{{end}}
|
||||
|
||||
<h2>Последние {{.LastN}} завершённых</h2>
|
||||
<p class="muted">
|
||||
pass: {{index .Breakdown "pass"}} ·
|
||||
partial: {{index .Breakdown "partial"}} ·
|
||||
fail: {{index .Breakdown "fail"}} ·
|
||||
cancelled: {{index .Breakdown "cancelled"}}
|
||||
</p>
|
||||
{{if .LastCompleted}}
|
||||
<table class="compact" role="grid">
|
||||
<thead><tr><th>Адрес</th><th>Итог</th><th>Завершено</th></tr></thead>
|
||||
<tbody>
|
||||
{{range .LastCompleted}}
|
||||
{{$b := ipBadge .State .OverallResult}}
|
||||
<tr>
|
||||
<td><a href="/ips/{{.IPAddress}}">{{.IPAddress}}</a></td>
|
||||
<td><span class="{{$b.Class}}">{{$b.Label}}</span></td>
|
||||
<td>{{fmtTime .AggregatedAt}}</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
{{else}}
|
||||
<p class="muted">Пока ничего не завершено.</p>
|
||||
{{end}}
|
||||
{{end}}
|
||||
Reference in new issue
Block a user