diskLayout() fix parsing linux (JSON)
This commit is contained in:
parent
ef55058b0c
commit
bc4b737e41
@ -80,6 +80,7 @@ For major (breaking) changes - **version 4, 3 and 2** - see end of page.
|
|||||||
|
|
||||||
| Version | Date | Comment |
|
| Version | Date | Comment |
|
||||||
| -------------- | -------------- | -------- |
|
| -------------- | -------------- | -------- |
|
||||||
|
| 5.11.18 | 2022-06-13 | `diskLayout()` fix parsing linux (JSON) |
|
||||||
| 5.11.17 | 2022-06-13 | `diskLayout()` fix parsing linux (JSON) |
|
| 5.11.17 | 2022-06-13 | `diskLayout()` fix parsing linux (JSON) |
|
||||||
| 5.11.16 | 2022-05-30 | `docs` updated, `tests` added node 18 |
|
| 5.11.16 | 2022-05-30 | `docs` updated, `tests` added node 18 |
|
||||||
| 5.11.15 | 2022-05-11 | `audio()` fix typescript typings |
|
| 5.11.15 | 2022-05-11 | `audio()` fix typescript typings |
|
||||||
|
|||||||
@ -57,6 +57,11 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<th scope="row">5.11.18</th>
|
||||||
|
<td>2022-06-13</td>
|
||||||
|
<td><span class="code">diskLayout()</span> fix parsing linux (JSON)</td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">5.11.17</th>
|
<th scope="row">5.11.17</th>
|
||||||
<td>2022-06-13</td>
|
<td>2022-06-13</td>
|
||||||
|
|||||||
@ -170,7 +170,7 @@
|
|||||||
<img class="logo" src="assets/logo.png">
|
<img class="logo" src="assets/logo.png">
|
||||||
<div class="title">systeminformation</div>
|
<div class="title">systeminformation</div>
|
||||||
<div class="subtitle"><span id="typed"></span> </div>
|
<div class="subtitle"><span id="typed"></span> </div>
|
||||||
<div class="version">New Version: <span id="version">5.11.17</span></div>
|
<div class="version">New Version: <span id="version">5.11.18</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>
|
<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>
|
||||||
<div class="down">
|
<div class="down">
|
||||||
|
|||||||
@ -852,7 +852,7 @@ function diskLayout(callback) {
|
|||||||
try {
|
try {
|
||||||
const outJSON = JSON.parse(out);
|
const outJSON = JSON.parse(out);
|
||||||
if (outJSON && {}.hasOwnProperty.call(outJSON, 'blockdevices')) {
|
if (outJSON && {}.hasOwnProperty.call(outJSON, 'blockdevices')) {
|
||||||
devices = outJSON.blockdevices.filter(item => { return (item.type === 'disk') && item.size > 0 && (item.model !== null || (item.mountpoint === null && item.label === null && item.fstype === null && item.parttype === null)); });
|
devices = outJSON.blockdevices.filter(item => { return (item.type === 'disk') && item.size > 0 && (item.model !== null || (item.mountpoint === null && item.label === null && item.fsType === null && item.parttype === null && item.name.indexOf('ram') !== 0)); });
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
// fallback to older version of lsblk
|
// fallback to older version of lsblk
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user