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:
parent
4637e6b3b3
commit
e5e86fee19
3 changed files with 55 additions and 27 deletions
16
meshagent.js
16
meshagent.js
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue