tiamat/cmd/templates/index.html

68 lines
1.6 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<title>Tiamat Dashboard</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="/style.css" rel="stylesheet">
<script src="/htmx.js" integrity="sha384-qbtR4rS9RrUMECUWDWM2+YGgN3U4V4ZncZ0BvUcg9FGct0jqXz3PUdVpU1p0yrXS"
crossorigin="anonymous"></script>
</head>
<body>
<div class="container">
<div id="main">
<b>
<ul>
<li class="hor">
<p><a href="/">Home</a></p>
</li>
<li class="hor">
<p><a href="https://git.bulgariu.xyz/raul/aemet" target="_blank">Source code</a></p>
</li>
</ul>
</b>
<hr>
<h2 align=center>Current clients</h2>
{{ range .Clients }}
<table border=1>
<tr>
<td>ID</td>
<td>Status</td>
<td>IP</td>
<td>Username</td>
<td>Hostname</td>
<td>Operating System</td>
<td rowspan=2>
<a target="_blank" href="command/{{ .ClientID }}"><b>CMD</b></a>
</td>
</tr>
<tr>
<td>{{ .ClientID }}</td>
<td>
{{ if .IsOnline }}
<on>
OK
</on>
{{ else }}
<off>
Offline
</off>
{{ end }}
</td>
<td>{{ .ClientBasicInfo.PublicIP }}</td>
<td>{{ .ClientBasicInfo.Username }}</td>
<td>{{ .ClientBasicInfo.Hostname }}</td>
<td>{{ .ClientBasicInfo.OperatingSystem }}</td>
</tr>
</table>
<hr>
{{ end }}
</div>
</div>
</body>
</html>