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