Hello all. I have the following code:
cb = AdminDirectory.Chromeosdevices.get('my_customer', id)
freeSpace = 0
totalSpace = 0
for(var j=0; j < cb.diskVolumeReports[0].volumeInfo.length; j++){
freeSpace += parseInt(cb.diskVolumeReports[0].volumeInfo[j].storageFree)
totalSpace += parseInt(cb.diskVolumeReports[0].volumeInfo[j].storageTotal)
}
var usedSpace = totalSpace - freeSpace
hd = usedSpace / totalSpace
Debugging it, it appears to be working correctly with the data that is returned from the Get on the specific Chromebook. The problem is that the values do not match what I see in admin console. Is this a bug or possibly a permissions issue where I can't pull down ALL the available data?
Thanks,
-Aaron