mirror of
https://github.com/optim-enterprises-bv/OptimCloud-gw-ui.git
synced 2025-10-29 17:32:20 +00:00
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "ucentral-client",
|
||||
"version": "2.6.27",
|
||||
"version": "2.6.29",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "ucentral-client",
|
||||
"version": "2.6.27",
|
||||
"version": "2.6.29",
|
||||
"dependencies": {
|
||||
"@coreui/coreui": "^3.4.0",
|
||||
"@coreui/icons": "^2.0.1",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "ucentral-client",
|
||||
"version": "2.6.27",
|
||||
"version": "2.6.29",
|
||||
"dependencies": {
|
||||
"@coreui/coreui": "^3.4.0",
|
||||
"@coreui/icons": "^2.0.1",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import React, { useEffect, useState } from 'react';
|
||||
import React, { useEffect, useMemo, useState } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import PropTypes from 'prop-types';
|
||||
import Select from 'react-select';
|
||||
@@ -55,6 +55,17 @@ const TelemetryModal = ({ show, toggle }) => {
|
||||
}
|
||||
};
|
||||
|
||||
const msgToDisplay = useMemo(() => {
|
||||
const display = {};
|
||||
if (lastMessage) {
|
||||
for (const type of types) {
|
||||
display[type.value] = lastMessage[type.value];
|
||||
}
|
||||
}
|
||||
|
||||
return display;
|
||||
}, [lastMessage, types]);
|
||||
|
||||
const getUrl = () => {
|
||||
setLastUpdate('');
|
||||
setLastMessage({});
|
||||
@@ -82,14 +93,13 @@ const TelemetryModal = ({ show, toggle }) => {
|
||||
.then((response) => {
|
||||
if (chosenMethod === 'true') {
|
||||
addToast({
|
||||
title: t('common.success'),
|
||||
body: t('commands.command_success'),
|
||||
color: 'success',
|
||||
autohide: true,
|
||||
});
|
||||
title: t('common.success'),
|
||||
body: t('commands.command_success'),
|
||||
color: 'success',
|
||||
autohide: true,
|
||||
});
|
||||
toggle();
|
||||
}
|
||||
else if (response.data.uri && response.data.uri !== '') {
|
||||
} else if (response.data.uri && response.data.uri !== '') {
|
||||
setReceivedMessages(0);
|
||||
setSocket(new WebSocket(response.data.uri));
|
||||
}
|
||||
@@ -259,7 +269,7 @@ const TelemetryModal = ({ show, toggle }) => {
|
||||
</CRow>
|
||||
<CRow>
|
||||
<CCol>
|
||||
<pre>{JSON.stringify(lastMessage, null, 2)}</pre>
|
||||
<pre>{JSON.stringify(msgToDisplay, null, 2)}</pre>
|
||||
</CCol>
|
||||
</CRow>
|
||||
<CRow>
|
||||
|
||||
@@ -82,7 +82,7 @@ const WifiScanModal = ({ show, toggleModal }) => {
|
||||
setActiveScan(false);
|
||||
setHideOptions(false);
|
||||
setErrorCode(0);
|
||||
setIes(undefined);
|
||||
setIes([]);
|
||||
}, [show]);
|
||||
|
||||
const parseThroughList = (scanList) => {
|
||||
@@ -164,7 +164,7 @@ const WifiScanModal = ({ show, toggleModal }) => {
|
||||
override_dfs: dfs,
|
||||
bandwidth: bandwidth !== '' ? bandwidth : undefined,
|
||||
activeScan,
|
||||
ies: ies.length > 0 ? ies.map(({ value }) => value) : undefined,
|
||||
ies: ies?.length > 0 ? ies.map(({ value }) => value) : undefined,
|
||||
};
|
||||
const headers = {
|
||||
Accept: 'application/json',
|
||||
|
||||
Reference in New Issue
Block a user