Merge branch 'main' into resize-fix

This commit is contained in:
alex.ita 2024-01-17 18:53:17 +01:00 committed by GitHub
commit 738721119e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 689 additions and 311 deletions

View File

@ -13,6 +13,10 @@ function mainRoutes(router) {
router.get('/stats', function (req, res) {
res.render('stats.ejs');
});
router.get('/linux-builds', function (req, res) {
res.render('linux-builds.ejs');
});
router.get('/ping', function (req, res) {
res.send('OK');

View File

@ -0,0 +1,44 @@
.pageContainer, .footer-js {
display: none;
}
.nojs-warning {
position: absolute !important;
max-width: 400px !important;
text-align: center !important;
padding-top: 24px !important;
animation: blinker 2s ease-in-out infinite;
}
@keyframes blinker {
50% { opacity: 0; }
}
.content-not-available {
display: grid;
position: relative;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
width: 100%;
height: calc(100vh - 80px);
overflow: hidden;
color: #fefee1;
}
.content-not-available .content-not-available-introduction {
width: 100%;
position: absolute;
transition: transform .2s ease;
transform: translateX(0);
text-align: center;
}
.table-container {
margin-left: 10px;
height: 100%;
}
.table-container a{
color: #4FACFC;
}

View File

@ -0,0 +1,30 @@
<footer class="py-5">
<div class="container">
<div class="row">
<div class="col-6 col-sm-4 text-xs-center order-sm-2">
<a class="text-white" target="_blank" href="https://www.reddit.com/r/BeamMP">Reddit</a>
<span> | </span>
<a class="text-white" target="_blank" href="https://twitter.com/BeamMP_Mod_Team">Twitter</a>
<span> | </span>
<a class="text-white" target="_blank" href="https://www.facebook.com/BeamNGMP">Facebook</a>
</div>
<div class="col-6 justify-content-between col-sm-4 text-right text-xs-center order-sm-3">
<a class="text-white" target="_blank" href="https://github.com/BeamMP">GitHub</a>
<span> | </span>
<a class="text-white" target="_blank" href="https://discord.gg/beammp">Discord</a>
<span> | </span>
<a class="text-white" target="_blank" href="https://www.beamng.com/threads/beamng-drive-multiplayer-beamng-mp-formally-local-multiplayer-lua-based.63052/">BeamNG Forums Thread</a>
</div>
</div>
<div class="col-12 col-sm-4 text-center py-4 order-sm-2">
<small class="text-white">&#xA9; 2019 - Present | BeamMP Mod Team All Rights Reserved</small>
<small class="ml-1">
<a href="https://forum.beammp.com/topic/95/privacy-policy-v1-0" target="_blank">Privacy Policy</a>
&middot;
<a href="https://forum.beammp.com/topic/94/terms-of-use-v1-0">Terms &amp; Conditions</a>
</small>
</div>
</div>
</footer>

View File

@ -0,0 +1,68 @@
<div class="nojs-warning">
<b>
<span>&#9888;</span>
<span> You're not using Javascript, this version of the website has limited content.</span>
</b>
</div>
<div class="container">
<div class="row center-xs" style="max-height: 80px;">
<div class="col-md-4 col-sm-4">
<a class="logo-img" href="/">
<div class="logo-image">
<img src="../img/beammp-logo.png" alt="BeamMP Logo" class="img-fluid"/>
</div>
</a>
</div>
<div class="col-md-8 col-sm-8">
<div class="burger-menu">
<button class="navbar-toggler toggler-example" type="button" data-toggle="collapse" data-target="#navbarSupportedContent1" aria-controls="navbarSupportedContent1" aria-expanded="false" aria-label="Toggle navigation"><span class="dark-blue-text"><i class="fas fa-bars fa-1x"></i></span></button>
</div>
<!-- Collapsible content -->
<div class="collapse navbar-collapse" id="navbarSupportedContent1">
<!-- Links -->
<div class="mobile-container">
<ul class="navbar-nav mr-auto">
<li class="nav-item active">
<a class="nav-link" href="https://forum.beammp.com">Forum</a>
</li>
<li class="nav-item">
<a class="nav-link" href="https://docs.beammp.com/">Docs</a>
</li>
<li class="nav-item">
<a class="nav-link" href="https://github.com/BeamMP/BeamMP">GitHub</a>
</li>
<li class="nav-item">
<a class="nav-link" href="https://www.patreon.com/BeamMP">Patreon</a>
</li>
</ul>
</div>
</div>
<div class="navbar-links">
<ul class="links">
<li>
<a href="https://forum.beammp.com">
<span class="text">Forum</span>
</a>
</li>
<li>
<a href="https://docs.beammp.com/">
<span class="text">Docs</span>
</a>
</li>
<li>
<a href="https://github.com/BeamMP/BeamMP">
<span class="text">Github</span>
</a>
</li>
<li>
<a href="https://www.patreon.com/BeamMP">
<span class="text">Patreon</span>
</a>
</li>
</ul>
</div>
</div>
</div>
</div>

View File

@ -50,32 +50,37 @@
});
});
</script>
<noscript>
<link rel="stylesheet" type="text/css" href="css/styles.css"/>
<link rel="stylesheet" type="text/css" href="css/styles-nojs.css"/>
</noscript>
</head>
<body>
<nav class="nav">
<%- include('includes/nav.ejs') %>
</nav>
<header class="main-content" style="background-position: center center, center 0px;">
<div class="introduction" style="margin-top: 0px;">
<div class="container">
<div class="row center-xs middle-xs">
<div class="col-lg-8 col-md-8 col-sm-8 col-xs-12">
<p class="lead">
<b>BeamMP</b> Bringing Multiplayer to BeamNG.drive!<br>
With a smooth and enjoyable experience.
</div>
<div id="button" class="col-lg-4 col-md-4 col-sm-4 buttons-wrapper hidden-xs">
<div class="player-count">
<h2>Players Online: <span id="ONLINE-PLAYERS"></span></h2>
</div>
<div class="buttons mt-3">
<button class="download-client js-show-story" onclick="downloadinstaller()" href="beamMP.zip" download>
<img class="os-icon" src="https://raw.githubusercontent.com/devicons/devicon/master/icons/windows8/windows8-original.svg" alt="windows-logo">
<div class="pageContainer">
<nav class="nav">
<%- include('includes/nav.ejs') %>
</nav>
<header class="main-content" style="background-position: center center, center 0px;">
<div class="introduction" style="margin-top: 0px;">
<div class="container">
<div class="row center-xs middle-xs">
<div class="col-lg-8 col-md-8 col-sm-8 col-xs-12">
<p class="lead">
<b>BeamMP</b> Bringing Multiplayer to BeamNG.drive!<br>
With a smooth and enjoyable experience.
</div>
<div id="button" class="col-lg-4 col-md-4 col-sm-4 buttons-wrapper hidden-xs">
<div class="player-count">
<h2>Players Online: <span id="ONLINE-PLAYERS"></span></h2>
</div>
<div class="buttons mt-3">
<button class="download-client js-show-story" onclick="downloadinstaller()" href="beamMP.zip" download>
<img class="os-icon" src="https://raw.githubusercontent.com/devicons/devicon/master/icons/windows8/windows8-original.svg" alt="windows-logo">
<span class="text">Download Client</span>
<span class="description"> BeamMP_Installer.zip</span>
</button>
</div>
<span class="description"> BeamMP_Installer.zip</span>
</button>
</div>
<div class="buttons mt-3">
<form action="https://github.com/BeamMP/BeamMP-Server/releases/latest/download/BeamMP-Server.exe">
<button class="download-client js-show-story" style="background: radial-gradient(circle,rgb(255 179 38 / 80%),rgb(255 176 0 / 65%)) center/100%;">
@ -94,98 +99,215 @@
</button>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
</header>
<section id="features">
<div class="container">
<div class="row center-lg center-md center-sm center-xs features">
<article class="col-lg-3">
<h2>Stable Servers</h2>
BeamMP allows for stable servers,
with a variety of servers located accross the globe.
</article>
<article class="col-lg-3 col-md-6 col-sm-6 col-xs-12">
<h2> BeamNG.drive </h2> BeamMP uses the same maps, vehicles & mods
so you don't need to learn anything new!
</article>
<article class="col-lg-3 col-md-6 col-sm-6 col-xs-12">
<h2> Standalone </h2> BeamMP doesn't modify your original installation,
so you can play either singleplayer or multiplayer.
</article>
<article class="col-lg-3 col-md-6 col-sm-6 col-xs-12">
<h2> Sync quality </h2> BeamMP updates your vehicle position ~100 times per second,
allowing for a smooth overall experience.
</article>
</div>
</div>
</div>
</div>
</div>
</div>
</header>
<section id="features">
<div class="container">
<div class="row center-lg center-md center-sm center-xs features">
<article class="col-lg-3">
<h2>Stable Servers</h2>
BeamMP allows for stable servers,
with a variety of servers located accross the globe.
</article>
<article class="col-lg-3 col-md-6 col-sm-6 col-xs-12">
<h2> BeamNG.drive </h2> BeamMP uses the same maps, vehicles & mods
so you don't need to learn anything new!
</article>
<article class="col-lg-3 col-md-6 col-sm-6 col-xs-12">
<h2> Standalone </h2> BeamMP doesn't modify your original installation,
so you can play either singleplayer or multiplayer.
</article>
<article class="col-lg-3 col-md-6 col-sm-6 col-xs-12">
<h2> Sync quality </h2> BeamMP updates your vehicle position ~100 times per second,
allowing for a smooth overall experience.
</article>
</div>
</div>
<hr>
<div class="row middle-lg">
<div class="col-lg-6">
<figure>
<img src="../img/beammpservers.png">
</figure>
</div>
<div class="col-lg-6" style="text-align:center">
<ul class="user-features-list">
<li> Dedicated servers </li>
<li> The original BeamNG.Drive</li>
<li> Dedicated support team</li>
<li> 24/7 Global Access</li>
</ul>
</div>
</div>
<hr>
<div class="row middle-lg">
<div class="col-lg-6">
<figure>
<img src="../img/beammpservers.png">
</figure>
</div>
<div class="col-lg-6" style="text-align:center">
<ul class="user-features-list">
<li> Dedicated servers </li>
<li> The original BeamNG.Drive</li>
<li> Dedicated support team</li>
<li> 24/7 Global Access</li>
</ul>
</div>
</div>
</section>
<hr>
<section id="faq"><div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
<div class="container">
<!-- <div class="row"> -->
<h1>FAQ.</h1>
<div class="faq">
<h3 id="faq-heading">The server list is not showing up!</h3>
<p>Try restarting BeamMP as this can sometimes happen, if this fails to fix your issue please create a topic on our forum or visit the support channel on our discord</p>
<h3 id="faq-heading">How do I open a ticket in case something doesnt work or I have questions?</h3>
<p>Please check the <b>#how-to-use</b> channel in Discord and on our forum. Please give an accurate description of what youve done so the support team will help you in a fast and effective way. </p>
<h3 id="faq-heading">Help! Im getting error codes</h3>
<p>Please head over to our forum and see if anyone has had the issue before. It is likely that someone else has at some point and therefore there will also probably be a solution posted with it too in the replies. Altervatively visit our discord where the larger portion of community is currently based.</p>
<h3 id="faq-heading"> Does this work with pirated versions of BeamNG.drive?</h3>
<p>We dont know if it works with pirated versions of BeamNG.drive, but we <b>will not</b> provide any support to non legit copies of the game. Nor will we change to support it.</p>
<h3 id="faq-heading">How do I host a server?</h3>
<p>The server files required for hosting your own server can be found at the top of this page below the client download. You will also require a authentication key which can be found from <a href="https://keymaster.beammp.com/">keymaster</a>. Further information around the setup can be found on our <a href="https://wiki.beammp.com/en/home/Server_Mod">wiki</a>.</p>
<h3 id="faq-heading">Can I use mods?</h3>
<p>Mods are supported, These are installed on the server. See our <a href="https://wiki.beammp.com/en/home/Server_Mod">wiki</a> for more infomation.</p>
</div>
</div>
</div>
</div>
</section>
</section>
<hr>
<section id="faq">
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
<div class="container">
<!-- <div class="row"> -->
<h1>FAQ.</h1>
<div class="faq">
<h3 id="faq-heading">The server list is not showing up!</h3>
<p>Try restarting BeamMP as this can sometimes happen, if this fails to fix your issue please create a topic on our forum or visit the support channel on our discord</p>
<h3 id="faq-heading">How do I open a ticket in case something doesnt work or I have questions?</h3>
<p>Please check the <b>#how-to-use</b> channel in Discord and on our forum. Please give an accurate description of what youve done so the support team will help you in a fast and effective way. </p>
<h3 id="faq-heading">Help! Im getting error codes</h3>
<p>Please head over to our forum and see if anyone has had the issue before. It is likely that someone else has at some point and therefore there will also probably be a solution posted with it too in the replies. Altervatively visit our discord where the larger portion of community is currently based.</p>
<h3 id="faq-heading"> Does this work with pirated versions of BeamNG.drive?</h3>
<p>We dont know if it works with pirated versions of BeamNG.drive, but we <b>will not</b> provide any support to non legit copies of the game. Nor will we change to support it.</p>
<h3 id="faq-heading">How do I host a server?</h3>
<p>The server files required for hosting your own server can be found at the top of this page below the client download. You will also require a authentication key which can be found from <a href="https://keymaster.beammp.com/">keymaster</a>. Further information around the setup can be found on our <a href="https://docs.beammp.com/">docs</a>.</p>
<h3 id="faq-heading">Can I use mods?</h3>
<p>Mods are supported, These are installed on the server. See our <a href="https://docs.beammp.com/">docs</a> for more infomation.</p>
</div>
</div>
</div>
</div>
</section>
<div class="footer-js">
<%- include('includes/footer.ejs') %>
</div>
<script>
function downloadinstaller() {
document.location.href ="/installer/BeamMP_Installer.zip";
//alert("Sorry this is coming soon, Therefore it is not available just yet. Please join the discord to get the latest version: https://discord.gg/beammp")
}
<%- include('includes/footer.ejs') %>
<script>
function downloadinstaller() {
document.location.href ="/installer/BeamMP_Installer.zip";
//alert("Sorry this is coming soon, Therefore it is not available just yet. Please join the discord to get the latest version: https://discord.gg/beammp")
}
function myFunction() {
var x = document.getElementById("burger-links");
if (x.style.display === "block") {
x.style.display = "none";
} else {
x.style.display = "block";
}
}
</script>
<script src="js/script.js"></script>
</div>
<noscript>
<nav class="nav">
<%- include('includes/nav-nojs.ejs') %>
</nav>
<div class="nojsContainer">
<header class="main-content" style="background-position: center center, center 0px;">
<div class="introduction" style="margin-top: 0px;">
<div class="container">
<div class="row center-xs middle-xs">
<div class="col-lg-8 col-md-8 col-sm-8 col-xs-12">
<p class="lead">
<b>BeamMP</b> Bringing Multiplayer to BeamNG.drive!<br>
With a smooth and enjoyable experience.
</p>
</div>
<div id="button" class="col-lg-4 col-md-4 col-sm-4 buttons-wrapper hidden-xs">
<div class="buttons mt-3">
<form action="https://beammp.com/installer/BeamMP_Installer.zip">
<button class="download-client js-show-story" href="beamMP.zip" download>
<img class="os-icon" src="https://raw.githubusercontent.com/devicons/devicon/master/icons/windows8/windows8-original.svg" alt="windows-logo">
<span class="text">Download Client</span>
<span class="description"> BeamMP_Installer.zip</span>
</button>
</form>
</div>
<div class="buttons mt-3">
<form action="https://github.com/BeamMP/BeamMP-Server/releases/latest/download/BeamMP-Server.exe">
<button class="download-client js-show-story" style="background: radial-gradient(circle,rgb(255 179 38 / 80%),rgb(255 176 0 / 65%)) center/100%;">
<img class="os-icon" src="https://raw.githubusercontent.com/devicons/devicon/master/icons/windows8/windows8-original.svg" alt="windows-logo">
<span class="text">Download Server</span>
<span class="description"> BeamMP-Server.exe</span>
</button>
</form>
</div>
<div class="buttons mt-3">
<form action="/linux-builds" method="post">
<button class="download-client js-show-story" style="background: radial-gradient(circle,rgb(255 179 38 / 80%),rgb(255 176 0 / 65%)) center/100%;">
<img class="os-icon" src="https://raw.githubusercontent.com/devicons/devicon/master/icons/linux/linux-plain.svg" alt="linux-logo">
<span class="text">Download Server</span>
<span class="description"> Linux builds</span>
</button>
</form>
</div>
</div>
</div>
</div>
</div>
</header>
<section id="features">
<div class="container">
<div class="row center-lg center-md center-sm center-xs features">
<article class="col-lg-3">
<h2>Stable Servers</h2>
BeamMP allows for stable servers,
with a variety of servers located accross the globe.
</article>
<article class="col-lg-3 col-md-6 col-sm-6 col-xs-12">
<h2> BeamNG.drive </h2> BeamMP uses the same maps, vehicles & mods
so you don't need to learn anything new!
</article>
<article class="col-lg-3 col-md-6 col-sm-6 col-xs-12">
<h2> Standalone </h2> BeamMP doesn't modify your original installation,
so you can play either singleplayer or multiplayer.
</article>
<article class="col-lg-3 col-md-6 col-sm-6 col-xs-12">
<h2> Sync quality </h2> BeamMP updates your vehicle position ~100 times per second,
allowing for a smooth overall experience.
</article>
</div>
</div>
function downloadserver() {
document.location.href ="https://github.com/BeamMP/BeamMP-Server/releases/latest";
//alert("Sorry this is coming soon, Therefore it is not available just yet. Please join the discord to get the latest version: https://discord.gg/beammp")
}
<hr>
<div class="row middle-lg">
<div class="col-lg-6">
<figure>
<img src="../img/beammpservers.png">
</figure>
</div>
<div class="col-lg-6" style="text-align:center">
<ul class="user-features-list">
<li> Dedicated servers </li>
<li> The original BeamNG.Drive</li>
<li> Dedicated support team</li>
<li> 24/7 Global Access</li>
</ul>
</div>
</div>
function myFunction() {
var x = document.getElementById("burger-links");
if (x.style.display === "block") {
x.style.display = "none";
} else {
x.style.display = "block";
}
}
</script>
<script src="js/script.js"></script>
</section>
<hr>
<section id="faq">
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
<div class="container">
<!-- <div class="row"> -->
<h1>FAQ.</h1>
<div class="faq">
<h3 id="faq-heading">The server list is not showing up!</h3>
<p>Try restarting BeamMP as this can sometimes happen, if this fails to fix your issue please create a topic on our forum or visit the support channel on our discord</p>
<h3 id="faq-heading">How do I open a ticket in case something doesnt work or I have questions?</h3>
<p>Please check the <b>#how-to-use</b> channel in Discord and on our forum. Please give an accurate description of what youve done so the support team will help you in a fast and effective way. </p>
<h3 id="faq-heading">Help! Im getting error codes</h3>
<p>Please head over to our forum and see if anyone has had the issue before. It is likely that someone else has at some point and therefore there will also probably be a solution posted with it too in the replies. Altervatively visit our discord where the larger portion of community is currently based.</p>
<h3 id="faq-heading"> Does this work with pirated versions of BeamNG.drive?</h3>
<p>We dont know if it works with pirated versions of BeamNG.drive, but we <b>will not</b> provide any support to non legit copies of the game. Nor will we change to support it.</p>
<h3 id="faq-heading">How do I host a server?</h3>
<p>The server files required for hosting your own server can be found at the top of this page below the client download. You will also require a authentication key which can be found from <a href="https://keymaster.beammp.com/">keymaster</a>. Further information around the setup can be found on our <a href="https://docs.beammp.com/">docs</a>.</p>
<h3 id="faq-heading">Can I use mods?</h3>
<p>Mods are supported, These are installed on the server. See our <a href="https://docs.beammp.com/">docs</a> for more infomation.</p>
</div>
</div>
</div>
</div>
</section>
<%- include('includes/footer-nojs.ejs') %>
</div>
</noscript>
<!-- <script src="../static/js/script.js"></script>-->
</body>

View File

@ -0,0 +1,65 @@
<!-- This page is only loaded on JS free clients -->
<!-- Archetype to add a distribution (THERE MUST BE 2 SPACES BEFORE THE DISTRO NAME)
<tr>
<td>Distro name</td>
</tr>
<tr>
<td>
&emsp;&#9562;<a href="direct link to .zip file on Github"> Distro name (architecture A)</a><br>
&emsp;&#9562;<a href="direct link to .zip file on Github"> Distro name (architecture B)</a><br>
</td>
</tr>
-->
<head>
<meta charset="utf-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="abuseipdb-verification" content="K1hJK7Gv" />
<title>Linux Builds</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"/>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/css/bootstrap.min.css" integrity="sha384-rwoIResjU2yc3z8GV/NPeZWAv56rSmLldC3R/AZzGRnGxQQKnKkoFVhFQhNUwEyJ" crossorigin="anonymous">
<link rel="stylesheet" type="text/css" href="css/styles.css"/>
<link rel="stylesheet" type="text/css" href="css/styles-nojs.css"/>
</head>
<body>
<nav class="nav">
<%- include('includes/nav-nojs.ejs') %>
</nav>
<h1 style="padding-top: 80px; padding-left: 10px;">List of Linux builds for BeamMP Server</h1>
<div class="table-container">
<table>
<tbody>
<tr>
<td>Debian</td>
</tr>
<tr>
<td>
&emsp;&#9562;<a href="https://github.com/BeamMP/BeamMP-Server/releases/latest/download/BeamMP-Server.debian.11.arm64"> Debian 11 (arm64)</a><br>
&emsp;&#9562;<a href="https://github.com/BeamMP/BeamMP-Server/releases/latest/download/BeamMP-Server.debian.11.x86_64"> Debian 11 (x86/64)</a><br>
&emsp;&#9562;<a href="https://github.com/BeamMP/BeamMP-Server/releases/latest/download/BeamMP-Server.debian.12.arm64"> Debian 12 (arm64)</a><br>
&emsp;&#9562;<a href="https://github.com/BeamMP/BeamMP-Server/releases/latest/download/BeamMP-Server.debian.12.x86_64"> Debian 12 (x86/64)</a><br>
</td>
</tr>
<tr>
<td>Ubuntu</td>
</tr>
<tr>
<td>
&emsp;&#9562;<a href="https://github.com/BeamMP/BeamMP-Server/releases/latest/download/BeamMP-Server.ubuntu.20.04.arm64"> Ubuntu 20.04 (arm64)</a><br>
&emsp;&#9562;<a href="https://github.com/BeamMP/BeamMP-Server/releases/latest/download/BeamMP-Server.ubuntu.20.04.x86_64"> Ubuntu 20.04 (x86/64)</a><br>
&emsp;&#9562;<a href="https://github.com/BeamMP/BeamMP-Server/releases/latest/download/BeamMP-Server.ubuntu.22.04.arm64"> Ubuntu 22.04 (arm64)</a><br>
&emsp;&#9562;<a href="https://github.com/BeamMP/BeamMP-Server/releases/latest/download/BeamMP-Server.ubuntu.22.04.x86_64"> Ubuntu 22.04 (x86/64)</a><br>
</td>
</tr>
</tbody>
</table>
</div>
<%- include('includes/footer-nojs.ejs') %>
</body>

View File

@ -20,49 +20,70 @@
gtag('config', 'UA-160071688-1');
</script>
<noscript>
<link rel="stylesheet" type="text/css" href="css/styles.css"/>
<link rel="stylesheet" type="text/css" href="css/styles-nojs.css"/>
</noscript>
</head>
<body class="sb-nav-fixed">
<span id="TEMPAREA" style="display:none;"></span>
<nav class="nav" style="position: unset !important;">
<%- include('includes/nav.ejs') %>
</nav>
<div class="container-fluid">
<div id="layoutSidenav_content">
<h1 class="mt-4" style="color:white;">Server List</h1>
<div class="card mb-4">
<div class="card-header"><i class="fas fa-server mr-1"></i>BeamMP Server List</div>
<div class="card-body">
<div class="table-responsive">
<table class="table table-bordered" id="dataTable" width="100%" cellspacing="0">
<thead>
<tr>
<th>Location</th>
<th>Server Name</th>
<th>Map</th>
<th>Players</th>
</tr>
</thead>
<tfoot>
<tr>
<th>Location</th>
<th>Server Name</th>
<th>Map</th>
<th>Players</th>
</tr>
</tfoot>
<tbody id="Servers-List">
</tbody>
</table>
</div>
</div>
</div>
</div>
<%- include('includes/footer.ejs') %>
</div>
<script src="https://code.jquery.com/jquery-3.4.1.min.js" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.bundle.min.js" crossorigin="anonymous"></script>
<script src="js/scripts.js"></script>
<script src="https://cdn.datatables.net/1.10.20/js/jquery.dataTables.min.js" crossorigin="anonymous"></script>
<script src="https://cdn.datatables.net/1.10.20/js/dataTables.bootstrap4.min.js" crossorigin="anonymous"></script>
<div class="pageContainer">
<span id="TEMPAREA" style="display:none;"></span>
<nav class="nav" style="position: unset !important;">
<%- include('includes/nav.ejs') %>
</nav>
<div class="container-fluid">
<div id="layoutSidenav_content">
<h1 class="mt-4" style="color:white;">Server List</h1>
<div class="card mb-4">
<div class="card-header"><i class="fas fa-server mr-1"></i>BeamMP Server List</div>
<div class="card-body">
<div class="table-responsive">
<table class="table table-bordered" id="dataTable" width="100%" cellspacing="0">
<thead>
<tr>
<th>Location</th>
<th>Server Name</th>
<th>Map</th>
<th>Players</th>
</tr>
</thead>
<tfoot>
<tr>
<th>Location</th>
<th>Server Name</th>
<th>Map</th>
<th>Players</th>
</tr>
</tfoot>
<tbody id="Servers-List">
</tbody>
</table>
</div>
</div>
</div>
</div>
<%- include('includes/footer.ejs') %>
</div>
<script src="https://code.jquery.com/jquery-3.4.1.min.js" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.bundle.min.js" crossorigin="anonymous"></script>
<script src="js/scripts.js"></script>
<script src="https://cdn.datatables.net/1.10.20/js/jquery.dataTables.min.js" crossorigin="anonymous"></script>
<script src="https://cdn.datatables.net/1.10.20/js/dataTables.bootstrap4.min.js" crossorigin="anonymous"></script>
</div>
<noscript>
<nav class="nav">
<%- include('includes/nav-nojs.ejs') %>
</nav>
<header class="content-not-available">
<div class="content-not-available-introduction" style="margin-top: 0px;">
<h1>This content is not available without Javascript.</h1>
<h2>Please enable Javascript and refresh the page.</h2>
</div>
</header>
<%- include('includes/footer-nojs.ejs') %>
</noscript>
</body>
</html>

View File

@ -25,168 +25,192 @@
gtag('config', 'UA-160071688-1');
</script>
<noscript>
<link rel="stylesheet" type="text/css" href="css/styles.css"/>
<link rel="stylesheet" type="text/css" href="css/styles-nojs.css"/>
</noscript>
</head>
<body>
<nav class="nav" style="position: unset !important;">
<%- include('includes/nav.ejs') %>
</nav>
<div class="container-fluid">
<div id="layoutSidenav_content">
<div class="row">
<div class="col-md-12">
<h1 class="mt-4" style="color:white;"><i class="fas fa-server mr-1"></i>BeamMP Statistics <h3 id="LivePlayerCount" style="color:white;"></h3></h1>
</div>
<div class="col-md-4">
<div class="card">
<div class="card-body">
<h5 class="card-title">Highest Recorded Players</h5>
<p class="card-text text-muted" id="MAXPLAYERS"></p>
</div>
</div>
</div>
<div class="col-md-4">
<div class="card">
<div class="card-body">
<h5 class="card-title">Highest Recorded Servers</h5>
<p class="card-text text-muted" id="MAXSERVERS"></p>
</div>
</div>
</div>
<div class="col-md-4">
<div class="card">
<div class="card-body">
<h5 class="card-title">Todays Average Players</h5>
<p class="card-text text-muted" id="AVERAGES"></p
</div>
</div>
</div>
</div>
<div class="col-md-12">
<canvas id="myChart" width="100vw" height="770"></canvas>
</div>
</div>
<footer class="py-4 bg-light mt-auto">
<div class="container-fluid">
<div class="d-flex align-items-center justify-content-between small">
<div class="text-muted">Copyright &copy; BeamMP Development Team 2021</div>
<div>
<a href="https://forum.beammp.com/topic/95/privacy-policy-v1-0">Privacy Policy</a>
&middot;
<a href="https://forum.beammp.com/topic/94/terms-of-use-v1-0">Terms &amp; Conditions</a>
</div>
</div>
</div>
</footer>
</div>
<script src="https://code.jquery.com/jquery-3.4.1.min.js" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.bundle.min.js" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.8.0/Chart.min.js" crossorigin="anonymous"></script>
<script src="https://cdn.datatables.net/1.10.20/js/jquery.dataTables.min.js" crossorigin="anonymous"></script>
<script src="https://cdn.datatables.net/1.10.20/js/dataTables.bootstrap4.min.js" crossorigin="anonymous"></script>
<script type="text/javascript">
var chartData = {};
<div class="pageContainer">
<nav class="nav" style="position: unset !important;">
<%- include('includes/nav.ejs') %>
</nav>
<div class="container-fluid">
<div id="layoutSidenav_content">
<div class="row">
<div class="col-md-12">
<h1 class="mt-4" style="color:white;"><i class="fas fa-server mr-1"></i>BeamMP Statistics <h3 id="LivePlayerCount" style="color:white;"></h3></h1>
</div>
<div class="col-md-4">
<div class="card">
<div class="card-body">
<h5 class="card-title">Highest Recorded Players</h5>
<p class="card-text text-muted" id="MAXPLAYERS"></p>
</div>
</div>
</div>
<div class="col-md-4">
<div class="card">
<div class="card-body">
<h5 class="card-title">Highest Recorded Servers</h5>
<p class="card-text text-muted" id="MAXSERVERS"></p>
</div>
</div>
</div>
<div class="col-md-4">
<div class="card">
<div class="card-body">
<h5 class="card-title">Todays Average Players</h5>
<p class="card-text text-muted" id="AVERAGES"></p
</div>
</div>
</div>
</div>
<div class="col-md-12">
<canvas id="myChart" width="100vw" height="770"></canvas>
</div>
</div>
<div class="foot">
<footer class="py-4 bg-light mt-auto">
<div class="container-fluid">
<div class="d-flex align-items-center justify-content-between small">
<div class="text-muted">Copyright &copy; BeamMP Development Team 2019 - Present</div>
<div>
<a href="https://forum.beammp.com/topic/95/privacy-policy-v1-0">Privacy Policy</a>
&middot;
<a href="https://forum.beammp.com/topic/94/terms-of-use-v1-0">Terms &amp; Conditions</a>
</div>
</div>
</div>
</footer>
</div>
</div>
<script src="https://code.jquery.com/jquery-3.4.1.min.js" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.bundle.min.js" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.8.0/Chart.min.js" crossorigin="anonymous"></script>
<script src="https://cdn.datatables.net/1.10.20/js/jquery.dataTables.min.js" crossorigin="anonymous"></script>
<script src="https://cdn.datatables.net/1.10.20/js/dataTables.bootstrap4.min.js" crossorigin="anonymous"></script>
<script type="text/javascript">
var chartData = {};
var GetChartData = function (period) {
$.ajax({
type: 'GET',
url: 'https://backend.beammp.com/stats-info',
data: {
period: (period) ? period : 'today',
},
dataType: 'json',
success: function (d) {
console.log(d)
var average = 0;
var Data = {}
Data.Players = []
Data.Servers = []
Data.v2Players = []
Data.v2Servers = []
Data.Labels = []
console.log(d.maxp, d.maxs)
console.log(d.v2history)
if (d.v2history) {
var count = 0
var tot = 0
d.v2history.forEach(function(item, index) {
Data.Labels.push(item.datetime)
Data.v2Players.push(item.players)
if (typeof(item.servers) == 'number') Data.v2Servers.push(item.servers);
if (typeof(item.servers) == 'object') Data.v2Servers.push(item.servers.count);
tot += parseInt(item.players)
count++;
});
average = tot / count
}
$('#MAXPLAYERS').text(d.maxp);
$('#MAXSERVERS').text(d.maxs);
$('#AVERAGES').text(Math.floor(average));
$('#LivePlayerCount').text(`Currently Online: ${d.v2history[d.v2history.length-1].players}`)
console.log(Data)
document.getElementById('myChart').innerHTML = '';
var ctx = document.getElementById('myChart').getContext('2d');
ctx.height = 770;
var myChart = new Chart(ctx, {
type: 'line',
data: {
labels: Data.Labels,
datasets: [{
label: 'Servers',
backgroundColor: 'rgba(255,0,0,0.1)',
borderColor: 'rgba(255,0,0,0.4)',
data: Data.v2Servers,
fill: false,
}, {
label: 'Players',
fill: false,
backgroundColor: 'rgba(0,0,255,0.1)',
borderColor: 'rgba(0,0,255,0.4)',
data: Data.v2Players,
}]
},
options: {
responsive: true,
maintainAspectRatio: false,
title: {
display: true,
text: 'BeamMP Statistics'
},
tooltips: {
mode: 'index',
intersect: false,
},
hover: {
mode: 'nearest',
intersect: true
},
scales: {
x: {
display: true,
scaleLabel: {
display: true,
labelString: 'Time'
}
},
y: {
display: true,
scaleLabel: {
display: true,
labelString: 'Count'
}
}
}
}
})
}
});
};
var GetChartData = function (period) {
$.ajax({
type: 'GET',
url: 'https://backend.beammp.com/stats-info',
data: {
period: (period) ? period : 'today',
},
dataType: 'json',
success: function (d) {
console.log(d)
var average = 0;
var Data = {}
Data.Players = []
Data.Servers = []
Data.v2Players = []
Data.v2Servers = []
Data.Labels = []
console.log(d.maxp, d.maxs)
console.log(d.v2history)
if (d.v2history) {
var count = 0
var tot = 0
d.v2history.forEach(function(item, index) {
Data.Labels.push(item.datetime)
Data.v2Players.push(item.players)
if (typeof(item.servers) == 'number') Data.v2Servers.push(item.servers);
if (typeof(item.servers) == 'object') Data.v2Servers.push(item.servers.count);
tot += parseInt(item.players)
count++;
});
average = tot / count
}
$('#MAXPLAYERS').text(d.maxp);
$('#MAXSERVERS').text(d.maxs);
$('#AVERAGES').text(Math.floor(average));
$('#LivePlayerCount').text(`Currently Online: ${d.v2history[d.v2history.length-1].players}`)
console.log(Data)
document.getElementById('myChart').innerHTML = '';
var ctx = document.getElementById('myChart').getContext('2d');
ctx.height = 770;
var myChart = new Chart(ctx, {
type: 'line',
data: {
labels: Data.Labels,
datasets: [{
label: 'Servers',
backgroundColor: 'rgba(255,0,0,0.1)',
borderColor: 'rgba(255,0,0,0.4)',
data: Data.v2Servers,
fill: false,
}, {
label: 'Players',
fill: false,
backgroundColor: 'rgba(0,0,255,0.1)',
borderColor: 'rgba(0,0,255,0.4)',
data: Data.v2Players,
}]
},
options: {
responsive: true,
maintainAspectRatio: false,
title: {
display: true,
text: 'BeamMP Statistics'
},
tooltips: {
mode: 'index',
intersect: false,
},
hover: {
mode: 'nearest',
intersect: true
},
scales: {
x: {
display: true,
scaleLabel: {
display: true,
labelString: 'Time'
}
},
y: {
display: true,
scaleLabel: {
display: true,
labelString: 'Count'
}
}
}
}
})
}
});
};
$(document).ready(function() {
GetChartData();
});
$(document).ready(function() {
GetChartData();
});
//const socket = io('./stats');
</script>
//const socket = io('./stats');
</script>
</div>
</div>
<noscript>
<nav class="nav">
<%- include('includes/nav-nojs.ejs') %>
</nav>
<header class="content-not-available">
<div class="content-not-available-introduction" style="margin-top: 0px;">
<h1>This content is not available without Javascript.</h1>
<h2>Please enable Javascript and refresh the page.</h2>
</div>
</header>
<%- include('includes/footer-nojs.ejs') %>
</noscript>
</body>
</html>