@@ -610,7 +614,7 @@
-
+
Disconnected
@@ -2162,8 +2166,39 @@
}
case 'serverwarnings': {
if ((message.warnings != null) && (message.warnings.length > 0)) {
+ var ServerWarnings = {
+ 1: "MeshCentral SSH support requires NodeJS 11 or higher.",
+ 2: "Missing WebDAV parameters.",
+ 3: "Unrecognized configuration option \"{0}\".",
+ 4: "WebSocket compression is disabled, this feature is broken in NodeJS v11.11 to v12.15 and v13.2",
+ 5: "Unable to load Intel AMT TLS root certificate for default domain.",
+ 6: "Unable to load Intel AMT TLS root certificate for domain {0}.",
+ 7: "CIRA local FQDN's ignored when server in LAN-only or WAN-only mode.",
+ 8: "Can't have more than 4 CIRA local FQDN's. Ignoring value.",
+ 9: "Agent hash checking is being skipped, this is unsafe.",
+ 10: "Missing Let's Encrypt email address.",
+ 11: "Invalid Let's Encrypt host names.",
+ 12: "Invalid Let's Encrypt names, can't contain a *.",
+ 13: "Unable to setup Let's Encrypt module.",
+ 14: "Invalid Let's Encrypt names, unable to resolve: {0}",
+ 15: "Invalid Let's Encrypt email address, unable to resolve: {0}",
+ 16: "Unable to load CloudFlare trusted proxy IPv6 address list.",
+ 17: "SendGrid server has limited use in LAN mode.",
+ 18: "SMTP server has limited use in LAN mode.",
+ 19: "SMS gateway has limited use in LAN mode.",
+ 20: "Invalid \"LoginCookieEncryptionKey\" in config.json."
+ };
var x = '';
- for (var i in message.warnings) { x += '
' + "WARNING: " + message.warnings[i] + '
'; }
+ for (var i in message.warnings) {
+ var y = message.warnings[i];
+ if (typeof y == 'string') {
+ x += '
' + "WARNING: " + y + '
';
+ } else {
+ var z = ServerWarnings[y.id];
+ if (z == null) { z = y.msg; } else { z = format(z, y.args); }
+ x += '
' + format("Install Google Authenticator or a compatible application and scan the barcode, use this link or enter the secret. Then, enter the current 6 digit token below to activate 2-Step login.", message.url) + '
Secret ' + secret + '
' + "Enter the token here for 2-step login:" + '
');
+ QH('d2optinfo', '
' + format("Install Google Authenticator or a compatible application and scan the barcode, use this link or enter the secret. Then, enter the current 6 digit token below to activate 2-Step login.", message.url) + '
' + "Secret" + ' ' + secret + '
' + "Enter the token here for 2-step login:" + '
');
new QRCode(Q('qrcode'), { text: message.url, width: 128, height: 128, colorDark: '#000000', colorLight: '#EEE', correctLevel: QRCode.CorrectLevel.H });
QV('idx_dlgOkButton', true);
QE('idx_dlgOkButton', false);
@@ -4682,22 +4717,22 @@
function addAmtScanToMesh(meshid) {
if (xxdialogMode) return false;
var x = "Enter a range of IP addresses to scan for Intel® AMT devices." + '
';
- var amtscanoptions = decodeURIComponent('{{{amtscanoptions}}}').split(',');
+ var amtscanoptions = '';//decodeURIComponent('{{{amtscanoptions}}}').split(',');
if (amtscanoptions != '') {
x += '';
- x += addHtmlValue("IP Range", '');
+ x += addHtmlValue("IP Range", '
');
} else {
- x += addHtmlValue("IP Range", '');
+ x += addHtmlValue("IP Range", '
');
}
x += '';
x += '';
- x += '
';
+ x += '
';
setDialogMode(2, "Scan for Intel® AMT devices", 0, addAmtScanToMeshEx, x, meshid);
QE('idx_dlgOkButton2', false);
QE('d2scanSelectButton', false);
- QH('dp1results', '
Sample IP range values 192.168.0.100 192.168.1.0/24 192.167.0.1-192.168.0.100
');
+ QH('dp1results', '
' + "Sample IP range values" + ' 192.168.0.100 192.168.1.0/24 192.167.0.1-192.168.0.100
');
focusTextBox('dp1range');
addAmtScanToMeshKeyUp();
return false;
@@ -4856,7 +4891,7 @@
// Linux agent install
x += '
' + format("To add a computer to \"{0}\" run the following command. Root credentials will be needed.", EscapeHtml(mesh.name)) + ' ';
x += '';
- x += '
' + "* For BSD, run \"pkg install wget sudo bash\" first." + '
' + format("To add a new computer to device group \"{0}\", download the mesh agent and install it the computer to manage. This agent installer has server and device group information embedded within it.", EscapeHtml(mesh.name)) + '
';
@@ -5514,6 +5549,13 @@
showContextMenuDiv(document.getElementById('deskConnectContextMenu'), event.pageX, event.pageY);
break;
}
+ case 'deskDisconnectButton': {
+ // Desktop disconnect button context menu
+ if ((currentNode == null) || (currentNode.agent == null)) return true;
+ contextelement = elem;
+ showContextMenuDiv(document.getElementById('deskDisconnectContextMenu'), event.pageX, event.pageY);
+ break;
+ }
case 'devsContentMenu': {
// Device content menu
contextelement = elem;
@@ -5642,6 +5684,8 @@
if (action == 1) { connectDesktop(null, 3, null, 0x0008 + 0x0040); } // Consent Prompt + Privacy bar
if (action == 2) { connectDesktop(null, 3, null, 0x0008); } // Consent Prompt
if (action == 3) { connectDesktop(null, 3, null, 0x0040); } // Privacy bar
+ if (action == 10) { if (desktop != null) { desktop.sendCtrlMsg('{"ctrlChannel":"102938","type":"autolock","value":true}'); connectDesktop(); } } // Disconnect and lock
+ if (action == 11) { if (desktop != null) { desktop.sendCtrlMsg('{"ctrlChannel":"102938","type":"autolock","value":false}'); connectDesktop(); } } // Disconnect without lock
}
function cmaltportaction(action) {
@@ -5761,6 +5805,7 @@
QV('termShellContextMenu2', false);
QV('termShellContextMenuLinux', false);
QV('deskConnectContextMenu', false);
+ QV('deskDisconnectContextMenu', false);
QV('altPortContextMenu', false);
QV('rfbPortContextMenu', false);
QV('sshPortContextMenu', false);
@@ -8628,8 +8673,8 @@
if (xxdialogMode || desktop == null || desktop.State != 3) return;
Q('DeskClip').blur();
var x = '';
- if ((features2 & 0x0800) == 0) x += '';
- if ((features2 & 0x1000) == 0) x += '';
+ if ((features2 & 0x0800) == 0) x += '';
+ if ((features2 & 0x1000) == 0) x += '';
x += '';
x += '';
x += '
' + "Remote clipboard is valid for 60 seconds." + '
';
@@ -8744,9 +8789,11 @@
var x = '';
for (var i in s) {
if (s[i].p != 0) {
- var c = s[i].d;
+ var c = s[i].d, ss = s[i].p;
if (c.length > 30) { c = '' + c.substring(0, 30) + '...' } else { c = EscapeHtml(c); }
- x += '
' + EscapeHtml(s[i].p) + '
' + c + '
';
+ if (ss == 'Stopped') { ss = "Stopped"; } // TODO: Add all other states for translation
+ else if (ss == 'Running') { ss = "Running"; }
+ x += '
' + EscapeHtml(ss) + '
' + c + '
';
}
}
QH('DeskToolsServices', x);
@@ -8761,7 +8808,10 @@
if (service.name) { x += addHtmlValue("Name", service.name); }
if (service.displayName) { x += addHtmlValue("Display name", service.displayName); }
if (service.status) {
- if (service.status.state) { x += addHtmlValue("State", capitalizeFirstLetter(service.status.state.toLowerCase())); }
+ var ss = capitalizeFirstLetter(service.status.state.toLowerCase());
+ if (ss == 'Stopped') { ss = "Stopped"; } // TODO: Add all other states for translation
+ else if (ss == 'Running') { ss = "Running"; }
+ if (service.status.state) { x += addHtmlValue("State", ss); }
if (service.status.pid) { x += addHtmlValue("PID", service.status.pid); }
var serviceTypes = [];
if (service.status.isFileSystemDriver === true) { serviceTypes.push("FileSystemDriver"); }