From 38fa6a9004ed6367267fa2f7f2a43993252a0d84 Mon Sep 17 00:00:00 2001 From: Ylian Saint-Hilaire Date: Thu, 14 Oct 2021 15:09:52 -0700 Subject: [PATCH] Fix for #3194 --- public/scripts/amt-desktop-0.0.2.js | 8 ++++++-- views/default.handlebars | 14 +++++++------- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/public/scripts/amt-desktop-0.0.2.js b/public/scripts/amt-desktop-0.0.2.js index ffd31c00..3bc6fe39 100644 --- a/public/scripts/amt-desktop-0.0.2.js +++ b/public/scripts/amt-desktop-0.0.2.js @@ -847,10 +847,14 @@ var CreateAmtRemoteDesktop = function (divid, scrolldiv) { if (event.addy) { obj.my += event.addy; } // ###BEGIN###{DesktopRotation} + if ((obj.rotation == 1) || (obj.rotation == 3)) { + obj.mx = ((obj.mx * obj.rwidth) / obj.width); + obj.my = ((obj.my * obj.rheight) / obj.height); + } if (obj.noMouseRotate != true) { - obj.mx2 = _crotX(obj.mx, obj.my); + var mx2 = _crotX(obj.mx, obj.my); obj.my = _crotY(obj.mx, obj.my); - obj.mx = obj.mx2; + obj.mx = mx2; } // ###END###{DesktopRotation} diff --git a/views/default.handlebars b/views/default.handlebars index 8663e0c4..e2e44117 100644 --- a/views/default.handlebars +++ b/views/default.handlebars @@ -3215,17 +3215,17 @@ // Show the notification if (n & 2) { - var agentPrivilages = ''; - if ((node.agent != null) && (node.agent.root === false)) { agentPrivilages = ', ' + "Restricted" + ''; } - if (((node.conn & 1) == 0) && ((message.event.conn & 1) != 0)) { addNotification({ text: "Agent connected" + agentPrivilages, title: node.name, icon: node.icon, nodeid: node._id }); } - if (((node.conn & 2) == 0) && ((message.event.conn & 2) != 0)) { addNotification({ text: "Intel® AMT detected", title: node.name, icon: node.icon, nodeid: node._id }); } - if (((node.conn & 4) == 0) && ((message.event.conn & 4) != 0)) { addNotification({ text: "Intel® AMT CIRA connected", title: node.name, icon: node.icon, nodeid: node._id }); } + var agentPrivilages = "Agent connected"; + if ((node.agent != null) && (node.agent.root === false)) { "Agent connected with limited privilages"; } + if (((node.conn & 1) == 0) && ((message.event.conn & 1) != 0)) { addNotification({ text: agentPrivilages, title: node.name, icon: node.icon, nodeid: node._id }); } + if (((node.conn & 2) == 0) && ((message.event.conn & 2) != 0)) { addNotification({ text: "Intel AMT detected", title: node.name, icon: node.icon, nodeid: node._id }); } + if (((node.conn & 4) == 0) && ((message.event.conn & 4) != 0)) { addNotification({ text: "Intel AMT CIRA connected", title: node.name, icon: node.icon, nodeid: node._id }); } if (((node.conn & 16) == 0) && ((message.event.conn & 16) != 0)) { addNotification({ text: "MQTT connected", title: node.name, icon: node.icon, nodeid: node._id }); } } if (n & 4) { if (((node.conn & 1) != 0) && ((message.event.conn & 1) == 0)) { addNotification({ text: "Agent disconnected", title: node.name, icon: node.icon, nodeid: node._id }); } - if (((node.conn & 2) != 0) && ((message.event.conn & 2) == 0)) { addNotification({ text: "Intel® AMT not detected", title: node.name, icon: node.icon, nodeid: node._id }); } - if (((node.conn & 4) != 0) && ((message.event.conn & 4) == 0)) { addNotification({ text: "Intel® AMT CIRA disconnected", title: node.name, icon: node.icon, nodeid: node._id }); } + if (((node.conn & 2) != 0) && ((message.event.conn & 2) == 0)) { addNotification({ text: "Intel AMT not detected", title: node.name, icon: node.icon, nodeid: node._id }); } + if (((node.conn & 4) != 0) && ((message.event.conn & 4) == 0)) { addNotification({ text: "Intel AMT CIRA disconnected", title: node.name, icon: node.icon, nodeid: node._id }); } if (((node.conn & 16) != 0) && ((message.event.conn & 16) == 0)) { addNotification({ text: "MQTT disconnected", title: node.name, icon: node.icon, nodeid: node._id }); } }