diff --git a/agents/agents-old/MeshCmd-signed.exe b/agents/agents-old/MeshCmd-signed.exe new file mode 100644 index 00000000..b7c3637e Binary files /dev/null and b/agents/agents-old/MeshCmd-signed.exe differ diff --git a/agents/agents-old/MeshCmd64-signed.exe b/agents/agents-old/MeshCmd64-signed.exe new file mode 100644 index 00000000..62eb676d Binary files /dev/null and b/agents/agents-old/MeshCmd64-signed.exe differ diff --git a/agents/agents-old/MeshService-signed.exe b/agents/agents-old/MeshService-signed.exe new file mode 100644 index 00000000..3741de65 Binary files /dev/null and b/agents/agents-old/MeshService-signed.exe differ diff --git a/agents/agents-old/MeshService.exe b/agents/agents-old/MeshService.exe new file mode 100644 index 00000000..94fc3711 Binary files /dev/null and b/agents/agents-old/MeshService.exe differ diff --git a/agents/agents-old/MeshService64-signed.exe b/agents/agents-old/MeshService64-signed.exe new file mode 100644 index 00000000..2c0d5783 Binary files /dev/null and b/agents/agents-old/MeshService64-signed.exe differ diff --git a/agents/agents-old/MeshService64.exe b/agents/agents-old/MeshService64.exe new file mode 100644 index 00000000..fd5a16b3 Binary files /dev/null and b/agents/agents-old/MeshService64.exe differ diff --git a/views/default.handlebars b/views/default.handlebars index 945b43e2..25f74f13 100644 --- a/views/default.handlebars +++ b/views/default.handlebars @@ -5235,35 +5235,39 @@ } function groupActionFunction() { - var addedOptions = '', nodeids = getCheckedDevices(), added = 0; + var addedOptions = [], nodeids = getCheckedDevices(), added = 0; // Check if any of the selected devices have a MQTT connection active if (features & 0x00400000) { - for (var i in nodeids) { if ((getNodeFromId(nodeids[i]).conn & 16) != 0) { addedOptions += ''; break; } } + for (var i in nodeids) { if ((getNodeFromId(nodeids[i]).conn & 16) != 0) { addedOptions.push({ v:103, name: "Send MQTT Message" });; break; } } } - // Display the "Uninstall Agent" option if allowed and we selected connected devices. + // Display the options that are allowed depending on what devices are selected. + addedOptions.push({ v: 105, name: "Export device information", s:true }); for (var i in nodeids) { var node = getNodeFromId(nodeids[i]), rights = GetNodeRights(node); - if ((rights & 1) && ((added & 2) == 0)) { added |= 2; addedOptions += ''; } - if (((node.conn & 1) != 0) && ((rights & 0x8000) != 0) && ((added & 1) == 0)) { added |= 1; addedOptions += ''; } - if ((rights & 64) && ((added & 8) == 0)) { added |= 8; addedOptions += ''; } - if ((rights & 262144) && ((added & 4) == 0)) { added |= 4; addedOptions += ''; } - if ((rights & 131072) && ((added & 16) == 0)) { added |= 16; addedOptions += ''; } - if ((rights & 16384) && ((added & 32) == 0)) { added |= 32; addedOptions += ''; } - if ((rights & 4) && ((added & 64) == 0)) { added |= 64; addedOptions += ''; } - if ((rights & 8) && ((added & 256) == 0)) { added |= 256; addedOptions += ''; } - if ((rights & 32768) && ((added & 128) == 0)) { added |= 128; addedOptions += ''; } + if ((rights & 1) && ((added & 2) == 0)) { added |= 2; addedOptions.push({ v: 102, name: "Move to device group" }); } + if (((node.conn & 1) != 0) && ((rights & 0x8000) != 0) && ((added & 1) == 0)) { added |= 1; addedOptions.push({ v: 104, name: "Uninstall Agent" }); } + if ((rights & 64) && ((added & 8) == 0)) { added |= 8; addedOptions.push({ v: 100, name: "Wake-up devices" }); } + if ((rights & 262144) && ((added & 4) == 0)) { added |= 4; addedOptions.push({ v: 4, name: "Sleep devices" }); addedOptions.push({ v: 3, name: "Reset devices" }); addedOptions.push({ v: 2, name: "Power off devices" }); } + if ((rights & 131072) && ((added & 16) == 0)) { added |= 16; addedOptions.push({ v: 106, name: "Run commands" }); } + if ((rights & 16384) && ((added & 32) == 0)) { added |= 32; addedOptions.push({ v: 108, name: "Device notification" }); } + if ((rights & 4) && ((added & 64) == 0)) { added |= 64; addedOptions.push({ v: 107, name: "Edit tags" }); } + if ((rights & 8) && ((added & 256) == 0)) { added |= 256; addedOptions.push({ v: 109, name: "Upload files" }); } + if ((rights & 32768) && ((added & 128) == 0)) { added |= 128; addedOptions.push({ v: 101, name: "Delete devices" }); } if ((node.agent != null) && (features2 & 0x00000010) && (rights == 0xFFFFFFFF) && ((added & 512) == 0)) { added |= 512; - addedOptions += ''; - addedOptions += ''; - addedOptions += ''; + addedOptions.push({ v: 110, name: "Force agent update" }); + addedOptions.push({ v: 111, name: "Clear agent core" }); + addedOptions.push({ v: 112, name: "Upload default server core" }); } } + var addedOptionsStr = ''; + addedOptions.sort(nameSort); + for (var i in addedOptions) { addedOptionsStr += ''; } var x = "Select an operation to perform on all selected devices. Actions will be performed only with proper rights." + '

'; - x += addHtmlValue("Operation", ''); + x += addHtmlValue("Operation", ''); setDialogMode(2, "Group Action", 3, groupActionFunctionEx, x); }