2.5.38: fix for v1 interface stats

This commit is contained in:
Charles
2022-02-07 15:53:02 +00:00
parent 8542ded488
commit 54f5912da6
3 changed files with 7 additions and 7 deletions

4
package-lock.json generated
View File

@@ -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",

View File

@@ -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",

View File

@@ -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,