2021-02-10 23:07:37 +01:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html lang="en">
|
|
|
|
<head>
|
|
|
|
<meta charset="UTF-8">
|
|
|
|
<title>ANABASIS CLIENTS</title>
|
|
|
|
<meta http-equiv="refresh" content="60">
|
|
|
|
<style>
|
|
|
|
body {
|
|
|
|
font-family: "Courier New", "Courier", monospace;
|
|
|
|
color: white;
|
|
|
|
background: black;
|
|
|
|
text-align: center;
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
align-items: center;
|
|
|
|
}
|
|
|
|
|
|
|
|
h1, h2 {
|
|
|
|
margin-bottom: 0 !important;
|
|
|
|
}
|
|
|
|
|
|
|
|
.status {
|
|
|
|
font-size: 24pt;
|
|
|
|
font-weight: bold;
|
|
|
|
border: 2px solid;
|
|
|
|
padding: .25rem .5rem;
|
|
|
|
}
|
|
|
|
|
|
|
|
.status-container {
|
|
|
|
margin: 1rem 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
.status-empty {
|
|
|
|
border-color: red;
|
|
|
|
}
|
|
|
|
|
|
|
|
.status-occupied {
|
|
|
|
border-color: green;
|
|
|
|
}
|
|
|
|
|
|
|
|
.datetime {
|
|
|
|
font-weight: bold;
|
|
|
|
margin: 1em 0;
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
<link rel="stylesheet" href="https://necolas.github.io/normalize.css/8.0.1/normalize.css"
|
|
|
|
integrity="sha384-M86HUGbBFILBBZ9ykMAbT3nVb0+2C7yZlF8X2CiKNpDOQjKroMJqIeGZ/Le8N2Qp" crossorigin="anonymous">
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<h1>/|\ Anabasis Clients</h1>
|
|
|
|
<h2>STATUS</h2>
|
|
|
|
<div class="status-container">
|
|
|
|
<div class="status status-{{status.status}}">{{status.status.upper()}}</div>
|
|
|
|
<div class="status-explanation">{{status.text}}</div>
|
|
|
|
</div>
|
|
|
|
<h2>Current clients</h2>
|
|
|
|
<div class="datetime">{{now.strftime("%c")}}</div>
|
|
|
|
<table>
|
|
|
|
<tr>
|
|
|
|
<th>MAC</th>
|
|
|
|
<th>hostname</th>
|
|
|
|
<th>IP address</th>
|
|
|
|
</tr>
|
|
|
|
{% for lease in leases %}
|
|
|
|
<tr>
|
|
|
|
<td>{{lease.mac}}</td>
|
|
|
|
<td>{{lease.hostname}}</td>
|
|
|
|
<td>{{lease.ip}}</td>
|
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
|
|
</table>
|
2021-02-10 23:21:05 +01:00
|
|
|
<h2>History</h2>
|
|
|
|
<p>Last human entry:
|
|
|
|
{% if last_human %}
|
|
|
|
{{last_human.ts.strftime("%c")}} ({{last_human.hostname or last_human.mac}})
|
|
|
|
{% else %}
|
|
|
|
???
|
|
|
|
{% endif %}
|
|
|
|
</p>
|
2021-02-10 23:07:37 +01:00
|
|
|
</body>
|
|
|
|
</html>
|