diskLayout() tiny bug S.M.A.R.T status windows

This commit is contained in:
Sebastian Hildebrandt 2018-09-07 09:03:31 +02:00
parent 740c41b58a
commit d17c7d0358
2 changed files with 4 additions and 2 deletions

View File

@ -100,6 +100,8 @@ Other changes
| Version | Date | Comment |
| -------------- | -------------- | -------- |
| 3.45.5 | 2018-09-07 | `diskLayout()` tiny bug S.M.A.R.T status windows |
| 3.45.4 | 2018-09-06 | added icon to README.md |
| 3.45.3 | 2018-09-06 | `diskLayout()` optimized media type detection (HD, SSD) on Windows |
| 3.45.2 | 2018-09-05 | updated imags shields icons |
| 3.45.1 | 2018-09-05 | updated documentation |

View File

@ -838,7 +838,7 @@ function diskLayout(callback) {
devices.forEach(function (device) {
let lines = device.split('\r\n');
const size = util.getValue(lines, 'Size', '=').trim();
const status = util.getValue(lines, 'Status', '=').trim();
const status = util.getValue(lines, 'Status', '=').trim().toLowerCase();
if (size) {
result.push({
type: device.indexOf('SSD') > -1 ? 'SSD' : 'HD', // just a starting point ... better: MSFT_PhysicalDisk - Media Type ... see below
@ -855,7 +855,7 @@ function diskLayout(callback) {
firmwareRevision: util.getValue(lines, 'FirmwareRevision', '=').trim(),
serialNum: util.getValue(lines, 'SerialNumber', '=').trim(),
interfaceType: util.getValue(lines, 'InterfaceType', '=').trim(),
smartStatus: (status === 'Ok' ? 'Ok' : (status === 'Degraded' ? 'Degraded' : (status === 'Pred Fail' ? 'Predicted Failure' : 'Unknown')))
smartStatus: (status === 'ok' ? 'Ok' : (status === 'degraded' ? 'Degraded' : (status === 'pred fail' ? 'Predicted Failure' : 'Unknown')))
});
}
});