Fixed recording file name and recording icon. #3207

This commit is contained in:
Ylian Saint-Hilaire 2021-10-20 10:33:21 -07:00
parent d52c434961
commit d0d85feb45
4 changed files with 6 additions and 6 deletions

View File

@ -797,7 +797,7 @@ function CreateDesktopMultiplexor(parent, domain, nodeid, func) {
if (start == false) { func(false); return; } // Just skip this if (start == false) { func(false); return; } // Just skip this
obj.pendingRecording = 1; obj.pendingRecording = 1;
var now = new Date(Date.now()); 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 recFilename = 'desktopSession' + ((domain.id == '') ? '' : '-') + domain.id + '-' + now.getUTCFullYear() + '-' + parent.common.zeroPad(now.getUTCMonth() + 1, 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; var recFullFilename = null;
if (domain.sessionrecording.filepath) { if (domain.sessionrecording.filepath) {
try { parent.parent.fs.mkdirSync(domain.sessionrecording.filepath); } catch (e) { } try { parent.parent.fs.mkdirSync(domain.sessionrecording.filepath); } catch (e) { }

View File

@ -406,7 +406,7 @@ function CreateMeshRelayEx(parent, ws, req, domain, user, cookie) {
var now = new Date(Date.now()); var now = new Date(Date.now());
var xsessionid = obj.id; var xsessionid = obj.id;
if ((typeof xsessionid == 'string') && (xsessionid.startsWith('meshmessenger/node/') == true)) { xsessionid = 'Messenger' } if ((typeof xsessionid == 'string') && (xsessionid.startsWith('meshmessenger/node/') == true)) { xsessionid = 'Messenger' }
var recFilename = 'relaysession' + ((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) + xusername + xdevicename + '-' + xsessionid + (xtextSession ? '.txt' : '.mcrec'); var recFilename = 'relaysession' + ((domain.id == '') ? '' : '-') + domain.id + '-' + now.getUTCFullYear() + '-' + parent.common.zeroPad(now.getUTCMonth() + 1, 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) + xusername + xdevicename + '-' + xsessionid + (xtextSession ? '.txt' : '.mcrec');
var recFullFilename = null; var recFullFilename = null;
if (domain.sessionrecording.filepath) { if (domain.sessionrecording.filepath) {
try { parent.parent.fs.mkdirSync(domain.sessionrecording.filepath); } catch (e) { } try { parent.parent.fs.mkdirSync(domain.sessionrecording.filepath); } catch (e) { }

View File

@ -49,9 +49,9 @@
<div class='deskareaicon' title="Toggle View Mode" onclick="toggleAspectRatio(1)">&#8690;</div> <div class='deskareaicon' title="Toggle View Mode" onclick="toggleAspectRatio(1)">&#8690;</div>
<div class='deskareaicon' title="Rotate Left" onclick="drotate(-1)">&olarr;</div> <div class='deskareaicon' title="Rotate Left" onclick="drotate(-1)">&olarr;</div>
<div class='deskareaicon' title="Rotate Right" onclick="drotate(1)">&orarr;</div> <div class='deskareaicon' title="Rotate Right" onclick="drotate(1)">&orarr;</div>
<div id="deskRecordIcon" class='deskareaicon' title="Server is recording this session" style="display:none;background-color:red;width:12px;height:12px;border-radius:6px;margin-top:5px"></div>
<input id="deskActionsSettings" type="button" value="Settings..." title="Edit remote desktop settings" onkeypress="return false" onkeydown="return false" onclick="showDesktopSettings()" class="mR" /> <input id="deskActionsSettings" type="button" value="Settings..." title="Edit remote desktop settings" onkeypress="return false" onkeydown="return false" onclick="showDesktopSettings()" class="mR" />
<div id="desktopCustomUiButtons" style="float:left"></div> <div id="desktopCustomUiButtons" style="float:left"></div>
<div id="deskRecordIcon" class='deskareaicon' title="Server is recording this session" style="display:none;background-color:red;width:12px;height:12px;border-radius:6px;margin-top:5px"></div>
</div> </div>
<div> <div>
<div id="idx_deskFullBtn2" onclick=deskToggleFull(event)>&nbsp;&#x2716;</div> <div id="idx_deskFullBtn2" onclick=deskToggleFull(event)>&nbsp;&#x2716;</div>
@ -111,8 +111,8 @@
</div> </div>
<div class="areaHead" style="position:absolute;top:0;left:0;right:0;height:24px"> <div class="areaHead" style="position:absolute;top:0;left:0;right:0;height:24px">
<div class="toright2"> <div class="toright2">
<div id="p12power" style="margin-top:3px;margin-right:4px"></div>
<div id="termRecordIcon" class='deskareaicon' title="Server is recording this session" style="display:none;background-color:red;width:12px;height:12px;border-radius:6px;margin-top:5px;margin-left:5px"></div> <div id="termRecordIcon" class='deskareaicon' title="Server is recording this session" style="display:none;background-color:red;width:12px;height:12px;border-radius:6px;margin-top:5px;margin-left:5px"></div>
<div id="p12power" style="margin-top:3px;margin-right:4px;float:right"></div>
</div> </div>
<div> <div>
<span id="connectbutton2span"><input type="button" id="connectbutton2" cmenu="termConnectButton" value="Connect" onclick=connectTerminal(event,1) onkeypress="return false" onkeydown="return false" disabled="disabled" /></span> <span id="connectbutton2span"><input type="button" id="connectbutton2" cmenu="termConnectButton" value="Connect" onclick=connectTerminal(event,1) onkeypress="return false" onkeydown="return false" disabled="disabled" /></span>
@ -153,8 +153,8 @@
<div id="p13toolbar" style="position:absolute;left:0;top:0;right:0;bottom:28px"> <div id="p13toolbar" style="position:absolute;left:0;top:0;right:0;bottom:28px">
<div class="areaHead"> <div class="areaHead">
<div class="toright2"> <div class="toright2">
<div id="p13power" style="margin-top:3px;margin-right:4px"></div>
<div id="filesRecordIcon" class='deskareaicon' title="Server is recording this session" style="display:none;background-color:red;width:12px;height:12px;border-radius:6px;margin-top:5px;margin-left:5px"></div> <div id="filesRecordIcon" class='deskareaicon' title="Server is recording this session" style="display:none;background-color:red;width:12px;height:12px;border-radius:6px;margin-top:5px;margin-left:5px"></div>
<div id="p13power" style="margin-top:3px;margin-right:4px;float:right"></div>
</div> </div>
<div> <div>
<input id=p13Connect value="Connect" onclick=connectFiles(event) type="button" /> <input id=p13Connect value="Connect" onclick=connectFiles(event) type="button" />

View File

@ -4018,7 +4018,7 @@ module.exports.CreateWebServer = function (parent, db, args, certificates) {
if (record == true) { if (record == true) {
var now = new Date(Date.now()); var now = new Date(Date.now());
var recFilename = 'relaysession' + ((domain.id == '') ? '' : '-') + domain.id + '-' + now.getUTCFullYear() + '-' + obj.common.zeroPad(now.getUTCMonth(), 2) + '-' + obj.common.zeroPad(now.getUTCDate(), 2) + '-' + obj.common.zeroPad(now.getUTCHours(), 2) + '-' + obj.common.zeroPad(now.getUTCMinutes(), 2) + '-' + obj.common.zeroPad(now.getUTCSeconds(), 2) + '-' + getRandomPassword() + '.mcrec' var recFilename = 'relaysession' + ((domain.id == '') ? '' : '-') + domain.id + '-' + now.getUTCFullYear() + '-' + obj.common.zeroPad(now.getUTCMonth() + 1, 2) + '-' + obj.common.zeroPad(now.getUTCDate(), 2) + '-' + obj.common.zeroPad(now.getUTCHours(), 2) + '-' + obj.common.zeroPad(now.getUTCMinutes(), 2) + '-' + obj.common.zeroPad(now.getUTCSeconds(), 2) + '-' + getRandomPassword() + '.mcrec'
var recFullFilename = null; var recFullFilename = null;
if (domain.sessionrecording.filepath) { if (domain.sessionrecording.filepath) {
try { obj.fs.mkdirSync(domain.sessionrecording.filepath); } catch (e) { } try { obj.fs.mkdirSync(domain.sessionrecording.filepath); } catch (e) { }