mirror of
https://github.com/optim-enterprises-bv/OptimCloud-gw-ui.git
synced 2025-11-03 03:37:45 +00:00
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "ucentral-client",
|
"name": "ucentral-client",
|
||||||
"version": "2.5.36",
|
"version": "2.5.39",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "ucentral-client",
|
"name": "ucentral-client",
|
||||||
"version": "2.5.36",
|
"version": "2.5.39",
|
||||||
"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.5.36",
|
"version": "2.5.39",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@coreui/coreui": "^3.4.0",
|
"@coreui/coreui": "^3.4.0",
|
||||||
"@coreui/icons": "^2.0.1",
|
"@coreui/icons": "^2.0.1",
|
||||||
|
|||||||
@@ -76,6 +76,16 @@ const StatisticsChartList = ({ setOptions, section, setStart, setEnd, time }) =>
|
|||||||
memoryUsed[2].data.push(Math.floor(log.data.unit.memory.cached / 1024 / 1024));
|
memoryUsed[2].data.push(Math.floor(log.data.unit.memory.cached / 1024 / 1024));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const newUsed = memoryUsed[0].data;
|
||||||
|
if (newUsed.length > 0) newUsed.shift();
|
||||||
|
memoryUsed[0].data = newUsed;
|
||||||
|
const newBuff = memoryUsed[1].data;
|
||||||
|
if (newBuff.length > 0) newBuff.shift();
|
||||||
|
memoryUsed[1].data = newBuff;
|
||||||
|
const newCached = memoryUsed[2].data;
|
||||||
|
if (newCached.length > 0) newCached.shift();
|
||||||
|
memoryUsed[2].data = newCached;
|
||||||
|
|
||||||
// This dictionary will have a key that is the interface name and a value of it's index in the final array
|
// This dictionary will have a key that is the interface name and a value of it's index in the final array
|
||||||
const interfaceTypes = {};
|
const interfaceTypes = {};
|
||||||
const interfaceList = [];
|
const interfaceList = [];
|
||||||
@@ -135,16 +145,23 @@ const StatisticsChartList = ({ setOptions, section, setStart, setEnd, time }) =>
|
|||||||
totalRx += assoc.rx_bytes ?? 0;
|
totalRx += assoc.rx_bytes ?? 0;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
totalTx += assoc.tx_bytes - prevTx ?? 0;
|
totalTx += assoc.tx_bytes ?? 0;
|
||||||
totalRx += assoc.rx_bytes - prevRx ?? 0;
|
totalRx += assoc.rx_bytes ?? 0;
|
||||||
prevTx = assoc.tx_bytes;
|
|
||||||
prevRx = assoc.rx_bytes;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (version > 0) {
|
||||||
|
const tx = Math.floor(totalTx / 1024);
|
||||||
|
const rx = Math.floor(totalRx / 1024);
|
||||||
|
interfaceList[interfaceTypes[inter.name]][0].data.push(tx - prevTx);
|
||||||
|
interfaceList[interfaceTypes[inter.name]][1].data.push(rx - prevRx);
|
||||||
|
prevTx = tx;
|
||||||
|
prevRx = rx;
|
||||||
|
} else {
|
||||||
interfaceList[interfaceTypes[inter.name]][0].data.push(Math.floor(totalTx / 1024));
|
interfaceList[interfaceTypes[inter.name]][0].data.push(Math.floor(totalTx / 1024));
|
||||||
interfaceList[interfaceTypes[inter.name]][1].data.push(Math.floor(totalRx / 1024));
|
interfaceList[interfaceTypes[inter.name]][1].data.push(Math.floor(totalRx / 1024));
|
||||||
|
}
|
||||||
} 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.floor(inter.counters.tx_bytes) : 0,
|
||||||
|
|||||||
@@ -31,7 +31,10 @@ const WifiScanResultModal = ({ show, toggle, scanResults, date }) => {
|
|||||||
scanList.forEach((device) => {
|
scanList.forEach((device) => {
|
||||||
if (device.channel === channelNumber) {
|
if (device.channel === channelNumber) {
|
||||||
const deviceToAdd = {};
|
const deviceToAdd = {};
|
||||||
deviceToAdd.SSID = device.ssid ?? 'N/A';
|
if (device.ssid && device.ssid.length > 0) deviceToAdd.SSID = device.ssid;
|
||||||
|
else {
|
||||||
|
deviceToAdd.SSID = device.meshid && device.meshid.length > 0 ? device.meshid : 'N/A';
|
||||||
|
}
|
||||||
deviceToAdd.Signal = (dbmNumber - device.signal) * -1;
|
deviceToAdd.Signal = (dbmNumber - device.signal) * -1;
|
||||||
channel.devices.push(deviceToAdd);
|
channel.devices.push(deviceToAdd);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user