More translation fixes.

This commit is contained in:
Ylian Saint-Hilaire 2020-05-03 14:04:40 -07:00
parent c8e1a1c305
commit 88a649b05c
7 changed files with 1066 additions and 1053 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "meshcentral", "name": "meshcentral",
"version": "0.5.21", "version": "0.5.22",
"keywords": [ "keywords": [
"Remote Management", "Remote Management",
"Intel AMT", "Intel AMT",

File diff suppressed because one or more lines are too long

View File

@ -215,7 +215,7 @@ var CreateAgentRemoteDesktop = function (canvasid, scrolldiv) {
if ((command >= 18) && (command != 65) && (command != 88)) { if ((command >= 18) && (command != 65) && (command != 88)) {
console.error("Invalid KVM command " + command + " of size " + cmdsize); console.error("Invalid KVM command " + command + " of size " + cmdsize);
console.log("Invalid KVM data", str.length, rstr2hex(str.substring(0, 40)) + '...'); console.log("Invalid KVM data", str.length, rstr2hex(str.substring(0, 40)) + '...');
if (obj.parent && obj.parent.setConsoleMessage) { obj.parent.setConsoleMessage("Invalid KVM command " + command + " of size " + cmdsize); } if (obj.parent && obj.parent.setConsoleMessage) { obj.parent.setConsoleMessage("Received invalid network data", 5); }
return; return;
} }
if (cmdsize > str.length) { if (cmdsize > str.length) {

File diff suppressed because one or more lines are too long

View File

@ -73,7 +73,7 @@ var CreateAgentRedirect = function (meshserver, module, serverPublicNamePort, au
//console.log(controlMsg); //console.log(controlMsg);
if ((typeof args != 'undefined') && args.redirtrace) { console.log('RedirRecv', controlMsg); } if ((typeof args != 'undefined') && args.redirtrace) { console.log('RedirRecv', controlMsg); }
if (controlMsg.type == 'console') { if (controlMsg.type == 'console') {
obj.setConsoleMessage(controlMsg.msg, controlMsg.msgid, controlMsg.msgargs); obj.setConsoleMessage(controlMsg.msg, controlMsg.msgid, controlMsg.msgargs, controlMsg.timeout);
} else if ((controlMsg.type == 'rtt') && (typeof controlMsg.time == 'number')) { } else if ((controlMsg.type == 'rtt') && (typeof controlMsg.time == 'number')) {
obj.latency.current = (new Date().getTime()) - controlMsg.time; obj.latency.current = (new Date().getTime()) - controlMsg.time;
if (obj.latency.callbacks != null) { obj.latency.callback(obj.latency.current); } if (obj.latency.callbacks != null) { obj.latency.callback(obj.latency.current); }
@ -92,11 +92,12 @@ var CreateAgentRedirect = function (meshserver, module, serverPublicNamePort, au
} }
// Set the console message // Set the console message
obj.setConsoleMessage = function (str, id, args) { obj.setConsoleMessage = function (str, id, args, timeout) {
if (obj.consoleMessage == str) return; if (obj.consoleMessage == str) return;
obj.consoleMessage = str; obj.consoleMessage = str;
obj.consoleMessageId = id; obj.consoleMessageId = id;
obj.consoleMessageArgs = args; obj.consoleMessageArgs = args;
obj.consoleMessageTimeout = timeout;
if (obj.onConsoleMessageChange) { obj.onConsoleMessageChange(obj, obj.consoleMessage, obj.consoleMessageId); } if (obj.onConsoleMessageChange) { obj.onConsoleMessageChange(obj, obj.consoleMessage, obj.consoleMessageId); }
} }

File diff suppressed because it is too large Load Diff

View File

@ -5836,7 +5836,7 @@
function autoConnectDesktop(e) { if (autoConnectDesktopTimer == null) { autoConnectDesktopTimer = setInterval(function() { connectDesktop(null, 1) }, 1000); } else { clearInterval(autoConnectDesktopTimer); autoConnectDesktopTimer = null; } } function autoConnectDesktop(e) { if (autoConnectDesktopTimer == null) { autoConnectDesktopTimer = setInterval(function() { connectDesktop(null, 1) }, 1000); } else { clearInterval(autoConnectDesktopTimer); autoConnectDesktopTimer = null; } }
// Used to translate incoming agent console messages // Used to translate incoming agent console messages
var agentConsoleMessages = [ '', "Waiting for user to grant access...", "Denied", "Failed to start remote terminal session, {0} ({1})" ]; var agentConsoleMessages = [ '', "Waiting for user to grant access...", "Denied", "Failed to start remote terminal session, {0} ({1})", "Timeout", "Received invalid network data" ];
function formatAgentConsoleMessage(msg, msgid, msgargs) { function formatAgentConsoleMessage(msg, msgid, msgargs) {
var r; var r;
if (msgargs == null) { msgargs = []; } if (msgargs == null) { msgargs = []; }
@ -5950,8 +5950,8 @@
if (desktop.consoleMessage) { if (desktop.consoleMessage) {
Q('p11DeskConsoleMsg').innerHTML += formatAgentConsoleMessage(desktop.consoleMessage, desktop.consoleMessageId, desktop.consoleMessageArgs); Q('p11DeskConsoleMsg').innerHTML += formatAgentConsoleMessage(desktop.consoleMessage, desktop.consoleMessageId, desktop.consoleMessageArgs);
QV('p11DeskConsoleMsg', true); QV('p11DeskConsoleMsg', true);
//if (p11DeskConsoleMsgTimer != null) { clearTimeout(p11DeskConsoleMsgTimer); } if (p11DeskConsoleMsgTimer != null) { clearTimeout(p11DeskConsoleMsgTimer); }
//p11DeskConsoleMsgTimer = setTimeout(p11clearConsoleMsg, 8000); if (desktop.consoleMessageTimeout) { p11DeskConsoleMsgTimer = setTimeout(p11clearConsoleMsg, desktop.consoleMessageTimeout * 1000); }
} else { } else {
p11clearConsoleMsg(); p11clearConsoleMsg();
} }
@ -6804,8 +6804,8 @@
if (terminal.consoleMessage) { if (terminal.consoleMessage) {
Q('p12TermConsoleMsg').innerHTML += formatAgentConsoleMessage(terminal.consoleMessage, terminal.consoleMessageId, terminal.consoleMessageArgs); Q('p12TermConsoleMsg').innerHTML += formatAgentConsoleMessage(terminal.consoleMessage, terminal.consoleMessageId, terminal.consoleMessageArgs);
QV('p12TermConsoleMsg', true); QV('p12TermConsoleMsg', true);
//if (p12DeskConsoleMsgTimer != null) { clearTimeout(p12DeskConsoleMsgTimer); } if (p12TermConsoleMsgTimer != null) { clearTimeout(p12TermConsoleMsgTimer); }
//p12TermConsoleMsgTimer = setTimeout(p12clearConsoleMsg, 8000); if (terminal.consoleMessageTimeout) { p12TermConsoleMsgTimer = setTimeout(p12clearConsoleMsg, terminal.consoleMessageTimeout * 1000); }
} else { } else {
p12clearConsoleMsg(); p12clearConsoleMsg();
} }
@ -6827,8 +6827,8 @@
if (terminal.consoleMessage) { if (terminal.consoleMessage) {
Q('p12TermConsoleMsg').innerHTML += formatAgentConsoleMessage(terminal.consoleMessage, terminal.consoleMessageId, terminal.consoleMessageArgs); Q('p12TermConsoleMsg').innerHTML += formatAgentConsoleMessage(terminal.consoleMessage, terminal.consoleMessageId, terminal.consoleMessageArgs);
QV('p12TermConsoleMsg', true); QV('p12TermConsoleMsg', true);
//if (p12DeskConsoleMsgTimer != null) { clearTimeout(p12DeskConsoleMsgTimer); } if (p12TermConsoleMsgTimer != null) { clearTimeout(p12TermConsoleMsgTimer); }
//p12TermConsoleMsgTimer = setTimeout(p12clearConsoleMsg, 8000); if (terminal.consoleMessageTimeout) { p12TermConsoleMsgTimer = setTimeout(p12clearConsoleMsg, terminal.consoleMessageTimeout * 1000); }
} else { } else {
p12clearConsoleMsg(); p12clearConsoleMsg();
} }
@ -6979,8 +6979,8 @@
if (files.consoleMessage) { if (files.consoleMessage) {
Q('p13FilesConsoleMsg').innerHTML += formatAgentConsoleMessage(files.consoleMessage, files.consoleMessageId, files.consoleMessageArgs); Q('p13FilesConsoleMsg').innerHTML += formatAgentConsoleMessage(files.consoleMessage, files.consoleMessageId, files.consoleMessageArgs);
QV('p13FilesConsoleMsg', true); QV('p13FilesConsoleMsg', true);
//if (p13DeskConsoleMsgTimer != null) { clearTimeout(p13DeskConsoleMsgTimer); } if (p13DeskConsoleMsgTimer != null) { clearTimeout(p13DeskConsoleMsgTimer); }
//p13FilesConsoleMsgTimer = setTimeout(p13clearConsoleMsg, 8000); if (files.consoleMessageTimeout) { p13FilesConsoleMsgTimer = setTimeout(p13clearConsoleMsg, files.consoleMessageTimeout * 1000); }
} else { } else {
p13clearConsoleMsg(); p13clearConsoleMsg();
} }