feat(client_details.html): add basic client details

This commit is contained in:
2026-02-28 23:42:12 +01:00
parent c5771dc371
commit 1900bf46cc

View File

@@ -3,7 +3,31 @@
<head> <head>
<meta charset="UTF-8" /> <meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Details for client {{ client.mac_id }}</title> <title>Details for client {{ client.id }}</title>
<link
rel="stylesheet"
href="{{ url_for('static', filename='css/style.css') }}"
/>
</head> </head>
<body></body> <body>
<h1>Details for client {{ client.id }}</h1>
<p><strong>ID:</strong> {{ client.id }}</p>
<p><strong>IP Address:</strong> {{ client.addr[0] }}</p>
<p><strong>Port:</strong> {{ client.addr[1] }}</p>
<p>
<strong>Last Seen:</strong>
<span id="last-seen">{{ client.last_seen }}</span>
</p>
</body>
<script>
function updateLastSeen() {
const lastSeenElement = document.getElementById("last-seen");
const lastSeenTimestamp = parseInt(lastSeenElement.textContent);
const lastSeenDate = new Date(lastSeenTimestamp * 1000);
lastSeenElement.textContent = lastSeenDate.toLocaleString();
}
updateLastSeen();
</script>
</html> </html>