diskLayout() fix parsing linux (JSON)
This commit is contained in:
parent
f47f227295
commit
9e37404aec
@ -80,6 +80,7 @@ For major (breaking) changes - **version 4, 3 and 2** - see end of page.
|
||||
|
||||
| Version | Date | Comment |
|
||||
| -------------- | -------------- | -------- |
|
||||
| 5.11.20 | 2022-06-13 | `diskLayout()` fix parsing linux (JSON) |
|
||||
| 5.11.19 | 2022-06-13 | `diskLayout()` optimized parsing linux (JSON) |
|
||||
| 5.11.18 | 2022-06-13 | `diskLayout()` fix parsing linux (JSON) |
|
||||
| 5.11.17 | 2022-06-13 | `diskLayout()` fix parsing linux (JSON) |
|
||||
|
||||
@ -57,6 +57,11 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row">5.11.20</th>
|
||||
<td>2022-06-13</td>
|
||||
<td><span class="code">diskLayout()</span> fix parsing linux (JSON)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">5.11.19</th>
|
||||
<td>2022-06-13</td>
|
||||
@ -2689,4 +2694,4 @@
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
</html>
|
||||
|
||||
@ -170,7 +170,7 @@
|
||||
<img class="logo" src="assets/logo.png">
|
||||
<div class="title">systeminformation</div>
|
||||
<div class="subtitle"><span id="typed"></span> </div>
|
||||
<div class="version">New Version: <span id="version">5.11.19</span></div>
|
||||
<div class="version">New Version: <span id="version">5.11.20</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">
|
||||
@ -403,4 +403,4 @@
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
</html>
|
||||
|
||||
@ -852,7 +852,7 @@ function diskLayout(callback) {
|
||||
try {
|
||||
const outJSON = JSON.parse(out);
|
||||
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 && item.path && item.path.indexOf('/ram') !== 0 && item.path.indexOf('/loop') !== 0 && item['disc-max'] && item['disc-max'] !== 0)); });
|
||||
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.path && item.path.indexOf('/ram') !== 0 && item.path.indexOf('/loop') !== 0 && item['disc-max'] && item['disc-max'] !== 0)); });
|
||||
}
|
||||
} catch (e) {
|
||||
// fallback to older version of lsblk
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user