1
0
Fork 0
mirror of https://github.com/Ylianst/MeshCentral.git synced 2025-03-09 15:40:18 +00:00

BitLocker fixes, added drive volumes to details tab.

This commit is contained in:
Ylian Saint-Hilaire 2024-02-17 14:01:49 -08:00
parent 4637e6b3b3
commit e5e86fee19
3 changed files with 55 additions and 27 deletions

View file

@ -1941,9 +1941,19 @@ module.exports.CreateMeshAgent = function (parent, db, ws, req, args, domain) {
}
// Volumes and BitLocker
if(command.volumes != null){
if(!device.volumes) { device.volumes = {}; }
if (JSON.stringify(device.volumes) != JSON.stringify(command.volumes)) { /*changes.push('Volumes status');*/ device.volumes = command.volumes; change = 1; log = 1; }
if (command.volumes != null) {
for (var i in command.volumes) {
// Fix the incoming data and cut down how much data we use
const v = command.volumes[i];
if (typeof v.size == 'string') { v.size = parseInt(v.size); }
if (v.recoveryPassword == '') { delete v.recoveryPassword; }
if (v.identifier == '') { delete v.identifier; }
if (v.name == '') { delete v.name; }
if (v.removable != true) { delete v.removable; }
if (v.protectionStatus == 'On') { v.protectionStatus = true; } else { delete v.protectionStatus; }
if (v.volumeStatus == "FullyDecrypted") { delete v.volumeStatus; }
}
if (JSON.stringify(device.volumes) != JSON.stringify(command.volumes)) { device.volumes = command.volumes; change = 1; }
}
// If there are changes, event the new device