Files
fm-dx-webserver/views/setup.ejs
T
2026-07-10 22:06:09 +02:00

103 lines
4.6 KiB
Plaintext

<!DOCTYPE html>
<html>
<head>
<title>Setup - FM-DX Webserver</title>
<link href="css/entry.css" type="text/css" rel="stylesheet">
<link href="css/flags.min.css" type="text/css" rel="stylesheet">
<link href="css/libs/fontawesome.css" type="text/css" rel="stylesheet">
<script src="js/libs/jquery.min.js"></script>
<link href="https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.9.4/leaflet.min.css" type="text/css" rel="stylesheet">
<script src="https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.9.4/leaflet.min.js"></script>
<link rel="icon" type="image/svg+xml" href="favicon.svg" id="favicon" />
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
<div id="toast-container"></div>
<div id="wrapper" class="panel-full">
<div class="m-0 no-bg">
<h2>Dashboard</h2>
<div class="flex-container">
<div class="panel-33 p-20">
<span class="text-medium-big color-5"><%= onlineUsers %></span>
<p>Online users</p>
</div>
<div class="panel-33 p-20">
<span class="text-medium-big color-5"><%= memoryUsage %></span>
<span class="text-small color-4" style="display: block; font-size: 1em; font-weight: 600; line-height: 0;">(<%= memoryHeap %> heap)</span>
<p>Memory usage</p>
</div>
<div class="panel-33 p-20">
<span class="text-medium-big color-5"><%= processUptime %></span>
<p >Uptime</p>
</div>
</div>
<div class="flex-container">
<div class="panel-100-real p-bottom-20" style="overflow-x: auto;">
<h3>Current users</h3>
<table class="table-big">
<thead>
<tr>
<th>IP Address</th>
<th>Location</th>
<th>User Agent</th>
<th>Online since</th>
<th></th>
</tr>
</thead>
<tbody>
<% if (connectedUsers.length > 0) { %>
<% connectedUsers.forEach(user => { %>
<tr>
<td>
<a href="https://ipinfo.io/<%= user.ip %>" target="_blank">
<%= user.ip %>
</a>
</td>
<td>
<%= user.location %><% if (user.isp) { %> (<%= user.isp %>)<% } %>
</td>
<td><%= user.agent %></td>
<td><%= user.time %></td>
<td><a href="./kick?ip=<%= user.ip %>">Kick</a></td>
</tr>
<% }); %>
<% } else { %>
<tr>
<td colspan="4" style="text-align: center">No users online</td>
</tr>
<% } %>
</tbody>
</table>
</div>
</div>
<div class="flex-container">
<div class="panel-100-real p-bottom-20 bottom-20">
<h3>Console</h3>
<% if (consoleOutput && consoleOutput.length > 0) { %>
<div class="panel-100 auto br-5 p-10 text-small text-left top-10" id="console-output">
<% consoleOutput.forEach(function(log) { %>
<pre class="m-0" style="white-space:pre-wrap;"><%= log %></pre>
<% }); %>
</div>
<% } else { %>
<p>No console output available.</p>
<% } %>
</div>
</div>
</div>
</div>
</div>
<script src="js/ver.js"></script>
<script src="js/toast.js"></script>
<script src="js/settings.js"></script>
<script src="js/dropdown.js"></script>
<script src="js/setup.js"></script>
<script src="js/confighandler.js"></script>
</body>
</html>