mirror of
https://github.com/optim-enterprises-bv/OptimCloud-gw-ui.git
synced 2025-10-29 17:32:20 +00:00
[WIFI-11742] Wifi analysis now deducing 2G-5G from channel
Signed-off-by: Charles <charles.bourque96@gmail.com>
This commit is contained in:
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "ucentral-client",
|
||||
"version": "2.8.0(23)",
|
||||
"version": "2.8.0(24)",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "ucentral-client",
|
||||
"version": "2.8.0(23)",
|
||||
"version": "2.8.0(24)",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"@chakra-ui/icons": "^2.0.11",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "ucentral-client",
|
||||
"version": "2.8.0(23)",
|
||||
"version": "2.8.0(24)",
|
||||
"description": "",
|
||||
"private": true,
|
||||
"main": "index.tsx",
|
||||
|
||||
@@ -47,7 +47,7 @@ const WifiAnalysisAssocationsTable = ({ data, ouis }: Props) => {
|
||||
[],
|
||||
);
|
||||
const dataCell = React.useCallback((v: number) => <DataCell bytes={v} />, []);
|
||||
const indexCell = React.useCallback((assoc: ParsedAssociation) => assoc.radio?.band ?? assoc.radio?.index, []);
|
||||
const indexCell = React.useCallback((assoc: ParsedAssociation) => assoc.radio?.band ?? assoc.radio?.deductedBand, []);
|
||||
|
||||
const columns: Column<ParsedAssociation>[] = React.useMemo(
|
||||
(): Column<ParsedAssociation>[] => [
|
||||
@@ -174,6 +174,7 @@ const WifiAnalysisAssocationsTable = ({ data, ouis }: Props) => {
|
||||
}
|
||||
hiddenColumns={hiddenColumns}
|
||||
data={data ?? []}
|
||||
hideEmptyListText
|
||||
sortBy={data?.[0]?.radio?.band ? [{ id: 'index', desc: true }] : undefined}
|
||||
// @ts-ignore
|
||||
hideControls
|
||||
|
||||
@@ -8,6 +8,7 @@ import { Column } from 'models/Table';
|
||||
export type ParsedRadio = {
|
||||
recorded: number;
|
||||
band?: string;
|
||||
deductedBand: string;
|
||||
index: number;
|
||||
channel: number;
|
||||
channelWidth: string;
|
||||
@@ -27,7 +28,7 @@ const WifiAnalysisRadioTable = ({ data }: Props) => {
|
||||
const { t } = useTranslation();
|
||||
const [hiddenColumns, setHiddenColumns] = React.useState<string[]>([]);
|
||||
|
||||
const indexCell = React.useCallback((radio: ParsedRadio) => radio?.band ?? radio?.index, []);
|
||||
const indexCell = React.useCallback((radio: ParsedRadio) => radio.band ?? radio.deductedBand, []);
|
||||
|
||||
const columns: Column<ParsedRadio>[] = React.useMemo(
|
||||
(): Column<ParsedRadio>[] => [
|
||||
|
||||
@@ -25,6 +25,7 @@ const parseRadios = (t: (str: string) => string, data: { data: DeviceStatistics;
|
||||
recorded: data.recorded,
|
||||
index: i,
|
||||
band: radio.band?.[0],
|
||||
deductedBand: radio.channel && radio.channel > 16 ? '5G' : '2G',
|
||||
channel: radio.channel,
|
||||
channelWidth: radio.channel_width,
|
||||
noise: radio.noise ? parseDbm(radio.noise) : '-',
|
||||
|
||||
Reference in New Issue
Block a user