commit
d81d5d4686
@ -30,7 +30,8 @@ For major (breaking) changes - version 3 and 2 see end of page.
|
|||||||
|
|
||||||
| Version | Date | Comment |
|
| Version | Date | Comment |
|
||||||
| -------------- | -------------- | -------- |
|
| -------------- | -------------- | -------- |
|
||||||
| 4.15.2 | 2019-11-10 | type definitions and docs update |
|
| 4.16.0 | 2019-11-27 | `networkGatewayDefault()` added |
|
||||||
|
| 4.15.3 | 2019-11-10 | type definitions and docs update |
|
||||||
| 4.15.2 | 2019-11-10 | `mem()` improved calculation linux |
|
| 4.15.2 | 2019-11-10 | `mem()` improved calculation linux |
|
||||||
| 4.15.1 | 2019-11-10 | `diskLayout()` added support for older lsblk versions (linux) |
|
| 4.15.1 | 2019-11-10 | `diskLayout()` added support for older lsblk versions (linux) |
|
||||||
| 4.15.0 | 2019-11-10 | `cpu()` added governor (linux) |
|
| 4.15.0 | 2019-11-10 | `cpu()` added governor (linux) |
|
||||||
|
|||||||
@ -277,7 +277,7 @@ I also created a nice little command line tool called [mmon][mmon-github-url] (
|
|||||||
| Function | Result object | Linux | BSD | Mac | Win | Sun | Comments |
|
| Function | Result object | Linux | BSD | Mac | Win | Sun | Comments |
|
||||||
| --------------- | ------------- | ----- | ------- | --- | --- | --- | -------- |
|
| --------------- | ------------- | ----- | ------- | --- | --- | --- | -------- |
|
||||||
| si.osInfo(cb) | {...} | X | X | X | X | X | OS information |
|
| si.osInfo(cb) | {...} | X | X | X | X | X | OS information |
|
||||||
| | platform | X | X | X | X | X | 'Linux', 'Darwin', 'Windows' |
|
| | platform | X | X | X | X | X | 'linux', 'darwin', 'win32', ... |
|
||||||
| | distro | X | X | X | X | X | |
|
| | distro | X | X | X | X | X | |
|
||||||
| | release | X | X | X | X | X | |
|
| | release | X | X | X | X | X | |
|
||||||
| | codename | | | X | | | |
|
| | codename | | | X | | | |
|
||||||
|
|||||||
@ -83,6 +83,11 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<th scope="row">4.16.0</th>
|
||||||
|
<td>2019-11-27</td>
|
||||||
|
<td><span class="code">networkGatewayDefault()</span> added</td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">4.15.3</th>
|
<th scope="row">4.15.3</th>
|
||||||
<td>2019-11-10</td>
|
<td>2019-11-10</td>
|
||||||
|
|||||||
@ -168,7 +168,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.15.3</span></div>
|
<div class="version">Current Version: <span id="version">4.16.0</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">
|
||||||
@ -191,7 +191,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">9,445</div>
|
<div class="numbers">9,471</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">
|
||||||
@ -199,7 +199,7 @@
|
|||||||
<div class="title">Downloads last month</div>
|
<div class="title">Downloads last month</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">
|
||||||
<div class="numbers">215</div>
|
<div class="numbers">216</div>
|
||||||
<div class="title">Dependends</div>
|
<div class="title">Dependends</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -83,7 +83,7 @@
|
|||||||
<td>X</td>
|
<td>X</td>
|
||||||
<td>X</td>
|
<td>X</td>
|
||||||
<td>X</td>
|
<td>X</td>
|
||||||
<td>'Linux', 'Darwin', 'Windows'</td>
|
<td>'linux', 'darwin', 'win32', ...</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td></td>
|
<td></td>
|
||||||
|
|||||||
@ -1336,16 +1336,33 @@ function networkGatewayDefault(callback) {
|
|||||||
}
|
}
|
||||||
if (_windows) {
|
if (_windows) {
|
||||||
try {
|
try {
|
||||||
util.powerShell('Get-CimInstance -ClassName Win32_IP4RouteTable | Where-Object { $_.Destination -eq \'0.0.0.0\' -and $_.Mask -eq \'0.0.0.0\' }).InterfaceIndex')
|
util.powerShell('Get-CimInstance -ClassName Win32_IP4RouteTable | Where-Object { $_.Destination -eq \'0.0.0.0\' -and $_.Mask -eq \'0.0.0.0\' }')
|
||||||
.then(data => {
|
.then(data => {
|
||||||
let lines = data.toString().split('\r\n');
|
let lines = data.toString().split('\r\n');
|
||||||
result = lines && lines[0] ? lines[0] : '';
|
if (lines.length > 1 && !result) {
|
||||||
|
result = util.getValue(lines, 'NextHop');
|
||||||
|
// result = lines && lines[0] ? lines[0] : '';
|
||||||
if (callback) {
|
if (callback) {
|
||||||
callback(result);
|
callback(result);
|
||||||
}
|
}
|
||||||
resolve(result);
|
resolve(result);
|
||||||
|
} else {
|
||||||
|
exec('ipconfig', util.execOptsWin, function (error, stdout) {
|
||||||
|
let lines = stdout.toString().split('\r\n');
|
||||||
|
lines.forEach(function (line) {
|
||||||
|
line = line.trim().replace(/\. /g, '');
|
||||||
|
line = line.trim().replace(/ +/g, '');
|
||||||
|
const parts = line.split(':');
|
||||||
|
if (parts[0].toLowerCase().startsWith('standardgate') && parts[1]) {
|
||||||
|
result = parts[1];
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
if (callback) { callback(result); }
|
||||||
|
resolve(result);
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
if (callback) { callback(result); }
|
if (callback) { callback(result); }
|
||||||
resolve(result);
|
resolve(result);
|
||||||
@ -1355,5 +1372,4 @@ function networkGatewayDefault(callback) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
exports.networkGatewayDefault = networkGatewayDefault;
|
exports.networkGatewayDefault = networkGatewayDefault;
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "systeminformation",
|
"name": "systeminformation",
|
||||||
"version": "4.15.3",
|
"version": "4.16.0",
|
||||||
"description": "Simple system and OS information library",
|
"description": "Simple system and OS information library",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"author": "Sebastian Hildebrandt <hildebrandt@plus-innovations.com> (https://plus-innovations.com)",
|
"author": "Sebastian Hildebrandt <hildebrandt@plus-innovations.com> (https://plus-innovations.com)",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user