Files

64 lines
2.8 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 "registry_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 "registry_detail_content" .}}
</main>
</div>
</div>
</body>
</html>
{{end}}
{{define "registry_detail_content"}}
<p><a href="/registry">&larr; К реестру</a></p>
<div class="topbar">
<h1 class="mono" style="display:flex;align-items:center;gap:10px">{{.History.Registry.IPAddress}}
{{if eq .History.Registry.LastResult "pass"}}<span class="pill pill-success">pass</span>
{{else if eq .History.Registry.LastResult "partial"}}<span class="pill pill-warning">partial</span>
{{else if eq .History.Registry.LastResult "fail"}}<span class="pill pill-danger">fail</span>
{{else if eq .History.Registry.LastResult "cancelled"}}<span class="pill pill-cancel">cancelled</span>{{end}}
{{if .History.Registry.InQueue}}<a class="pill pill-info" href="/ips/{{.History.Registry.IPAddress}}">{{.History.Registry.CurrentState}} · в очереди</a>{{else}}<span class="pill pill-neutral">не в очереди</span>{{end}}
</h1>
</div>
<p class="muted">
впервые замечен: {{fmtTime .History.Registry.FirstSeenAt}} · последний раз замечен: {{fmtTime .History.Registry.LastSeenAt}}
· всего циклов проверки: {{.History.Registry.TotalCycles}}
</p>
{{if .History.SelfCheckFailedOn}}<p class="muted">Self-check не прошёл на: {{join .History.SelfCheckFailedOn ", "}}</p>{{end}}
<h2 class="section-title">История проверок</h2>
{{if .Cycles}}
<div class="registry-cycles">
{{range .Cycles}}
<details class="registry-cycle">
<summary>
{{if .Date.IsZero}}<span class="mono">—</span>{{else}}<time class="mono" datetime="{{.Date.Format "2006-01-02T15:04:05Z07:00"}}">{{fmtTime .Date}}</time>{{end}}
<span class="muted">· {{if .RunID}}Запуск №{{.RunID}} · {{end}}Цикл №{{.CycleID}}</span>
{{if .Badge.Label}}<span class="pill {{.Badge.Class}}">{{.Badge.Label}}</span>{{end}}
{{if .Detail.Checks}}
<span class="muted">· Успешно {{.Passed}} из {{len .Detail.Checks}}</span>
{{else}}
<span class="muted">· Проверок нет</span>
{{end}}
</summary>
<div class="registry-cycle-body">
{{template "ip_check_cycle" .}}
</div>
</details>
{{end}}
</div>
<p class="muted" style="margin-top:8px">Если глубина истории (см. <a href="/settings">настройки</a>) ограничена, здесь
показаны только сохранённые циклы — более старые уже вытеснены.</p>
{{else}}<p class="muted">Проверок пока нет.</p>{{end}}
{{end}}