mirror of
https://github.com/KubaPro010/fm-dx-webserver.git
synced 2026-07-29 16:29:19 +02:00
117 lines
5.5 KiB
Plaintext
117 lines
5.5 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="setup-wrapper admin-wrapper">
|
|
<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>Online since</th>
|
|
<th></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<% if (connectedUsers.length > 0) { %>
|
|
<% connectedUsers.forEach(user => { %>
|
|
<tr>
|
|
<td>
|
|
<a href="https://ipinfo.io/<%= user.ip.replace('::ffff:', '') %>" target="_blank">
|
|
<%= user.ip.replace('::ffff:', '') %>
|
|
</a>
|
|
</td>
|
|
<td>
|
|
<%= user.location %><% if (user.isp) { %> (<%= user.isp %>)<% } %>
|
|
</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">
|
|
<h3>Quick settings</h3>
|
|
<div class="flex-container flex-center" style="margin: 30px;">
|
|
<%- include('_components', {component: 'checkbox', cssClass: '', label: 'Unlocked Tuner', id: 'publicTuner'}) %>
|
|
<%- include('_components', {component: 'checkbox', cssClass: '', label: 'Admin lock', id: 'lockToAdmin'}) %><br>
|
|
</div>
|
|
|
|
<%- include('_components', {component: 'text', cssClass: 'w-150 br-15', placeholder: '', label: 'Tune password', id: 'password-tunePass', password: true}) %>
|
|
<%- include('_components', {component: 'text', cssClass: 'w-150 br-15', placeholder: '', label: 'Admin password', id: 'password-adminPass', password: true}) %><br>
|
|
</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>
|
|
<% enabledPlugins?.forEach(function(plugin) { %>
|
|
<script src="js/plugins/<%= plugin %>"></script>
|
|
<% }); %>
|
|
</body>
|
|
</html>
|