File tree 2 files changed +7
-7
lines changed
2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -68,11 +68,11 @@ export default {
68
68
networks .push ({
69
69
name: network .interface_name ,
70
70
speed: network .speed ,
71
- online: network .is_up ? ' up' : ' down' ,
72
- currentDownload: network .rx ,
73
- currentUpload: network .tx ,
74
- totalDownload: network .cumulative_rx ,
75
- totalUpload: network .cumulative_tx ,
71
+ online: network .speed ? ' up' : ' down' , // v3 to v4 is_up no longer seems to be a default response field
72
+ currentDownload: network .bytes_recv ,
73
+ currentUpload: network .bytes_sent ,
74
+ totalDownload: network .bytes_recv_gauge ,
75
+ totalUpload: network .bytes_sent_gauge ,
76
76
changeDownload: this .previous && network .rx > this .previous [index].rx ,
77
77
changeUpload: this .previous && network .tx > this .previous [index].tx ,
78
78
});
Original file line number Diff line number Diff line change @@ -33,8 +33,8 @@ export default {
33
33
/* eslint-disable prefer-destructuring */
34
34
Object .keys (trafficData).forEach ((keyName ) => {
35
35
let upOrDown = null ;
36
- if (keyName .includes (' _tx ' )) upOrDown = ' up' ;
37
- else if (keyName .includes (' _rx ' )) upOrDown = ' down' ;
36
+ if (keyName .includes (' _sent ' )) upOrDown = ' up' ;
37
+ else if (keyName .includes (' _recv ' )) upOrDown = ' down' ;
38
38
trafficData[keyName].forEach ((dataPoint ) => {
39
39
const dataTime = this .getRoundedTime (dataPoint[0 ]);
40
40
if (upOrDown === ' up' ) {
You can’t perform that action at this time.
0 commit comments