Local Add Device added device group view on desktop site, #3984

Ylian Saint-Hilaire committed May 16, 2022 at 10:55 UTC dd4e20bd546b35aa29a6645bd1e19565d00af540
2 files changed +10 -7
public/scripts/agent-rdp-0.0.1.js
+1 -7
@@ -104,13 +104,7 @@ var CreateRDPDesktop = function (canvasid) {
104 if (obj.socket) { obj.socket.close(); }
105 }
106
107 - obj.m.setClipboard = function (content) {
108 - console.log('s1');
109 - if (obj.socket) {
110 - console.log('s2', content);
111 - obj.socket.send(JSON.stringify(['clipboard', content]));
112 - }
113 - }
107 + obj.m.setClipboard = function (content) { if (obj.socket) { obj.socket.send(JSON.stringify(['clipboard', content])); } }
108
109 function changeState(newstate) {
110 if (obj.State == newstate) return;
views/default.handlebars
+9
@@ -3178,6 +3178,9 @@
3178 // Web page update
3179 mainUpdate(1 | 2 | 4 | 16);
3180
3181 + // If we are looking at the device group for this device, update that.
3182 + if ((xxcurrentView == 20) && (currentMesh != null) && (currentMesh._id == node.meshid)) { mainUpdate(4096); }
3183 +
3184 break;
3185 }
3186 case 'removenode': {
@@ -3194,6 +3197,9 @@
3197
3198 // Web page update
3199 mainUpdate(4 | 16);
3200 +
3201 + // If we are looking at the device group for this device, update that.
3202 + if ((xxcurrentView == 20) && (currentMesh != null) && (currentMesh._id == node.meshid)) { mainUpdate(4096); }
3203 }
3204 break;
3205 }
@@ -12212,6 +12218,9 @@
12218 x += '<a href=# onclick=\'return addAgentToMesh("' + currentMesh._id + '")\' style=cursor:pointer;margin-right:10px title="' + "Add a new computer to this device group by installing the mesh agent." + '"><img src=images/icon-addnew.png border=0 height=12 width=12> ' + "Add Agent" + '</a>';
12219 x += '<a href=# onclick=\'return inviteAgentToMesh("' + currentMesh._id + '")\' style=cursor:pointer;margin-right:10px title="' + "Invite someone to install the mesh agent on this device group." + '"><img src=images/icon-addnew.png border=0 height=12 width=12> ' + "Invite" + '</a>';
12220 }
12221 + if ((currentMesh.mtype == 3) && ((userinfo.siteadmin == 0xFFFFFFFF) || ((userinfo.siteadmin & 4096) == 0))) {
12222 + x += '<a href=# onclick=\'return addLocalDeviceToMesh("' + currentMesh._id + '")\' style=cursor:pointer;margin-right:10px title="' + "Add device located on the local network." + '"><img src=images/icon-addnew.png border=0 height=12 width=12> ' + "Add Device" + '</a>';
12223 + }
12224 if (currentMesh.amt && (currentMesh.amt.type > 2) && ((userinfo.siteadmin == 0xFFFFFFFF) || ((userinfo.siteadmin & 4096) == 0))) { // ACM activation or Full Automatic
12225 x += '<a href=# style=cursor:pointer;font-size:small title="' + "Switch Intel AMT to Admin Control Mode (ACM)." + '" onclick=\'return showAmtAcmSetup()\'><img src=images/icon-installmesh.png border=0 height=12 width=12> ' + "ACM" + '</a>';
12226 }