2024-09-28 14:31:02 +01:00
|
|
|
<%- include("../base/header", { title: "Web 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>Web Sessions</a></li>
|
|
|
|
</ol>
|
|
|
|
</nav>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="row">
|
|
|
|
<div class="col">
|
|
|
|
<h1>Web Sessions</h1>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="row my-5">
|
|
|
|
<div class="col">
|
|
|
|
<table class="table table-striped">
|
|
|
|
<thead>
|
|
|
|
<th class="align-middle text-center">User Id</th>
|
|
|
|
<th class="align-middle text-center">Username</th>
|
|
|
|
<th class="align-middle text-center">Expires At</th>
|
|
|
|
<th> </th>
|
|
|
|
</thead>
|
|
|
|
<tbody><%
|
|
|
|
const keys = sessions._getKeys();
|
|
|
|
for (const key of keys) {
|
|
|
|
const session = sessions.get(key); %>
|
|
|
|
<tr>
|
|
|
|
<td class="align-middle text-center"><%= session.userId %></td>
|
|
|
|
<td class="align-middle text-center"><%= session.username %></td>
|
|
|
|
<td class="align-middle text-center"><%= session.validityPeriod.toString().split("GMT")[0] %></td>
|
|
|
|
<td class="text-end text-nowrap align-middle">
|
|
|
|
<a class="btn btn-sm btn-danger" href="/admin/expiresession?key=<%= key %>">Expire</a>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<% } %></tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
</div>
|
2024-10-13 14:13:33 +01:00
|
|
|
<%- include("../base/footer", { apiKey: session.apiKey, username: session.username }) %>
|