diff --git a/package-lock.json b/package-lock.json index 275e6fd..173c596 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "ucentral-client", - "version": "2.5.37", + "version": "2.5.38", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "ucentral-client", - "version": "2.5.37", + "version": "2.5.38", "dependencies": { "@coreui/coreui": "^3.4.0", "@coreui/icons": "^2.0.1", diff --git a/package.json b/package.json index b95f883..82ab593 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ucentral-client", - "version": "2.5.37", + "version": "2.5.38", "dependencies": { "@coreui/coreui": "^3.4.0", "@coreui/icons": "^2.0.1", diff --git a/src/components/InterfaceStatistics/StatisticsChartList.js b/src/components/InterfaceStatistics/StatisticsChartList.js index f4badb8..3887527 100644 --- a/src/components/InterfaceStatistics/StatisticsChartList.js +++ b/src/components/InterfaceStatistics/StatisticsChartList.js @@ -147,14 +147,14 @@ const StatisticsChartList = ({ setOptions, section, setStart, setEnd, time }) => } else { totalTx += assoc.tx_bytes - prevTx ?? 0; totalRx += assoc.rx_bytes - prevRx ?? 0; - prevTx = assoc.tx_bytes; - prevRx = assoc.rx_bytes; } } } } - interfaceList[interfaceTypes[inter.name]][0].data.push(Math.floor(totalTx / 1024)); - interfaceList[interfaceTypes[inter.name]][1].data.push(Math.floor(totalRx / 1024)); + prevTx = Math.floor(totalTx / 1024); + prevRx = Math.floor(totalRx / 1024); + interfaceList[interfaceTypes[inter.name]][0].data.push(prevTx); + interfaceList[interfaceTypes[inter.name]][1].data.push(prevRx); } else { interfaceList[interfaceTypes[inter.name]][0].data.push( inter.counters ? Math.floor(inter.counters.tx_bytes) : 0,