forked from
tangled.org/core
Monorepo for Tangled
1{{template "base" .}}
2{{define "content"}}
3<h2>Knot Hosts</h2>
4
5<div class="filters">
6 <form
7 hx-get=""
8 hx-target="#table"
9 hx-select="#table"
10 hx-swap="outerHTML"
11 hx-trigger="every 10s"
12 >
13 <select name="status">
14 {{ range const.AllHostStatuses }}
15 <option value="{{.}}" {{ if eq $.FilterByStatus . }}selected{{end}}>{{.}}</option>
16 {{ end }}
17 </select>
18 <button type="submit">Filter</button>
19 </form>
20</div>
21
22<table id="table">
23 <thead>
24 <tr>
25 <th>Hostname</th>
26 <th>SSL</th>
27 <th>Status</th>
28 <th>Last Seq</th>
29 </tr>
30 </thead>
31 <tbody>
32 {{range .Hosts}}
33 <tr>
34 <td>{{.Hostname}}</td>
35 <td>{{if .NoSSL}}False{{else}}True{{end}}</td>
36 <td>{{.Status}}</td>
37 <td>{{.LastSeq}}</td>
38 </tr>
39 {{else}}
40 <tr><td colspan="4">No hosts registered.</td></tr>
41 {{end}}
42 </tbody>
43</table>
44{{end}}