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

Added selective session recording.

This commit is contained in:
Ylian Saint-Hilaire 2020-09-29 15:02:33 -07:00
parent ead64152e5
commit 7b71c0488f
6 changed files with 25 additions and 1 deletions

View file

@ -683,6 +683,13 @@ function CreateDesktopMultiplexor(parent, domain, nodeid, func) {
function recordingSetup(domain, func) {
// Setup session recording
if ((domain.sessionrecording == true || ((typeof domain.sessionrecording == 'object') && ((domain.sessionrecording.protocols == null) || (domain.sessionrecording.protocols.indexOf(2) >= 0))))) {
// Check again to make sure we need to start recording
if (domain.sessionrecording.onlyselecteddevicegroups === true) {
var mesh = parent.meshes[obj.meshid];
if ((mesh.flags == null) || ((mesh.flags & 4) == 0)) { func(false); return; } // Do not record the session
}
var now = new Date(Date.now());
var recFilename = 'desktopSession' + ((domain.id == '') ? '' : '-') + domain.id + '-' + now.getUTCFullYear() + '-' + parent.common.zeroPad(now.getUTCMonth(), 2) + '-' + parent.common.zeroPad(now.getUTCDate(), 2) + '-' + parent.common.zeroPad(now.getUTCHours(), 2) + '-' + parent.common.zeroPad(now.getUTCMinutes(), 2) + '-' + parent.common.zeroPad(now.getUTCSeconds(), 2) + '-' + obj.nodeid.split('/')[2] + '.mcrec'
var recFullFilename = null;