mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-03-09 15:40:18 +00:00
Error counters in MyServer panel, Autobackup now default, new console msg support.
This commit is contained in:
parent
d8b54376ef
commit
3e5afa84c7
11 changed files with 205 additions and 117 deletions
|
@ -258,7 +258,7 @@ var CreateAgentRemoteDesktop = function (canvasid, scrolldiv) {
|
|||
if (disp == 65535) { displays[disp] = 'All Displays'; } else { displays[disp] = 'Display ' + disp; }
|
||||
}
|
||||
}
|
||||
console.log('Get Displays', displays, selectedDisplay, rstr2hex(str));
|
||||
//console.log('Get Displays', displays, selectedDisplay, rstr2hex(str));
|
||||
if (obj.onDisplayinfo != null) { obj.onDisplayinfo(obj, displays, selectedDisplay); }
|
||||
break;
|
||||
case 12: // SetDisplay
|
||||
|
@ -283,7 +283,13 @@ var CreateAgentRemoteDesktop = function (canvasid, scrolldiv) {
|
|||
break;
|
||||
case 65: // Alert
|
||||
str = str.substring(4);
|
||||
if (str[0] != '.') { console.log(str); alert('KVM: ' + str); } else { console.log('KVM: ' + str.substring(1)); }
|
||||
if (str[0] != '.') {
|
||||
console.log(str); //alert('KVM: ' + str);
|
||||
obj.parent.consoleMessage = str;
|
||||
if (obj.parent.onConsoleMessageChange) { obj.parent.onConsoleMessageChange(obj.parent, str); }
|
||||
} else {
|
||||
console.log('KVM: ' + str.substring(1));
|
||||
}
|
||||
break;
|
||||
}
|
||||
return cmdsize + jumboAdd;
|
||||
|
|
|
@ -26,6 +26,10 @@ var CreateAgentRedirect = function (meshserver, module, serverPublicNamePort, au
|
|||
obj.webrtc = null;
|
||||
obj.debugmode = 0;
|
||||
|
||||
// Console Message
|
||||
obj.consoleMessage = null;
|
||||
obj.onConsoleMessageChange = null;
|
||||
|
||||
// Private method
|
||||
//obj.debug = function (msg) { console.log(msg); }
|
||||
|
||||
|
@ -59,7 +63,10 @@ var CreateAgentRedirect = function (meshserver, module, serverPublicNamePort, au
|
|||
try { controlMsg = JSON.parse(msg); } catch (e) { return; }
|
||||
if (controlMsg.ctrlChannel != '102938') { obj.xxOnSocketData(msg); return; }
|
||||
//console.log(controlMsg);
|
||||
if (obj.webrtc != null) {
|
||||
if (controlMsg.type == 'console') {
|
||||
obj.consoleMessage = controlMsg.msg;
|
||||
if (obj.onConsoleMessageChange) { obj.onConsoleMessageChange(obj, obj.consoleMessage); }
|
||||
} else if (obj.webrtc != null) {
|
||||
if (controlMsg.type == 'answer') {
|
||||
obj.webrtc.setRemoteDescription(new RTCSessionDescription(controlMsg), function () { /*console.log('WebRTC remote ok');*/ }, obj.xxCloseWebRTC);
|
||||
} else if (controlMsg.type == 'webrtc0') {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue