Merge pull request #131 from stephb9959/main

[WIFI-11728] Added 6G associations to device table
This commit is contained in:
Charles Bourque
2022-11-24 09:31:30 +00:00
committed by GitHub
4 changed files with 6 additions and 5 deletions

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{
"name": "ucentral-client",
"version": "2.8.0(18)",
"version": "2.8.0(20)",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "ucentral-client",
"version": "2.8.0(18)",
"version": "2.8.0(20)",
"license": "ISC",
"dependencies": {
"@chakra-ui/icons": "^2.0.11",

View File

@@ -1,6 +1,6 @@
{
"name": "ucentral-client",
"version": "2.8.0(18)",
"version": "2.8.0(20)",
"description": "",
"private": true,
"main": "index.tsx",

View File

@@ -41,6 +41,7 @@ export type DeviceWithStatus = {
UUID: number;
associations_2G: number;
associations_5G: number;
associations_6G: number;
compatible: string;
connected: boolean;
certificateExpiryDate?: number;

View File

@@ -200,7 +200,7 @@ const DeviceListCard = () => {
),
[],
);
const numberCell = React.useCallback((v: number) => <NumberCell value={v} />, []);
const numberCell = React.useCallback((v?: number) => <NumberCell value={v !== undefined ? v : 0} />, []);
const actionCell = React.useCallback(
(device: DeviceWithStatus) => (
<Actions
@@ -324,7 +324,7 @@ const DeviceListCard = () => {
Header: '6G',
Footer: '',
accessor: 'associations_6G',
Cell: () => numberCell(0),
Cell: (v) => numberCell(v.cell.row.original.associations_6G),
customWidth: '50px',
disableSortBy: true,
},