mirror of
https://github.com/Telecominfraproject/wlan-cloud-ui.git
synced 2025-11-01 19:27:51 +00:00
Added Passpoint profile to Add/Update profile
This commit is contained in:
@@ -79,6 +79,15 @@ const AddProfile = () => {
|
|||||||
variables: { customerId, type: 'rf' },
|
variables: { customerId, type: 'rf' },
|
||||||
fetchPolicy: 'network-only',
|
fetchPolicy: 'network-only',
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const { data: passpointProfiles, fetchMore: fetchMorePasspointProfiles } = useQuery(
|
||||||
|
GET_ALL_PROFILES(),
|
||||||
|
{
|
||||||
|
variables: { customerId, type: 'rf' },
|
||||||
|
fetchPolicy: 'network-only',
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
const [createProfile] = useMutation(CREATE_PROFILE);
|
const [createProfile] = useMutation(CREATE_PROFILE);
|
||||||
const history = useHistory();
|
const history = useHistory();
|
||||||
|
|
||||||
@@ -117,6 +126,8 @@ const AddProfile = () => {
|
|||||||
fetchMoreProfiles(e, operatorProfiles, fetchMoreOperatorProfiles);
|
fetchMoreProfiles(e, operatorProfiles, fetchMoreOperatorProfiles);
|
||||||
else if (key === 'passpoint_osu_id_provider')
|
else if (key === 'passpoint_osu_id_provider')
|
||||||
fetchMoreProfiles(e, idProviderProfiles, fetchMoreIdProviderProfiles);
|
fetchMoreProfiles(e, idProviderProfiles, fetchMoreIdProviderProfiles);
|
||||||
|
else if (key === 'passpoint')
|
||||||
|
fetchMoreProfiles(e, passpointProfiles, fetchMorePasspointProfiles);
|
||||||
else fetchMoreProfiles(e, ssidProfiles, fetchMore);
|
else fetchMoreProfiles(e, ssidProfiles, fetchMore);
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -170,6 +181,7 @@ const AddProfile = () => {
|
|||||||
operatorProfiles={operatorProfiles?.getAllProfiles?.items}
|
operatorProfiles={operatorProfiles?.getAllProfiles?.items}
|
||||||
idProviderProfiles={idProviderProfiles?.getAllProfiles?.items}
|
idProviderProfiles={idProviderProfiles?.getAllProfiles?.items}
|
||||||
rfProfiles={rfProfiles?.getAllProfiles?.items}
|
rfProfiles={rfProfiles?.getAllProfiles?.items}
|
||||||
|
passpointProfiles={passpointProfiles?.getAllProfiles?.items}
|
||||||
onFetchMoreProfiles={handleFetchMoreProfiles}
|
onFetchMoreProfiles={handleFetchMoreProfiles}
|
||||||
fileUpload={handleFileUpload}
|
fileUpload={handleFileUpload}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -32,6 +32,8 @@ const GET_PROFILE = gql`
|
|||||||
osuSsidProfile {
|
osuSsidProfile {
|
||||||
id
|
id
|
||||||
name
|
name
|
||||||
|
profileType
|
||||||
|
details
|
||||||
}
|
}
|
||||||
childProfileIds
|
childProfileIds
|
||||||
createdTimestamp
|
createdTimestamp
|
||||||
@@ -139,6 +141,14 @@ const ProfileDetails = () => {
|
|||||||
fetchPolicy: 'network-only',
|
fetchPolicy: 'network-only',
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const { data: passpointProfiles, fetchMore: fetchMorePasspointProfiles } = useQuery(
|
||||||
|
GET_ALL_PROFILES(),
|
||||||
|
{
|
||||||
|
variables: { customerId, type: 'rf' },
|
||||||
|
fetchPolicy: 'network-only',
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
const [updateProfile] = useMutation(UPDATE_PROFILE);
|
const [updateProfile] = useMutation(UPDATE_PROFILE);
|
||||||
const [deleteProfile] = useMutation(DELETE_PROFILE);
|
const [deleteProfile] = useMutation(DELETE_PROFILE);
|
||||||
|
|
||||||
@@ -269,6 +279,8 @@ const ProfileDetails = () => {
|
|||||||
fetchMoreProfiles(e, operatorProfiles, fetchMoreOperatorProfiles);
|
fetchMoreProfiles(e, operatorProfiles, fetchMoreOperatorProfiles);
|
||||||
else if (key === 'passpoint_osu_id_provider')
|
else if (key === 'passpoint_osu_id_provider')
|
||||||
fetchMoreProfiles(e, idProviderProfiles, fetchMoreIdProviderProfiles);
|
fetchMoreProfiles(e, idProviderProfiles, fetchMoreIdProviderProfiles);
|
||||||
|
else if (key === 'passpoint')
|
||||||
|
fetchMoreProfiles(e, passpointProfiles, fetchMorePasspointProfiles);
|
||||||
else fetchMoreProfiles(e, ssidProfiles, fetchMore);
|
else fetchMoreProfiles(e, ssidProfiles, fetchMore);
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -289,6 +301,7 @@ const ProfileDetails = () => {
|
|||||||
return (
|
return (
|
||||||
<ProfileDetailsPage
|
<ProfileDetailsPage
|
||||||
name={data.getProfile.name}
|
name={data.getProfile.name}
|
||||||
|
profileId={data?.getProfile?.id}
|
||||||
profileType={data.getProfile.profileType}
|
profileType={data.getProfile.profileType}
|
||||||
details={data.getProfile.details}
|
details={data.getProfile.details}
|
||||||
childProfiles={data.getProfile.childProfiles}
|
childProfiles={data.getProfile.childProfiles}
|
||||||
@@ -304,6 +317,7 @@ const ProfileDetails = () => {
|
|||||||
idProviderProfiles={idProviderProfiles?.getAllProfiles?.items}
|
idProviderProfiles={idProviderProfiles?.getAllProfiles?.items}
|
||||||
associatedSsidProfiles={data.getProfile?.associatedSsidProfiles}
|
associatedSsidProfiles={data.getProfile?.associatedSsidProfiles}
|
||||||
osuSsidProfile={data.getProfile?.osuSsidProfile}
|
osuSsidProfile={data.getProfile?.osuSsidProfile}
|
||||||
|
passpointProfiles={passpointProfiles?.getAllProfiles?.items}
|
||||||
fileUpload={handleFileUpload}
|
fileUpload={handleFileUpload}
|
||||||
onFetchMoreProfiles={handleFetchMoreProfiles}
|
onFetchMoreProfiles={handleFetchMoreProfiles}
|
||||||
onDownloadFile={handleDownloadFile}
|
onDownloadFile={handleDownloadFile}
|
||||||
|
|||||||
Reference in New Issue
Block a user