Merge pull request #71 from Telecominfraproject/feature/WIFI-1012

feature/WIFI-1012: Added client device status support
This commit is contained in:
Sean Macfarlane
2020-11-02 15:55:47 -05:00
committed by GitHub
3 changed files with 16 additions and 3 deletions

View File

@@ -24,7 +24,19 @@ const clientDevicesTableColumns = [
{ title: 'SSID', dataIndex: 'ssid' },
{ title: 'BAND', dataIndex: 'radioType' },
{ title: 'SIGNAL', dataIndex: 'signal' },
{ title: 'STATUS', dataIndex: 'status' },
{
title: 'STATUS',
dataIndex: ['details', 'associationState'],
render: text => {
if (text === 'Active_Data') {
return 'Connected';
}
if (text === 'Disconnected') {
return 'Disconnected';
}
return 'N/A';
},
},
];
const ClientDevices = ({ checkedLocations }) => {
@@ -86,7 +98,7 @@ const ClientDevices = ({ checkedLocations }) => {
<NetworkTableContainer
activeTab="/network/client-devices"
tableColumns={clientDevicesTableColumns}
tableData={data && data.filterClientSessions && data.filterClientSessions.items}
tableData={data?.filterClientSessions?.items}
onLoadMore={handleLoadMore}
onRefresh={handleOnRefresh}
isLastPage={data && data.filterClientSessions && data.filterClientSessions.context.lastPage}

View File

@@ -126,6 +126,7 @@ export const FILTER_CLIENT_SESSIONS = gql`
radioType
signal
manufacturer
details
equipment {
name
}

2
package-lock.json generated
View File

@@ -1,6 +1,6 @@
{
"name": "wlan-cloud-ui",
"version": "0.4.3",
"version": "0.4.4",
"lockfileVersion": 1,
"requires": true,
"dependencies": {