t00-multiuser/server/views/admin/wssessions.ejs

43 lines
1.4 KiB
Text
Raw Normal View History

2024-09-28 14:31:02 +01:00
<%- include("../base/header", { title: "Websocket Sessions", userId: session.userId, isAdmin: true }) %>
<div class="row">
<div class="col">
<nav aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="/admin">Admin</a></li>
<li class="breadcrumb-item active"><a>Websocket Sessions</a></li>
</ol>
</nav>
</div>
</div>
<div class="row">
<div class="col">
<h1>Websocket Sessions</h1>
</div>
</div>
<div class="row my-5">
<div class="col">
<table class="table table-striped">
<thead>
<th class="align-middle text-center">#</th>
<th class="align-middle text-center">Username</th>
<th class="align-middle text-center">Current Location</th>
<th class="align-middle text-center">Is AFK?</th>
</thead>
<tbody><%
const keys = users._getKeys();
for (const key of keys) {
const session = users.get(key); %>
<tr>
<td class="align-middle text-center"><%= session.id %></td>
<td class="align-middle text-center"><%= session.username %></td>
<td class="align-middle text-center"><a href="https://<%= session.rawURL %>">https://<%= session.rawURL %></a></td>
<td class="align-middle text-center"><%= session.isAfk ? "Yes" : "No" %></td>
</tr>
<% } %></tbody>
</table>
</div>
</div>
<%- include("../base/footer", { apiKey: session.apiKey, username: session.username }) %>