2022-02-21 14:16:06 +00:00
|
|
|
<form action="/add" method="post">
|
|
|
|
<fieldset>
|
|
|
|
<legend>Add Device</legend>
|
|
|
|
|
|
|
|
<label for="alias">Alias</label><input id="alias" name="Alias">
|
|
|
|
<label for="mac">MAC</label><input id="mac" name="MAC">
|
2022-02-21 18:09:02 +00:00
|
|
|
<label for="ip">IP</label><input id="ip" name="IP" value="255.255.255.255">
|
2022-02-21 14:16:06 +00:00
|
|
|
<input type="submit" value="Submit">
|
|
|
|
</fieldset>
|
|
|
|
</form>
|
|
|
|
|
|
|
|
<fieldset>
|
|
|
|
<legend>Devices</legend>
|
|
|
|
|
|
|
|
<table>
|
|
|
|
<tr>
|
|
|
|
<th>Alias</th>
|
|
|
|
<th>MAC</th>
|
|
|
|
<th>IP/Broadcast</th>
|
|
|
|
<th>Actions</th>
|
|
|
|
</tr>
|
|
|
|
{{range $i, $d := .Devices}}
|
|
|
|
<tr>
|
|
|
|
<td>{{$d.Alias}}</td>
|
|
|
|
<td>{{$d.MAC}}</td>
|
|
|
|
<td>{{$d.IP}}</td>
|
2022-02-22 09:34:45 +00:00
|
|
|
<td>
|
|
|
|
<div class="actions">
|
|
|
|
<form action="/wake" method="post">
|
2022-02-23 13:02:46 +00:00
|
|
|
<input type="number" name="Index" value="{{$i}}" hidden>
|
|
|
|
<input type="submit" value="⏻" title="Wake">
|
2022-02-22 09:34:45 +00:00
|
|
|
</form>
|
|
|
|
<form action="/remove" method="post">
|
2022-02-23 13:02:46 +00:00
|
|
|
<input type="number" name="Index" value="{{$i}}" hidden>
|
|
|
|
<input type="submit" value="🗑" title="Delete">
|
2022-02-22 09:34:45 +00:00
|
|
|
</form>
|
|
|
|
</div>
|
2022-02-21 14:16:06 +00:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
{{end}}
|
|
|
|
</table>
|
|
|
|
</fieldset>
|
|
|
|
|
|
|
|
<style>
|
|
|
|
body > div {
|
|
|
|
flex-flow: row wrap;
|
|
|
|
align-items: flex-start;
|
|
|
|
}
|
2022-02-21 14:57:54 +00:00
|
|
|
|
|
|
|
body > div > form {
|
|
|
|
flex-grow: 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
table {
|
|
|
|
grid-column: 1 / 3;
|
|
|
|
border-collapse: collapse;
|
|
|
|
}
|
|
|
|
|
2022-02-21 18:09:02 +00:00
|
|
|
th, td {
|
|
|
|
padding: 0.25rem;
|
|
|
|
}
|
|
|
|
|
2022-02-21 14:57:54 +00:00
|
|
|
.actions {
|
2022-02-22 09:34:45 +00:00
|
|
|
flex-flow: row wrap;
|
|
|
|
justify-content: center;
|
|
|
|
padding: 0;
|
|
|
|
gap: 0.5rem;
|
2022-02-21 14:57:54 +00:00
|
|
|
}
|
2022-02-21 14:16:06 +00:00
|
|
|
</style>
|