Fixed mesh router relay.
This commit is contained in:
parent
4932d7961f
commit
9b321876da
33
meshrelay.js
33
meshrelay.js
|
@ -23,15 +23,12 @@ module.exports.CreateMeshRelay = function (parent, ws, req, domain, user, cookie
|
|||
|
||||
// Check relay authentication
|
||||
if ((user == null) && (req.query.rauth != null)) {
|
||||
var rcookie = parent.parent.decodeCookie(req.query.rauth, parent.parent.loginCookieEncryptionKey, 240); // Cookie with 4 hour timeout
|
||||
const rcookie = parent.parent.decodeCookie(req.query.rauth, parent.parent.loginCookieEncryptionKey, 240); // Cookie with 4 hour timeout
|
||||
if (rcookie.ruserid != null) { obj.ruserid = rcookie.ruserid; }
|
||||
}
|
||||
|
||||
// Check connection id
|
||||
if ((obj.id == null) || (obj.id.length < 8)) { try { ws.close(); parent.parent.debug('relay', 'Relay: Connection with no id (' + cleanRemoteAddr(req.ip) + ')'); } catch (e) { console.log(e); } return; }
|
||||
|
||||
// If there is no authentication, drop this connection
|
||||
if ((obj.id.startsWith('meshmessenger/') == false) && (obj.user == null) && (obj.ruserid == null)) { try { ws.close(); parent.parent.debug('relay', 'Relay: Connection with no authentication (' + cleanRemoteAddr(req.ip) + ')'); } catch (e) { console.log(e); } return; }
|
||||
if ((obj.id != null) && (obj.id.startsWith('meshmessenger/') == false) && (obj.user == null) && (obj.ruserid == null)) { try { ws.close(); parent.parent.debug('relay', 'Relay: Connection with no authentication (' + cleanRemoteAddr(req.ip) + ')'); } catch (e) { console.log(e); } return; }
|
||||
|
||||
// Relay session count (we may remove this in the future)
|
||||
obj.relaySessionCounted = true;
|
||||
|
@ -86,7 +83,7 @@ module.exports.CreateMeshRelay = function (parent, ws, req, domain, user, cookie
|
|||
rights = user.links[agent.dbMeshKey];
|
||||
mesh = parent.meshes[agent.dbMeshKey];
|
||||
if ((rights != null) && (mesh != null) || ((rights & 16) != 0)) { // TODO: 16 is console permission, may need more gradular permission checking
|
||||
command.sessionid = ws.sessionId; // Set the session id, required for responses.
|
||||
if (ws.sessionId) { command.sessionid = ws.sessionId; } // Set the session id, required for responses.
|
||||
command.rights = rights.rights; // Add user rights flags to the message
|
||||
command.consent = mesh.consent; // Add user consent
|
||||
if (typeof domain.userconsentflags == 'number') { command.consent |= domain.userconsentflags; } // Add server required consent flags
|
||||
|
@ -103,7 +100,7 @@ module.exports.CreateMeshRelay = function (parent, ws, req, domain, user, cookie
|
|||
rights = user.links[routing.meshid];
|
||||
mesh = parent.meshes[routing.meshid];
|
||||
if (rights != null || ((rights & 16) != 0)) { // TODO: 16 is console permission, may need more gradular permission checking
|
||||
command.fromSessionid = ws.sessionId; // Set the session id, required for responses.
|
||||
if (ws.sessionId) { command.fromSessionid = ws.sessionId; } // Set the session id, required for responses.
|
||||
command.rights = rights.rights; // Add user rights flags to the message
|
||||
command.consent = mesh.consent; // Add user consent
|
||||
if (typeof domain.userconsentflags == 'number') { command.consent |= domain.userconsentflags; } // Add server required consent flags
|
||||
|
@ -167,9 +164,13 @@ module.exports.CreateMeshRelay = function (parent, ws, req, domain, user, cookie
|
|||
if (!obj.id.startsWith('meshmessenger/')) {
|
||||
var u1 = obj.user ? obj.user._id : obj.ruserid;
|
||||
var u2 = relayinfo.peer1.user ? relayinfo.peer1.user._id : relayinfo.peer1.ruserid;
|
||||
if (parent.args.user != null) { // If the server is setup with a default user, correct the userid now.
|
||||
if (u1 != null) { u1 = 'user/' + domain.id + '/' + parent.args.user.toLowerCase(); }
|
||||
if (u2 != null) { u2 = 'user/' + domain.id + '/' + parent.args.user.toLowerCase(); }
|
||||
}
|
||||
if (u1 != u2) {
|
||||
ws.close();
|
||||
parent.parent.debug('relay', 'Relay auth mismatch: ' + obj.id + ' (' + cleanRemoteAddr(req.ip) + ')');
|
||||
parent.parent.debug('relay', 'Relay auth mismatch (' + u1 + ' != ' + u2 + '): ' + obj.id + ' (' + cleanRemoteAddr(req.ip) + ')');
|
||||
delete obj.id;
|
||||
delete obj.ws;
|
||||
delete obj.peer;
|
||||
|
@ -403,15 +404,16 @@ module.exports.CreateMeshRelay = function (parent, ws, req, domain, user, cookie
|
|||
// We have routing instructions in the cookie, but first, check user access for this node.
|
||||
parent.db.Get(cookie.nodeid, function (err, docs) {
|
||||
if (docs.length == 0) { console.log('ERR: Node not found'); try { obj.close(); } catch (e) { } return; } // Disconnect websocket
|
||||
var node = docs[0];
|
||||
const node = docs[0];
|
||||
|
||||
// Check if this user has permission to manage this computer
|
||||
var meshlinks = user.links[node.meshid];
|
||||
const meshlinks = user.links[node.meshid];
|
||||
if ((!meshlinks) || (!meshlinks.rights) || ((meshlinks.rights & MESHRIGHT_REMOTECONTROL) == 0)) { console.log('ERR: Access denied (2)'); try { obj.close(); } catch (e) { } return; }
|
||||
|
||||
// Send connection request to agent
|
||||
const rcookie = parent.parent.encodeCookie({ ruserid: user._id }, parent.parent.loginCookieEncryptionKey);
|
||||
if (obj.id == undefined) { obj.id = ('' + Math.random()).substring(2); } // If there is no connection id, generate one.
|
||||
var command = { nodeid: cookie.nodeid, action: 'msg', type: 'tunnel', value: '*/meshrelay.ashx?id=' + obj.id, tcpport: cookie.tcpport, tcpaddr: cookie.tcpaddr };
|
||||
const command = { nodeid: cookie.nodeid, action: 'msg', type: 'tunnel', value: '*/meshrelay.ashx?id=' + obj.id + '&rauth=' + rcookie, tcpport: cookie.tcpport, tcpaddr: cookie.tcpaddr };
|
||||
parent.parent.debug('relay', 'Relay: Sending agent tunnel command: ' + JSON.stringify(command));
|
||||
if (obj.sendAgentMessage(command, user._id, cookie.domainid) == false) { delete obj.id; parent.parent.debug('relay', 'Relay: Unable to contact this agent (' + cleanRemoteAddr(req.ip) + ')'); }
|
||||
performRelay();
|
||||
|
@ -421,21 +423,22 @@ module.exports.CreateMeshRelay = function (parent, ws, req, domain, user, cookie
|
|||
// We have routing instructions in the URL arguments, but first, check user access for this node.
|
||||
parent.db.Get(req.query.nodeid, function (err, docs) {
|
||||
if (docs.length == 0) { console.log('ERR: Node not found'); try { obj.close(); } catch (e) { } return; } // Disconnect websocket
|
||||
var node = docs[0];
|
||||
const node = docs[0];
|
||||
|
||||
// Check if this user has permission to manage this computer
|
||||
var meshlinks = user.links[node.meshid];
|
||||
const meshlinks = user.links[node.meshid];
|
||||
if ((!meshlinks) || (!meshlinks.rights) || ((meshlinks.rights & MESHRIGHT_REMOTECONTROL) == 0)) { console.log('ERR: Access denied (2)'); try { obj.close(); } catch (e) { } return; }
|
||||
|
||||
// Send connection request to agent
|
||||
if (obj.id == null) { obj.id = ('' + Math.random()).substring(2); } // If there is no connection id, generate one.
|
||||
const rcookie = parent.parent.encodeCookie({ ruserid: user._id }, parent.parent.loginCookieEncryptionKey);
|
||||
|
||||
if (req.query.tcpport != null) {
|
||||
var command = { nodeid: req.query.nodeid, action: 'msg', type: 'tunnel', value: '*/meshrelay.ashx?id=' + obj.id, tcpport: req.query.tcpport, tcpaddr: ((req.query.tcpaddr == null) ? '127.0.0.1' : req.query.tcpaddr) };
|
||||
const command = { nodeid: req.query.nodeid, action: 'msg', type: 'tunnel', value: '*/meshrelay.ashx?id=' + obj.id + '&rauth=' + rcookie, tcpport: req.query.tcpport, tcpaddr: ((req.query.tcpaddr == null) ? '127.0.0.1' : req.query.tcpaddr) };
|
||||
parent.parent.debug('relay', 'Relay: Sending agent TCP tunnel command: ' + JSON.stringify(command));
|
||||
if (obj.sendAgentMessage(command, user._id, domain.id) == false) { delete obj.id; parent.parent.debug('relay', 'Relay: Unable to contact this agent (' + cleanRemoteAddr(req.ip) + ')'); }
|
||||
} else if (req.query.udpport != null) {
|
||||
var command = { nodeid: req.query.nodeid, action: 'msg', type: 'tunnel', value: '*/meshrelay.ashx?id=' + obj.id, udpport: req.query.udpport, udpaddr: ((req.query.udpaddr == null) ? '127.0.0.1' : req.query.udpaddr) };
|
||||
const command = { nodeid: req.query.nodeid, action: 'msg', type: 'tunnel', value: '*/meshrelay.ashx?id=' + obj.id + '&rauth=' + rcookie, udpport: req.query.udpport, udpaddr: ((req.query.udpaddr == null) ? '127.0.0.1' : req.query.udpaddr) };
|
||||
parent.parent.debug('relay', 'Relay: Sending agent UDP tunnel command: ' + JSON.stringify(command));
|
||||
if (obj.sendAgentMessage(command, user._id, domain.id) == false) { delete obj.id; parent.parent.debug('relay', 'Relay: Unable to contact this agent (' + cleanRemoteAddr(req.ip) + ')'); }
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "meshcentral",
|
||||
"version": "0.4.2-t",
|
||||
"version": "0.4.2-u",
|
||||
"keywords": [
|
||||
"Remote Management",
|
||||
"Intel AMT",
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
|
@ -92,7 +92,8 @@
|
|||
<div id=topbar class=noselect>
|
||||
<div>
|
||||
<div style="position:relative">
|
||||
<div tabindex=0 id=uiMenuButton title="User interface selection" onclick="showUserInterfaceSelectMenu()" onkeypress="if (event.key == 'Enter') showUserInterfaceSelectMenu()">♦
|
||||
<div tabindex=0 id=uiMenuButton title="User interface selection" onclick="showUserInterfaceSelectMenu()" onkeypress="if (event.key == 'Enter') showUserInterfaceSelectMenu()">
|
||||
♦
|
||||
<div id=uiMenu style="display:none">
|
||||
<div tabindex=0 id=uiViewButton1 class=uiSelector onclick=userInterfaceSelectMenu(1) title="Left bar interface" onkeypress="if (event.key == 'Enter') userInterfaceSelectMenu(1)"><div class="uiSelector1"></div></div>
|
||||
<div tabindex=0 id=uiViewButton2 class=uiSelector onclick=userInterfaceSelectMenu(2) title="Top bar interface" onkeypress="if (event.key == 'Enter') userInterfaceSelectMenu(2)"><div class="uiSelector2"></div></div>
|
||||
|
@ -169,7 +170,7 @@
|
|||
</div>
|
||||
<div id=p1 style="display:none">
|
||||
<div style="display:none" id="devListToolbarViewIcons">
|
||||
<div tabindex=0 id=devViewButton1 class=viewSelector onclick=onDeviceViewChange(1) onkeypress="if (event.key=='Enter') { onDeviceViewChange(1); }" title="Columns"><div class="viewSelector2"></div></div>
|
||||
<div tabindex=0 id=devViewButton1 class=viewSelector onclick=onDeviceViewChange(1) onkeypress="if (event.key == 'Enter') { onDeviceViewChange(1); }" title="Columns"><div class="viewSelector2"></div></div>
|
||||
<div tabindex=0 id=devViewButton2 class=viewSelector onclick=onDeviceViewChange(2) onkeypress="if (event.key == 'Enter') { onDeviceViewChange(2); }" title="List"><div class="viewSelector1"></div></div>
|
||||
<div tabindex=0 id=devViewButton3 class=viewSelector onclick=onDeviceViewChange(3) onkeypress="if (event.key == 'Enter') { onDeviceViewChange(3); }" title="Desktops"><div class="viewSelector3"></div></div>
|
||||
<div tabindex=0 id=devViewButton4 class=viewSelector onclick=onDeviceViewChange(4) onkeypress="if (event.key == 'Enter') { onDeviceViewChange(4); }" title="Map"><div class="viewSelector4"></div></div>
|
||||
|
@ -255,7 +256,7 @@
|
|||
</div>
|
||||
<div id=p2 style="display:none">
|
||||
<h1>My Account</h1>
|
||||
<img id="p2AccountImage" alt="" src="images/clipboard-128.png"/>
|
||||
<img id="p2AccountImage" alt="" src="images/clipboard-128.png" />
|
||||
<div id="p2AccountSecurity" style="display:none">
|
||||
<p><strong>Account security</strong></p>
|
||||
<div style="margin-left:25px">
|
||||
|
@ -420,7 +421,7 @@
|
|||
<div id=MainComputerState></div>
|
||||
</td>
|
||||
</tr>
|
||||
</table><br>
|
||||
</table><br />
|
||||
<div id=p10html2></div>
|
||||
<div id=p10html3></div>
|
||||
</div>
|
||||
|
@ -448,18 +449,18 @@
|
|||
<div class='deskareaicon' title="Rotate Left" onclick="drotate(-1)">↺</div>
|
||||
<div class='deskareaicon' title="Rotate Right" onclick="drotate(1)">↻</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="deskFocusBtn" type="button" title="Toggle focus mode, when active only the region around the mouse is updated" onkeypress="return false" onkeydown="return false" value="Focus All" onclick="deskToggleFocus()" style="margin-right:3px;display:none">
|
||||
<input id="deskSaveBtn" type="button" title="Save a screenshot of the remote desktop" onkeypress="return false" onkeydown="return false" value="Save..." onclick=deskSaveImage() class="mR">
|
||||
<input id="deskFocusBtn" type="button" title="Toggle focus mode, when active only the region around the mouse is updated" onkeypress="return false" onkeydown="return false" value="Focus All" onclick="deskToggleFocus()" style="margin-right:3px;display:none" />
|
||||
<input id="deskSaveBtn" type="button" title="Save a screenshot of the remote desktop" onkeypress="return false" onkeydown="return false" value="Save..." onclick=deskSaveImage() class="mR" />
|
||||
<input id="deskActionsBtn" type=button title="Perform power actions on the device" onkeypress="return false" onkeydown="return false" value=Actions onclick=deviceActionFunction() class="mR" />
|
||||
<input id="deskActionsSettings" type="button" value="Settings..." title="Edit remote desktop settings" onkeypress="return false" onkeydown="return false" onclick="showDesktopSettings()" class="mR">
|
||||
<input type="button" title="Change the power state of the remote machine" onkeypress="return false" onkeydown="return false" value="Power Actions..." onclick="showPowerActionDlg()" style="display:none">
|
||||
<input id="deskActionsSettings" type="button" value="Settings..." title="Edit remote desktop settings" onkeypress="return false" onkeydown="return false" onclick="showDesktopSettings()" class="mR" />
|
||||
<input type="button" title="Change the power state of the remote machine" onkeypress="return false" onkeydown="return false" value="Power Actions..." onclick="showPowerActionDlg()" style="display:none" />
|
||||
</div>
|
||||
<div>
|
||||
<div id="idx_deskFullBtn2" onclick=deskToggleFull(event)> ✖</div>
|
||||
<input type="button" id="autoconnectbutton1" value="AutoConnect" onclick=autoConnectDesktop(event) onkeypress="return false" onkeydown="return false" style="display:none">
|
||||
<span id=connectbutton1span><input type=button id=connectbutton1 value="Connect" onclick=connectDesktop(event,1) onkeypress="return false" onkeydown="return false" disabled="disabled"></span>
|
||||
<span id=connectbutton1hspan> <input type=button id=connectbutton1h value="HW Connect" onclick=connectDesktop(event,2) onkeypress="return false" onkeydown="return false" disabled="disabled"></span>
|
||||
<span id=disconnectbutton1span> <input type=button id=disconnectbutton1 value="Disconnect" onclick=connectDesktop(event,0) onkeypress="return false" onkeydown="return false"></span>
|
||||
<input type="button" id="autoconnectbutton1" value="AutoConnect" onclick=autoConnectDesktop(event) onkeypress="return false" onkeydown="return false" style="display:none" />
|
||||
<span id=connectbutton1span><input type=button id=connectbutton1 value="Connect" onclick=connectDesktop(event,1) onkeypress="return false" onkeydown="return false" disabled="disabled" /></span>
|
||||
<span id=connectbutton1hspan> <input type=button id=connectbutton1h value="HW Connect" onclick=connectDesktop(event,2) onkeypress="return false" onkeydown="return false" disabled="disabled" /></span>
|
||||
<span id=disconnectbutton1span> <input type=button id=disconnectbutton1 value="Disconnect" onclick=connectDesktop(event,0) onkeypress="return false" onkeydown="return false" /></span>
|
||||
<span id="deskstatus">Disconnected</span>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -500,7 +501,7 @@
|
|||
<div class="toright2">
|
||||
<span id="DeskTimer" title="Session time"></span>
|
||||
<select id=termdisplays style="display:none" onchange=deskSetDisplay(event) onkeypress="return false" onkeydown="return false"></select>
|
||||
<input id=DeskToolsButton type=button value=Tools title="Toggle tools view" onkeypress="return false" onkeydown="return false" onclick="toggleDeskTools()">
|
||||
<input id=DeskToolsButton type=button value=Tools title="Toggle tools view" onkeypress="return false" onkeydown="return false" onclick="toggleDeskTools()" />
|
||||
<span id=DeskChatButton class="deskarea" title="Open chat window to this computer"><img src='images/icon-chat.png' onclick=deviceChat() height=16 width=16 style=padding-top:2px /></span>
|
||||
<span id=DeskNotifyButton title="Display a notification on the remote computer"><img src='images/icon-notify.png' onclick=deviceToastFunction() height=16 width=16 style=padding-top:2px /></span>
|
||||
<span id=DeskOpenWebButton title="Open a web address on remote computer"><img src='images/icon-url2.png' onclick=deviceUrlFunction() height=16 width=16 style=padding-top:2px /></span>
|
||||
|
@ -521,10 +522,10 @@
|
|||
<option value=11>Win+Left</option>
|
||||
<option value=12>Win+Right</option>
|
||||
</select>
|
||||
<input id="DeskWD" type=button value="Send" onkeypress="return false" onkeydown="return false" onclick="deskSendKeys()">
|
||||
<input id="DeskClip" style="" type="button" value="Clipboard" onkeypress="return false" onkeydown="return false" onclick="showDeskClip()">
|
||||
<input id="DeskType" style="" type="button" value="Type" onkeypress="return false" onkeydown="return false" onclick="showDeskType()">
|
||||
<label><span id="DeskControlSpan" title="Toggle mouse and keyboard input"><input id="DeskControl" type="checkbox" onkeypress="return false" onkeydown="return false" onclick="toggleKvmControl()">Input</span></label>
|
||||
<input id="DeskWD" type=button value="Send" onkeypress="return false" onkeydown="return false" onclick="deskSendKeys()" />
|
||||
<input id="DeskClip" style="" type="button" value="Clipboard" onkeypress="return false" onkeydown="return false" onclick="showDeskClip()" />
|
||||
<input id="DeskType" style="" type="button" value="Type" onkeypress="return false" onkeydown="return false" onclick="showDeskType()" />
|
||||
<label><span id="DeskControlSpan" title="Toggle mouse and keyboard input"><input id="DeskControl" type="checkbox" onkeypress="return false" onkeydown="return false" onclick="toggleKvmControl()" />Input</span></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -551,10 +552,10 @@
|
|||
<input id="termActionsBtn" type=button title="Perform power actions on the device" onkeypress="return false" onkeydown="return false" value=Actions onclick=deviceActionFunction() />
|
||||
</div>
|
||||
<div>
|
||||
<input type="button" id="autoconnectbutton2" value="AutoConnect" onclick=autoConnectTerminal(event) onkeypress="return false" onkeydown="return false" style="display:none">
|
||||
<span id="connectbutton2span"><input type="button" id="connectbutton2" value="Connect" onclick=connectTerminal(event,1) onkeypress="return false" onkeydown="return false" disabled="disabled"></span>
|
||||
<span id="connectbutton2hspan"> <input type="button" id="connectbutton2h" value="HW Connect" onclick=connectTerminal(event,2) onkeypress="return false" onkeydown="return false" disabled="disabled"></span>
|
||||
<span id="disconnectbutton2span"> <input type="button" id="disconnectbutton2" value="Disconnect" onclick=connectTerminal(event,0) onkeypress="return false" onkeydown="return false"></span>
|
||||
<input type="button" id="autoconnectbutton2" value="AutoConnect" onclick=autoConnectTerminal(event) onkeypress="return false" onkeydown="return false" style="display:none" />
|
||||
<span id="connectbutton2span"><input type="button" id="connectbutton2" value="Connect" onclick=connectTerminal(event,1) onkeypress="return false" onkeydown="return false" disabled="disabled" /></span>
|
||||
<span id="connectbutton2hspan"> <input type="button" id="connectbutton2h" value="HW Connect" onclick=connectTerminal(event,2) onkeypress="return false" onkeydown="return false" disabled="disabled" /></span>
|
||||
<span id="disconnectbutton2span"> <input type="button" id="disconnectbutton2" value="Disconnect" onclick=connectTerminal(event,0) onkeypress="return false" onkeydown="return false" /></span>
|
||||
<span id="termstatus">Disconnected</span><span id="termtitle"></span>
|
||||
</div>
|
||||
</td>
|
||||
|
@ -574,9 +575,9 @@
|
|||
<div class="toright2">
|
||||
<span id="TermTimer" title="Session time"></span>
|
||||
<span id="terminalSettingsButtons" style="display:none">
|
||||
<input id="id_tcrbutton" type="button" onkeypress="return false" onkeydown="return false" class="bottombutton" value="CR+LF" title="Toggle what the return key will send" onclick="termToggleCr()">
|
||||
<input id="id_tfxkeysbutton" type="button" onkeypress="return false" onkeydown="return false" class="bottombutton" value="Intel (F10 = ESC+[OM)" title="Toggle F1 to F10 keys emulation type" onclick="termToggleFx()">
|
||||
<input id="id_ttypebutton" type="button" onkeypress="return false" onkeydown="return false" class="bottombutton" value="Extended Ascii" title="Toggle terminal emulation type" onclick="termToggleType()">
|
||||
<input id="id_tcrbutton" type="button" onkeypress="return false" onkeydown="return false" class="bottombutton" value="CR+LF" title="Toggle what the return key will send" onclick="termToggleCr()" />
|
||||
<input id="id_tfxkeysbutton" type="button" onkeypress="return false" onkeydown="return false" class="bottombutton" value="Intel (F10 = ESC+[OM)" title="Toggle F1 to F10 keys emulation type" onclick="termToggleFx()" />
|
||||
<input id="id_ttypebutton" type="button" onkeypress="return false" onkeydown="return false" class="bottombutton" value="Extended Ascii" title="Toggle terminal emulation type" onclick="termToggleType()" />
|
||||
</span>
|
||||
<span id="terminalSizeDropDown">
|
||||
<select id="termSizeList" onkeypress="return false"><option value="1">80x25</option><option value="2">100x30</option><option value="3" selected>Auto</option></select>
|
||||
|
@ -611,8 +612,8 @@
|
|||
<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>
|
||||
<div>
|
||||
<input id=p13AutoConnect value="AutoConnect" onclick=autoConnectFiles(event) type="button" style="display:none">
|
||||
<input id=p13Connect value="Connect" onclick=connectFiles(event) type="button">
|
||||
<input id=p13AutoConnect value="AutoConnect" onclick=autoConnectFiles(event) type="button" style="display:none" />
|
||||
<input id=p13Connect value="Connect" onclick=connectFiles(event) type="button" />
|
||||
<span id=p13Status>Disconnected</span>
|
||||
</div>
|
||||
</td>
|
||||
|
@ -709,7 +710,7 @@
|
|||
<option value=2>MQTT</option>
|
||||
</select>
|
||||
</td>
|
||||
<td style="width:1%"><input id="id_p15consoleClear" type="button" class="bottombutton" value="Clear" onclick="p15consoleClear()"></td>
|
||||
<td style="width:1%"><input id="id_p15consoleClear" type="button" class="bottombutton" value="Clear" onclick="p15consoleClear()" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
|
@ -750,7 +751,7 @@
|
|||
</div>
|
||||
<div id=p20 style="display:none">
|
||||
<picture id=MainMeshImage style=border-width:0px;height:200px;width:200px;float:right>
|
||||
<source type="image/webp" width=200 height=200 srcset="images/webp/mesh-256.webp">
|
||||
<source type="image/webp" width=200 height=200 srcset="images/webp/mesh-256.webp" />
|
||||
<img alt="" width=200 height=200 src=images/mesh-256.png />
|
||||
</picture>
|
||||
<div style="float:left"><div class="backButton" tabindex=0 onclick=goBack() title="Back" onkeypress="if (event.key == 'Enter') goBack()"><div class="backButtonEx"></div></div></div>
|
||||
|
@ -770,13 +771,13 @@
|
|||
<td style=width:20px></td>
|
||||
<td style=width:200px>
|
||||
<picture id=MainUserImage style=border-width:0px;height:200px;width:200px;float:right>
|
||||
<source type="image/webp" width=200 height=200 srcset="images/webp/user-256.webp">
|
||||
<source type="image/webp" width=200 height=200 srcset="images/webp/user-256.webp" />
|
||||
<img alt="" width=200 height=200 src=images/user-256.png />
|
||||
</picture>
|
||||
<div style="width:100%;text-align:center"><strong><span id=MainUserState></span></strong></div>
|
||||
</td>
|
||||
</tr>
|
||||
</table><br>
|
||||
</table><br />
|
||||
<div id=p30html2></div>
|
||||
<div id=p30html3></div>
|
||||
</div>
|
||||
|
@ -851,19 +852,21 @@
|
|||
<div id=p19 style="display:none">
|
||||
<h1>Plugins - <span id=p19deviceName></span></h1>
|
||||
<style>
|
||||
#p19headers {
|
||||
padding-right: 7px;
|
||||
padding-bottom: 10px;
|
||||
font-weight: bold;
|
||||
border-bottom: 1px dotted blue;
|
||||
}
|
||||
#p19headers > span:nth-child(n+2) {
|
||||
border-left: 1px solid black;
|
||||
}
|
||||
#p19headers > span {
|
||||
padding-left: 4px;
|
||||
padding-right: 4px;
|
||||
}
|
||||
#p19headers {
|
||||
padding-right: 7px;
|
||||
padding-bottom: 10px;
|
||||
font-weight: bold;
|
||||
border-bottom: 1px dotted blue;
|
||||
}
|
||||
|
||||
#p19headers > span:nth-child(n+2) {
|
||||
border-left: 1px solid black;
|
||||
}
|
||||
|
||||
#p19headers > span {
|
||||
padding-left: 4px;
|
||||
padding-right: 4px;
|
||||
}
|
||||
</style>
|
||||
<div id="p19headers"></div>
|
||||
<div id=p19pages></div>
|
||||
|
@ -957,24 +960,24 @@
|
|||
<div>
|
||||
<div>Other Settings</div>
|
||||
<div id="d7otherset" style="display:block">
|
||||
<label style="display:block"><input type="checkbox" id="d7showfocus">Show Focus Tool</label>
|
||||
<label style="display:block"><input type="checkbox" id="d7showcursor">Show Local Mouse Cursor</label>
|
||||
<label style="display:block"><input type="checkbox" id="d7localKeyMap">Local Keyboard Map</label>
|
||||
<label style="display:block"><input type="checkbox" id="d7showfocus" />Show Focus Tool</label>
|
||||
<label style="display:block"><input type="checkbox" id="d7showcursor" />Show Local Mouse Cursor</label>
|
||||
<label style="display:block"><input type="checkbox" id="d7localKeyMap" />Local Keyboard Map</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="idx_dlgButtonBar">
|
||||
<input id="idx_dlgCancelButton" type="button" value="Cancel" style="" onclick="dialogclose(0)">
|
||||
<input id="idx_dlgOkButton" type="button" value="OK" style="" onclick="dialogclose(1)">
|
||||
<div><input id="idx_dlgDeleteButton" type="button" value="Delete" style="display:none" onclick="dialogclose(2)"></div>
|
||||
<input id="idx_dlgCancelButton" type="button" value="Cancel" style="" onclick="dialogclose(0)" />
|
||||
<input id="idx_dlgOkButton" type="button" value="OK" style="" onclick="dialogclose(1)" />
|
||||
<div><input id="idx_dlgDeleteButton" type="button" value="Delete" style="display:none" onclick="dialogclose(2)" /></div>
|
||||
</div>
|
||||
</div>
|
||||
<iframe name="fileUploadFrame" style="display:none"></iframe>
|
||||
<form style="display:none" method=post action=uploadfile.ashx enctype=multipart/form-data target=fileUploadFrame><input id=p5fileDragName name="name"><input id=p5fileDragAuthCookie name="auth"><input id=p5fileDragSize name="size"><input id=p5fileDragType name="type"><input id=p5fileDragData name="data"><input id=p5fileDragLink name="link"><input type=submit id=p5loginSubmit2 style="display:none" /></form>
|
||||
<form style="display:none" method=post action=uploadnodefile.ashx enctype=multipart/form-data target=fileUploadFrame><input id=p13fileDragName name="name"><input id=p13fileDragSize name="size"><input id=p13fileDragType name="type"><input id=p13fileDragData name="data"><input id=p13fileDragLink name="link"><input type=submit id=p13loginSubmit2 style="display:none" /></form>
|
||||
<audio id="chimes"><source src="sounds/chimes.mp3" type="audio/mp3"></audio>
|
||||
<form style="display:none" method=post action=uploadfile.ashx enctype=multipart/form-data target=fileUploadFrame><input id=p5fileDragName name="name" /><input id=p5fileDragAuthCookie name="auth" /><input id=p5fileDragSize name="size" /><input id=p5fileDragType name="type" /><input id=p5fileDragData name="data" /><input id=p5fileDragLink name="link" /><input type=submit id=p5loginSubmit2 style="display:none" /></form>
|
||||
<form style="display:none" method=post action=uploadnodefile.ashx enctype=multipart/form-data target=fileUploadFrame><input id=p13fileDragName name="name" /><input id=p13fileDragSize name="size" /><input id=p13fileDragType name="type" /><input id=p13fileDragData name="data" /><input id=p13fileDragLink name="link" /><input type=submit id=p13loginSubmit2 style="display:none" /></form>
|
||||
<audio id="chimes"><source src="sounds/chimes.mp3" type="audio/mp3" /></audio>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
'use strict';
|
||||
|
@ -1039,7 +1042,7 @@
|
|||
var pluginHandlerBuilder = {{{pluginHandler}}};
|
||||
var pluginHandler = null;
|
||||
if (pluginHandlerBuilder != null) { pluginHandler = new pluginHandlerBuilder(); }
|
||||
|
||||
|
||||
// Console Message Display Timers
|
||||
var p11DeskConsoleMsgTimer = null;
|
||||
var p12TermConsoleMsgTimer = null;
|
||||
|
@ -1194,13 +1197,13 @@
|
|||
if (toggle === 1) { deskAspectRatio = ((deskAspectRatio + 1) % 3); putstore('deskAspectRatio', deskAspectRatio); }
|
||||
deskAdjust();
|
||||
}
|
||||
|
||||
|
||||
// If FullScreen, toggle menu to be horisontal or vertical
|
||||
function toggleStackMenu(toggle) {
|
||||
if (webPageFullScreen == true) {
|
||||
if (toggle === 1) {
|
||||
webPageStackMenu = !webPageStackMenu;
|
||||
putstore('webPageStackMenu', webPageStackMenu);
|
||||
putstore('webPageStackMenu', webPageStackMenu);
|
||||
}
|
||||
if (webPageStackMenu == false) {
|
||||
QC('body').remove("menu_stack");
|
||||
|
@ -1953,7 +1956,7 @@
|
|||
}
|
||||
}
|
||||
if (users == null) break;
|
||||
|
||||
|
||||
// Check if the account is part of our user group
|
||||
if ((userinfo.groups == null) || (userinfo.groups.length == 0) || (findOne(message.event.account.groups, userinfo.groups) == true)) {
|
||||
users[message.event.account._id] = message.event.account; // Part of our groups, update this user.
|
||||
|
@ -2670,9 +2673,9 @@
|
|||
}
|
||||
|
||||
// Display "connect all" and "auto"
|
||||
QV('kvmMultiConnectButtonSpan', (kvmDivs.length < 16));
|
||||
QV('kvmAutoConnectButtonSpan', (kvmDivs.length < 16));
|
||||
if (kvmDivs.length >= 16) { Q('autoConnectDesktopCheckbox').checked = false; }
|
||||
QV('kvmMultiConnectButtonSpan', (kvmDivs.length < 64));
|
||||
QV('kvmAutoConnectButtonSpan', (kvmDivs.length < 64));
|
||||
if (kvmDivs.length >= 64) { Q('autoConnectDesktopCheckbox').checked = false; }
|
||||
|
||||
// If displaying devices by groups, sort the group names and display the devices.
|
||||
if (sort == 3) {
|
||||
|
@ -3131,7 +3134,7 @@
|
|||
}
|
||||
|
||||
function d2CopyInviteToClip() { copyTextToClip(Q('agentInvitationLink').href); }
|
||||
|
||||
|
||||
function validateAgentInvite() {
|
||||
if ((features & 64) && (Q('d2InviteType').value == 1)) {
|
||||
QE('idx_dlgOkButton', checkEmail(Q('agentInviteEmail').value));
|
||||
|
@ -4231,13 +4234,13 @@
|
|||
var provisioningStates = { 0: 'Not Activated (Pre)', 1: 'Not Activated (In)', 2: 'Activated' };
|
||||
if (node.intelamt.ver != null && node.intelamt.state == null) { str += '<i>Unknown State</i>, v' + node.intelamt.ver; } else
|
||||
|
||||
if ((node.intelamt.ver == null) && (node.intelamt.state == 2)) { str += '<i>Activated</i>'; }
|
||||
else if ((node.intelamt.ver == null) || (node.intelamt.state == null)) { str += '<i>Unknown Version & State</i>'; }
|
||||
else {
|
||||
str += provisioningStates[node.intelamt.state];
|
||||
if ((node.intelamt.state == 2) && node.intelamt.flags) { if (node.intelamt.flags & 2) { str += ' <span title="Intel AMT is activated in Client Control Mode">CCM</span>'; } else if (node.intelamt.flags & 4) { str += ' <span title="Intel AMT is activated in Admin Control Mode">ACM</span>'; } }
|
||||
str += (', v' + node.intelamt.ver);
|
||||
}
|
||||
if ((node.intelamt.ver == null) && (node.intelamt.state == 2)) { str += '<i>Activated</i>'; }
|
||||
else if ((node.intelamt.ver == null) || (node.intelamt.state == null)) { str += '<i>Unknown Version & State</i>'; }
|
||||
else {
|
||||
str += provisioningStates[node.intelamt.state];
|
||||
if ((node.intelamt.state == 2) && node.intelamt.flags) { if (node.intelamt.flags & 2) { str += ' <span title="Intel AMT is activated in Client Control Mode">CCM</span>'; } else if (node.intelamt.flags & 4) { str += ' <span title="Intel AMT is activated in Admin Control Mode">ACM</span>'; } }
|
||||
str += (', v' + node.intelamt.ver);
|
||||
}
|
||||
|
||||
if (node.intelamt.tls == 1) { str += ', <span title="Intel AMT is setup with TLS network security">TLS</span>'; }
|
||||
if (node.intelamt.state == 2) {
|
||||
|
@ -4442,7 +4445,7 @@
|
|||
p11clearConsoleMsg();
|
||||
p12clearConsoleMsg();
|
||||
p13clearConsoleMsg();
|
||||
|
||||
|
||||
// Device refresh plugin handler
|
||||
if (pluginHandler != null) { pluginHandler.onDeviceRefeshEnd(nodeid, panel, refresh, event); }
|
||||
}
|
||||
|
@ -4765,7 +4768,7 @@
|
|||
meshserver.send({ action: 'getnetworkinfo', nodeid: currentNode._id });
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
// Show MeshCentral Router dialog
|
||||
function p10showMeshRouterDialog() {
|
||||
if (xxdialogMode) return;
|
||||
|
@ -5284,10 +5287,10 @@
|
|||
if ((parentH / parentW) > (deskH / deskW)) {
|
||||
var hNew = ((deskH * parentW) / deskW) + 'px';
|
||||
//if (webPageFullScreen || fullscreen) {
|
||||
//QS('deskarea3x').height = null;
|
||||
//QS('deskarea3x').height = null;
|
||||
//} else {
|
||||
// QS('deskarea3x').height = hNew;
|
||||
//QS('deskarea3x').height = null;
|
||||
// QS('deskarea3x').height = hNew;
|
||||
//QS('deskarea3x').height = null;
|
||||
//}
|
||||
QS('Desk').height = hNew;
|
||||
QS('Desk').width = '100%';
|
||||
|
@ -7386,7 +7389,7 @@
|
|||
if (meshrights & 128) { Q('p20editnotes').checked = true; }
|
||||
if (meshrights & 8192) { Q('p20limitevents').checked = true; }
|
||||
if (meshrights & 16384) { Q('p20chatnotify').checked = true; }
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
p20validateAddMeshUserDialog();
|
||||
|
@ -9187,7 +9190,7 @@
|
|||
|
||||
// column_l max-height
|
||||
if (webPageStackMenu && (x >= 10)) { QC('column_l').add('room4submenu'); } else { QC('column_l').remove('room4submenu'); }
|
||||
|
||||
|
||||
// If we are going to panel 0 in "full screen mode", hide the left bar.
|
||||
QV('topbar', x != 0);
|
||||
if ((x == 0) && (webPageFullScreen)) { QC('body').add("arg_hide"); }
|
||||
|
|
Loading…
Reference in New Issue