diff --git a/meshcentral-config-schema.json b/meshcentral-config-schema.json index 6e1687fd..8bd2138c 100644 --- a/meshcentral-config-schema.json +++ b/meshcentral-config-schema.json @@ -15,7 +15,7 @@ "WANonly": { "type": "boolean", "default": false, "description": "When enabled, only MeshCentral WAN features are enabled and agents will connect to the server using a well known DNS name." }, "LANonly": { "type": "boolean", "default": false, "description": "When enabled, only MeshCentral LAN features are enabled and agents will find the server using multicast LAN packets." }, "maintenanceMode": { "type": "boolean", "default": false, "description": "When enabled the server is in maintenance mode, only administrators can login. Use the maintenance command in server console to change." }, - "sessionTime": { "type": "integer" }, + "sessionTime": { "type": "integer", "default": 60, "description": "Duration of a session cookie in minutes. Changing this affects how often the session needs to be automatically refreshed." }, "sessionKey": { "type": "string" }, "sessionSameSite": { "type": "string" }, "dbEncryptKey": { "type": "string" }, @@ -273,7 +273,7 @@ "userBlockedIP": { "type": "string" }, "agentAllowedIP": { "type": "string" }, "agentBlockedIP": { "type": "string" }, - "userSessionIdleTimeout": { "type": "integer" }, + "userSessionIdleTimeout": { "type": "integer", "default": null, "description": "When set, idle users will be disconnected after a set amounts of minutes." }, "userConsentFlags": { "type": "object", "additionalProperties": false, diff --git a/meshcentral.js b/meshcentral.js index 89250d63..6d395f71 100644 --- a/meshcentral.js +++ b/meshcentral.js @@ -1543,6 +1543,7 @@ function CreateMeshCentralServer(config, args) { for (var i in obj.mpsserver.ciraConnections) { data.conn.am += obj.mpsserver.ciraConnections[i].length; } } if (obj.firstStats === true) { delete obj.firstStats; data.first = true; } + if (obj.multiServer != null) { data.s = obj.multiServer.serverid; } obj.db.SetServerStats(data); // Save the stats to the database obj.DispatchEvent(['*'], obj, { action: 'servertimelinestats', data: data }); // Event the server stats }, 300000); diff --git a/meshuser.js b/meshuser.js index 058ad496..5816cd57 100644 --- a/meshuser.js +++ b/meshuser.js @@ -558,9 +558,7 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use if ((user.siteadmin & 21) == 0) return; // Only site administrators with "site backup" or "site restore" or "site update" permissions can use this. if (common.validateInt(command.hours, 0, 24 * 30) == false) return; db.GetServerStats(command.hours, function (err, docs) { - if (err == null) { - try { ws.send(JSON.stringify({ action: 'servertimelinestats', events: docs })); } catch (ex) { } - } + if (err == null) { try { ws.send(JSON.stringify({ action: 'servertimelinestats', events: docs })); } catch (ex) { } } }); break; } diff --git a/sample-config-advanced.json b/sample-config-advanced.json index 432a3942..416296a6 100644 --- a/sample-config-advanced.json +++ b/sample-config-advanced.json @@ -9,7 +9,6 @@ "_mongoDumpPath": "C:\\Program Files\\MongoDB\\Server\\4.2\\bin\\mongodump.exe", "_WANonly": true, "_LANonly": true, - "_sessionTime": 30, "_sessionKey": "MyReallySecretPassword1", "_sessionSameSite": "strict", "_dbEncryptKey": "MyReallySecretPassword2", diff --git a/views/default.handlebars b/views/default.handlebars index f1c45744..f4ee842c 100644 --- a/views/default.handlebars +++ b/views/default.handlebars @@ -994,6 +994,8 @@

My Server Stats

+