Files
cloud-ip-validator/internal/dashboard/templates/ip_detail.html
T

62 lines
2.2 KiB
HTML
Raw Normal View History

2026-08-23 20:39:22 +03:00
{{define "ip_detail_page"}}
<!doctype html>
<html lang="ru">
<head>{{template "html_head" .}}</head>
<body>
{{template "page_header" .}}
2026-08-23 21:15:31 +03:00
<main class="container-fluid py-3">
2026-08-23 20:39:22 +03:00
<div id="error-banner">{{template "banner_inner" .Banner}}</div>
{{template "ip_detail_content" .}}
</main>
</body>
</html>
{{end}}
{{define "ip_detail_content"}}
<p><a href="/ips">&larr; К очереди</a></p>
2026-08-23 21:15:31 +03:00
<h1 class="d-flex align-items-center gap-2">
{{.Detail.IP.IPAddress}}
2026-08-23 20:39:22 +03:00
{{$b := ipBadge .Detail.IP.State .Detail.IP.OverallResult}}
2026-08-23 21:15:31 +03:00
<span class="{{$b.Class}} fs-6">{{$b.Label}}</span>
</h1>
<p class="muted mb-1">
попытка {{.Detail.IP.AttemptNumber}} (повторов: {{.Detail.IP.RetryCount}})
2026-08-23 20:39:22 +03:00
· валидатор {{deref .Detail.IP.OwnerValidatorID}}
</p>
<p class="muted">
создан: {{fmtTime .Detail.IP.CreatedAt}} · назначен: {{fmtTime .Detail.IP.AssignedAt}} ·
агрегирован: {{fmtTime .Detail.IP.AggregatedAt}} · FIP освобождён: {{fmtTime .Detail.IP.FIPReleasedAt}}
</p>
<h2>Проверки (попытка {{.Detail.IP.AttemptNumber}})</h2>
{{if .Detail.Checks}}
2026-08-23 21:15:31 +03:00
<div class="table-responsive">
<table class="table table-sm table-striped align-middle">
2026-08-23 20:39:22 +03:00
<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>
2026-08-23 21:15:31 +03:00
<td>{{if .Success}}<span class="badge bg-success">ok</span>{{else}}<span class="badge bg-danger">fail</span>{{end}}</td>
2026-08-23 20:39:22 +03:00
<td>{{.LatencyMS}}</td><td>{{fmtTime .CheckedAt}}</td><td>{{.Detail}}</td>
</tr>
{{end}}
</tbody>
</table>
2026-08-23 21:15:31 +03:00
</div>
2026-08-23 20:39:22 +03:00
{{else}}<p class="muted">Проверок пока нет.</p>{{end}}
<h2>События</h2>
{{if .Detail.Events}}
2026-08-23 21:15:31 +03:00
<div class="table-responsive">
<table class="table table-sm table-striped align-middle">
2026-08-23 20:39:22 +03:00
<thead><tr><th>Время</th><th>Тип</th><th>Источник</th><th>Данные</th></tr></thead>
<tbody>
{{range .Detail.Events}}
<tr><td>{{fmtTime .OccurredAt}}</td><td>{{.EventType}}</td><td>{{.SourceType}} {{.SourceID}}</td><td>{{.Payload}}</td></tr>
{{end}}
</tbody>
</table>
2026-08-23 21:15:31 +03:00
</div>
2026-08-23 20:39:22 +03:00
{{else}}<p class="muted">Событий нет.</p>{{end}}
{{end}}