networkStats() fixed comparison issue windows
This commit is contained in:
+3
-3
@@ -1019,7 +1019,7 @@ function networkStatsSingle(iface) {
|
||||
if (sections[i].trim() !== '') {
|
||||
let lines = sections[i].trim().split('\r\n');
|
||||
perfData.push({
|
||||
name: util.getValue(lines, 'Name', '=').replace(/[()\[\] ]+/g, '').toLowerCase(),
|
||||
name: util.getValue(lines, 'Name', '=').replace(/[()\[\] ]+/g, '').replace('#', '_').toLowerCase(),
|
||||
rx_bytes: parseInt(util.getValue(lines, 'BytesReceivedPersec', '='), 10),
|
||||
rx_errors: parseInt(util.getValue(lines, 'PacketsReceivedErrors', '='), 10),
|
||||
rx_dropped: parseInt(util.getValue(lines, 'PacketsReceivedDiscarded', '='), 10),
|
||||
@@ -1165,8 +1165,8 @@ function networkStatsSingle(iface) {
|
||||
det.mac.toLowerCase() === ifaceSanitized.toLowerCase() ||
|
||||
det.ip4.toLowerCase() === ifaceSanitized.toLowerCase() ||
|
||||
det.ip6.toLowerCase() === ifaceSanitized.toLowerCase() ||
|
||||
det.ifaceName.replace(/[()\[\] ]+/g, '').toLowerCase() === ifaceSanitized.replace(/[()\[\] ]+/g, '').toLowerCase()) &&
|
||||
(det.ifaceName.replace(/[()\[\] ]+/g, '').toLowerCase() === detail.name)) {
|
||||
det.ifaceName.replace(/[()\[\] ]+/g, '').replace('#', '_').toLowerCase() === ifaceSanitized.replace(/[()\[\] ]+/g, '').replace('#', '_').toLowerCase()) &&
|
||||
(det.ifaceName.replace(/[()\[\] ]+/g, '').replace('#', '_').toLowerCase() === detail.name)) {
|
||||
ifaceName = det.iface;
|
||||
rx_bytes = detail.rx_bytes;
|
||||
rx_dropped = detail.rx_dropped;
|
||||
|
||||
Reference in New Issue
Block a user