use bootstrap 5 for UI, compact UI
This commit is contained in:
1 parent
37910e410b
commit
ee2a29cb36
18 files changed
+284
-161
No files matched your search
@@ -4,7 +4,7 @@
|
||||
<head>{{template "html_head" .}}</head>
|
||||
<body>
|
||||
{{template "page_header" .}}
|
||||
<main>
|
||||
<main class="container-fluid py-3">
|
||||
<div id="error-banner">{{template "banner_inner" .Banner}}</div>
|
||||
{{template "ip_detail_content" .}}
|
||||
</main>
|
||||
@@ -14,11 +14,13 @@
|
||||
|
||||
{{define "ip_detail_content"}}
|
||||
<p><a href="/ips">← К очереди</a></p>
|
||||
<h1>{{.Detail.IP.IPAddress}}</h1>
|
||||
<h1 class="d-flex align-items-center gap-2">
|
||||
{{.Detail.IP.IPAddress}}
|
||||
{{$b := ipBadge .Detail.IP.State .Detail.IP.OverallResult}}
|
||||
<p>
|
||||
<span class="{{$b.Class}}">{{$b.Label}}</span>
|
||||
· попытка {{.Detail.IP.AttemptNumber}} (повторов: {{.Detail.IP.RetryCount}})
|
||||
<span class="{{$b.Class}} fs-6">{{$b.Label}}</span>
|
||||
</h1>
|
||||
<p class="muted mb-1">
|
||||
попытка {{.Detail.IP.AttemptNumber}} (повторов: {{.Detail.IP.RetryCount}})
|
||||
· валидатор {{deref .Detail.IP.OwnerValidatorID}}
|
||||
</p>
|
||||
<p class="muted">
|
||||
@@ -28,23 +30,26 @@
|
||||
|
||||
<h2>Проверки (попытка {{.Detail.IP.AttemptNumber}})</h2>
|
||||
{{if .Detail.Checks}}
|
||||
<table class="compact" role="grid">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-sm table-striped align-middle">
|
||||
<thead><tr><th>Источник</th><th>Тип</th><th>Цель</th><th>Успех</th><th>Задержка, мс</th><th>Время</th><th>Детали</th></tr></thead>
|
||||
<tbody>
|
||||
{{range .Detail.Checks}}
|
||||
<tr>
|
||||
<td>{{.Source}}</td><td>{{.CheckType}}</td><td>{{.Target}}</td>
|
||||
<td>{{if .Success}}✅{{else}}❌{{end}}</td>
|
||||
<td>{{if .Success}}<span class="badge bg-success">ok</span>{{else}}<span class="badge bg-danger">fail</span>{{end}}</td>
|
||||
<td>{{.LatencyMS}}</td><td>{{fmtTime .CheckedAt}}</td><td>{{.Detail}}</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{{else}}<p class="muted">Проверок пока нет.</p>{{end}}
|
||||
|
||||
<h2>События</h2>
|
||||
{{if .Detail.Events}}
|
||||
<table class="compact" role="grid">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-sm table-striped align-middle">
|
||||
<thead><tr><th>Время</th><th>Тип</th><th>Источник</th><th>Данные</th></tr></thead>
|
||||
<tbody>
|
||||
{{range .Detail.Events}}
|
||||
@@ -52,5 +57,6 @@
|
||||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{{else}}<p class="muted">Событий нет.</p>{{end}}
|
||||
{{end}}
|
||||
Reference in new issue
Block a user