networkStats() bug fix windows
This commit is contained in:
+6
-1
@@ -665,7 +665,12 @@ function networkStatsSingle(iface) {
|
||||
tx_bytes = 0;
|
||||
perfData.forEach(detail => {
|
||||
interfaces.forEach(det => {
|
||||
if ((det.iface.toLowerCase() === iface.toLowerCase() || det.mac.toLowerCase() === iface.toLowerCase() || det.ip4.toLowerCase() === iface.toLowerCase() || det.ip6.toLowerCase() === iface.toLowerCase() || det.ifaceName.replace(/[()\[\] ]+/g, '').toLowerCase() === iface.replace(/[()\[\] ]+/g, '').toLowerCase()) && det.ifaceName.replace(/[()\[\] ]+/g, '').toLowerCase() === detail.name) {
|
||||
if ((det.iface.toLowerCase() === iface.toLowerCase() ||
|
||||
det.mac.toLowerCase() === iface.toLowerCase() ||
|
||||
det.ip4.toLowerCase() === iface.toLowerCase() ||
|
||||
det.ip6.toLowerCase() === iface.toLowerCase() ||
|
||||
(det.ifaceName.replace(/[()\[\] ]+/g, '').toLowerCase() === iface.replace(/[()\[\] ]+/g, '').toLowerCase()) &&
|
||||
det.ifaceName.replace(/[()\[\] ]+/g, '').toLowerCase() === detail.name)) {
|
||||
ifaceName = det.iface;
|
||||
rx_bytes = detail.rx_bytes;
|
||||
rx_dropped = detail.rx_dropped;
|
||||
|
||||
Reference in New Issue
Block a user