Add frontend option for bulk killing/removing clients

This commit is contained in:
raul 2024-06-13 09:23:35 +02:00
parent 7c08d039f8
commit 2c9a204ac6
2 changed files with 58 additions and 42 deletions

View File

@ -34,9 +34,11 @@
<h2 align=center>Current clients</h2> <h2 align=center>Current clients</h2>
<hr> <hr>
<form>
{{ range .Clients }} {{ range .Clients }}
<table border=1> <table border=1>
<tr> <tr>
<td id="bold" rowspan="2"><input type="checkbox" name="clients[]" value="{{ .ClientID }}"></td>
<td id="bold">ID</td> <td id="bold">ID</td>
<td id="bold">Status</td> <td id="bold">Status</td>
<td id="bold">Remote IP</td> <td id="bold">Remote IP</td>
@ -76,6 +78,17 @@
</table> </table>
<hr> <hr>
{{ end }} {{ end }}
<b>
<ul>
<li class="hor">
<p><a hx-post="/bulk-kill" hx-swap="none" target="_blank" id="pointer">Bulk kill</a></p>
</li>
<li class="hor">
<p><a hx-post="/bulk-remove" hx-swap="none" target="_blank" id="pointer">Bulk remove</a></p>
</li>
</ul>
</b>
</form>
</div> </div>
</div> </div>
</body> </body>

View File

@ -23,16 +23,19 @@ ul {
li.hor { li.hor {
display: inline-flex; display: inline-flex;
vertical-align: center;
margin-right: 20px; margin-right: 20px;
} }
td.left { td.left {
text-align: left; text-align: left;
vertical-align: center;
padding-left: 5px; padding-left: 5px;
} }
td { td {
text-align: center; text-align: center;
vertical-align: center;
padding: 5px; padding: 5px;
} }