Skip to content

Commit

Permalink
graphics() fixed parsing (mac OS)
Browse files Browse the repository at this point in the history
  • Loading branch information
sebhildebrandt committed Jun 22, 2023
1 parent 6268cb7 commit f37d14b
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ For major (breaking) changes - **version 4, 3 and 2** - see end of page.

| Version | Date | Comment |
| ------- | ---------- | --------------------------------------------------------------------------------------------------- |
| 5.18.4 | 2023-06-22 | `graphics()` fixed parsing (mac OS) |
| 5.18.3 | 2023-06-09 | `tests` improved key handling, updated docs |
| 5.18.2 | 2023-06-08 | `fsSize()` improved error handling (linux alpine) |
| 5.18.1 | 2023-06-07 | `networkInterfaces()` cleaned up testVirtualNic |
Expand Down
5 changes: 5 additions & 0 deletions docs/history.html
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ <h3>Full version history</h3>
</tr>
</thead>
<tbody>
<tr>
<th scope="row">5.18.4</th>
<td>2023-06-22</td>
<td><span class="code">graphics()</span> fixed parsing (mac OS)</td>
</tr>
<tr>
<th scope="row">5.18.3</th>
<td>2023-06-09</td>
Expand Down
2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@
<img class="logo" src="assets/logo.png" alt="logo">
<div class="title">systeminformation</div>
<div class="subtitle"><span id="typed"></span>&nbsp;</div>
<div class="version">New Version: <span id="version">5.18.3</span></div>
<div class="version">New Version: <span id="version">5.18.4</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">
Expand Down
4 changes: 2 additions & 2 deletions lib/docker.js
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@ function dockerContainerStats(containerIDs, callback) {
containerArray = [];
dockerContainers().then(allContainers => {
for (let container of allContainers) {
containerArray.push(container.id);
containerArray.push(container.id.substring(0, 12));
}
if (containerArray.length) {
dockerContainerStats(containerArray.join(',')).then(result => {
Expand Down Expand Up @@ -555,8 +555,8 @@ function dockerContainerStatsSingle(containerID) {
_docker_socket.getStats(containerID, data => {
try {
let stats = data;

if (!stats.message) {
if (data.id) { result.id = data.id; }
result.memUsage = (stats.memory_stats && stats.memory_stats.usage ? stats.memory_stats.usage : 0);
result.memLimit = (stats.memory_stats && stats.memory_stats.limit ? stats.memory_stats.limit : 0);
result.memPercent = (stats.memory_stats && stats.memory_stats.usage && stats.memory_stats.limit ? stats.memory_stats.usage / stats.memory_stats.limit * 100.0 : 0);
Expand Down

0 comments on commit f37d14b

Please sign in to comment.