Fixed agent desktop alert issue.

This commit is contained in:
Ylian Saint-Hilaire 2021-03-18 14:36:21 -07:00
parent 60c752c0c8
commit 607849e0e7

View File

@ -252,12 +252,12 @@ var CreateAgentRemoteDesktop = function (canvasid, scrolldiv) {
obj.TouchArray = {}; obj.TouchArray = {};
break; break;
case 17: // MNG_KVM_MESSAGE case 17: // MNG_KVM_MESSAGE
var str = String.fromCharCode.apply(null, data.slice(4)); var str = String.fromCharCode.apply(null, view.slice(4));
console.log('Got KVM Message: ' + str); console.log('Got KVM Message: ' + str);
if (obj.onMessage != null) obj.onMessage(str, obj); if (obj.onMessage != null) obj.onMessage(str, obj);
break; break;
case 65: // Alert case 65: // Alert
var str = String.fromCharCode.apply(null, data.slice(4)); var str = String.fromCharCode.apply(null, view.slice(4));
if (str[0] != '.') { if (str[0] != '.') {
console.log(str); //alert('KVM: ' + str); console.log(str); //alert('KVM: ' + str);
if (obj.parent && obj.parent.setConsoleMessage) { obj.parent.setConsoleMessage(str); } if (obj.parent && obj.parent.setConsoleMessage) { obj.parent.setConsoleMessage(str); }