mirror of
https://github.com/Telecominfraproject/wlan-cloud-ucentralgw-ui.git
synced 2025-10-29 18:02:31 +00:00
Compare commits
18 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2c62c7bc92 | ||
|
|
2befa3ce6f | ||
|
|
5a39deaa37 | ||
|
|
85b92f46f5 | ||
|
|
abb8b2ba0f | ||
|
|
a22f33dade | ||
|
|
237b8b5ede | ||
|
|
438d008c34 | ||
|
|
1990498f86 | ||
|
|
dc035572f0 | ||
|
|
9cd216bbba | ||
|
|
e032ff4485 | ||
|
|
fbe9ca5dd9 | ||
|
|
4533bb6dd7 | ||
|
|
3320c03603 | ||
|
|
5101e41565 | ||
|
|
bc12b598ce | ||
|
|
a34f679c43 |
@@ -8,7 +8,7 @@ fullnameOverride: ""
|
||||
images:
|
||||
owgwui:
|
||||
repository: tip-tip-wlan-cloud-ucentral.jfrog.io/owgw-ui
|
||||
tag: main
|
||||
tag: v2.6.0
|
||||
pullPolicy: Always
|
||||
|
||||
services:
|
||||
|
||||
34
package-lock.json
generated
34
package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "ucentral-client",
|
||||
"version": "2.7.0",
|
||||
"version": "2.6.29",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "ucentral-client",
|
||||
"version": "2.7.0",
|
||||
"version": "2.6.29",
|
||||
"dependencies": {
|
||||
"@coreui/coreui": "^3.4.0",
|
||||
"@coreui/icons": "^2.0.1",
|
||||
@@ -35,7 +35,7 @@
|
||||
"react-tooltip": "^4.2.21",
|
||||
"react-widgets": "^5.1.1",
|
||||
"sass": "^1.35.1",
|
||||
"ucentral-libs": "^1.0.60",
|
||||
"ucentral-libs": "^1.0.61",
|
||||
"uuid": "^8.3.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
@@ -11795,9 +11795,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/semver-regex": {
|
||||
"version": "3.1.3",
|
||||
"resolved": "https://registry.npmjs.org/semver-regex/-/semver-regex-3.1.3.tgz",
|
||||
"integrity": "sha512-Aqi54Mk9uYTjVexLnR67rTyBusmwd04cLkHy9hNvk3+G3nT2Oyg7E0l4XVbOaNwIvQ3hHeYxGcyEy+mKreyBFQ==",
|
||||
"version": "3.1.4",
|
||||
"resolved": "https://registry.npmjs.org/semver-regex/-/semver-regex-3.1.4.tgz",
|
||||
"integrity": "sha512-6IiqeZNgq01qGf0TId0t3NvKzSvUsjcpdEO3AQNeIjR6A2+ckTnQlDpl4qu1bjRv0RzN3FP9hzFmws3lKqRWkA==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
@@ -13420,9 +13420,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/ucentral-libs": {
|
||||
"version": "1.0.60",
|
||||
"resolved": "https://registry.npmjs.org/ucentral-libs/-/ucentral-libs-1.0.60.tgz",
|
||||
"integrity": "sha512-PRw2QTcbnHdrA8rPQhREI1FOKyuZUt48H3KcSGQgHpik2Ni+0una7jRfMFXwOU9yHzxQAlYG0EWLrzBnrKRvGA==",
|
||||
"version": "1.0.61",
|
||||
"resolved": "https://registry.npmjs.org/ucentral-libs/-/ucentral-libs-1.0.61.tgz",
|
||||
"integrity": "sha512-RMUFLC6PMeh4S1MSkDXYjpQfh4yWeZX5Rm5FTRNbfYfaLKuL8CbRZjnuGPFrgABGQRWk5TITxXQASYBpmOq1dQ==",
|
||||
"dependencies": {
|
||||
"@coreui/coreui": "^3.4.0",
|
||||
"@coreui/icons": "^2.0.1",
|
||||
@@ -14269,7 +14269,7 @@
|
||||
"node_modules/webpack-dev-server/node_modules/glob-parent": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz",
|
||||
"integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=",
|
||||
"integrity": "sha512-E8Ak/2+dZY6fnzlR7+ueWvhsH1SjHr4jjss4YS/h4py44jY9MhK/VFdaZJAWDz6BbL21KeteKxFSFpq8OS5gVA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"is-glob": "^3.1.0",
|
||||
@@ -23690,9 +23690,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"semver-regex": {
|
||||
"version": "3.1.3",
|
||||
"resolved": "https://registry.npmjs.org/semver-regex/-/semver-regex-3.1.3.tgz",
|
||||
"integrity": "sha512-Aqi54Mk9uYTjVexLnR67rTyBusmwd04cLkHy9hNvk3+G3nT2Oyg7E0l4XVbOaNwIvQ3hHeYxGcyEy+mKreyBFQ==",
|
||||
"version": "3.1.4",
|
||||
"resolved": "https://registry.npmjs.org/semver-regex/-/semver-regex-3.1.4.tgz",
|
||||
"integrity": "sha512-6IiqeZNgq01qGf0TId0t3NvKzSvUsjcpdEO3AQNeIjR6A2+ckTnQlDpl4qu1bjRv0RzN3FP9hzFmws3lKqRWkA==",
|
||||
"dev": true
|
||||
},
|
||||
"send": {
|
||||
@@ -24975,9 +24975,9 @@
|
||||
}
|
||||
},
|
||||
"ucentral-libs": {
|
||||
"version": "1.0.60",
|
||||
"resolved": "https://registry.npmjs.org/ucentral-libs/-/ucentral-libs-1.0.60.tgz",
|
||||
"integrity": "sha512-PRw2QTcbnHdrA8rPQhREI1FOKyuZUt48H3KcSGQgHpik2Ni+0una7jRfMFXwOU9yHzxQAlYG0EWLrzBnrKRvGA==",
|
||||
"version": "1.0.61",
|
||||
"resolved": "https://registry.npmjs.org/ucentral-libs/-/ucentral-libs-1.0.61.tgz",
|
||||
"integrity": "sha512-RMUFLC6PMeh4S1MSkDXYjpQfh4yWeZX5Rm5FTRNbfYfaLKuL8CbRZjnuGPFrgABGQRWk5TITxXQASYBpmOq1dQ==",
|
||||
"requires": {
|
||||
"@coreui/coreui": "^3.4.0",
|
||||
"@coreui/icons": "^2.0.1",
|
||||
@@ -25660,7 +25660,7 @@
|
||||
"glob-parent": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz",
|
||||
"integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=",
|
||||
"integrity": "sha512-E8Ak/2+dZY6fnzlR7+ueWvhsH1SjHr4jjss4YS/h4py44jY9MhK/VFdaZJAWDz6BbL21KeteKxFSFpq8OS5gVA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"is-glob": "^3.1.0",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "ucentral-client",
|
||||
"version": "2.7.0",
|
||||
"version": "2.6.29",
|
||||
"dependencies": {
|
||||
"@coreui/coreui": "^3.4.0",
|
||||
"@coreui/icons": "^2.0.1",
|
||||
@@ -29,7 +29,7 @@
|
||||
"react-tooltip": "^4.2.21",
|
||||
"react-widgets": "^5.1.1",
|
||||
"sass": "^1.35.1",
|
||||
"ucentral-libs": "^1.0.60",
|
||||
"ucentral-libs": "^1.0.61",
|
||||
"uuid": "^8.3.2"
|
||||
},
|
||||
"main": "index.js",
|
||||
|
||||
@@ -720,6 +720,8 @@
|
||||
"connection_failed": "Verbindung konnte nicht hergestellt werden. Fehler: {{error}}",
|
||||
"interval": "Intervall",
|
||||
"last_update": "Letztes Update",
|
||||
"lifetime": "Dauer",
|
||||
"outputmode": "Ausgabemodus",
|
||||
"types": "Typen"
|
||||
},
|
||||
"trace": {
|
||||
@@ -814,6 +816,7 @@
|
||||
"radios": "Radios",
|
||||
"scan_warning": "Ihr 5G-Funkgerät befindet sich auf einem Radarkanal, Sie müssen „Override DFS“ aktivieren, um das Scannen aller 5G-Kanäle zu ermöglichen",
|
||||
"title": "WLAN-Analyse",
|
||||
"vendor": "Verkäufer"
|
||||
"vendor": "Verkäufer",
|
||||
"waiting_for_data": "Warten auf Empfang von Gerätedaten. Bitte schauen Sie später noch einmal nach"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -720,6 +720,8 @@
|
||||
"connection_failed": "Failed to create connection. Error: {{error}}",
|
||||
"interval": "Interval",
|
||||
"last_update": "Last Update",
|
||||
"lifetime": "Duration",
|
||||
"outputmode": "Output Mode",
|
||||
"types": "Types"
|
||||
},
|
||||
"trace": {
|
||||
@@ -814,6 +816,7 @@
|
||||
"radios": "Radios",
|
||||
"scan_warning": "Your 5G radio is on a radar channel, you must enable “Override DFS” to allow scanning of all 5G channels",
|
||||
"title": "Wi-Fi Analysis",
|
||||
"vendor": "Vendor"
|
||||
"vendor": "Vendor",
|
||||
"waiting_for_data": "Waiting to receive device data. Please check again later"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -720,6 +720,8 @@
|
||||
"connection_failed": "No se pudo crear la conexión. Error: {{error}}",
|
||||
"interval": "intervalo",
|
||||
"last_update": "Última actualización",
|
||||
"lifetime": "Duración",
|
||||
"outputmode": "Modo salida",
|
||||
"types": "Los tipos"
|
||||
},
|
||||
"trace": {
|
||||
@@ -814,6 +816,7 @@
|
||||
"radios": "Radios",
|
||||
"scan_warning": "Su radio 5G está en un canal de radar, debe habilitar \"Anular DFS\" para permitir el escaneo de todos los canales 5G",
|
||||
"title": "Análisis de Wi-Fi",
|
||||
"vendor": "Vendedor"
|
||||
"vendor": "Vendedor",
|
||||
"waiting_for_data": "Esperando recibir datos del dispositivo. Vuelva a consultar más tarde"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -720,6 +720,8 @@
|
||||
"connection_failed": "Échec de la création de la connexion. Erreur : {{error}}",
|
||||
"interval": "Intervalle",
|
||||
"last_update": "Dernière mise à jour",
|
||||
"lifetime": "Durée",
|
||||
"outputmode": "Mode de sortie",
|
||||
"types": "Les types"
|
||||
},
|
||||
"trace": {
|
||||
@@ -814,6 +816,7 @@
|
||||
"radios": "Radios",
|
||||
"scan_warning": "Votre radio 5G est sur un canal radar, vous devez activer \"Override DFS\" pour permettre le balayage de tous les canaux 5G",
|
||||
"title": "Analyse Wi-Fi",
|
||||
"vendor": "vendeur"
|
||||
"vendor": "vendeur",
|
||||
"waiting_for_data": "En attente de réception des données de l'appareil. Veuillez revérifier plus tard"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -720,6 +720,8 @@
|
||||
"connection_failed": "Falha ao criar conexão. Erro: {{error}}",
|
||||
"interval": "intervalo",
|
||||
"last_update": "Última atualização",
|
||||
"lifetime": "Duração",
|
||||
"outputmode": "Modo saída",
|
||||
"types": "Tipos"
|
||||
},
|
||||
"trace": {
|
||||
@@ -814,6 +816,7 @@
|
||||
"radios": "Rádios",
|
||||
"scan_warning": "Seu rádio 5G está em um canal de radar, você deve habilitar “Override DFS” para permitir a varredura de todos os canais 5G",
|
||||
"title": "Análise de Wi-Fi",
|
||||
"vendor": "fornecedor"
|
||||
"vendor": "fornecedor",
|
||||
"waiting_for_data": "Aguardando para receber dados do dispositivo. Verifique novamente mais tarde"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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';
|
||||
@@ -12,6 +12,9 @@ import {
|
||||
CRow,
|
||||
CCol,
|
||||
CInput,
|
||||
CFormGroup,
|
||||
CInputRadio,
|
||||
CLabel,
|
||||
CSpinner,
|
||||
CAlert,
|
||||
} from '@coreui/react';
|
||||
@@ -36,11 +39,14 @@ const TelemetryModal = ({ show, toggle }) => {
|
||||
const [lastMessage, setLastMessage] = useState({});
|
||||
const [receivedMessages, setReceivedMessages] = useState(0);
|
||||
const [types, setTypes] = useState([]);
|
||||
const [chosenMethod, setChosenMethod] = useState('false');
|
||||
const [lifetime, setLifetime] = useState(5);
|
||||
const [interval, setInterval] = useState(3);
|
||||
const [loading, setLoading] = useState(false);
|
||||
const [lastUpdate, setLastUpdate] = useState('');
|
||||
|
||||
const onIntervalChange = (e) => setInterval(e.target.value);
|
||||
const onLifetimeChange = (e) => setLifetime(e.target.value);
|
||||
|
||||
const closeSocket = () => {
|
||||
if (socket !== null) {
|
||||
@@ -49,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({});
|
||||
@@ -57,6 +74,8 @@ const TelemetryModal = ({ show, toggle }) => {
|
||||
const parameters = {
|
||||
serialNumber: deviceSerialNumber,
|
||||
interval: parseInt(interval, 10),
|
||||
lifetime: parseInt(lifetime * 60, 10),
|
||||
kafka: chosenMethod,
|
||||
types: types.map((type) => type.value),
|
||||
};
|
||||
|
||||
@@ -72,7 +91,15 @@ const TelemetryModal = ({ show, toggle }) => {
|
||||
{ headers },
|
||||
)
|
||||
.then((response) => {
|
||||
if (response.data.uri && response.data.uri !== '') {
|
||||
if (chosenMethod === 'true') {
|
||||
addToast({
|
||||
title: t('common.success'),
|
||||
body: t('commands.command_success'),
|
||||
color: 'success',
|
||||
autohide: true,
|
||||
});
|
||||
toggle();
|
||||
} else if (response.data.uri && response.data.uri !== '') {
|
||||
setReceivedMessages(0);
|
||||
setSocket(new WebSocket(response.data.uri));
|
||||
}
|
||||
@@ -146,6 +173,50 @@ const TelemetryModal = ({ show, toggle }) => {
|
||||
/>
|
||||
</CCol>
|
||||
</CRow>
|
||||
<CRow>
|
||||
<CCol>{`${t('telemetry.lifetime')}: ${lifetime} ${t('common.minutes')}`}</CCol>
|
||||
</CRow>
|
||||
<CRow>
|
||||
<CCol>
|
||||
<CInput
|
||||
type="range"
|
||||
min="1"
|
||||
max="120"
|
||||
step="1"
|
||||
onChange={onLifetimeChange}
|
||||
value={lifetime}
|
||||
/>
|
||||
</CCol>
|
||||
</CRow>
|
||||
<CFormGroup row className="mb-0">
|
||||
<CCol md="3">
|
||||
<CLabel>{t('telemetry.outputmode')}</CLabel>
|
||||
</CCol>
|
||||
<CCol>
|
||||
<CFormGroup variant="checkbox" onClick={() => setChosenMethod('false')} inline>
|
||||
<CInputRadio
|
||||
defaultChecked={chosenMethod === 'false'}
|
||||
id="traceRadio1"
|
||||
name="radios"
|
||||
value="traceOption1"
|
||||
/>
|
||||
<CLabel variant="checkbox" htmlFor="traceRadio1">
|
||||
Websocket
|
||||
</CLabel>
|
||||
</CFormGroup>
|
||||
<CFormGroup variant="checkbox" onClick={() => setChosenMethod('true')} inline>
|
||||
<CInputRadio
|
||||
defaultChecked={chosenMethod === 'true'}
|
||||
id="traceRadio2"
|
||||
name="radios"
|
||||
value="traceOption2"
|
||||
/>
|
||||
<CLabel variant="checkbox" htmlFor="traceRadio2">
|
||||
Kafka
|
||||
</CLabel>
|
||||
</CFormGroup>
|
||||
</CCol>
|
||||
</CFormGroup>
|
||||
<CRow>
|
||||
<CCol sm="2" className="pt-2">
|
||||
{t('telemetry.types')}:
|
||||
@@ -178,6 +249,11 @@ const TelemetryModal = ({ show, toggle }) => {
|
||||
{t('telemetry.interval')}: {interval} {t('common.seconds')}
|
||||
</CCol>
|
||||
</CRow>
|
||||
<CRow>
|
||||
<CCol>
|
||||
{t('telemetry.lifetime')}: {lifetime} {t('common.minutes')}
|
||||
</CCol>
|
||||
</CRow>
|
||||
<CRow>
|
||||
<CCol>
|
||||
{t('telemetry.types')}: {types.map((type) => type.label).join(', ')}
|
||||
@@ -193,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>
|
||||
|
||||
@@ -238,7 +238,7 @@ const WifiAnalysis = () => {
|
||||
|
||||
return (
|
||||
<div>
|
||||
<CCard>
|
||||
<CCard className="mb-0">
|
||||
<CCardHeader className="dark-header d-flex flex-row-reverse align-items-center">
|
||||
<div className="pl-2">
|
||||
<CPopover content={t('common.refresh')}>
|
||||
@@ -254,35 +254,47 @@ const WifiAnalysis = () => {
|
||||
</div>
|
||||
</CCardHeader>
|
||||
<CCardBody>
|
||||
<CRow className="mb-4">
|
||||
<CCol className="text-center">
|
||||
<input
|
||||
type="range"
|
||||
style={{ width: '80%' }}
|
||||
className="form-range"
|
||||
min="0"
|
||||
max={range}
|
||||
step="1"
|
||||
onChange={(e) => updateSelectedStats(e.target.value)}
|
||||
defaultValue={range}
|
||||
disabled={!selectedRadioStats}
|
||||
/>
|
||||
<h5>
|
||||
{t('common.timestamp')}: {tableTime}
|
||||
</h5>
|
||||
</CCol>
|
||||
</CRow>
|
||||
<div className="overflow-auto" style={{ height: 'calc(100vh - 300px)' }}>
|
||||
<h5 className="pb-3 text-center">{t('wifi_analysis.radios')}</h5>
|
||||
<RadioAnalysisTable data={selectedRadioStats ?? []} loading={loading} range={range} />
|
||||
<h5 className="pt-5 pb-3 text-center">{t('wifi_analysis.associations')}</h5>
|
||||
<WifiAnalysisTable
|
||||
t={t}
|
||||
data={selectedAssociationStats ?? []}
|
||||
loading={loading}
|
||||
range={range}
|
||||
/>
|
||||
</div>
|
||||
{!loading && parsedAssociationStats.length === 0 ? (
|
||||
<div className="text-center">
|
||||
<h3>{t('wifi_analysis.waiting_for_data')}</h3>
|
||||
</div>
|
||||
) : (
|
||||
<>
|
||||
<CRow className="mb-4">
|
||||
<CCol className="text-center">
|
||||
<input
|
||||
type="range"
|
||||
style={{ width: '80%' }}
|
||||
className="form-range"
|
||||
min="0"
|
||||
max={range}
|
||||
step="1"
|
||||
onChange={(e) => updateSelectedStats(e.target.value)}
|
||||
defaultValue={range}
|
||||
disabled={!selectedRadioStats}
|
||||
/>
|
||||
<h5>
|
||||
{t('common.timestamp')}: {tableTime}
|
||||
</h5>
|
||||
</CCol>
|
||||
</CRow>
|
||||
<div className="overflow-auto" style={{ height: 'calc(100vh - 300px)' }}>
|
||||
<h5 className="pb-3 text-center">{t('wifi_analysis.radios')}</h5>
|
||||
<RadioAnalysisTable
|
||||
data={selectedRadioStats ?? []}
|
||||
loading={loading}
|
||||
range={range}
|
||||
/>
|
||||
<h5 className="pt-5 pb-3 text-center">{t('wifi_analysis.associations')}</h5>
|
||||
<WifiAnalysisTable
|
||||
t={t}
|
||||
data={selectedAssociationStats ?? []}
|
||||
loading={loading}
|
||||
range={range}
|
||||
/>
|
||||
</div>
|
||||
</>
|
||||
)}
|
||||
</CCardBody>
|
||||
</CCard>
|
||||
<CModal size="xl" show={showModal} onClose={toggleModal}>
|
||||
|
||||
@@ -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