mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2024-12-26 15:15:53 -05:00
MeshPlayer can now play MeshCentral terminal sessions.
This commit is contained in:
parent
fd8a3c79a0
commit
78198a3b13
@ -31,15 +31,15 @@
|
|||||||
<div id=deskarea2 style="">
|
<div id=deskarea2 style="">
|
||||||
<div class="areaProgress"><div id="progressbar" style=""></div></div>
|
<div class="areaProgress"><div id="progressbar" style=""></div></div>
|
||||||
</div>
|
</div>
|
||||||
<div id=deskarea3x style="max-height:calc(100vh - 54px);height:calc(100vh - 54px);position:relative">
|
<div id=deskarea3x style="max-height:calc(100vh - 54px);height:calc(100vh - 54px);" onclick="togglePause()">
|
||||||
<div id="bigok" style="display:none;left:calc((100vh / 2))"><b>✓</b></div>
|
<div id="bigok" style="display:none;left:calc((100vh / 2))"><b>✓</b></div>
|
||||||
<div id="bigfail" style="display:none;left:calc((100vh / 2))"><b>✗</b></div>
|
<div id="bigfail" style="display:none;left:calc((100vh / 2))"><b>✗</b></div>
|
||||||
<div id="metadatadiv" style="padding:20px;color:lightgrey;text-align:left;display:none"></div>
|
<div id="metadatadiv" style="padding:20px;color:lightgrey;text-align:left;display:none"></div>
|
||||||
<div id=DeskParent onclick="togglePause()">
|
<div id=DeskParent onclick="togglePause()">
|
||||||
<canvas id=Desk width=640 height=480></canvas>
|
<canvas id=Desk width=640 height=480></canvas>
|
||||||
</div>
|
</div>
|
||||||
<div id=TermParent onclick="togglePause()" style="margin:0;overflow:hidden;height:100px;left:0;position:absolute;right:0;top:0;background-color:red">
|
<div id=TermParent onclick="togglePause()" style="display:none">
|
||||||
<pre id=Term style="background-color:blue"></pre>
|
<pre id=Term></pre>
|
||||||
</div>
|
</div>
|
||||||
<div id=p11DeskConsoleMsg style="display:none;cursor:pointer;position:absolute;left:30px;top:17px;color:yellow;background-color:rgba(0,0,0,0.6);padding:10px;border-radius:5px" onclick=clearConsoleMsg()></div>
|
<div id=p11DeskConsoleMsg style="display:none;cursor:pointer;position:absolute;left:30px;top:17px;color:yellow;background-color:rgba(0,0,0,0.6);padding:10px;border-radius:5px" onclick=clearConsoleMsg()></div>
|
||||||
</div>
|
</div>
|
||||||
@ -180,7 +180,6 @@
|
|||||||
else if (p == 101) { p = 'Intel® AMT Redirection'; }
|
else if (p == 101) { p = 'Intel® AMT Redirection'; }
|
||||||
x += addInfoNoEsc('Protocol', p);
|
x += addInfoNoEsc('Protocol', p);
|
||||||
}
|
}
|
||||||
console.log('desk');
|
|
||||||
QV('DeskParent', true);
|
QV('DeskParent', true);
|
||||||
QV('TermParent', false);
|
QV('TermParent', false);
|
||||||
if (recFileMetadata.protocol == 1) {
|
if (recFileMetadata.protocol == 1) {
|
||||||
@ -191,8 +190,6 @@
|
|||||||
QE('PauseButton', false);
|
QE('PauseButton', false);
|
||||||
QE('RestartButton', false);
|
QE('RestartButton', false);
|
||||||
recFileStartTime = recFileLastTime = time;
|
recFileStartTime = recFileLastTime = time;
|
||||||
agentTerminal = CreateAmtRemoteTerminal('Term', {});
|
|
||||||
agentTerminal.State = 3;
|
|
||||||
}
|
}
|
||||||
else if (recFileMetadata.protocol == 2) {
|
else if (recFileMetadata.protocol == 2) {
|
||||||
// MeshCentral remote desktop
|
// MeshCentral remote desktop
|
||||||
@ -288,6 +285,7 @@
|
|||||||
waitTimerArgs = null;
|
waitTimerArgs = null;
|
||||||
currentDeltaTimeTotalSec = 0;
|
currentDeltaTimeTotalSec = 0;
|
||||||
recFileEndTime = 0;
|
recFileEndTime = 0;
|
||||||
|
agentTerminal = null;
|
||||||
if (waitTimer != null) { clearTimeout(waitTimer); waitTimer = null; }
|
if (waitTimer != null) { clearTimeout(waitTimer); waitTimer = null; }
|
||||||
QH('deskstatus', '');
|
QH('deskstatus', '');
|
||||||
QE('PlayButton', false);
|
QE('PlayButton', false);
|
||||||
@ -297,8 +295,6 @@
|
|||||||
QH('timespan', '00:00:00');
|
QH('timespan', '00:00:00');
|
||||||
QV('metadatadiv', true);
|
QV('metadatadiv', true);
|
||||||
QH('metadatadiv', '<span style=\"font-family:Arial,Helvetica Neue,Helvetica,sans-serif;font-size:28px\">MeshCentral Session Player</span><br /><br /><span style=color:gray>Drag & drop a .mcrec file or click "Open File..."</span>');
|
QH('metadatadiv', '<span style=\"font-family:Arial,Helvetica Neue,Helvetica,sans-serif;font-size:28px\">MeshCentral Session Player</span><br /><br /><span style=color:gray>Drag & drop a .mcrec file or click "Open File..."</span>');
|
||||||
QH('Term', '');
|
|
||||||
console.log('desk');
|
|
||||||
QV('DeskParent', true);
|
QV('DeskParent', true);
|
||||||
QV('TermParent', false);
|
QV('TermParent', false);
|
||||||
}
|
}
|
||||||
@ -384,10 +380,11 @@
|
|||||||
QE('PlayButton', false);
|
QE('PlayButton', false);
|
||||||
QE('PauseButton', true);
|
QE('PauseButton', true);
|
||||||
QE('RestartButton', false);
|
QE('RestartButton', false);
|
||||||
if (recFileProtocol == 1) {
|
if ((recFileProtocol == 1) && (agentTerminal == null)) {
|
||||||
console.log('term');
|
|
||||||
QV('DeskParent', false);
|
QV('DeskParent', false);
|
||||||
QV('TermParent', true);
|
QV('TermParent', true);
|
||||||
|
agentTerminal = CreateAmtRemoteTerminal('Term', {});
|
||||||
|
agentTerminal.State = 3;
|
||||||
}
|
}
|
||||||
readNextBlock(processBlock);
|
readNextBlock(processBlock);
|
||||||
}
|
}
|
||||||
@ -419,8 +416,6 @@
|
|||||||
QE('RestartButton', false);
|
QE('RestartButton', false);
|
||||||
QS('progressbar').width = '0px';
|
QS('progressbar').width = '0px';
|
||||||
QH('timespan', '00:00:00');
|
QH('timespan', '00:00:00');
|
||||||
QH('Term', '');
|
|
||||||
console.log('desk');
|
|
||||||
QV('DeskParent', true);
|
QV('DeskParent', true);
|
||||||
QV('TermParent', false);
|
QV('TermParent', false);
|
||||||
if (agentDesktop) {
|
if (agentDesktop) {
|
||||||
@ -431,6 +426,8 @@
|
|||||||
amtDesktop.onScreenSizeChange = deskAdjust;
|
amtDesktop.onScreenSizeChange = deskAdjust;
|
||||||
amtDesktop.State = 3;
|
amtDesktop.State = 3;
|
||||||
amtDesktop.Start();
|
amtDesktop.Start();
|
||||||
|
} else if (agentTerminal) {
|
||||||
|
agentTerminal = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -443,7 +440,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function deskAdjust() {
|
function deskAdjust() {
|
||||||
return;
|
|
||||||
var parentH = Q('DeskParent').clientHeight, parentW = Q('DeskParent').clientWidth;
|
var parentH = Q('DeskParent').clientHeight, parentW = Q('DeskParent').clientWidth;
|
||||||
var deskH = Q('Desk').height, deskW = Q('Desk').width;
|
var deskH = Q('Desk').height, deskW = Q('Desk').width;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user