mirror of
https://github.com/optim-enterprises-bv/OptimCloud-gw-ui.git
synced 2025-11-02 19:27:45 +00:00
2.6.12: statistics fix for negative values
This commit is contained in:
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "ucentral-client",
|
"name": "ucentral-client",
|
||||||
"version": "2.6.11",
|
"version": "2.6.12",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "ucentral-client",
|
"name": "ucentral-client",
|
||||||
"version": "2.6.11",
|
"version": "2.6.12",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@coreui/coreui": "^3.4.0",
|
"@coreui/coreui": "^3.4.0",
|
||||||
"@coreui/icons": "^2.0.1",
|
"@coreui/icons": "^2.0.1",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "ucentral-client",
|
"name": "ucentral-client",
|
||||||
"version": "2.6.11",
|
"version": "2.6.12",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@coreui/coreui": "^3.4.0",
|
"@coreui/coreui": "^3.4.0",
|
||||||
"@coreui/icons": "^2.0.1",
|
"@coreui/icons": "^2.0.1",
|
||||||
|
|||||||
@@ -138,15 +138,15 @@ const StatisticsChartList = ({ setOptions, section, setStart, setEnd, time }) =>
|
|||||||
for (const assoc of ssid.associations) {
|
for (const assoc of ssid.associations) {
|
||||||
if (version === 0) {
|
if (version === 0) {
|
||||||
if (assoc.deltas) {
|
if (assoc.deltas) {
|
||||||
totalTx += assoc.deltas?.tx_bytes ?? 0;
|
totalTx += Math.max(0, assoc.deltas?.tx_bytes ?? 0);
|
||||||
totalRx += assoc.deltas?.rx_bytes ?? 0;
|
totalRx += Math.max(0, assoc.deltas?.rx_bytes ?? 0);
|
||||||
} else {
|
} else {
|
||||||
totalTx += assoc.tx_bytes ?? 0;
|
totalTx += Math.max(0, assoc.tx_bytes ?? 0);
|
||||||
totalRx += assoc.rx_bytes ?? 0;
|
totalRx += Math.max(0, assoc.rx_bytes ?? 0);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
totalTx += assoc.tx_bytes ?? 0;
|
totalTx += Math.max(0, assoc.tx_bytes ?? 0);
|
||||||
totalRx += assoc.rx_bytes ?? 0;
|
totalRx += Math.max(0, assoc.rx_bytes ?? 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -168,10 +168,10 @@ const StatisticsChartList = ({ setOptions, section, setStart, setEnd, time }) =>
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
interfaceList[interfaceTypes[inter.name]][0].data.push(
|
interfaceList[interfaceTypes[inter.name]][0].data.push(
|
||||||
inter.counters ? Math.floor(inter.counters.tx_bytes) : 0,
|
inter.counters ? Math.max(0, Math.floor(inter.counters.tx_bytes)) : 0,
|
||||||
);
|
);
|
||||||
interfaceList[interfaceTypes[inter.name]][1].data.push(
|
interfaceList[interfaceTypes[inter.name]][1].data.push(
|
||||||
inter.counters ? Math.floor(inter.counters.rx_bytes) : 0,
|
inter.counters ? Math.max(0, Math.floor(inter.counters.rx_bytes)) : 0,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user