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

63 lines
2.2 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{{define "ip_detail_page"}}
<!doctype html>
<html lang="ru">
<head>{{template "html_head" .}}</head>
<body>
{{template "page_header" .}}
<main class="container-fluid py-3">
<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>
<h1 class="d-flex align-items-center gap-2">
{{.Detail.IP.IPAddress}}
{{$b := ipBadge .Detail.IP.State .Detail.IP.OverallResult}}
<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">
создан: {{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}}
<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}}<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}}
<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}}
<tr><td>{{fmtTime .OccurredAt}}</td><td>{{.EventType}}</td><td>{{.SourceType}} {{.SourceID}}</td><td>{{.Payload}}</td></tr>
{{end}}
</tbody>
</table>
</div>
{{else}}<p class="muted">Событий нет.</p>{{end}}
{{end}}