Files

79 lines
3.5 KiB
HTML
Raw Permalink 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>
<div class="bg-grid"></div>
<input type="checkbox" id="nav-toggle" class="nav-toggle">
<div class="shell">
{{template "sidebar_nav" .}}
<div>
{{template "topbar_mobile" .}}
<main class="main">
<div id="error-banner">{{template "banner_inner" .Banner}}</div>
{{template "ip_detail_content" .}}
</main>
</div>
</div>
</body>
</html>
{{end}}
{{define "ip_detail_content"}}
<p><a href="/ips">&larr; К очереди</a></p>
{{$b := ipBadge .Detail.IP.State .Detail.IP.OverallResult .Detail.IP.FIPAssociatedAt 0}}
<div class="topbar">
<h1 class="mono" style="display:flex;align-items:center;gap:10px">{{.Detail.IP.IPAddress}} <span class="pill {{$b.Class}}">{{$b.Label}}</span></h1>
</div>
<p class="muted"><a href="/registry/{{.Detail.IP.IPAddress}}">Полная история проверок этого адреса за всё время &rarr;</a></p>
{{template "ip_check_cycle" .}}
{{end}}
{{define "ip_check_cycle"}}
<p class="muted">
попытка {{if .Detail.IP.AttemptNumber}}{{.Detail.IP.AttemptNumber}}{{else}}—{{end}} (повторов: {{if .HasQueueData}}{{.Detail.IP.RetryCount}}{{else}}—{{end}})
· валидатор {{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>
{{if .Detail.SelfCheckFailedOn}}<p class="muted">Self-check не прошёл на: {{join .Detail.SelfCheckFailedOn ", "}}</p>{{end}}
<h2 class="section-title">Проверки{{if .Detail.IP.AttemptNumber}} (попытка {{.Detail.IP.AttemptNumber}}){{end}}</h2>
{{if .Detail.Checks}}
<div class="panel">
<div class="table-scroll">
<table>
<thead><tr><th>Источник</th><th>Тип</th><th>Цель</th><th>Успех</th><th>Задержка, мс</th><th>Время</th><th>Детали</th></tr></thead>
<tbody>
{{range .Detail.Checks}}
<tr>
<td data-label="Источник">{{.Source}}</td><td data-label="Тип">{{.CheckType}}</td><td class="addr" data-label="Цель">{{.Target}}</td>
<td data-label="Успех">{{if .Success}}<span class="pill pill-success">ok</span>{{else}}<span class="pill pill-danger">fail</span>{{end}}</td>
<td class="num" data-label="Задержка, мс">{{.LatencyMS}}</td><td class="num" data-label="Время">{{fmtTime .CheckedAt}}</td><td data-label="Детали">{{.Detail}}</td>
</tr>
{{end}}
</tbody>
</table>
</div>
</div>
{{else}}<p class="muted">Проверок пока нет.</p>{{end}}
<h2 class="section-title">События</h2>
{{if .Events}}
<div class="panel">
<div class="table-scroll">
<table>
<thead><tr><th>Время</th><th>Тип</th><th>Источник</th><th>Данные</th></tr></thead>
<tbody>
{{range .Events}}
<tr><td class="num" data-label="Время">{{fmtTime .OccurredAt}}</td><td data-label="Тип">{{.EventType}}</td><td data-label="Источник">{{.SourceType}} {{.SourceID}}</td><td data-label="Данные">{{with .Trace}}<div>цель {{.Target}}{{if .Host}} ({{.Host}}){{end}} · IP {{.IP}} · {{.Status}} · {{.DurationMS}} мс{{if .Error}} · ошибка: {{.Error}}{{end}}</div>{{if .Output}}<pre class="trace-output">{{.Output}}</pre>{{end}}{{else}}{{.Payload}}{{end}}</td></tr>
{{end}}
</tbody>
</table>
</div>
</div>
{{else}}<p class="muted">Событий нет.</p>{{end}}
{{end}}