mirror of
https://github.com/Telecominfraproject/wlan-cloud-ui.git
synced 2025-11-01 03:07:53 +00:00
Compare commits
29 Commits
v1.0.0-rc1
...
v1.0.0-rc2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e38c672f91 | ||
|
|
7810f51baf | ||
|
|
300f00cc85 | ||
|
|
0b83cce523 | ||
|
|
5de121330e | ||
|
|
252047aad4 | ||
|
|
cf7ed39120 | ||
|
|
a7c7b0f295 | ||
|
|
8d14212702 | ||
|
|
70d609643c | ||
|
|
a6e2f9b5c7 | ||
|
|
569ce9d5f9 | ||
|
|
a0506eaf07 | ||
|
|
31074ac42e | ||
|
|
2eebd4ac3d | ||
|
|
153e4f7dcf | ||
|
|
325f86ff42 | ||
|
|
5bff3379d5 | ||
|
|
a2cf42e90c | ||
|
|
0fd5803584 | ||
|
|
af98ac522a | ||
|
|
6baf3785da | ||
|
|
eba4850ae1 | ||
|
|
36682cd207 | ||
|
|
3cfdcf15c6 | ||
|
|
63ac433ad8 | ||
|
|
2ed09f903c | ||
|
|
2c0fa53896 | ||
|
|
9bf737c1eb |
14
.github/workflows/dockerpublish.yml
vendored
14
.github/workflows/dockerpublish.yml
vendored
@@ -15,8 +15,8 @@ on:
|
||||
pull_request:
|
||||
|
||||
schedule:
|
||||
# runs nightly build at 5AM
|
||||
- cron: '00 09 * * *'
|
||||
# runs nightly build at 5AM
|
||||
- cron: '00 09 * * *'
|
||||
|
||||
env:
|
||||
IMAGE_NAME: wlan-cloud-ui
|
||||
@@ -49,7 +49,7 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Adding property file with component version and commit hash
|
||||
- name: Adding property file with component version and commit hash
|
||||
run: |
|
||||
# Strip git ref prefix from version
|
||||
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
|
||||
@@ -61,7 +61,7 @@ jobs:
|
||||
[[ "${{ 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
|
||||
[ "$VERSION" == "master" ] && VERSION=1.0.0-SNAPSHOT
|
||||
[ "$VERSION" == "master" ] && VERSION=0.0.1-SNAPSHOT
|
||||
|
||||
TIMESTAMP=$(date +'%Y-%m-%d')
|
||||
|
||||
@@ -96,7 +96,7 @@ jobs:
|
||||
[[ "${{ 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
|
||||
[ "$VERSION" == "master" ] && VERSION=1.0.0-SNAPSHOT
|
||||
[ "$VERSION" == "master" ] && VERSION=0.0.1-SNAPSHOT
|
||||
|
||||
echo IMAGE_ID=$IMAGE_ID
|
||||
echo VERSION=$VERSION
|
||||
@@ -104,6 +104,6 @@ jobs:
|
||||
|
||||
docker tag image $IMAGE_ID:$VERSION
|
||||
docker push $IMAGE_ID:$VERSION
|
||||
|
||||
|
||||
docker tag image $IMAGE_ID:$VERSION-$TIMESTAMP
|
||||
docker push $IMAGE_ID:$VERSION-$TIMESTAMP
|
||||
docker push $IMAGE_ID:$VERSION-$TIMESTAMP
|
||||
|
||||
@@ -92,7 +92,9 @@ const App = () => {
|
||||
<ProtectedRouteWithLayout exact path={ROUTES.addprofile} component={AddProfile} />
|
||||
|
||||
<ProtectedRouteWithLayout exact path={ROUTES.alarms} component={Alarms} />
|
||||
<ProtectedRouteWithLayout exact path={ROUTES.account} component={EditAccount} />
|
||||
{user?.id !== 0 && (
|
||||
<ProtectedRouteWithLayout exact path={ROUTES.account} component={EditAccount} />
|
||||
)}
|
||||
{user?.roles?.[0] === 'SuperUser' && (
|
||||
<ProtectedRouteWithLayout exact path={ROUTES.users} component={Accounts} />
|
||||
)}
|
||||
|
||||
@@ -13,7 +13,7 @@ import { removeItem } from 'utils/localStorage';
|
||||
import UserContext from 'contexts/UserContext';
|
||||
|
||||
const MasterLayout = ({ children }) => {
|
||||
const { roles, customerId } = useContext(UserContext);
|
||||
const { roles, customerId, id: currentUserId } = useContext(UserContext);
|
||||
|
||||
const client = useApolloClient();
|
||||
const location = useLocation();
|
||||
@@ -56,11 +56,15 @@ const MasterLayout = ({ children }) => {
|
||||
key: 'settings',
|
||||
text: 'Settings',
|
||||
children: [
|
||||
{
|
||||
key: 'editAccount',
|
||||
path: ROUTES.account,
|
||||
text: 'Edit Account',
|
||||
},
|
||||
...(currentUserId !== 0
|
||||
? [
|
||||
{
|
||||
key: 'editAccount',
|
||||
path: ROUTES.account,
|
||||
text: 'Edit Account',
|
||||
},
|
||||
]
|
||||
: []),
|
||||
{
|
||||
key: 'logout',
|
||||
path: ROUTES.root,
|
||||
@@ -90,6 +94,7 @@ const MasterLayout = ({ children }) => {
|
||||
menuItems={menuItems}
|
||||
mobileMenuItems={mobileMenuItems}
|
||||
totalAlarms={data && data.getAlarmCount}
|
||||
currentUserId={currentUserId}
|
||||
>
|
||||
{children}
|
||||
</Layout>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import React, { useContext } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { useParams, useHistory } from 'react-router-dom';
|
||||
import { useQuery, useMutation, gql } from '@apollo/client';
|
||||
import { useQuery, useMutation } from '@apollo/client';
|
||||
import { Alert, notification } from 'antd';
|
||||
import moment from 'moment';
|
||||
import {
|
||||
@@ -9,8 +9,15 @@ import {
|
||||
Loading,
|
||||
} from '@tip-wlan/wlan-cloud-ui-library';
|
||||
|
||||
import { FILTER_SERVICE_METRICS, GET_ALL_FIRMWARE, GET_ALL_PROFILES } from 'graphql/queries';
|
||||
import {
|
||||
GET_EQUIPMENT,
|
||||
FILTER_SERVICE_METRICS,
|
||||
GET_ALL_FIRMWARE,
|
||||
GET_ALL_PROFILES,
|
||||
} from 'graphql/queries';
|
||||
import {
|
||||
UPDATE_EQUIPMENT,
|
||||
DELETE_EQUIPMENT,
|
||||
UPDATE_EQUIPMENT_FIRMWARE,
|
||||
REQUEST_EQUIPMENT_SWITCH_BANK,
|
||||
REQUEST_EQUIPMENT_REBOOT,
|
||||
@@ -18,120 +25,6 @@ import {
|
||||
import { fetchMoreProfiles } from 'graphql/functions';
|
||||
import UserContext from 'contexts/UserContext';
|
||||
|
||||
const GET_EQUIPMENT = gql`
|
||||
query GetEquipment($id: ID!) {
|
||||
getEquipment(id: $id) {
|
||||
id
|
||||
equipmentType
|
||||
inventoryId
|
||||
customerId
|
||||
profileId
|
||||
locationId
|
||||
name
|
||||
latitude
|
||||
longitude
|
||||
serial
|
||||
lastModifiedTimestamp
|
||||
details
|
||||
profile {
|
||||
id
|
||||
name
|
||||
childProfiles {
|
||||
id
|
||||
name
|
||||
details
|
||||
}
|
||||
}
|
||||
baseMacAddress
|
||||
manufacturer
|
||||
status {
|
||||
firmware {
|
||||
detailsJSON
|
||||
}
|
||||
protocol {
|
||||
detailsJSON
|
||||
}
|
||||
radioUtilization {
|
||||
detailsJSON
|
||||
}
|
||||
clientDetails {
|
||||
detailsJSON
|
||||
details {
|
||||
numClientsPerRadio
|
||||
}
|
||||
}
|
||||
osPerformance {
|
||||
detailsJSON
|
||||
}
|
||||
}
|
||||
model
|
||||
alarmsCount
|
||||
alarms {
|
||||
severity
|
||||
alarmCode
|
||||
details
|
||||
createdTimestamp
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
const UPDATE_EQUIPMENT = gql`
|
||||
mutation UpdateEquipment(
|
||||
$id: ID!
|
||||
$equipmentType: String!
|
||||
$inventoryId: String!
|
||||
$customerId: ID!
|
||||
$profileId: ID!
|
||||
$locationId: ID!
|
||||
$name: String!
|
||||
$baseMacAddress: String
|
||||
$latitude: String
|
||||
$longitude: String
|
||||
$serial: String
|
||||
$lastModifiedTimestamp: String
|
||||
$details: JSONObject
|
||||
) {
|
||||
updateEquipment(
|
||||
id: $id
|
||||
equipmentType: $equipmentType
|
||||
inventoryId: $inventoryId
|
||||
customerId: $customerId
|
||||
profileId: $profileId
|
||||
locationId: $locationId
|
||||
name: $name
|
||||
baseMacAddress: $baseMacAddress
|
||||
latitude: $latitude
|
||||
longitude: $longitude
|
||||
serial: $serial
|
||||
lastModifiedTimestamp: $lastModifiedTimestamp
|
||||
details: $details
|
||||
) {
|
||||
id
|
||||
equipmentType
|
||||
inventoryId
|
||||
customerId
|
||||
profileId
|
||||
locationId
|
||||
name
|
||||
baseMacAddress
|
||||
latitude
|
||||
longitude
|
||||
serial
|
||||
lastModifiedTimestamp
|
||||
details
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
const DELETE_EQUIPMENT = gql`
|
||||
mutation DeleteEquipment($id: ID!) {
|
||||
deleteEquipment(id: $id) {
|
||||
id
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
const toTime = moment();
|
||||
const fromTime = moment().subtract(1, 'hour');
|
||||
|
||||
|
||||
@@ -89,8 +89,8 @@ const accessPointsTableColumns = [
|
||||
},
|
||||
{
|
||||
title: 'CHANNEL',
|
||||
dataIndex: 'channel',
|
||||
render: renderTableCell,
|
||||
dataIndex: ['status', 'channel', 'detailsJSON', 'channelNumberStatusDataMap'],
|
||||
render: text => renderTableCell(Object.values(text ?? [])),
|
||||
},
|
||||
{
|
||||
title: 'OCCUPANCY',
|
||||
|
||||
@@ -27,13 +27,22 @@ const renderTableCell = tabCell => {
|
||||
return <span>{tabCell}</span>;
|
||||
};
|
||||
const accessPointsChannelTableColumns = [
|
||||
{ title: 'Name', dataIndex: 'name', key: 'name', width: 150, render: renderTableCell },
|
||||
{ title: 'Name', dataIndex: 'name', key: 'name', width: 250, render: renderTableCell },
|
||||
{
|
||||
title: 'Channel',
|
||||
dataIndex: 'channel',
|
||||
key: 'channel',
|
||||
title: 'Manual Active Channel',
|
||||
dataIndex: 'manualChannelNumber',
|
||||
key: 'manualChannelNumber',
|
||||
editable: true,
|
||||
width: 150,
|
||||
width: 200,
|
||||
render: renderTableCell,
|
||||
},
|
||||
|
||||
{
|
||||
title: 'Manual Backup Channel',
|
||||
dataIndex: 'manualBackupChannelNumber',
|
||||
key: 'manualBackupChannelNumber',
|
||||
editable: true,
|
||||
width: 210,
|
||||
render: renderTableCell,
|
||||
},
|
||||
{
|
||||
@@ -49,7 +58,7 @@ const accessPointsChannelTableColumns = [
|
||||
dataIndex: 'probeResponseThreshold',
|
||||
key: 'probeResponseThreshold',
|
||||
editable: true,
|
||||
width: 200,
|
||||
width: 210,
|
||||
render: renderTableCell,
|
||||
},
|
||||
{
|
||||
@@ -57,7 +66,7 @@ const accessPointsChannelTableColumns = [
|
||||
dataIndex: 'clientDisconnectThreshold',
|
||||
key: 'clientDisconnectThreshold',
|
||||
editable: true,
|
||||
width: 200,
|
||||
width: 210,
|
||||
|
||||
render: renderTableCell,
|
||||
},
|
||||
@@ -66,7 +75,7 @@ const accessPointsChannelTableColumns = [
|
||||
dataIndex: 'snrDrop',
|
||||
key: 'snrDrop',
|
||||
editable: true,
|
||||
width: 175,
|
||||
width: 150,
|
||||
render: renderTableCell,
|
||||
},
|
||||
{
|
||||
@@ -169,6 +178,21 @@ const BulkEditAPs = ({ locations, checkedLocations }) => {
|
||||
const [updateEquipmentBulk] = useMutation(UPDATE_EQUIPMENT_BULK);
|
||||
|
||||
const getRadioDetails = (radioDetails, type) => {
|
||||
if (type === 'manualChannelNumber') {
|
||||
const manualChannelNumbers = [];
|
||||
Object.keys(radioDetails?.radioMap || {}).map(i => {
|
||||
return manualChannelNumbers.push(radioDetails.radioMap[i]?.manualChannelNumber);
|
||||
});
|
||||
return manualChannelNumbers;
|
||||
}
|
||||
|
||||
if (type === 'manualBackupChannelNumber') {
|
||||
const manualBackupChannelNumbers = [];
|
||||
Object.keys(radioDetails?.radioMap || {}).map(i => {
|
||||
return manualBackupChannelNumbers.push(radioDetails.radioMap[i]?.manualBackupChannelNumber);
|
||||
});
|
||||
return manualBackupChannelNumbers;
|
||||
}
|
||||
if (type === 'cellSize') {
|
||||
const cellSizeValues = [];
|
||||
Object.keys(radioDetails?.radioMap || {}).map(i => {
|
||||
@@ -213,26 +237,25 @@ const BulkEditAPs = ({ locations, checkedLocations }) => {
|
||||
return minLoadValue;
|
||||
};
|
||||
|
||||
const setAccessPointsBulkEditTableData = (dataSource = []) => {
|
||||
const tableData = dataSource.items.map(({ id: key, name, channel, details }) => {
|
||||
return {
|
||||
key,
|
||||
id: key,
|
||||
name,
|
||||
channel,
|
||||
cellSize: getRadioDetails(details, 'cellSize'),
|
||||
probeResponseThreshold: getRadioDetails(details, 'probeResponseThreshold'),
|
||||
clientDisconnectThreshold: getRadioDetails(details, 'clientDisconnectThreshold'),
|
||||
snrDrop: getRadioDetails(details, 'snrDrop'),
|
||||
minLoad: getRadioDetails(details, 'minLoad'),
|
||||
};
|
||||
});
|
||||
return tableData;
|
||||
};
|
||||
const setAccessPointsBulkEditTableData = (dataSource = []) =>
|
||||
dataSource.items.map(({ id: key, name, details }) => ({
|
||||
key,
|
||||
id: key,
|
||||
name,
|
||||
manualChannelNumber: getRadioDetails(details, 'manualChannelNumber'),
|
||||
manualBackupChannelNumber: getRadioDetails(details, 'manualBackupChannelNumber'),
|
||||
cellSize: getRadioDetails(details, 'cellSize'),
|
||||
probeResponseThreshold: getRadioDetails(details, 'probeResponseThreshold'),
|
||||
clientDisconnectThreshold: getRadioDetails(details, 'clientDisconnectThreshold'),
|
||||
snrDrop: getRadioDetails(details, 'snrDrop'),
|
||||
minLoad: getRadioDetails(details, 'minLoad'),
|
||||
radioMap: Object.keys(details?.radioMap || {}),
|
||||
}));
|
||||
|
||||
const setUpdatedBulkEditTableData = (
|
||||
equipmentId,
|
||||
channel,
|
||||
manualChannelNumber,
|
||||
manualBackupChannelNumber,
|
||||
cellSize,
|
||||
probeResponseThreshold,
|
||||
clientDisconnectThreshold,
|
||||
@@ -251,7 +274,8 @@ const BulkEditAPs = ({ locations, checkedLocations }) => {
|
||||
minLoadFactor = minLoad[dataIndex];
|
||||
|
||||
frequencies[`${i}`] = {
|
||||
channelNumber: channel[dataIndex],
|
||||
channelNumber: manualChannelNumber[dataIndex],
|
||||
backupChannelNumber: manualBackupChannelNumber[dataIndex],
|
||||
rxCellSizeDb: {
|
||||
auto: true,
|
||||
value: cellSize[dataIndex],
|
||||
@@ -300,7 +324,8 @@ const BulkEditAPs = ({ locations, checkedLocations }) => {
|
||||
Object.keys(updatedRows).forEach(key => {
|
||||
const {
|
||||
id: equipmentId,
|
||||
channel,
|
||||
manualChannelNumber,
|
||||
manualBackupChannelNumber,
|
||||
cellSize,
|
||||
probeResponseThreshold,
|
||||
clientDisconnectThreshold,
|
||||
@@ -309,7 +334,8 @@ const BulkEditAPs = ({ locations, checkedLocations }) => {
|
||||
} = updatedRows[key];
|
||||
const updatedEuips = setUpdatedBulkEditTableData(
|
||||
equipmentId,
|
||||
channel,
|
||||
manualChannelNumber,
|
||||
manualBackupChannelNumber,
|
||||
cellSize,
|
||||
probeResponseThreshold,
|
||||
clientDisconnectThreshold,
|
||||
@@ -364,18 +390,9 @@ const BulkEditAPs = ({ locations, checkedLocations }) => {
|
||||
return (
|
||||
<BulkEditAccessPoints
|
||||
tableColumns={accessPointsChannelTableColumns}
|
||||
tableData={
|
||||
equipData &&
|
||||
equipData.filterEquipment &&
|
||||
setAccessPointsBulkEditTableData(equipData && equipData.filterEquipment)
|
||||
}
|
||||
tableData={setAccessPointsBulkEditTableData(equipData?.filterEquipment)}
|
||||
onLoadMore={handleLoadMore}
|
||||
isLastPage={
|
||||
equipData &&
|
||||
equipData.filterEquipment &&
|
||||
equipData.filterEquipment.context &&
|
||||
equipData.filterEquipment.context.lastPage
|
||||
}
|
||||
isLastPage={equipData?.filterEquipment?.context?.lastPage}
|
||||
onSaveChanges={handleSaveChanges}
|
||||
breadcrumbPath={getBreadcrumbPath(id, locations)}
|
||||
/>
|
||||
|
||||
@@ -4,11 +4,11 @@ import { useQuery, useMutation, gql } from '@apollo/client';
|
||||
import { Alert, notification } from 'antd';
|
||||
import { ProfileDetails as ProfileDetailsPage, Loading } from '@tip-wlan/wlan-cloud-ui-library';
|
||||
|
||||
import { ROUTES } from 'constants/index';
|
||||
import { ROUTES, AUTH_TOKEN } from 'constants/index';
|
||||
import UserContext from 'contexts/UserContext';
|
||||
import { GET_ALL_PROFILES } from 'graphql/queries';
|
||||
import { FILE_UPLOAD } from 'graphql/mutations';
|
||||
import { GET_ALL_PROFILES, GET_API_URL } from 'graphql/queries';
|
||||
import { fetchMoreProfiles } from 'graphql/functions';
|
||||
import { getItem } from 'utils/localStorage';
|
||||
|
||||
const GET_PROFILE = gql`
|
||||
query GetProfile($id: ID!) {
|
||||
@@ -23,6 +23,16 @@ const GET_PROFILE = gql`
|
||||
profileType
|
||||
details
|
||||
}
|
||||
associatedSsidProfiles {
|
||||
id
|
||||
name
|
||||
profileType
|
||||
details
|
||||
}
|
||||
osuSsidProfile {
|
||||
id
|
||||
name
|
||||
}
|
||||
childProfileIds
|
||||
createdTimestamp
|
||||
lastModifiedTimestamp
|
||||
@@ -75,6 +85,8 @@ const ProfileDetails = () => {
|
||||
|
||||
const [redirect, setRedirect] = useState(false);
|
||||
|
||||
const { data: apiUrl } = useQuery(GET_API_URL);
|
||||
|
||||
const { loading, error, data } = useQuery(GET_PROFILE, {
|
||||
variables: { id },
|
||||
fetchPolicy: 'network-only',
|
||||
@@ -130,8 +142,6 @@ const ProfileDetails = () => {
|
||||
const [updateProfile] = useMutation(UPDATE_PROFILE);
|
||||
const [deleteProfile] = useMutation(DELETE_PROFILE);
|
||||
|
||||
const [fileUpload] = useMutation(FILE_UPLOAD);
|
||||
|
||||
const handleDeleteProfile = () => {
|
||||
deleteProfile({ variables: { id } })
|
||||
.then(() => {
|
||||
@@ -177,20 +187,77 @@ const ProfileDetails = () => {
|
||||
);
|
||||
};
|
||||
|
||||
const handleFileUpload = (fileName, file) =>
|
||||
fileUpload({ variables: { fileName, file } })
|
||||
.then(() => {
|
||||
notification.success({
|
||||
message: 'Success',
|
||||
description: 'File successfully uploaded.',
|
||||
});
|
||||
const handleFileUpload = async (fileName, file) => {
|
||||
const token = getItem(AUTH_TOKEN);
|
||||
|
||||
if (apiUrl?.getApiUrl) {
|
||||
fetch(`${apiUrl?.getApiUrl}filestore/${fileName}`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
Authorization: token ? `Bearer ${token.access_token}` : '',
|
||||
'Content-Type': 'application/octet-stream',
|
||||
},
|
||||
body: file,
|
||||
})
|
||||
.catch(() =>
|
||||
notification.error({
|
||||
message: 'Error',
|
||||
description: 'File could not be uploaded.',
|
||||
.then(response => response.json())
|
||||
.then(resp => {
|
||||
if (resp?.success) {
|
||||
notification.success({
|
||||
message: 'Success',
|
||||
description: 'File successfully uploaded.',
|
||||
});
|
||||
} else {
|
||||
notification.error({
|
||||
message: 'Error',
|
||||
description: 'File could not be uploaded.',
|
||||
});
|
||||
}
|
||||
})
|
||||
);
|
||||
.catch(() => {
|
||||
notification.error({
|
||||
message: 'Error',
|
||||
description: 'File could not be uploaded.',
|
||||
});
|
||||
});
|
||||
} else {
|
||||
notification.error({
|
||||
message: 'Error',
|
||||
description: 'File could not be uploaded.',
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
const handleDownloadFile = async name => {
|
||||
const token = getItem(AUTH_TOKEN);
|
||||
if (apiUrl?.getApiUrl) {
|
||||
return fetch(`${apiUrl?.getApiUrl}filestore/${encodeURIComponent(name)}`, {
|
||||
method: 'GET',
|
||||
headers: {
|
||||
'Content-Type': 'application/octet-stream',
|
||||
Authorization: token ? `Bearer ${token.access_token}` : '',
|
||||
},
|
||||
})
|
||||
.then(response => response.blob())
|
||||
.then(blob => {
|
||||
return new Promise((resolve, reject) => {
|
||||
const reader = new FileReader();
|
||||
reader.onloadend = () => resolve(reader.result);
|
||||
reader.onerror = reject;
|
||||
reader.readAsDataURL(blob);
|
||||
});
|
||||
})
|
||||
.catch(() => {
|
||||
notification.error({
|
||||
message: 'Error',
|
||||
description: 'File could not be retrieved.',
|
||||
});
|
||||
});
|
||||
}
|
||||
return notification.error({
|
||||
message: 'Error',
|
||||
description: 'File could not be retrieved.',
|
||||
});
|
||||
};
|
||||
|
||||
const handleFetchMoreProfiles = (e, key) => {
|
||||
if (key === 'radius') fetchMoreProfiles(e, radiusProfiles, fetchMoreRadiusProfiles);
|
||||
@@ -235,8 +302,11 @@ const ProfileDetails = () => {
|
||||
venueProfiles={venueProfiles?.getAllProfiles?.items}
|
||||
operatorProfiles={operatorProfiles?.getAllProfiles?.items}
|
||||
idProviderProfiles={idProviderProfiles?.getAllProfiles?.items}
|
||||
associatedSsidProfiles={data.getProfile?.associatedSsidProfiles}
|
||||
osuSsidProfile={data.getProfile?.osuSsidProfile}
|
||||
fileUpload={handleFileUpload}
|
||||
onFetchMoreProfiles={handleFetchMoreProfiles}
|
||||
onDownloadFile={handleDownloadFile}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -255,6 +255,62 @@ export const CREATE_EQUIPMENT = gql`
|
||||
}
|
||||
`;
|
||||
|
||||
export const UPDATE_EQUIPMENT = gql`
|
||||
mutation UpdateEquipment(
|
||||
$id: ID!
|
||||
$equipmentType: String!
|
||||
$inventoryId: String!
|
||||
$customerId: ID!
|
||||
$profileId: ID!
|
||||
$locationId: ID!
|
||||
$name: String!
|
||||
$baseMacAddress: String
|
||||
$latitude: String
|
||||
$longitude: String
|
||||
$serial: String
|
||||
$lastModifiedTimestamp: String
|
||||
$details: JSONObject
|
||||
) {
|
||||
updateEquipment(
|
||||
id: $id
|
||||
equipmentType: $equipmentType
|
||||
inventoryId: $inventoryId
|
||||
customerId: $customerId
|
||||
profileId: $profileId
|
||||
locationId: $locationId
|
||||
name: $name
|
||||
baseMacAddress: $baseMacAddress
|
||||
latitude: $latitude
|
||||
longitude: $longitude
|
||||
serial: $serial
|
||||
lastModifiedTimestamp: $lastModifiedTimestamp
|
||||
details: $details
|
||||
) {
|
||||
id
|
||||
equipmentType
|
||||
inventoryId
|
||||
customerId
|
||||
profileId
|
||||
locationId
|
||||
name
|
||||
baseMacAddress
|
||||
latitude
|
||||
longitude
|
||||
serial
|
||||
lastModifiedTimestamp
|
||||
details
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const DELETE_EQUIPMENT = gql`
|
||||
mutation DeleteEquipment($id: ID!) {
|
||||
deleteEquipment(id: $id) {
|
||||
id
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const UPDATE_CUSTOMER = gql`
|
||||
mutation UpdateCustomer(
|
||||
$id: ID!
|
||||
|
||||
@@ -70,6 +70,9 @@ export const FILTER_EQUIPMENT = gql`
|
||||
firmware {
|
||||
detailsJSON
|
||||
}
|
||||
channel {
|
||||
detailsJSON
|
||||
}
|
||||
}
|
||||
}
|
||||
context
|
||||
@@ -77,6 +80,67 @@ export const FILTER_EQUIPMENT = gql`
|
||||
}
|
||||
`;
|
||||
|
||||
export const GET_EQUIPMENT = gql`
|
||||
query GetEquipment($id: ID!) {
|
||||
getEquipment(id: $id) {
|
||||
id
|
||||
equipmentType
|
||||
inventoryId
|
||||
customerId
|
||||
profileId
|
||||
locationId
|
||||
name
|
||||
latitude
|
||||
longitude
|
||||
serial
|
||||
lastModifiedTimestamp
|
||||
details
|
||||
profile {
|
||||
id
|
||||
name
|
||||
childProfiles {
|
||||
id
|
||||
name
|
||||
details
|
||||
}
|
||||
}
|
||||
baseMacAddress
|
||||
manufacturer
|
||||
status {
|
||||
firmware {
|
||||
detailsJSON
|
||||
}
|
||||
protocol {
|
||||
detailsJSON
|
||||
}
|
||||
radioUtilization {
|
||||
detailsJSON
|
||||
}
|
||||
clientDetails {
|
||||
detailsJSON
|
||||
details {
|
||||
numClientsPerRadio
|
||||
}
|
||||
}
|
||||
osPerformance {
|
||||
detailsJSON
|
||||
}
|
||||
channel {
|
||||
detailsJSON
|
||||
}
|
||||
}
|
||||
model
|
||||
alarmsCount
|
||||
alarms {
|
||||
severity
|
||||
alarmCode
|
||||
details
|
||||
createdTimestamp
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const FILTER_EQUIPMENT_BULK_EDIT_APS = gql`
|
||||
query FilterEquipment(
|
||||
$locationIds: [ID]
|
||||
|
||||
8
package-lock.json
generated
8
package-lock.json
generated
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "wlan-cloud-ui",
|
||||
"version": "0.10.2",
|
||||
"version": "1.0.6",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
@@ -1845,9 +1845,9 @@
|
||||
}
|
||||
},
|
||||
"@tip-wlan/wlan-cloud-ui-library": {
|
||||
"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.13.3.tgz",
|
||||
"integrity": "sha1-iTZriIG3Yd9OdrSzBWz5JKO7Cyg="
|
||||
"version": "1.0.9",
|
||||
"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-1.0.9.tgz",
|
||||
"integrity": "sha1-PyqEsNw1DBxvOiecHRFrV5MZ8yQ="
|
||||
},
|
||||
"@types/anymatch": {
|
||||
"version": "1.3.1",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "wlan-cloud-ui",
|
||||
"version": "0.10.2",
|
||||
"version": "1.0.6",
|
||||
"author": "ConnectUs",
|
||||
"description": "React Portal",
|
||||
"engines": {
|
||||
@@ -21,7 +21,7 @@
|
||||
"dependencies": {
|
||||
"@ant-design/icons": "^4.2.1",
|
||||
"@apollo/client": "^3.1.3",
|
||||
"@tip-wlan/wlan-cloud-ui-library": "^0.13.3",
|
||||
"@tip-wlan/wlan-cloud-ui-library": "^1.0.9",
|
||||
"antd": "^4.5.2",
|
||||
"apollo-upload-client": "^13.0.0",
|
||||
"clean-webpack-plugin": "^3.0.0",
|
||||
|
||||
Reference in New Issue
Block a user