Devices select all button will no longer select devices in collapsed groups.
Ylian Saint-Hilaire committed
Jul 29, 2022 at 11:12 UTC
4dea7e435c84e251473df9002bd58485546e37c5
2 files changed
+4
-2
meshuser.js
+1
-1
@@ -4966,7 +4966,7 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use
4966
if ((mesh == null) || (mesh.mtype != 1) || (parent.GetMeshRights(user, command.meshid) & MESHRIGHT_EDITMESH) == 0) return null; // This user must have mesh rights to edit the device group
4967
var amtDevices = [];
4968
4969
- // Decode a JSON file from the Intel EMA migration tool
4969
+ // Decode a JSON file from the Intel SCS migration tool
4970
if ((typeof command.amtdevices == 'object') && (typeof command.amtdevices.ApplicationData == 'object') && (command.amtdevices.ApplicationData.Application == 'Intel EMA Migration Tool') && (Array.isArray(command.amtdevices['Managed Systems']))) {
4971
for (var i in command.amtdevices['Managed Systems']) {
4972
const importDev = command.amtdevices['Managed Systems'][i];
views/default.handlebars
+3
-1
@@ -5413,8 +5413,10 @@
5413
for (var i = 0; i < elements.length; i++) { elements[i].checked = (checkcount == 0); }
5414
checkedNodeids = {};
5415
if (checkcount == 0) {
5416
+ checkedNodeids = {};
5417
var devdivs = document.getElementsByName('xxdevice' + Q('viewselect').value);
5417
- for (var i = 0; i < devdivs.length; i++) { checkedNodeids[devdivs[i].id.substring(3)] = 1; }
5418
+ // Checking that the parent style is null will insure that "select all" does not select any devices in collapsed groups
5419
+ for (var i = 0; i < devdivs.length; i++) { if ((devdivs[i].parentElement.attributes.style == null) || (devdivs[i].parentElement.attributes.style.value.indexOf('display') < 0)) { checkedNodeids[devdivs[i].id.substring(3)] = 1; } }
5420
}
5421
p1updateInfo();
5422
}