1
0
Fork 0
mirror of https://github.com/Ylianst/MeshCentral.git synced 2025-03-09 15:40:18 +00:00

Added server stats graph breaks.

This commit is contained in:
Ylian Saint-Hilaire 2020-03-21 17:33:09 -07:00
parent 0534322437
commit 2ca9ea9ed4
2 changed files with 14 additions and 0 deletions

View file

@ -70,6 +70,7 @@ function CreateMeshCentralServer(config, args) {
obj.serverWarnings = []; // List of warnings that should be shown to administrators
obj.cookieUseOnceTable = {}; // List of cookies that are already expired
obj.cookieUseOnceTableCleanCounter = 0; // Clean the cookieUseOnceTable each 20 additions
obj.firstStats = true; // True until this server saves it's not stats to the database
// Server version
obj.currentVer = null;
@ -1272,6 +1273,7 @@ function CreateMeshCentralServer(config, args) {
}
};
if (obj.mpsserver != null) { data.conn.am = Object.keys(obj.mpsserver.ciraConnections).length; }
if (obj.firstStats === true) { delete obj.firstStats; data.first = true; }
obj.db.SetServerStats(data); // Save the stats to the database
obj.DispatchEvent(['*'], obj, { action: 'servertimelinestats', data: data }); // Event the server stats
}, 300000);