diskLayout() fixed issue smartStatus (linux)

This commit is contained in:
Sebastian Hildebrandt 2022-03-20 20:08:14 +01:00
parent bd704b2907
commit 05bc81aaeb
4 changed files with 8 additions and 2 deletions

View File

@ -80,6 +80,7 @@ For major (breaking) changes - **version 4, 3 and 2** - see end of page.
| Version | Date | Comment |
| -------------- | -------------- | -------- |
| 5.11.9 | 2022-03-20 | `diskLayout()` fixed issue smartStatus (linux) |
| 5.11.8 | 2022-03-11 | `cpu()` improved socket detection by name (windows) |
| 5.11.7 | 2022-03-10 | `cpuTemperature()` fix NaN issue (windows) |
| 5.11.6 | 2022-03-01 | typescript typings fix `diskLayout()` |

View File

@ -57,6 +57,11 @@
</tr>
</thead>
<tbody>
<tr>
<th scope="row">5.11.9</th>
<td>2022-03-20</td>
<td><span class="code">diskLayout()</span> fixed issue smartStatus (linux)</td>
</tr>
<tr>
<th scope="row">5.11.8</th>
<td>2022-03-11</td>

View File

@ -170,7 +170,7 @@
<img class="logo" src="assets/logo.png">
<div class="title">systeminformation</div>
<div class="subtitle"><span id="typed"></span>&nbsp;</div>
<div class="version">New Version: <span id="version">5.11.8</span></div>
<div class="version">New Version: <span id="version">5.11.9</span></div>
<button class="btn btn-light" onclick="location.href='https://github.com/sebhildebrandt/systeminformation'">View on Github <i class=" fab fa-github"></i></button>
</div>
<div class="down">

View File

@ -1247,7 +1247,7 @@ function diskLayout(callback) {
const serialNum = smartData.serial_number;
let i = util.findObjectByKey(result, 'serialNum', serialNum);
if (i != -1) {
result[i].smartStatus = (smartData.smart_status.passed ? 'Ok' : (smartData.smart_status.passed === false ? 'Predicted Failure' : 'unknown'));
result[i].smartStatus = (smartData.smart_status && smartData.smart_status.passed ? 'Ok' : (smartData.smart_status && smartData.smart_status.passed === false ? 'Predicted Failure' : 'unknown'));
if (smartData.temperature && smartData.temperature.current) {
result[i].temperature = smartData.temperature.current;
}