networkStats() fixed issue blocking windows
This commit is contained in:
parent
dc62e51750
commit
fd5b435f8d
@ -30,6 +30,7 @@ For major (breaking) changes - version 3 and 2 see end of page.
|
|||||||
|
|
||||||
| Version | Date | Comment |
|
| Version | Date | Comment |
|
||||||
| -------------- | -------------- | -------- |
|
| -------------- | -------------- | -------- |
|
||||||
|
| 4.26.10 | 2020-07-16 | `networkStats()` fixed issue blocking windows |
|
||||||
| 4.26.9 | 2020-06-06 | `networkStats()` fixed comparison issue windows |
|
| 4.26.9 | 2020-06-06 | `networkStats()` fixed comparison issue windows |
|
||||||
| 4.26.8 | 2020-06-06 | `networkInterfaces()` fixed caching issue |
|
| 4.26.8 | 2020-06-06 | `networkInterfaces()` fixed caching issue |
|
||||||
| 4.26.7 | 2020-06-06 | `cpuTemperature()` fixed raspberry pi sensors issue |
|
| 4.26.7 | 2020-06-06 | `cpuTemperature()` fixed raspberry pi sensors issue |
|
||||||
|
|||||||
@ -83,6 +83,11 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<th scope="row">4.26.10</th>
|
||||||
|
<td>2020-07-16</td>
|
||||||
|
<td><span class="code">networkStats()</span> fixed issue blocking windows</td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">4.26.9</th>
|
<th scope="row">4.26.9</th>
|
||||||
<td>2020-06-06</td>
|
<td>2020-06-06</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.26.9</span></div>
|
<div class="version">Current Version: <span id="version">4.26.10</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">
|
||||||
@ -207,7 +207,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">283</div>
|
<div class="numbers">304</div>
|
||||||
<div class="title">Dependends</div>
|
<div class="title">Dependends</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -31,7 +31,7 @@ const _sunos = (_platform === 'sunos');
|
|||||||
|
|
||||||
let _network = {};
|
let _network = {};
|
||||||
let _default_iface = '';
|
let _default_iface = '';
|
||||||
let _ifaces = [];
|
let _ifaces = {};
|
||||||
let _dhcpNics = [];
|
let _dhcpNics = [];
|
||||||
let _networkInterfaces = [];
|
let _networkInterfaces = [];
|
||||||
let _mac = {};
|
let _mac = {};
|
||||||
@ -686,24 +686,7 @@ function networkInterfaces(callback, rescan = true) {
|
|||||||
return new Promise((resolve) => {
|
return new Promise((resolve) => {
|
||||||
process.nextTick(() => {
|
process.nextTick(() => {
|
||||||
let ifaces = os.networkInterfaces();
|
let ifaces = os.networkInterfaces();
|
||||||
if (_windows) {
|
|
||||||
getWindowsNics().forEach(nic => {
|
|
||||||
let found = false;
|
|
||||||
Object.keys(ifaces).forEach(key => {
|
|
||||||
if (!found) {
|
|
||||||
ifaces[key].forEach(value => {
|
|
||||||
if (Object.keys(value).indexOf('mac') >= 0) {
|
|
||||||
found = value['mac'] === nic.mac;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
if (!found) {
|
|
||||||
ifaces[nic.name] = [{ mac: nic.mac }];
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
let result = [];
|
let result = [];
|
||||||
let nics = [];
|
let nics = [];
|
||||||
let dnsSuffixes = [];
|
let dnsSuffixes = [];
|
||||||
@ -748,6 +731,7 @@ function networkInterfaces(callback, rescan = true) {
|
|||||||
carrierChanges: 0
|
carrierChanges: 0
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
_networkInterfaces = result;
|
||||||
if (callback) { callback(result); }
|
if (callback) { callback(result); }
|
||||||
resolve(result);
|
resolve(result);
|
||||||
} else {
|
} else {
|
||||||
@ -758,8 +742,26 @@ function networkInterfaces(callback, rescan = true) {
|
|||||||
if (callback) { callback(result); }
|
if (callback) { callback(result); }
|
||||||
resolve(result);
|
resolve(result);
|
||||||
} else {
|
} else {
|
||||||
_ifaces = ifaces;
|
_ifaces = Object.assign({}, ifaces);
|
||||||
|
|
||||||
if (_windows) {
|
if (_windows) {
|
||||||
|
getWindowsNics().forEach(nic => {
|
||||||
|
let found = false;
|
||||||
|
Object.keys(ifaces).forEach(key => {
|
||||||
|
if (!found) {
|
||||||
|
ifaces[key].forEach(value => {
|
||||||
|
if (Object.keys(value).indexOf('mac') >= 0) {
|
||||||
|
found = value['mac'] === nic.mac;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
if (!found) {
|
||||||
|
ifaces[nic.name] = [{ mac: nic.mac }];
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
nics8021xInfo = getWindowsWiredProfilesInformation();
|
nics8021xInfo = getWindowsWiredProfilesInformation();
|
||||||
nics = getWindowsNics();
|
nics = getWindowsNics();
|
||||||
dnsSuffixes = getWindowsDNSsuffixes();
|
dnsSuffixes = getWindowsDNSsuffixes();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user