Fix for #3194
Ylian Saint-Hilaire committed
Oct 14, 2021 at 15:09 UTC
38fa6a9004ed6367267fa2f7f2a43993252a0d84
2 files changed
+13
-9
public/scripts/amt-desktop-0.0.2.js
+6
-2
@@ -847,10 +847,14 @@ var CreateAmtRemoteDesktop = function (divid, scrolldiv) {
847
if (event.addy) { obj.my += event.addy; }
848
849
// ###BEGIN###{DesktopRotation}
850
+ if ((obj.rotation == 1) || (obj.rotation == 3)) {
851
+ obj.mx = ((obj.mx * obj.rwidth) / obj.width);
852
+ obj.my = ((obj.my * obj.rheight) / obj.height);
853
+ }
854
if (obj.noMouseRotate != true) {
851
- obj.mx2 = _crotX(obj.mx, obj.my);
855
+ var mx2 = _crotX(obj.mx, obj.my);
856
obj.my = _crotY(obj.mx, obj.my);
853
- obj.mx = obj.mx2;
857
+ obj.mx = mx2;
858
}
859
// ###END###{DesktopRotation}
860
views/default.handlebars
+7
-7
@@ -3215,17 +3215,17 @@
3215
3216
// Show the notification
3217
if (n & 2) {
3218
- var agentPrivilages = '';
3219
- if ((node.agent != null) && (node.agent.root === false)) { agentPrivilages = ', <span title="' + "Agent is running on remote device with reduced privilages." + '">' + "Restricted" + '</span>'; }
3220
- if (((node.conn & 1) == 0) && ((message.event.conn & 1) != 0)) { addNotification({ text: "Agent connected" + agentPrivilages, title: node.name, icon: node.icon, nodeid: node._id }); }
3221
- if (((node.conn & 2) == 0) && ((message.event.conn & 2) != 0)) { addNotification({ text: "Intel® AMT detected", title: node.name, icon: node.icon, nodeid: node._id }); }
3222
- 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 }); }
3218
+ var agentPrivilages = "Agent connected";
3219
+ if ((node.agent != null) && (node.agent.root === false)) { "Agent connected with limited privilages"; }
3220
+ if (((node.conn & 1) == 0) && ((message.event.conn & 1) != 0)) { addNotification({ text: agentPrivilages, title: node.name, icon: node.icon, nodeid: node._id }); }
3221
+ if (((node.conn & 2) == 0) && ((message.event.conn & 2) != 0)) { addNotification({ text: "Intel AMT detected", title: node.name, icon: node.icon, nodeid: node._id }); }
3222
+ 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 }); }
3223
if (((node.conn & 16) == 0) && ((message.event.conn & 16) != 0)) { addNotification({ text: "MQTT connected", title: node.name, icon: node.icon, nodeid: node._id }); }
3224
}
3225
if (n & 4) {
3226
if (((node.conn & 1) != 0) && ((message.event.conn & 1) == 0)) { addNotification({ text: "Agent disconnected", title: node.name, icon: node.icon, nodeid: node._id }); }
3227
- 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 }); }
3228
- 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 }); }
3227
+ 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 }); }
3228
+ 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 }); }
3229
if (((node.conn & 16) != 0) && ((message.event.conn & 16) == 0)) { addNotification({ text: "MQTT disconnected", title: node.name, icon: node.icon, nodeid: node._id }); }
3230
}
3231