mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-03-09 15:40:18 +00:00
First attempt at MSTSC.js support.
This commit is contained in:
parent
c7cb610f92
commit
b7f09f32f8
17 changed files with 28363 additions and 1235 deletions
|
@ -2195,13 +2195,19 @@
|
|||
var newWindow = window.open(rdpurl, '_blank');
|
||||
newWindow.opener = null;
|
||||
}
|
||||
}
|
||||
if (message.tag == 'novnc') {
|
||||
} else if (message.tag == 'novnc') {
|
||||
var vncurl = window.location.origin + domainUrl + 'novnc/vnc.html?ws=wss%3A%2F%2F' + window.location.host + '%2Fmeshrelay.ashx%3Fauth%3D' + message.cookie + '&show_dot=1';
|
||||
var node = getNodeFromId(message.nodeid);
|
||||
if (node != null) { vncurl += '&name=' + encodeURIComponentEx(node.name); }
|
||||
var newWindow = window.open(vncurl, 'mcnovnc/' + message.nodeid);
|
||||
newWindow.opener = null;
|
||||
} else if (message.tag == 'mstsc') {
|
||||
//var rdpurl = window.location.origin + domainUrl + 'mstsc/index.html?ws=wss%3A%2F%2F' + window.location.host + '%2Fmeshrelay.ashx%3Fauth%3D' + message.cookie;
|
||||
var rdpurl = window.location.origin + domainUrl + 'mstsc/index.html?ws=' + message.cookie;
|
||||
var node = getNodeFromId(message.nodeid);
|
||||
if (node != null) { rdpurl += '&name=' + encodeURIComponentEx(node.name); }
|
||||
var newWindow = window.open(rdpurl, 'mcmstsc/' + message.nodeid);
|
||||
newWindow.opener = null;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -5367,6 +5373,11 @@
|
|||
x += '<a href=# cmenu=rfbPortContextMenu id=rfbLink onclick=p10rfb("' + node._id + '") title="' + "Launch noVNC session to this device" + '.">' + "noVNC" + '</a> ';
|
||||
}
|
||||
|
||||
// MSTSC.js link
|
||||
if (((connectivity & 1) != 0) && (node.agent) && ((meshrights & 8) != 0) && ((features & 0x40000000) == 0)) {
|
||||
x += '<a href=# cmenu=rfbPortContextMenu id=mstscLink onclick=p10mstsc("' + node._id + '") title="' + "Launch RDP session to this device" + '.">' + "MSTSC" + '</a> ';
|
||||
}
|
||||
|
||||
// MQTT options
|
||||
if ((meshrights == 0xFFFFFFFF) && (features & 0x00400000)) { x += '<a href=# onclick=p10showMqttLoginDialog("' + node._id + '") title="' + "Get MQTT login credentials for this device." + '">' + "MQTT Login" + '</a> '; }
|
||||
x += '</div><br>'
|
||||
|
@ -5880,6 +5891,11 @@
|
|||
meshserver.send({ action: 'getcookie', nodeid: nodeid, tcpport: port, tag: 'novnc' });
|
||||
}
|
||||
|
||||
function p10mstsc(nodeid, port) {
|
||||
if (port == null) { if (currentNode.rdpport != null) { port = currentNode.rdpport; } else { port = 3389; } }
|
||||
meshserver.send({ action: 'getcookie', nodeid: nodeid, tcpport: port, tag: 'mstsc' });
|
||||
}
|
||||
|
||||
// Show current location
|
||||
var d2map = null;
|
||||
function p10showNodeLocationDialog() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue