Update LESite
This commit is contained in:
@@ -23,7 +23,7 @@
|
||||
<a href="./aboutus.html" class="desktop_navbar_link">About Us</a>
|
||||
<a href="./credits.html" class="desktop_navbar_link">Credits</a>
|
||||
<a href="./projects.html" class="desktop_navbar_link">Projects</a>
|
||||
<a class="desktop_navbar_link scroll">Current Version: 0.6.0</a>
|
||||
<a class="desktop_navbar_link scroll">Current Version: 0.6.1</a>
|
||||
<div class="desktop_navbar_link2_div">
|
||||
<a href="./downloads.html" class="desktop_navbar_link2">Download</a>
|
||||
</div>
|
||||
@@ -60,53 +60,6 @@
|
||||
<a>Lethal Company,<br>but</a>
|
||||
<a class="main1_actcent">better</a><a>.</a>
|
||||
</div>
|
||||
<title>Player Counts</title>
|
||||
<style>
|
||||
|
||||
#player-count {
|
||||
font-size: 2em;
|
||||
color: #ebe3e3;
|
||||
}
|
||||
|
||||
#loading {
|
||||
display: none;
|
||||
color: #777;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="main1_actcent" id="player-count">Loading...</div>
|
||||
|
||||
<script>
|
||||
const playerCountElement = document.getElementById('player-count');
|
||||
const prometheusURL = 'http://5.161.51.188:9090/api/v1/query?query=le_active_users';
|
||||
|
||||
// Function to fetch player count from Prometheus
|
||||
async function fetchPlayerCount() {
|
||||
try {
|
||||
const response = await fetch(prometheusURL);
|
||||
const data = await response.json();
|
||||
|
||||
// Extract the player count from the response
|
||||
if (data.status === 'success' && data.data.result.length > 0) {
|
||||
const playerCount = data.data.result[0].value[1];
|
||||
playerCountElement.textContent = `Current Player Count: ${playerCount}`;
|
||||
} else {
|
||||
playerCountElement.textContent = 'No data';
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('Error fetching player count:', error);
|
||||
playerCountElement.textContent = 'Error fetching data';
|
||||
} finally {
|
||||
}
|
||||
}
|
||||
|
||||
// Fetch player count every 15 seconds
|
||||
setInterval(fetchPlayerCount, 5000);
|
||||
|
||||
// Initial fetch when the page loads
|
||||
fetchPlayerCount();
|
||||
</script>
|
||||
<p></p>
|
||||
<div class="main1_ipcopier_div">
|
||||
<button class="main1_ipcopier" type="button">
|
||||
<span class="main1_ipcopier_text1"></span>
|
||||
@@ -154,10 +107,10 @@
|
||||
<a class="main2_feature_text">Explore More Dangers!</a>
|
||||
</div>
|
||||
<div class="main2_feature">
|
||||
<img class="main2_feature_img" alt="Feature Image" src="media/features/mimics.jpg">
|
||||
<a class="main2_feature_headline">Mimics</a>
|
||||
<a class="main2_feature_text">Can you figure out the differences in time?</a>
|
||||
</div>
|
||||
<img class="main2_feature_img" alt="Feature Image" src="media/features/interiors.png">
|
||||
<a class="main2_feature_headline">Custom Interiors</a>
|
||||
<a class="main2_feature_text">New Dungeons to explore and get lost in</a>
|
||||
</div>
|
||||
<div class="main2_feature">
|
||||
<img class="main2_feature_img" alt="Feature Image" src="media/features/skinwalkers.jpg">
|
||||
<a class="main2_feature_headline">Skinwalkers</a>
|
||||
@@ -173,11 +126,6 @@
|
||||
<a class="main2_feature_headline">Pushing</a>
|
||||
<a class="main2_feature_text">Betray your friends and push them in the most dire of times</a>
|
||||
</div>
|
||||
<div class="main2_feature">
|
||||
<img class="main2_feature_img" alt="Feature Image" src="media/features/interiors.png">
|
||||
<a class="main2_feature_headline">Custom Interiors</a>
|
||||
<a class="main2_feature_text">New Dungeons to explore and get lost in</a>
|
||||
</div>
|
||||
<div class="main2_feature">
|
||||
<img class="main2_feature_img" alt="Feature Image" src="media/features/enemies.png">
|
||||
<a class="main2_feature_headline">New Enemies</a>
|
||||
|
||||
Reference in New Issue
Block a user