56 lines
2.5 KiB
HTML
56 lines
2.5 KiB
HTML
{{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">← К реестру</a></p>
|
|||
|
|
<div class="topbar">
|
|||
|
|
<h1 class="mono" style="display:flex;align-items:center;gap:10px">{{.History.Registry.IPAddress}}
|
|||
|
|
{{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>
|
|||
|
|
|
|||
|
|
<h2 class="section-title">История проверок (все сохранённые циклы)</h2>
|
|||
|
|
{{if .History.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><th>Детали</th></tr></thead>
|
|||
|
|
<tbody>
|
|||
|
|
{{range .History.Checks}}
|
|||
|
|
<tr>
|
|||
|
|
<td class="num" data-label="Цикл">{{.CycleID}}</td>
|
|||
|
|
<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>
|
|||
|
|
<p class="muted" style="margin-top:8px">Если глубина истории (см. <a href="/settings">настройки</a>) ограничена, здесь
|
|||
|
|
показаны только сохранённые циклы — более старые уже вытеснены.</p>
|
|||
|
|
{{else}}<p class="muted">Проверок пока нет.</p>{{end}}
|
|||
|
|
{{end}}
|