1
0
mirror of https://github.com/RaidMax/IW4M-Admin.git synced 2025-06-10 07:13:58 -05:00

persist client count history data across reboots and allow for configurable timespan

This commit is contained in:
RaidMax
2021-08-29 13:10:10 -05:00
parent a15bcf1469
commit dcf690325c
22 changed files with 213 additions and 59 deletions

View File

@ -2,7 +2,8 @@
///////////////////////////////////////
// thanks to canvasjs :(
playerHistory.forEach(function (item, i) {
playerHistory[i].x = new Date(playerHistory[i].x);
playerHistory[i].x = new Date(playerHistory[i].timeString);
playerHistory[i].y = playerHistory[i].clientCount;
});
return new CanvasJS.Chart(`server_history_${i}`, {
@ -84,7 +85,7 @@ $(document).ready(function () {
});
$('.server-history-row').each(function (index, element) {
let clientHistory = $(this).data('clienthistory');
let clientHistory = $(this).data('clienthistory-ex');
let serverId = $(this).data('serverid');
let maxClients = parseInt($('#server_header_' + serverId + ' .server-maxclients').text());
let primaryColor = $('title').css('background-color');