mirror of
				https://github.com/Telecominfraproject/wlan-cloud-ui.git
				synced 2025-11-03 20:28:12 +00:00 
			
		
		
		
	Compare commits
	
		
			32 Commits
		
	
	
		
			feature/NE
			...
			v1.0.0-rc1
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						 | 
					1f018cbd04 | ||
| 
						 | 
					bc57402aa9 | ||
| 
						 | 
					2692e6527f | ||
| 
						 | 
					f6d03b7a1b | ||
| 
						 | 
					3f1a85a9c0 | ||
| 
						 | 
					f1b0c54fc3 | ||
| 
						 | 
					7659407562 | ||
| 
						 | 
					cf5be15402 | ||
| 
						 | 
					f3ee2f5a7c | ||
| 
						 | 
					6ddd9b30f3 | ||
| 
						 | 
					8acdd0ca4a | ||
| 
						 | 
					8670e74b77 | ||
| 
						 | 
					c8798dd6b3 | ||
| 
						 | 
					82b5688503 | ||
| 
						 | 
					fadb618c6a | ||
| 
						 | 
					dbf54d26b6 | ||
| 
						 | 
					11e7b92902 | ||
| 
						 | 
					cb8364b1ab | ||
| 
						 | 
					796bf24ef9 | ||
| 
						 | 
					444a9a929d | ||
| 
						 | 
					efea725ce9 | ||
| 
						 | 
					7a3bcbb2cb | ||
| 
						 | 
					a3e304323d | ||
| 
						 | 
					af182c93c6 | ||
| 
						 | 
					78fde75678 | ||
| 
						 | 
					7eda2074b2 | ||
| 
						 | 
					ded1b2d088 | ||
| 
						 | 
					e1f0357c1f | ||
| 
						 | 
					b84e156f74 | ||
| 
						 | 
					cae23638ee | ||
| 
						 | 
					569154ff95 | ||
| 
						 | 
					78146969f3 | 
							
								
								
									
										11
									
								
								.github/workflows/dockerpublish.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										11
									
								
								.github/workflows/dockerpublish.yml
									
									
									
									
										vendored
									
									
								
							@@ -5,6 +5,7 @@ on:
 | 
				
			|||||||
    # Publish `master` as Docker `latest` image.
 | 
					    # Publish `master` as Docker `latest` image.
 | 
				
			||||||
    branches:
 | 
					    branches:
 | 
				
			||||||
      - master
 | 
					      - master
 | 
				
			||||||
 | 
					      - 'release/**'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    # Publish `v1.2.3` tags as releases.
 | 
					    # Publish `v1.2.3` tags as releases.
 | 
				
			||||||
    tags:
 | 
					    tags:
 | 
				
			||||||
@@ -56,8 +57,11 @@ jobs:
 | 
				
			|||||||
          # Strip "v" prefix from tag name
 | 
					          # Strip "v" prefix from tag name
 | 
				
			||||||
          [[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//')
 | 
					          [[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					          # Create a release snapshot if we are on release branch
 | 
				
			||||||
 | 
					          [[ "${{ github.ref }}" == "refs/heads/release/"* ]] && VERSION=$(echo "${{ github.ref }}" | sed -e 's/refs\/heads\/release\/[v]//' | awk '{print $1"-SNAPSHOT"}')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
          # Use Docker `latest` tag convention
 | 
					          # Use Docker `latest` tag convention
 | 
				
			||||||
          [ "$VERSION" == "master" ] && VERSION=latest
 | 
					          [ "$VERSION" == "master" ] && VERSION=1.0.0-SNAPSHOT
 | 
				
			||||||
 | 
					
 | 
				
			||||||
          TIMESTAMP=$(date +'%Y-%m-%d')
 | 
					          TIMESTAMP=$(date +'%Y-%m-%d')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -88,8 +92,11 @@ jobs:
 | 
				
			|||||||
          # Strip "v" prefix from tag name
 | 
					          # Strip "v" prefix from tag name
 | 
				
			||||||
          [[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//')
 | 
					          [[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					          # Create a release snapshot if we are on release branch
 | 
				
			||||||
 | 
					          [[ "${{ github.ref }}" == "refs/heads/release/"* ]] && VERSION=$(echo "${{ github.ref }}" | sed -e 's/refs\/heads\/release\/[v]//' | awk '{print $1"-SNAPSHOT"}')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
          # Use Docker `latest` tag convention
 | 
					          # Use Docker `latest` tag convention
 | 
				
			||||||
          [ "$VERSION" == "master" ] && VERSION=latest
 | 
					          [ "$VERSION" == "master" ] && VERSION=1.0.0-SNAPSHOT
 | 
				
			||||||
 | 
					
 | 
				
			||||||
          echo IMAGE_ID=$IMAGE_ID
 | 
					          echo IMAGE_ID=$IMAGE_ID
 | 
				
			||||||
          echo VERSION=$VERSION
 | 
					          echo VERSION=$VERSION
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -7,7 +7,7 @@ import { useHistory } from 'react-router-dom';
 | 
				
			|||||||
import { ROUTES } from 'constants/index';
 | 
					import { ROUTES } from 'constants/index';
 | 
				
			||||||
import UserContext from 'contexts/UserContext';
 | 
					import UserContext from 'contexts/UserContext';
 | 
				
			||||||
import { GET_ALL_PROFILES } from 'graphql/queries';
 | 
					import { GET_ALL_PROFILES } from 'graphql/queries';
 | 
				
			||||||
import { updateQueryGetAllProfiles } from 'graphql/functions';
 | 
					import { fetchMoreProfiles } from 'graphql/functions';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const CREATE_PROFILE = gql`
 | 
					const CREATE_PROFILE = gql`
 | 
				
			||||||
  mutation CreateProfile(
 | 
					  mutation CreateProfile(
 | 
				
			||||||
@@ -37,24 +37,43 @@ const AddProfile = () => {
 | 
				
			|||||||
  const { customerId } = useContext(UserContext);
 | 
					  const { customerId } = useContext(UserContext);
 | 
				
			||||||
  const { data: ssidProfiles, fetchMore } = useQuery(GET_ALL_PROFILES(), {
 | 
					  const { data: ssidProfiles, fetchMore } = useQuery(GET_ALL_PROFILES(), {
 | 
				
			||||||
    variables: { customerId, type: 'ssid' },
 | 
					    variables: { customerId, type: 'ssid' },
 | 
				
			||||||
 | 
					    fetchPolicy: 'network-only',
 | 
				
			||||||
  });
 | 
					  });
 | 
				
			||||||
 | 
					  const { data: radiusProfiles, fetchMore: fetchMoreRadiusProfiles } = useQuery(
 | 
				
			||||||
 | 
					    GET_ALL_PROFILES(),
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					      variables: { customerId, type: 'radius' },
 | 
				
			||||||
 | 
					      fetchPolicy: 'network-only',
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  );
 | 
				
			||||||
 | 
					  const { data: captiveProfiles, fetchMore: fetchMoreCaptiveProfiles } = useQuery(
 | 
				
			||||||
 | 
					    GET_ALL_PROFILES(),
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					      variables: { customerId, type: 'captive_portal' },
 | 
				
			||||||
 | 
					      fetchPolicy: 'network-only',
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  );
 | 
				
			||||||
  const { data: venueProfiles, fetchMore: fetchMoreVenueProfiles } = useQuery(GET_ALL_PROFILES(), {
 | 
					  const { data: venueProfiles, fetchMore: fetchMoreVenueProfiles } = useQuery(GET_ALL_PROFILES(), {
 | 
				
			||||||
    variables: { customerId, type: 'passpoint_venue' },
 | 
					    variables: { customerId, type: 'passpoint_venue' },
 | 
				
			||||||
 | 
					    fetchPolicy: 'network-only',
 | 
				
			||||||
  });
 | 
					  });
 | 
				
			||||||
  const { data: operatorProfiles, fetchMore: fetchMoreOperatorProfiles } = useQuery(
 | 
					  const { data: operatorProfiles, fetchMore: fetchMoreOperatorProfiles } = useQuery(
 | 
				
			||||||
    GET_ALL_PROFILES(),
 | 
					    GET_ALL_PROFILES(),
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
      variables: { customerId, type: 'passpoint_operator' },
 | 
					      variables: { customerId, type: 'passpoint_operator' },
 | 
				
			||||||
 | 
					      fetchPolicy: 'network-only',
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  );
 | 
					  );
 | 
				
			||||||
  const { data: idProviderProfiles, fetchMore: fetchMoreIdProviderProfiles } = useQuery(
 | 
					  const { data: idProviderProfiles, fetchMore: fetchMoreIdProviderProfiles } = useQuery(
 | 
				
			||||||
    GET_ALL_PROFILES(),
 | 
					    GET_ALL_PROFILES(),
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
      variables: { customerId, type: 'passpoint_osu_id_provider' },
 | 
					      variables: { customerId, type: 'passpoint_osu_id_provider' },
 | 
				
			||||||
 | 
					      fetchPolicy: 'network-only',
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  );
 | 
					  );
 | 
				
			||||||
  const { data: rfProfiles, fetchMore: fetchMoreRfProfiles } = useQuery(GET_ALL_PROFILES(), {
 | 
					  const { data: rfProfiles, fetchMore: fetchMoreRfProfiles } = useQuery(GET_ALL_PROFILES(), {
 | 
				
			||||||
    variables: { customerId, type: 'rf' },
 | 
					    variables: { customerId, type: 'rf' },
 | 
				
			||||||
 | 
					    fetchPolicy: 'network-only',
 | 
				
			||||||
  });
 | 
					  });
 | 
				
			||||||
  const [createProfile] = useMutation(CREATE_PROFILE);
 | 
					  const [createProfile] = useMutation(CREATE_PROFILE);
 | 
				
			||||||
  const history = useHistory();
 | 
					  const history = useHistory();
 | 
				
			||||||
@@ -84,111 +103,30 @@ const AddProfile = () => {
 | 
				
			|||||||
      );
 | 
					      );
 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  const handleFetchProfiles = e => {
 | 
					  const handleFetchMoreProfiles = (e, key) => {
 | 
				
			||||||
    if (ssidProfiles.getAllProfiles.context.lastPage) {
 | 
					    if (key === 'radius') fetchMoreProfiles(e, radiusProfiles, fetchMoreRadiusProfiles);
 | 
				
			||||||
      return false;
 | 
					    else if (key === 'captive_portal')
 | 
				
			||||||
    }
 | 
					      fetchMoreProfiles(e, captiveProfiles, fetchMoreCaptiveProfiles);
 | 
				
			||||||
 | 
					    else if (key === 'rf') fetchMoreProfiles(e, rfProfiles, fetchMoreRfProfiles);
 | 
				
			||||||
    e.persist();
 | 
					    else if (key === 'passpoint_venue') fetchMoreProfiles(e, venueProfiles, fetchMoreVenueProfiles);
 | 
				
			||||||
    const { target } = e;
 | 
					    else if (key === 'passpoint_operator')
 | 
				
			||||||
 | 
					      fetchMoreProfiles(e, operatorProfiles, fetchMoreOperatorProfiles);
 | 
				
			||||||
    if (target.scrollTop + target.offsetHeight === target.scrollHeight) {
 | 
					    else if (key === 'passpoint_osu_id_provider')
 | 
				
			||||||
      fetchMore({
 | 
					      fetchMoreProfiles(e, idProviderProfiles, fetchMoreIdProviderProfiles);
 | 
				
			||||||
        variables: { context: { ...ssidProfiles.getAllProfiles.context } },
 | 
					    else fetchMoreProfiles(e, ssidProfiles, fetchMore);
 | 
				
			||||||
        updateQuery: updateQueryGetAllProfiles,
 | 
					 | 
				
			||||||
      });
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    return true;
 | 
					 | 
				
			||||||
  };
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  const handleFetchVenueProfiles = e => {
 | 
					 | 
				
			||||||
    if (venueProfiles.getAllProfiles.context.lastPage) {
 | 
					 | 
				
			||||||
      return false;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    e.persist();
 | 
					 | 
				
			||||||
    const { target } = e;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    if (target.scrollTop + target.offsetHeight === target.scrollHeight) {
 | 
					 | 
				
			||||||
      fetchMoreVenueProfiles({
 | 
					 | 
				
			||||||
        variables: { context: { ...venueProfiles.getAllProfiles.context } },
 | 
					 | 
				
			||||||
        updateQuery: updateQueryGetAllProfiles,
 | 
					 | 
				
			||||||
      });
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    return true;
 | 
					 | 
				
			||||||
  };
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  const handleFetchRfProfiles = e => {
 | 
					 | 
				
			||||||
    if (rfProfiles.getAllProfiles.context.lastPage) {
 | 
					 | 
				
			||||||
      return false;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    e.persist();
 | 
					 | 
				
			||||||
    const { target } = e;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    if (target.scrollTop + target.offsetHeight === target.scrollHeight) {
 | 
					 | 
				
			||||||
      fetchMoreRfProfiles({
 | 
					 | 
				
			||||||
        variables: { context: { ...rfProfiles.getAllProfiles.context } },
 | 
					 | 
				
			||||||
        updateQuery: updateQueryGetAllProfiles,
 | 
					 | 
				
			||||||
      });
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    return true;
 | 
					 | 
				
			||||||
  };
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  const handleFetchOperatorProfiles = e => {
 | 
					 | 
				
			||||||
    if (operatorProfiles.getAllProfiles.context.lastPage) {
 | 
					 | 
				
			||||||
      return false;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    e.persist();
 | 
					 | 
				
			||||||
    const { target } = e;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    if (target.scrollTop + target.offsetHeight === target.scrollHeight) {
 | 
					 | 
				
			||||||
      fetchMoreOperatorProfiles({
 | 
					 | 
				
			||||||
        variables: { context: { ...operatorProfiles.getAllProfiles.context } },
 | 
					 | 
				
			||||||
        updateQuery: updateQueryGetAllProfiles,
 | 
					 | 
				
			||||||
      });
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    return true;
 | 
					 | 
				
			||||||
  };
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  const handleFetchIdProviderProfiles = e => {
 | 
					 | 
				
			||||||
    if (idProviderProfiles.getAllProfiles.context.lastPage) {
 | 
					 | 
				
			||||||
      return false;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    e.persist();
 | 
					 | 
				
			||||||
    const { target } = e;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    if (target.scrollTop + target.offsetHeight === target.scrollHeight) {
 | 
					 | 
				
			||||||
      fetchMoreIdProviderProfiles({
 | 
					 | 
				
			||||||
        variables: { context: { ...idProviderProfiles.getAllProfiles.context } },
 | 
					 | 
				
			||||||
        updateQuery: updateQueryGetAllProfiles,
 | 
					 | 
				
			||||||
      });
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    return true;
 | 
					 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  return (
 | 
					  return (
 | 
				
			||||||
    <AddProfilePage
 | 
					    <AddProfilePage
 | 
				
			||||||
      onCreateProfile={handleAddProfile}
 | 
					      onCreateProfile={handleAddProfile}
 | 
				
			||||||
      ssidProfiles={
 | 
					      ssidProfiles={ssidProfiles?.getAllProfiles?.items}
 | 
				
			||||||
        (ssidProfiles && ssidProfiles.getAllProfiles && ssidProfiles.getAllProfiles.items) || []
 | 
					      radiusProfiles={radiusProfiles?.getAllProfiles?.items}
 | 
				
			||||||
      }
 | 
					      captiveProfiles={captiveProfiles?.getAllProfiles?.items}
 | 
				
			||||||
      venueProfiles={venueProfiles?.getAllProfiles?.items}
 | 
					      venueProfiles={venueProfiles?.getAllProfiles?.items}
 | 
				
			||||||
      operatorProfiles={operatorProfiles?.getAllProfiles?.items}
 | 
					      operatorProfiles={operatorProfiles?.getAllProfiles?.items}
 | 
				
			||||||
      idProviderProfiles={idProviderProfiles?.getAllProfiles?.items}
 | 
					      idProviderProfiles={idProviderProfiles?.getAllProfiles?.items}
 | 
				
			||||||
      rfProfiles={rfProfiles?.getAllProfiles?.items}
 | 
					      rfProfiles={rfProfiles?.getAllProfiles?.items}
 | 
				
			||||||
      onFetchMoreProfiles={handleFetchProfiles}
 | 
					      onFetchMoreProfiles={handleFetchMoreProfiles}
 | 
				
			||||||
      onFetchMoreVenueProfiles={handleFetchVenueProfiles}
 | 
					 | 
				
			||||||
      onFetchMoreOperatorProfiles={handleFetchOperatorProfiles}
 | 
					 | 
				
			||||||
      onFetchMoreIdProviderProfiles={handleFetchIdProviderProfiles}
 | 
					 | 
				
			||||||
      onFetchMoreRfProfiles={handleFetchRfProfiles}
 | 
					 | 
				
			||||||
    />
 | 
					    />
 | 
				
			||||||
  );
 | 
					  );
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -129,11 +129,17 @@ const Dashboard = () => {
 | 
				
			|||||||
            clientDevices2dot4GHz.push([eventTimestamp, radios.is2dot4GHz || 0]);
 | 
					            clientDevices2dot4GHz.push([eventTimestamp, radios.is2dot4GHz || 0]);
 | 
				
			||||||
            clientDevices5GHz.push([eventTimestamp, total5GHz || 0]);
 | 
					            clientDevices5GHz.push([eventTimestamp, total5GHz || 0]);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            trafficBytesDownstreamData.push([eventTimestamp, trafficBytesDownstream || 0]);
 | 
					            trafficBytesDownstreamData.push([
 | 
				
			||||||
            trafficBytesUpstreamData.push([eventTimestamp, trafficBytesUpstream || 0]);
 | 
					              eventTimestamp,
 | 
				
			||||||
 | 
					              (trafficBytesDownstream > 0 && trafficBytesDownstream) || 0,
 | 
				
			||||||
 | 
					            ]);
 | 
				
			||||||
 | 
					            trafficBytesUpstreamData.push([
 | 
				
			||||||
 | 
					              eventTimestamp,
 | 
				
			||||||
 | 
					              (trafficBytesUpstream > 0 && trafficBytesUpstream) || 0,
 | 
				
			||||||
 | 
					            ]);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            totalDown += trafficBytesDownstream || 0;
 | 
					            totalDown += (trafficBytesDownstream > 0 && trafficBytesDownstream) || 0;
 | 
				
			||||||
            totalUp += trafficBytesUpstream || 0;
 | 
					            totalUp += (trafficBytesUpstream > 0 && trafficBytesUpstream) || 0;
 | 
				
			||||||
          }
 | 
					          }
 | 
				
			||||||
        );
 | 
					        );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -15,7 +15,7 @@ import {
 | 
				
			|||||||
  REQUEST_EQUIPMENT_SWITCH_BANK,
 | 
					  REQUEST_EQUIPMENT_SWITCH_BANK,
 | 
				
			||||||
  REQUEST_EQUIPMENT_REBOOT,
 | 
					  REQUEST_EQUIPMENT_REBOOT,
 | 
				
			||||||
} from 'graphql/mutations';
 | 
					} from 'graphql/mutations';
 | 
				
			||||||
import { updateQueryGetAllProfiles } from 'graphql/functions';
 | 
					import { fetchMoreProfiles } from 'graphql/functions';
 | 
				
			||||||
import UserContext from 'contexts/UserContext';
 | 
					import UserContext from 'contexts/UserContext';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const GET_EQUIPMENT = gql`
 | 
					const GET_EQUIPMENT = gql`
 | 
				
			||||||
@@ -85,6 +85,7 @@ const UPDATE_EQUIPMENT = gql`
 | 
				
			|||||||
    $profileId: ID!
 | 
					    $profileId: ID!
 | 
				
			||||||
    $locationId: ID!
 | 
					    $locationId: ID!
 | 
				
			||||||
    $name: String!
 | 
					    $name: String!
 | 
				
			||||||
 | 
					    $baseMacAddress: String
 | 
				
			||||||
    $latitude: String
 | 
					    $latitude: String
 | 
				
			||||||
    $longitude: String
 | 
					    $longitude: String
 | 
				
			||||||
    $serial: String
 | 
					    $serial: String
 | 
				
			||||||
@@ -99,6 +100,7 @@ const UPDATE_EQUIPMENT = gql`
 | 
				
			|||||||
      profileId: $profileId
 | 
					      profileId: $profileId
 | 
				
			||||||
      locationId: $locationId
 | 
					      locationId: $locationId
 | 
				
			||||||
      name: $name
 | 
					      name: $name
 | 
				
			||||||
 | 
					      baseMacAddress: $baseMacAddress
 | 
				
			||||||
      latitude: $latitude
 | 
					      latitude: $latitude
 | 
				
			||||||
      longitude: $longitude
 | 
					      longitude: $longitude
 | 
				
			||||||
      serial: $serial
 | 
					      serial: $serial
 | 
				
			||||||
@@ -112,6 +114,7 @@ const UPDATE_EQUIPMENT = gql`
 | 
				
			|||||||
      profileId
 | 
					      profileId
 | 
				
			||||||
      locationId
 | 
					      locationId
 | 
				
			||||||
      name
 | 
					      name
 | 
				
			||||||
 | 
					      baseMacAddress
 | 
				
			||||||
      latitude
 | 
					      latitude
 | 
				
			||||||
      longitude
 | 
					      longitude
 | 
				
			||||||
      serial
 | 
					      serial
 | 
				
			||||||
@@ -142,6 +145,7 @@ const AccessPointDetails = ({ locations }) => {
 | 
				
			|||||||
      id,
 | 
					      id,
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    fetchPolicy: 'network-only',
 | 
					    fetchPolicy: 'network-only',
 | 
				
			||||||
 | 
					    errorPolicy: 'all',
 | 
				
			||||||
  });
 | 
					  });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  const { data: dataFirmware, error: errorFirmware, loading: loadingFirmware } = useQuery(
 | 
					  const { data: dataFirmware, error: errorFirmware, loading: loadingFirmware } = useQuery(
 | 
				
			||||||
@@ -149,9 +153,9 @@ const AccessPointDetails = ({ locations }) => {
 | 
				
			|||||||
    {
 | 
					    {
 | 
				
			||||||
      skip: !data?.getEquipment?.model,
 | 
					      skip: !data?.getEquipment?.model,
 | 
				
			||||||
      variables: { modelId: data?.getEquipment?.model },
 | 
					      variables: { modelId: data?.getEquipment?.model },
 | 
				
			||||||
 | 
					      errorPolicy: 'all',
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  );
 | 
					  );
 | 
				
			||||||
 | 
					 | 
				
			||||||
  const {
 | 
					  const {
 | 
				
			||||||
    data: dataProfiles,
 | 
					    data: dataProfiles,
 | 
				
			||||||
    error: errorProfiles,
 | 
					    error: errorProfiles,
 | 
				
			||||||
@@ -196,20 +200,21 @@ const AccessPointDetails = ({ locations }) => {
 | 
				
			|||||||
    metricsRefetch();
 | 
					    metricsRefetch();
 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  const handleUpdateEquipment = (
 | 
					  const handleUpdateEquipment = ({
 | 
				
			||||||
    equipmentId,
 | 
					    id: equipmentId,
 | 
				
			||||||
    equipmentType,
 | 
					    equipmentType,
 | 
				
			||||||
    inventoryId,
 | 
					    inventoryId,
 | 
				
			||||||
    custId,
 | 
					    customerId: custId,
 | 
				
			||||||
    profileId,
 | 
					    profileId,
 | 
				
			||||||
    locationId,
 | 
					    locationId,
 | 
				
			||||||
    name,
 | 
					    name,
 | 
				
			||||||
 | 
					    baseMacAddress,
 | 
				
			||||||
    latitude,
 | 
					    latitude,
 | 
				
			||||||
    longitude,
 | 
					    longitude,
 | 
				
			||||||
    serial,
 | 
					    serial,
 | 
				
			||||||
    lastModifiedTimestamp,
 | 
					    lastModifiedTimestamp,
 | 
				
			||||||
    details
 | 
					    formattedData,
 | 
				
			||||||
  ) => {
 | 
					  }) => {
 | 
				
			||||||
    updateEquipment({
 | 
					    updateEquipment({
 | 
				
			||||||
      variables: {
 | 
					      variables: {
 | 
				
			||||||
        id: equipmentId,
 | 
					        id: equipmentId,
 | 
				
			||||||
@@ -219,11 +224,12 @@ const AccessPointDetails = ({ locations }) => {
 | 
				
			|||||||
        profileId,
 | 
					        profileId,
 | 
				
			||||||
        locationId,
 | 
					        locationId,
 | 
				
			||||||
        name,
 | 
					        name,
 | 
				
			||||||
 | 
					        baseMacAddress,
 | 
				
			||||||
        latitude,
 | 
					        latitude,
 | 
				
			||||||
        longitude,
 | 
					        longitude,
 | 
				
			||||||
        serial,
 | 
					        serial,
 | 
				
			||||||
        lastModifiedTimestamp,
 | 
					        lastModifiedTimestamp,
 | 
				
			||||||
        details,
 | 
					        details: formattedData,
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
    })
 | 
					    })
 | 
				
			||||||
      .then(() => {
 | 
					      .then(() => {
 | 
				
			||||||
@@ -327,28 +333,14 @@ const AccessPointDetails = ({ locations }) => {
 | 
				
			|||||||
      );
 | 
					      );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  const handleFetchProfiles = e => {
 | 
					  const handleFetchProfiles = e => {
 | 
				
			||||||
    if (dataProfiles.getAllProfiles.context.lastPage) {
 | 
					    fetchMoreProfiles(e, dataProfiles, fetchMore);
 | 
				
			||||||
      return false;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    e.persist();
 | 
					 | 
				
			||||||
    const { target } = e;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    if (target.scrollTop + target.offsetHeight === target.scrollHeight) {
 | 
					 | 
				
			||||||
      fetchMore({
 | 
					 | 
				
			||||||
        variables: { context: { ...dataProfiles.getAllProfiles.context } },
 | 
					 | 
				
			||||||
        updateQuery: updateQueryGetAllProfiles,
 | 
					 | 
				
			||||||
      });
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    return true;
 | 
					 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  if (loading) {
 | 
					  if (loading) {
 | 
				
			||||||
    return <Loading />;
 | 
					    return <Loading />;
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  if (error) {
 | 
					  if (error && !data?.getEquipment) {
 | 
				
			||||||
    return (
 | 
					    return (
 | 
				
			||||||
      <Alert
 | 
					      <Alert
 | 
				
			||||||
        message="Error"
 | 
					        message="Error"
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -11,6 +11,8 @@ import { UPDATE_EQUIPMENT_BULK } from 'graphql/mutations';
 | 
				
			|||||||
import UserContext from 'contexts/UserContext';
 | 
					import UserContext from 'contexts/UserContext';
 | 
				
			||||||
import styles from './index.module.scss';
 | 
					import styles from './index.module.scss';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					const defaultAppliedRadios = { is5GHzL: 'is5GHzL', is2dot4GHz: 'is2dot4GHz', is5GHzU: 'is5GHzU' };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const renderTableCell = tabCell => {
 | 
					const renderTableCell = tabCell => {
 | 
				
			||||||
  if (Array.isArray(tabCell)) {
 | 
					  if (Array.isArray(tabCell)) {
 | 
				
			||||||
    return (
 | 
					    return (
 | 
				
			||||||
@@ -25,47 +27,54 @@ const renderTableCell = tabCell => {
 | 
				
			|||||||
  return <span>{tabCell}</span>;
 | 
					  return <span>{tabCell}</span>;
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
const accessPointsChannelTableColumns = [
 | 
					const accessPointsChannelTableColumns = [
 | 
				
			||||||
  { title: 'NAME', dataIndex: 'name', key: 'name', render: renderTableCell },
 | 
					  { title: 'Name', dataIndex: 'name', key: 'name', width: 150, render: renderTableCell },
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
    title: 'CHANNEL',
 | 
					    title: 'Channel',
 | 
				
			||||||
    dataIndex: 'channel',
 | 
					    dataIndex: 'channel',
 | 
				
			||||||
    key: 'channel',
 | 
					    key: 'channel',
 | 
				
			||||||
    editable: true,
 | 
					    editable: true,
 | 
				
			||||||
 | 
					    width: 150,
 | 
				
			||||||
    render: renderTableCell,
 | 
					    render: renderTableCell,
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
    title: 'CELL SIZE',
 | 
					    title: 'Cell Size',
 | 
				
			||||||
    dataIndex: 'cellSize',
 | 
					    dataIndex: 'cellSize',
 | 
				
			||||||
    key: 'cellSize',
 | 
					    key: 'cellSize',
 | 
				
			||||||
    editable: true,
 | 
					    editable: true,
 | 
				
			||||||
 | 
					    width: 150,
 | 
				
			||||||
    render: renderTableCell,
 | 
					    render: renderTableCell,
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
    title: 'PROB RESPONSE THRESHOLD',
 | 
					    title: 'Probe Response Threshold',
 | 
				
			||||||
    dataIndex: 'probeResponseThreshold',
 | 
					    dataIndex: 'probeResponseThreshold',
 | 
				
			||||||
    key: 'probeResponseThreshold',
 | 
					    key: 'probeResponseThreshold',
 | 
				
			||||||
    editable: true,
 | 
					    editable: true,
 | 
				
			||||||
 | 
					    width: 200,
 | 
				
			||||||
    render: renderTableCell,
 | 
					    render: renderTableCell,
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
    title: 'CLIENT DISCONNECT THRESHOLD',
 | 
					    title: 'Client Disconnect Threshold',
 | 
				
			||||||
    dataIndex: 'clientDisconnectThreshold',
 | 
					    dataIndex: 'clientDisconnectThreshold',
 | 
				
			||||||
    key: 'clientDisconnectThreshold',
 | 
					    key: 'clientDisconnectThreshold',
 | 
				
			||||||
    editable: true,
 | 
					    editable: true,
 | 
				
			||||||
 | 
					    width: 200,
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    render: renderTableCell,
 | 
					    render: renderTableCell,
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
    title: 'SNR (% DROP)',
 | 
					    title: 'SNR (% Drop)',
 | 
				
			||||||
    dataIndex: 'snrDrop',
 | 
					    dataIndex: 'snrDrop',
 | 
				
			||||||
    key: 'snrDrop',
 | 
					    key: 'snrDrop',
 | 
				
			||||||
    editable: true,
 | 
					    editable: true,
 | 
				
			||||||
 | 
					    width: 175,
 | 
				
			||||||
    render: renderTableCell,
 | 
					    render: renderTableCell,
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
    title: 'MIN LOAD',
 | 
					    title: 'Min Load',
 | 
				
			||||||
    dataIndex: 'minLoad',
 | 
					    dataIndex: 'minLoad',
 | 
				
			||||||
    key: 'minLoad',
 | 
					    key: 'minLoad',
 | 
				
			||||||
    editable: true,
 | 
					    editable: true,
 | 
				
			||||||
 | 
					    width: 150,
 | 
				
			||||||
    render: renderTableCell,
 | 
					    render: renderTableCell,
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
];
 | 
					];
 | 
				
			||||||
@@ -162,42 +171,44 @@ const BulkEditAPs = ({ locations, checkedLocations }) => {
 | 
				
			|||||||
  const getRadioDetails = (radioDetails, type) => {
 | 
					  const getRadioDetails = (radioDetails, type) => {
 | 
				
			||||||
    if (type === 'cellSize') {
 | 
					    if (type === 'cellSize') {
 | 
				
			||||||
      const cellSizeValues = [];
 | 
					      const cellSizeValues = [];
 | 
				
			||||||
      Object.keys(radioDetails.radioMap).map(i => {
 | 
					      Object.keys(radioDetails?.radioMap || {}).map(i => {
 | 
				
			||||||
        return cellSizeValues.push(radioDetails.radioMap[i].rxCellSizeDb.value);
 | 
					        return cellSizeValues.push(radioDetails.radioMap[i]?.rxCellSizeDb?.value);
 | 
				
			||||||
      });
 | 
					      });
 | 
				
			||||||
      return cellSizeValues;
 | 
					      return cellSizeValues;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    if (type === 'probeResponseThreshold') {
 | 
					    if (type === 'probeResponseThreshold') {
 | 
				
			||||||
      const probeResponseThresholdValues = [];
 | 
					      const probeResponseThresholdValues = [];
 | 
				
			||||||
      Object.keys(radioDetails.radioMap).map(i => {
 | 
					      Object.keys(radioDetails?.radioMap || {}).map(i => {
 | 
				
			||||||
        return probeResponseThresholdValues.push(
 | 
					        return probeResponseThresholdValues.push(
 | 
				
			||||||
          radioDetails.radioMap[i].probeResponseThresholdDb.value
 | 
					          radioDetails.radioMap[i]?.probeResponseThresholdDb?.value
 | 
				
			||||||
        );
 | 
					        );
 | 
				
			||||||
      });
 | 
					      });
 | 
				
			||||||
      return probeResponseThresholdValues;
 | 
					      return probeResponseThresholdValues;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    if (type === 'clientDisconnectThreshold') {
 | 
					    if (type === 'clientDisconnectThreshold') {
 | 
				
			||||||
      const clientDisconnectThresholdValues = [];
 | 
					      const clientDisconnectThresholdValues = [];
 | 
				
			||||||
      Object.keys(radioDetails.radioMap).map(i => {
 | 
					      Object.keys(radioDetails?.radioMap || {}).map(i => {
 | 
				
			||||||
        return clientDisconnectThresholdValues.push(
 | 
					        return clientDisconnectThresholdValues.push(
 | 
				
			||||||
          radioDetails.radioMap[i].clientDisconnectThresholdDb.value
 | 
					          radioDetails.radioMap[i]?.clientDisconnectThresholdDb?.value
 | 
				
			||||||
        );
 | 
					        );
 | 
				
			||||||
      });
 | 
					      });
 | 
				
			||||||
      return clientDisconnectThresholdValues;
 | 
					      return clientDisconnectThresholdValues;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    if (type === 'snrDrop') {
 | 
					    if (type === 'snrDrop') {
 | 
				
			||||||
      const snrDropValues = [];
 | 
					      const snrDropValues = [];
 | 
				
			||||||
      Object.keys(radioDetails.advancedRadioMap).map(i => {
 | 
					      Object.keys(radioDetails?.radioMap || {}).map(i => {
 | 
				
			||||||
        return snrDropValues.push(
 | 
					        return snrDropValues.push(
 | 
				
			||||||
          radioDetails.advancedRadioMap[i].bestApSettings.dropInSnrPercentage
 | 
					          radioDetails.advancedRadioMap[i]?.bestApSettings?.value?.dropInSnrPercentage
 | 
				
			||||||
        );
 | 
					        );
 | 
				
			||||||
      });
 | 
					      });
 | 
				
			||||||
      return snrDropValues;
 | 
					      return snrDropValues;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    const minLoadValue = [];
 | 
					    const minLoadValue = [];
 | 
				
			||||||
    Object.keys(radioDetails.advancedRadioMap).map(i => {
 | 
					    Object.keys(radioDetails?.radioMap || {}).map(i => {
 | 
				
			||||||
      return minLoadValue.push(radioDetails.advancedRadioMap[i].bestApSettings.minLoadFactor);
 | 
					      return minLoadValue.push(
 | 
				
			||||||
 | 
					        radioDetails.advancedRadioMap[i]?.bestApSettings?.value?.minLoadFactor
 | 
				
			||||||
 | 
					      );
 | 
				
			||||||
    });
 | 
					    });
 | 
				
			||||||
    return minLoadValue;
 | 
					    return minLoadValue;
 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
@@ -234,7 +245,7 @@ const BulkEditAPs = ({ locations, checkedLocations }) => {
 | 
				
			|||||||
    let minLoadFactor;
 | 
					    let minLoadFactor;
 | 
				
			||||||
    dataSource.items.forEach(({ id: itemId, details }) => {
 | 
					    dataSource.items.forEach(({ id: itemId, details }) => {
 | 
				
			||||||
      if (equipmentId === itemId) {
 | 
					      if (equipmentId === itemId) {
 | 
				
			||||||
        Object.keys(details.radioMap).forEach((i, dataIndex) => {
 | 
					        Object.keys(details?.radioMap || defaultAppliedRadios).forEach((i, dataIndex) => {
 | 
				
			||||||
          const frequencies = {};
 | 
					          const frequencies = {};
 | 
				
			||||||
          dropInSnrPercentage = snrDrop[dataIndex];
 | 
					          dropInSnrPercentage = snrDrop[dataIndex];
 | 
				
			||||||
          minLoadFactor = minLoad[dataIndex];
 | 
					          minLoadFactor = minLoad[dataIndex];
 | 
				
			||||||
@@ -286,9 +297,8 @@ const BulkEditAPs = ({ locations, checkedLocations }) => {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  const handleSaveChanges = updatedRows => {
 | 
					  const handleSaveChanges = updatedRows => {
 | 
				
			||||||
    const editedRowsArr = [];
 | 
					    const editedRowsArr = [];
 | 
				
			||||||
    if (updatedRows.length > 0) {
 | 
					    Object.keys(updatedRows).forEach(key => {
 | 
				
			||||||
      updatedRows.map(
 | 
					      const {
 | 
				
			||||||
        ({
 | 
					 | 
				
			||||||
        id: equipmentId,
 | 
					        id: equipmentId,
 | 
				
			||||||
        channel,
 | 
					        channel,
 | 
				
			||||||
        cellSize,
 | 
					        cellSize,
 | 
				
			||||||
@@ -296,7 +306,7 @@ const BulkEditAPs = ({ locations, checkedLocations }) => {
 | 
				
			|||||||
        clientDisconnectThreshold,
 | 
					        clientDisconnectThreshold,
 | 
				
			||||||
        snrDrop,
 | 
					        snrDrop,
 | 
				
			||||||
        minLoad,
 | 
					        minLoad,
 | 
				
			||||||
        }) => {
 | 
					      } = updatedRows[key];
 | 
				
			||||||
      const updatedEuips = setUpdatedBulkEditTableData(
 | 
					      const updatedEuips = setUpdatedBulkEditTableData(
 | 
				
			||||||
        equipmentId,
 | 
					        equipmentId,
 | 
				
			||||||
        channel,
 | 
					        channel,
 | 
				
			||||||
@@ -318,10 +328,8 @@ const BulkEditAPs = ({ locations, checkedLocations }) => {
 | 
				
			|||||||
        return tempObj;
 | 
					        return tempObj;
 | 
				
			||||||
      });
 | 
					      });
 | 
				
			||||||
      return editedRowsArr.push(tempObj);
 | 
					      return editedRowsArr.push(tempObj);
 | 
				
			||||||
        }
 | 
					    });
 | 
				
			||||||
      );
 | 
					 | 
				
			||||||
    updateEquipments(editedRowsArr);
 | 
					    updateEquipments(editedRowsArr);
 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  const handleLoadMore = () => {
 | 
					  const handleLoadMore = () => {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,5 +1,4 @@
 | 
				
			|||||||
.tabColumn {
 | 
					.tabColumn {
 | 
				
			||||||
  display: flex;
 | 
					  display: flex;
 | 
				
			||||||
  flex-direction: column;
 | 
					  flex-direction: column;
 | 
				
			||||||
  padding: 0 30px;
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -8,7 +8,7 @@ import { ROUTES } from 'constants/index';
 | 
				
			|||||||
import UserContext from 'contexts/UserContext';
 | 
					import UserContext from 'contexts/UserContext';
 | 
				
			||||||
import { GET_ALL_PROFILES } from 'graphql/queries';
 | 
					import { GET_ALL_PROFILES } from 'graphql/queries';
 | 
				
			||||||
import { FILE_UPLOAD } from 'graphql/mutations';
 | 
					import { FILE_UPLOAD } from 'graphql/mutations';
 | 
				
			||||||
import { updateQueryGetAllProfiles } from 'graphql/functions';
 | 
					import { fetchMoreProfiles } from 'graphql/functions';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const GET_PROFILE = gql`
 | 
					const GET_PROFILE = gql`
 | 
				
			||||||
  query GetProfile($id: ID!) {
 | 
					  query GetProfile($id: ID!) {
 | 
				
			||||||
@@ -82,12 +82,14 @@ const ProfileDetails = () => {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  const { data: ssidProfiles, fetchMore } = useQuery(GET_ALL_PROFILES(), {
 | 
					  const { data: ssidProfiles, fetchMore } = useQuery(GET_ALL_PROFILES(), {
 | 
				
			||||||
    variables: { customerId, type: 'ssid' },
 | 
					    variables: { customerId, type: 'ssid' },
 | 
				
			||||||
 | 
					    fetchPolicy: 'network-only',
 | 
				
			||||||
  });
 | 
					  });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  const { data: radiusProfiles, fetchMore: fetchMoreRadiusProfiles } = useQuery(
 | 
					  const { data: radiusProfiles, fetchMore: fetchMoreRadiusProfiles } = useQuery(
 | 
				
			||||||
    GET_ALL_PROFILES(),
 | 
					    GET_ALL_PROFILES(),
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
      variables: { customerId, type: 'radius' },
 | 
					      variables: { customerId, type: 'radius' },
 | 
				
			||||||
 | 
					      fetchPolicy: 'network-only',
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  );
 | 
					  );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -95,17 +97,20 @@ const ProfileDetails = () => {
 | 
				
			|||||||
    GET_ALL_PROFILES(),
 | 
					    GET_ALL_PROFILES(),
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
      variables: { customerId, type: 'captive_portal' },
 | 
					      variables: { customerId, type: 'captive_portal' },
 | 
				
			||||||
 | 
					      fetchPolicy: 'network-only',
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  );
 | 
					  );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  const { data: venueProfiles, fetchMore: fetchMoreVenueProfiles } = useQuery(GET_ALL_PROFILES(), {
 | 
					  const { data: venueProfiles, fetchMore: fetchMoreVenueProfiles } = useQuery(GET_ALL_PROFILES(), {
 | 
				
			||||||
    variables: { customerId, type: 'passpoint_venue' },
 | 
					    variables: { customerId, type: 'passpoint_venue' },
 | 
				
			||||||
 | 
					    fetchPolicy: 'network-only',
 | 
				
			||||||
  });
 | 
					  });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  const { data: operatorProfiles, fetchMore: fetchMoreOperatorProfiles } = useQuery(
 | 
					  const { data: operatorProfiles, fetchMore: fetchMoreOperatorProfiles } = useQuery(
 | 
				
			||||||
    GET_ALL_PROFILES(),
 | 
					    GET_ALL_PROFILES(),
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
      variables: { customerId, type: 'passpoint_operator' },
 | 
					      variables: { customerId, type: 'passpoint_operator' },
 | 
				
			||||||
 | 
					      fetchPolicy: 'network-only',
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  );
 | 
					  );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -113,11 +118,13 @@ const ProfileDetails = () => {
 | 
				
			|||||||
    GET_ALL_PROFILES(),
 | 
					    GET_ALL_PROFILES(),
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
      variables: { customerId, type: 'passpoint_osu_id_provider' },
 | 
					      variables: { customerId, type: 'passpoint_osu_id_provider' },
 | 
				
			||||||
 | 
					      fetchPolicy: 'network-only',
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  );
 | 
					  );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  const { data: rfProfiles, fetchMore: fetchMoreRfProfiles } = useQuery(GET_ALL_PROFILES(), {
 | 
					  const { data: rfProfiles, fetchMore: fetchMoreRfProfiles } = useQuery(GET_ALL_PROFILES(), {
 | 
				
			||||||
    variables: { customerId, type: 'rf' },
 | 
					    variables: { customerId, type: 'rf' },
 | 
				
			||||||
 | 
					    fetchPolicy: 'network-only',
 | 
				
			||||||
  });
 | 
					  });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  const [updateProfile] = useMutation(UPDATE_PROFILE);
 | 
					  const [updateProfile] = useMutation(UPDATE_PROFILE);
 | 
				
			||||||
@@ -185,130 +192,17 @@ const ProfileDetails = () => {
 | 
				
			|||||||
        })
 | 
					        })
 | 
				
			||||||
      );
 | 
					      );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  const handleFetchProfiles = e => {
 | 
					  const handleFetchMoreProfiles = (e, key) => {
 | 
				
			||||||
    if (ssidProfiles.getAllProfiles.context.lastPage) {
 | 
					    if (key === 'radius') fetchMoreProfiles(e, radiusProfiles, fetchMoreRadiusProfiles);
 | 
				
			||||||
      return false;
 | 
					    else if (key === 'captive_portal')
 | 
				
			||||||
    }
 | 
					      fetchMoreProfiles(e, captiveProfiles, fetchMoreCaptiveProfiles);
 | 
				
			||||||
 | 
					    else if (key === 'rf') fetchMoreProfiles(e, rfProfiles, fetchMoreRfProfiles);
 | 
				
			||||||
    e.persist();
 | 
					    else if (key === 'passpoint_venue') fetchMoreProfiles(e, venueProfiles, fetchMoreVenueProfiles);
 | 
				
			||||||
    const { target } = e;
 | 
					    else if (key === 'passpoint_operator')
 | 
				
			||||||
 | 
					      fetchMoreProfiles(e, operatorProfiles, fetchMoreOperatorProfiles);
 | 
				
			||||||
    if (target.scrollTop + target.offsetHeight === target.scrollHeight) {
 | 
					    else if (key === 'passpoint_osu_id_provider')
 | 
				
			||||||
      fetchMore({
 | 
					      fetchMoreProfiles(e, idProviderProfiles, fetchMoreIdProviderProfiles);
 | 
				
			||||||
        variables: { context: { ...ssidProfiles.getAllProfiles.context } },
 | 
					    else fetchMoreProfiles(e, ssidProfiles, fetchMore);
 | 
				
			||||||
        updateQuery: updateQueryGetAllProfiles,
 | 
					 | 
				
			||||||
      });
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    return true;
 | 
					 | 
				
			||||||
  };
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  const handleFetchRadiusProfiles = e => {
 | 
					 | 
				
			||||||
    if (radiusProfiles.getAllProfiles.context.lastPage) {
 | 
					 | 
				
			||||||
      return false;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    e.persist();
 | 
					 | 
				
			||||||
    const { target } = e;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    if (target.scrollTop + target.offsetHeight === target.scrollHeight) {
 | 
					 | 
				
			||||||
      fetchMoreRadiusProfiles({
 | 
					 | 
				
			||||||
        variables: { context: { ...radiusProfiles.getAllProfiles.context } },
 | 
					 | 
				
			||||||
        updateQuery: updateQueryGetAllProfiles,
 | 
					 | 
				
			||||||
      });
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    return true;
 | 
					 | 
				
			||||||
  };
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  const handleFetchCaptiveProfiles = e => {
 | 
					 | 
				
			||||||
    if (captiveProfiles.getAllProfiles.context.lastPage) {
 | 
					 | 
				
			||||||
      return false;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    e.persist();
 | 
					 | 
				
			||||||
    const { target } = e;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    if (target.scrollTop + target.offsetHeight === target.scrollHeight) {
 | 
					 | 
				
			||||||
      fetchMoreCaptiveProfiles({
 | 
					 | 
				
			||||||
        variables: { context: { ...captiveProfiles.getAllProfiles.context } },
 | 
					 | 
				
			||||||
        updateQuery: updateQueryGetAllProfiles,
 | 
					 | 
				
			||||||
      });
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    return true;
 | 
					 | 
				
			||||||
  };
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  const handleFetchVenueProfiles = e => {
 | 
					 | 
				
			||||||
    if (venueProfiles.getAllProfiles.context.lastPage) {
 | 
					 | 
				
			||||||
      return false;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    e.persist();
 | 
					 | 
				
			||||||
    const { target } = e;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    if (target.scrollTop + target.offsetHeight === target.scrollHeight) {
 | 
					 | 
				
			||||||
      fetchMoreVenueProfiles({
 | 
					 | 
				
			||||||
        variables: { context: { ...venueProfiles.getAllProfiles.context } },
 | 
					 | 
				
			||||||
        updateQuery: updateQueryGetAllProfiles,
 | 
					 | 
				
			||||||
      });
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    return true;
 | 
					 | 
				
			||||||
  };
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  const handleFetchRfProfiles = e => {
 | 
					 | 
				
			||||||
    if (rfProfiles.getAllProfiles.context.lastPage) {
 | 
					 | 
				
			||||||
      return false;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    e.persist();
 | 
					 | 
				
			||||||
    const { target } = e;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    if (target.scrollTop + target.offsetHeight === target.scrollHeight) {
 | 
					 | 
				
			||||||
      fetchMoreRfProfiles({
 | 
					 | 
				
			||||||
        variables: { context: { ...rfProfiles.getAllProfiles.context } },
 | 
					 | 
				
			||||||
        updateQuery: updateQueryGetAllProfiles,
 | 
					 | 
				
			||||||
      });
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    return true;
 | 
					 | 
				
			||||||
  };
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  const handleFetchOperatorProfiles = e => {
 | 
					 | 
				
			||||||
    if (operatorProfiles.getAllProfiles.context.lastPage) {
 | 
					 | 
				
			||||||
      return false;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    e.persist();
 | 
					 | 
				
			||||||
    const { target } = e;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    if (target.scrollTop + target.offsetHeight === target.scrollHeight) {
 | 
					 | 
				
			||||||
      fetchMoreOperatorProfiles({
 | 
					 | 
				
			||||||
        variables: { context: { ...operatorProfiles.getAllProfiles.context } },
 | 
					 | 
				
			||||||
        updateQuery: updateQueryGetAllProfiles,
 | 
					 | 
				
			||||||
      });
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    return true;
 | 
					 | 
				
			||||||
  };
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  const handleFetchIdProviderProfiles = e => {
 | 
					 | 
				
			||||||
    if (idProviderProfiles.getAllProfiles.context.lastPage) {
 | 
					 | 
				
			||||||
      return false;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    e.persist();
 | 
					 | 
				
			||||||
    const { target } = e;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    if (target.scrollTop + target.offsetHeight === target.scrollHeight) {
 | 
					 | 
				
			||||||
      fetchMoreIdProviderProfiles({
 | 
					 | 
				
			||||||
        variables: { context: { ...idProviderProfiles.getAllProfiles.context } },
 | 
					 | 
				
			||||||
        updateQuery: updateQueryGetAllProfiles,
 | 
					 | 
				
			||||||
      });
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    return true;
 | 
					 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  if (loading) {
 | 
					  if (loading) {
 | 
				
			||||||
@@ -342,13 +236,7 @@ const ProfileDetails = () => {
 | 
				
			|||||||
      operatorProfiles={operatorProfiles?.getAllProfiles?.items}
 | 
					      operatorProfiles={operatorProfiles?.getAllProfiles?.items}
 | 
				
			||||||
      idProviderProfiles={idProviderProfiles?.getAllProfiles?.items}
 | 
					      idProviderProfiles={idProviderProfiles?.getAllProfiles?.items}
 | 
				
			||||||
      fileUpload={handleFileUpload}
 | 
					      fileUpload={handleFileUpload}
 | 
				
			||||||
      onFetchMoreProfiles={handleFetchProfiles}
 | 
					      onFetchMoreProfiles={handleFetchMoreProfiles}
 | 
				
			||||||
      onFetchMoreRfProfiles={handleFetchRfProfiles}
 | 
					 | 
				
			||||||
      onFetchMoreRadiusProfiles={handleFetchRadiusProfiles}
 | 
					 | 
				
			||||||
      onFetchMoreCaptiveProfiles={handleFetchCaptiveProfiles}
 | 
					 | 
				
			||||||
      onFetchMoreVenueProfiles={handleFetchVenueProfiles}
 | 
					 | 
				
			||||||
      onFetchMoreOperatorProfiles={handleFetchOperatorProfiles}
 | 
					 | 
				
			||||||
      onFetchMoreIdProviderProfiles={handleFetchIdProviderProfiles}
 | 
					 | 
				
			||||||
    />
 | 
					    />
 | 
				
			||||||
  );
 | 
					  );
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -10,3 +10,21 @@ export const updateQueryGetAllProfiles = (previousResult, { fetchMoreResult }) =
 | 
				
			|||||||
    },
 | 
					    },
 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export const fetchMoreProfiles = (e, profile, fetchMore) => {
 | 
				
			||||||
 | 
					  if (profile.getAllProfiles.context.lastPage) {
 | 
				
			||||||
 | 
					    return false;
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  e.persist();
 | 
				
			||||||
 | 
					  const { target } = e;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  if (target.scrollTop + target.offsetHeight + 10 >= target.scrollHeight) {
 | 
				
			||||||
 | 
					    fetchMore({
 | 
				
			||||||
 | 
					      variables: { context: { ...profile.getAllProfiles.context } },
 | 
				
			||||||
 | 
					      updateQuery: updateQueryGetAllProfiles,
 | 
				
			||||||
 | 
					    });
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  return true;
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										8
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										8
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							@@ -1,6 +1,6 @@
 | 
				
			|||||||
{
 | 
					{
 | 
				
			||||||
  "name": "wlan-cloud-ui",
 | 
					  "name": "wlan-cloud-ui",
 | 
				
			||||||
  "version": "0.7.5",
 | 
					  "version": "0.10.2",
 | 
				
			||||||
  "lockfileVersion": 1,
 | 
					  "lockfileVersion": 1,
 | 
				
			||||||
  "requires": true,
 | 
					  "requires": true,
 | 
				
			||||||
  "dependencies": {
 | 
					  "dependencies": {
 | 
				
			||||||
@@ -1845,9 +1845,9 @@
 | 
				
			|||||||
      }
 | 
					      }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    "@tip-wlan/wlan-cloud-ui-library": {
 | 
					    "@tip-wlan/wlan-cloud-ui-library": {
 | 
				
			||||||
      "version": "0.7.6",
 | 
					      "version": "0.13.3",
 | 
				
			||||||
      "resolved": "https://tip.jfrog.io/artifactory/api/npm/tip-wlan-cloud-npm-repo/@tip-wlan/wlan-cloud-ui-library/-/@tip-wlan/wlan-cloud-ui-library-0.7.6.tgz",
 | 
					      "resolved": "https://tip.jfrog.io/artifactory/api/npm/tip-wlan-cloud-npm-repo/@tip-wlan/wlan-cloud-ui-library/-/@tip-wlan/wlan-cloud-ui-library-0.13.3.tgz",
 | 
				
			||||||
      "integrity": "sha1-GW0Wz1L8OnAwRqlyjUNZnGIuWQg="
 | 
					      "integrity": "sha1-iTZriIG3Yd9OdrSzBWz5JKO7Cyg="
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    "@types/anymatch": {
 | 
					    "@types/anymatch": {
 | 
				
			||||||
      "version": "1.3.1",
 | 
					      "version": "1.3.1",
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,6 +1,6 @@
 | 
				
			|||||||
{
 | 
					{
 | 
				
			||||||
  "name": "wlan-cloud-ui",
 | 
					  "name": "wlan-cloud-ui",
 | 
				
			||||||
  "version": "0.7.5",
 | 
					  "version": "0.10.2",
 | 
				
			||||||
  "author": "ConnectUs",
 | 
					  "author": "ConnectUs",
 | 
				
			||||||
  "description": "React Portal",
 | 
					  "description": "React Portal",
 | 
				
			||||||
  "engines": {
 | 
					  "engines": {
 | 
				
			||||||
@@ -10,8 +10,8 @@
 | 
				
			|||||||
  "scripts": {
 | 
					  "scripts": {
 | 
				
			||||||
    "test": "jest --passWithNoTests --coverage",
 | 
					    "test": "jest --passWithNoTests --coverage",
 | 
				
			||||||
    "start": "cross-env NODE_ENV=development webpack-dev-server",
 | 
					    "start": "cross-env NODE_ENV=development webpack-dev-server",
 | 
				
			||||||
    "start:bare": "cross-env API=https://wlan-graphql.qa.lab.wlan.tip.build NODE_ENV=bare webpack-dev-server",
 | 
					    "start:bare": "cross-env API=ttps://portal.rtl.lab.netexperience.com NODE_ENV=bare webpack-dev-server",
 | 
				
			||||||
    "start:dev": "cross-env API=https://wlan-graphql.qa.lab.wlan.tip.build NODE_ENV=development webpack-dev-server",
 | 
					    "start:dev": "cross-env API=https://portal.rtl.lab.netexperience.com NODE_ENV=development webpack-dev-server",
 | 
				
			||||||
    "build": "webpack --mode=production",
 | 
					    "build": "webpack --mode=production",
 | 
				
			||||||
    "format": "prettier --write 'app/**/*{.js,.scss}'",
 | 
					    "format": "prettier --write 'app/**/*{.js,.scss}'",
 | 
				
			||||||
    "eslint-fix": "eslint --fix 'app/**/*.js'",
 | 
					    "eslint-fix": "eslint --fix 'app/**/*.js'",
 | 
				
			||||||
@@ -21,7 +21,7 @@
 | 
				
			|||||||
  "dependencies": {
 | 
					  "dependencies": {
 | 
				
			||||||
    "@ant-design/icons": "^4.2.1",
 | 
					    "@ant-design/icons": "^4.2.1",
 | 
				
			||||||
    "@apollo/client": "^3.1.3",
 | 
					    "@apollo/client": "^3.1.3",
 | 
				
			||||||
    "@tip-wlan/wlan-cloud-ui-library": "^0.7.6",
 | 
					    "@tip-wlan/wlan-cloud-ui-library": "^0.13.3",
 | 
				
			||||||
    "antd": "^4.5.2",
 | 
					    "antd": "^4.5.2",
 | 
				
			||||||
    "apollo-upload-client": "^13.0.0",
 | 
					    "apollo-upload-client": "^13.0.0",
 | 
				
			||||||
    "clean-webpack-plugin": "^3.0.0",
 | 
					    "clean-webpack-plugin": "^3.0.0",
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user