68 lines
No EOL
3.1 KiB
HTML
68 lines
No EOL
3.1 KiB
HTML
{{ define "offline"}}
|
|
<body>
|
|
<div class="container mt-3">
|
|
<table class="table table-striped">
|
|
<tr>
|
|
<form action="/sort_hosts/" method="post">
|
|
<th>Name<br>
|
|
<button type="submit" name="sort_method" value="name-up" class="btn btn-primary btn-sm">
|
|
<i class="bi bi-caret-up"></i>
|
|
</button>
|
|
<button type="submit" name="sort_method" value="name-down" class="btn btn-primary btn-sm">
|
|
<i class="bi bi-caret-down"></i>
|
|
</button>
|
|
</th>
|
|
<th>Ip<br>
|
|
<button type="submit" name="sort_method" value="ip-up" class="btn btn-primary btn-sm">
|
|
<i class="bi bi-caret-up"></i>
|
|
</button>
|
|
<button type="submit" name="sort_method" value="ip-down" class="btn btn-primary btn-sm">
|
|
<i class="bi bi-caret-down"></i>
|
|
</button>
|
|
</th>
|
|
<th>Mac</th>
|
|
<th>Hardware</th>
|
|
<th>Last seen<br>
|
|
<button type="submit" name="sort_method" value="date-up" class="btn btn-primary btn-sm">
|
|
<i class="bi bi-caret-up"></i>
|
|
</button>
|
|
<button type="submit" name="sort_method" value="date-down" class="btn btn-primary btn-sm">
|
|
<i class="bi bi-caret-down"></i>
|
|
</button>
|
|
</th>
|
|
<th>Known<br>
|
|
<button type="submit" name="sort_method" value="known-up" class="btn btn-primary btn-sm">
|
|
<i class="bi bi-caret-up"></i>
|
|
</button>
|
|
<button type="submit" name="sort_method" value="known-down" class="btn btn-primary btn-sm">
|
|
<i class="bi bi-caret-down"></i>
|
|
</button>
|
|
</th>
|
|
</form>
|
|
</tr>
|
|
{{ range .Hosts }}
|
|
<form action="/update_host/" method="post">
|
|
<input name="id" type="hidden" class="form-control" value="{{ .ID }}">
|
|
<tr>
|
|
<td>
|
|
<input name="name" type="text" class="form-control text-dark" value="{{ .Name }}">
|
|
</td>
|
|
<td><a href="http://{{ .IP }}" target="_blank">{{ .IP }}</a></td>
|
|
<td>{{ .Mac }}</td>
|
|
<td>{{ .Hw }}</td>
|
|
<td>{{ .Date }}</td>
|
|
<td>
|
|
{{ if eq .Known 1 }}
|
|
<button value="off" name="known" type="submit" class="btn btn-success">Yes</button>
|
|
{{ else }}
|
|
<button value="on" name="known" type="submit" class="btn btn-warning">No</button>
|
|
{{ end }}
|
|
</td>
|
|
</tr>
|
|
</form>
|
|
{{ end }}
|
|
</table>
|
|
</div>
|
|
|
|
{{ template "footer" }}
|
|
{{ end }} |