memLayout() fix macos mojave
This commit is contained in:
parent
48806718af
commit
8fd8915d58
@ -30,6 +30,7 @@ For major (breaking) changes - version 3 and 2 see end of page.
|
|||||||
|
|
||||||
| Version | Date | Comment |
|
| Version | Date | Comment |
|
||||||
| -------------- | -------------- | -------- |
|
| -------------- | -------------- | -------- |
|
||||||
|
| 4.7.1 | 2019-05-29 | `memLayout()` fix macos mojave |
|
||||||
| 4.7.0 | 2019-05-29 | partial netBSD support |
|
| 4.7.0 | 2019-05-29 | partial netBSD support |
|
||||||
| 4.6.1 | 2019-05-29 | get wmic path - fic windows |
|
| 4.6.1 | 2019-05-29 | get wmic path - fic windows |
|
||||||
| 4.6.0 | 2019-05-27 | added `dockerInfo()` |
|
| 4.6.0 | 2019-05-27 | added `dockerInfo()` |
|
||||||
|
|||||||
@ -80,6 +80,11 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<th scope="row">4.7.1</th>
|
||||||
|
<td>2019-05-29</td>
|
||||||
|
<td><span class="code">memLayout()</span> fix macos mojave</td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">4.7.0</th>
|
<th scope="row">4.7.0</th>
|
||||||
<td>2019-05-29</td>
|
<td>2019-05-29</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">Current Version: <span id="version">4.7.0</span></div>
|
<div class="version">Current Version: <span id="version">4.7.1</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">
|
||||||
@ -193,7 +193,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="row number-section">
|
<div class="row number-section">
|
||||||
<div class="col-xl-4 col-lg-4 col-md-4 col-12">
|
<div class="col-xl-4 col-lg-4 col-md-4 col-12">
|
||||||
<div class="numbers">8,512</div>
|
<div class="numbers">8,536</div>
|
||||||
<div class="title">Lines of code</div>
|
<div class="title">Lines of code</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xl-4 col-lg-4 col-md-4 col-12">
|
<div class="col-xl-4 col-lg-4 col-md-4 col-12">
|
||||||
|
|||||||
@ -307,10 +307,15 @@ function memLayout(callback) {
|
|||||||
exec('system_profiler SPMemoryDataType', function (error, stdout) {
|
exec('system_profiler SPMemoryDataType', function (error, stdout) {
|
||||||
if (!error) {
|
if (!error) {
|
||||||
let devices = stdout.toString().split(' BANK ');
|
let devices = stdout.toString().split(' BANK ');
|
||||||
|
let hasBank = true;
|
||||||
|
if (devices.length === 1) {
|
||||||
|
devices = stdout.toString().split(' DIMM');
|
||||||
|
hasBank = false;
|
||||||
|
}
|
||||||
devices.shift();
|
devices.shift();
|
||||||
devices.forEach(function (device) {
|
devices.forEach(function (device) {
|
||||||
let lines = device.split('\n');
|
let lines = device.split('\n');
|
||||||
const bank = 'BANK ' + lines[0].trim();
|
const bank = (hasBank ? 'BANK ' : 'DIMM') + lines[0].trim();
|
||||||
const size = parseInt(util.getValue(lines, ' Size'));
|
const size = parseInt(util.getValue(lines, ' Size'));
|
||||||
if (size) {
|
if (size) {
|
||||||
result.push({
|
result.push({
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user