buttons
This commit is contained in:
parent
c9b9cefeec
commit
ee895f8f8a
1 changed files with 30 additions and 10 deletions
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<div class="container mt-3">
|
<div class="container mt-3">
|
||||||
<h2>Now online</h2>
|
<h2>Online</h2>
|
||||||
<table class="table table-striped">
|
<table class="table table-striped">
|
||||||
<tr>
|
<tr>
|
||||||
<th>Name</th>
|
<th>Name</th>
|
||||||
|
|
@ -20,7 +20,13 @@
|
||||||
<td>{{ .Ip }}</td>
|
<td>{{ .Ip }}</td>
|
||||||
<td>{{ .Mac }}</td>
|
<td>{{ .Mac }}</td>
|
||||||
<td>{{ .Hw }}</td>
|
<td>{{ .Hw }}</td>
|
||||||
<td>{{ .Known }}</td>
|
<td>
|
||||||
|
{{ if eq .Known 1 }}
|
||||||
|
<button type="button" class="btn btn-success" disabled>Yes</button>
|
||||||
|
{{ else }}
|
||||||
|
<button type="button" class="btn btn-warning" disabled>No</button>
|
||||||
|
{{ end }}
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
@ -34,17 +40,31 @@
|
||||||
<th>Hardware</th>
|
<th>Hardware</th>
|
||||||
<th>Last seen</th>
|
<th>Last seen</th>
|
||||||
<th>Known</th>
|
<th>Known</th>
|
||||||
|
<th> </th>
|
||||||
</tr>
|
</tr>
|
||||||
{{ range . }}
|
{{ range . }}
|
||||||
{{ if eq .Now 0 }}
|
{{ if eq .Now 0 }}
|
||||||
<tr>
|
<form action="/update_db/" method="post">
|
||||||
<td>{{ .Name }}</td>
|
<tr>
|
||||||
<td>{{ .Ip }}</td>
|
<td>
|
||||||
<td>{{ .Mac }}</td>
|
<input name="name" type="text" class="form-control text-dark" value="{{ .Name }}">
|
||||||
<td>{{ .Hw }}</td>
|
</td>
|
||||||
<td>{{ .Date }}</td>
|
<td>{{ .Ip }}</td>
|
||||||
<td>{{ .Known }}</td>
|
<td>{{ .Mac }}</td>
|
||||||
</tr>
|
<td>{{ .Hw }}</td>
|
||||||
|
<td>{{ .Date }}</td>
|
||||||
|
<td>
|
||||||
|
{{ if eq .Known 1 }}
|
||||||
|
<input class="form-check-input" type="checkbox" checked>
|
||||||
|
{{ else }}
|
||||||
|
<input class="form-check-input" type="checkbox">
|
||||||
|
{{ end }}
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<button type="submit" class="btn btn-primary">Ok</button>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</form>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</table>
|
</table>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue