mirror of
https://github.com/Telecominfraproject/wlan-cloud-ui.git
synced 2025-11-01 03:07:53 +00:00
Compare commits
62 Commits
feature/NE
...
release/v1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
196a8607cc | ||
|
|
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 | ||
|
|
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 |
21
.github/workflows/dockerpublish.yml
vendored
21
.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:
|
||||||
@@ -14,8 +15,8 @@ on:
|
|||||||
pull_request:
|
pull_request:
|
||||||
|
|
||||||
schedule:
|
schedule:
|
||||||
# runs nightly build at 5AM
|
# runs nightly build at 5AM
|
||||||
- cron: '00 09 * * *'
|
- cron: '00 09 * * *'
|
||||||
|
|
||||||
env:
|
env:
|
||||||
IMAGE_NAME: wlan-cloud-ui
|
IMAGE_NAME: wlan-cloud-ui
|
||||||
@@ -48,7 +49,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- 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: |
|
run: |
|
||||||
# Strip git ref prefix from version
|
# Strip git ref prefix from version
|
||||||
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
|
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
|
||||||
@@ -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=0.0.1-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=0.0.1-SNAPSHOT
|
||||||
|
|
||||||
echo IMAGE_ID=$IMAGE_ID
|
echo IMAGE_ID=$IMAGE_ID
|
||||||
echo VERSION=$VERSION
|
echo VERSION=$VERSION
|
||||||
@@ -97,6 +104,6 @@ jobs:
|
|||||||
|
|
||||||
docker tag image $IMAGE_ID:$VERSION
|
docker tag image $IMAGE_ID:$VERSION
|
||||||
docker push $IMAGE_ID:$VERSION
|
docker push $IMAGE_ID:$VERSION
|
||||||
|
|
||||||
docker tag image $IMAGE_ID:$VERSION-$TIMESTAMP
|
docker tag image $IMAGE_ID:$VERSION-$TIMESTAMP
|
||||||
docker push $IMAGE_ID:$VERSION-$TIMESTAMP
|
docker push $IMAGE_ID:$VERSION-$TIMESTAMP
|
||||||
|
|||||||
@@ -1,58 +0,0 @@
|
|||||||
import React, { useState } from 'react';
|
|
||||||
import PropTypes from 'prop-types';
|
|
||||||
import { Link } from 'react-router-dom';
|
|
||||||
import { Popover, Row } from 'antd';
|
|
||||||
import { UserOutlined } from '@ant-design/icons';
|
|
||||||
|
|
||||||
import styles from './index.module.scss';
|
|
||||||
|
|
||||||
const UsersDropdown = ({ onLogout }) => {
|
|
||||||
const [popoverVisible, setPopoverVisible] = useState(false);
|
|
||||||
|
|
||||||
const hidePopover = () => {
|
|
||||||
setPopoverVisible(false);
|
|
||||||
};
|
|
||||||
|
|
||||||
const handleVisibleChange = visible => {
|
|
||||||
setPopoverVisible(visible);
|
|
||||||
};
|
|
||||||
|
|
||||||
const userOptions = (
|
|
||||||
<>
|
|
||||||
<Row>
|
|
||||||
<Link onClick={hidePopover} to="/account">
|
|
||||||
Account
|
|
||||||
</Link>
|
|
||||||
</Row>
|
|
||||||
<Row>
|
|
||||||
<Link onClick={onLogout} to="/">
|
|
||||||
Log Out
|
|
||||||
</Link>
|
|
||||||
</Row>
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
|
|
||||||
return (
|
|
||||||
<Popover
|
|
||||||
content={userOptions}
|
|
||||||
trigger="click"
|
|
||||||
getPopupContainer={e => e.parentElement}
|
|
||||||
visible={popoverVisible}
|
|
||||||
onVisibleChange={handleVisibleChange}
|
|
||||||
placement="bottomRight"
|
|
||||||
arrowPointAtCenter
|
|
||||||
>
|
|
||||||
<UserOutlined className={styles.MenuIcon} />
|
|
||||||
</Popover>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
UsersDropdown.propTypes = {
|
|
||||||
onLogout: PropTypes.func,
|
|
||||||
};
|
|
||||||
|
|
||||||
UsersDropdown.defaultProps = {
|
|
||||||
onLogout: () => {},
|
|
||||||
};
|
|
||||||
|
|
||||||
export default UsersDropdown;
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
.MenuIcon {
|
|
||||||
cursor: pointer;
|
|
||||||
font-size: 18px;
|
|
||||||
line-height: 64px;
|
|
||||||
padding: 0 24px;
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -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}
|
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -92,7 +92,9 @@ const App = () => {
|
|||||||
<ProtectedRouteWithLayout exact path={ROUTES.addprofile} component={AddProfile} />
|
<ProtectedRouteWithLayout exact path={ROUTES.addprofile} component={AddProfile} />
|
||||||
|
|
||||||
<ProtectedRouteWithLayout exact path={ROUTES.alarms} component={Alarms} />
|
<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' && (
|
{user?.roles?.[0] === 'SuperUser' && (
|
||||||
<ProtectedRouteWithLayout exact path={ROUTES.users} component={Accounts} />
|
<ProtectedRouteWithLayout exact path={ROUTES.users} component={Accounts} />
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -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;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -12,10 +12,8 @@ import { removeItem } from 'utils/localStorage';
|
|||||||
|
|
||||||
import UserContext from 'contexts/UserContext';
|
import UserContext from 'contexts/UserContext';
|
||||||
|
|
||||||
import UsersDropdown from 'components/UsersDropdown';
|
|
||||||
|
|
||||||
const MasterLayout = ({ children }) => {
|
const MasterLayout = ({ children }) => {
|
||||||
const { roles, customerId, email } = useContext(UserContext);
|
const { roles, customerId, id: currentUserId } = useContext(UserContext);
|
||||||
|
|
||||||
const client = useApolloClient();
|
const client = useApolloClient();
|
||||||
const location = useLocation();
|
const location = useLocation();
|
||||||
@@ -58,11 +56,15 @@ const MasterLayout = ({ children }) => {
|
|||||||
key: 'settings',
|
key: 'settings',
|
||||||
text: 'Settings',
|
text: 'Settings',
|
||||||
children: [
|
children: [
|
||||||
{
|
...(currentUserId !== 0
|
||||||
key: 'editAccount',
|
? [
|
||||||
path: ROUTES.account,
|
{
|
||||||
text: 'Account',
|
key: 'editAccount',
|
||||||
},
|
path: ROUTES.account,
|
||||||
|
text: 'Edit Account',
|
||||||
|
},
|
||||||
|
]
|
||||||
|
: []),
|
||||||
{
|
{
|
||||||
key: 'logout',
|
key: 'logout',
|
||||||
path: ROUTES.root,
|
path: ROUTES.root,
|
||||||
@@ -92,8 +94,7 @@ const MasterLayout = ({ children }) => {
|
|||||||
menuItems={menuItems}
|
menuItems={menuItems}
|
||||||
mobileMenuItems={mobileMenuItems}
|
mobileMenuItems={mobileMenuItems}
|
||||||
totalAlarms={data && data.getAlarmCount}
|
totalAlarms={data && data.getAlarmCount}
|
||||||
currentUserEmail={email}
|
currentUserId={currentUserId}
|
||||||
usersDropdown={<UsersDropdown onLogout={handleLogout} />}
|
|
||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
</Layout>
|
</Layout>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import React, { useContext } from 'react';
|
import React, { useContext } from 'react';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import { useParams, useHistory } from 'react-router-dom';
|
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 { Alert, notification } from 'antd';
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
import {
|
import {
|
||||||
@@ -9,126 +9,22 @@ import {
|
|||||||
Loading,
|
Loading,
|
||||||
} from '@tip-wlan/wlan-cloud-ui-library';
|
} from '@tip-wlan/wlan-cloud-ui-library';
|
||||||
|
|
||||||
import { FILTER_SERVICE_METRICS, GET_ALL_FIRMWARE, GET_ALL_PROFILES } from 'graphql/queries';
|
|
||||||
import {
|
import {
|
||||||
|
GET_EQUIPMENT,
|
||||||
|
FILTER_SERVICE_METRICS,
|
||||||
|
GET_ALL_FIRMWARE,
|
||||||
|
GET_ALL_PROFILES,
|
||||||
|
} from 'graphql/queries';
|
||||||
|
import {
|
||||||
|
UPDATE_EQUIPMENT,
|
||||||
|
DELETE_EQUIPMENT,
|
||||||
UPDATE_EQUIPMENT_FIRMWARE,
|
UPDATE_EQUIPMENT_FIRMWARE,
|
||||||
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`
|
|
||||||
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!
|
|
||||||
$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
|
|
||||||
latitude: $latitude
|
|
||||||
longitude: $longitude
|
|
||||||
serial: $serial
|
|
||||||
lastModifiedTimestamp: $lastModifiedTimestamp
|
|
||||||
details: $details
|
|
||||||
) {
|
|
||||||
id
|
|
||||||
equipmentType
|
|
||||||
inventoryId
|
|
||||||
customerId
|
|
||||||
profileId
|
|
||||||
locationId
|
|
||||||
name
|
|
||||||
latitude
|
|
||||||
longitude
|
|
||||||
serial
|
|
||||||
lastModifiedTimestamp
|
|
||||||
details
|
|
||||||
}
|
|
||||||
}
|
|
||||||
`;
|
|
||||||
|
|
||||||
const DELETE_EQUIPMENT = gql`
|
|
||||||
mutation DeleteEquipment($id: ID!) {
|
|
||||||
deleteEquipment(id: $id) {
|
|
||||||
id
|
|
||||||
}
|
|
||||||
}
|
|
||||||
`;
|
|
||||||
|
|
||||||
const toTime = moment();
|
const toTime = moment();
|
||||||
const fromTime = moment().subtract(1, 'hour');
|
const fromTime = moment().subtract(1, 'hour');
|
||||||
|
|
||||||
@@ -142,6 +38,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 +46,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 +93,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 +117,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 +226,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"
|
||||||
|
|||||||
@@ -89,8 +89,8 @@ const accessPointsTableColumns = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'CHANNEL',
|
title: 'CHANNEL',
|
||||||
dataIndex: 'channel',
|
dataIndex: ['status', 'channel', 'detailsJSON', 'channelNumberStatusDataMap'],
|
||||||
render: renderTableCell,
|
render: text => renderTableCell(Object.values(text ?? [])),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'OCCUPANCY',
|
title: 'OCCUPANCY',
|
||||||
|
|||||||
@@ -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,63 @@ 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: 250, render: renderTableCell },
|
||||||
{
|
{
|
||||||
title: 'CHANNEL',
|
title: 'Manual Active Channel',
|
||||||
dataIndex: 'channel',
|
dataIndex: 'manualChannelNumber',
|
||||||
key: 'channel',
|
key: 'manualChannelNumber',
|
||||||
editable: true,
|
editable: true,
|
||||||
|
width: 200,
|
||||||
|
render: renderTableCell,
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
title: 'Manual Backup Channel',
|
||||||
|
dataIndex: 'manualBackupChannelNumber',
|
||||||
|
key: 'manualBackupChannelNumber',
|
||||||
|
editable: true,
|
||||||
|
width: 210,
|
||||||
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: 210,
|
||||||
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: 210,
|
||||||
|
|
||||||
render: renderTableCell,
|
render: renderTableCell,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'SNR (% DROP)',
|
title: 'SNR (% Drop)',
|
||||||
dataIndex: 'snrDrop',
|
dataIndex: 'snrDrop',
|
||||||
key: 'snrDrop',
|
key: 'snrDrop',
|
||||||
editable: true,
|
editable: true,
|
||||||
|
width: 150,
|
||||||
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,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
@@ -160,68 +178,84 @@ const BulkEditAPs = ({ locations, checkedLocations }) => {
|
|||||||
const [updateEquipmentBulk] = useMutation(UPDATE_EQUIPMENT_BULK);
|
const [updateEquipmentBulk] = useMutation(UPDATE_EQUIPMENT_BULK);
|
||||||
|
|
||||||
const getRadioDetails = (radioDetails, type) => {
|
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') {
|
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;
|
||||||
};
|
};
|
||||||
|
|
||||||
const setAccessPointsBulkEditTableData = (dataSource = []) => {
|
const setAccessPointsBulkEditTableData = (dataSource = []) =>
|
||||||
const tableData = dataSource.items.map(({ id: key, name, channel, details }) => {
|
dataSource.items.map(({ id: key, name, details }) => ({
|
||||||
return {
|
key,
|
||||||
key,
|
id: key,
|
||||||
id: key,
|
name,
|
||||||
name,
|
manualChannelNumber: getRadioDetails(details, 'manualChannelNumber'),
|
||||||
channel,
|
manualBackupChannelNumber: getRadioDetails(details, 'manualBackupChannelNumber'),
|
||||||
cellSize: getRadioDetails(details, 'cellSize'),
|
cellSize: getRadioDetails(details, 'cellSize'),
|
||||||
probeResponseThreshold: getRadioDetails(details, 'probeResponseThreshold'),
|
probeResponseThreshold: getRadioDetails(details, 'probeResponseThreshold'),
|
||||||
clientDisconnectThreshold: getRadioDetails(details, 'clientDisconnectThreshold'),
|
clientDisconnectThreshold: getRadioDetails(details, 'clientDisconnectThreshold'),
|
||||||
snrDrop: getRadioDetails(details, 'snrDrop'),
|
snrDrop: getRadioDetails(details, 'snrDrop'),
|
||||||
minLoad: getRadioDetails(details, 'minLoad'),
|
minLoad: getRadioDetails(details, 'minLoad'),
|
||||||
};
|
radioMap: Object.keys(details?.radioMap || {}),
|
||||||
});
|
}));
|
||||||
return tableData;
|
|
||||||
};
|
|
||||||
|
|
||||||
const setUpdatedBulkEditTableData = (
|
const setUpdatedBulkEditTableData = (
|
||||||
equipmentId,
|
equipmentId,
|
||||||
channel,
|
manualChannelNumber,
|
||||||
|
manualBackupChannelNumber,
|
||||||
cellSize,
|
cellSize,
|
||||||
probeResponseThreshold,
|
probeResponseThreshold,
|
||||||
clientDisconnectThreshold,
|
clientDisconnectThreshold,
|
||||||
@@ -234,13 +268,14 @@ 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];
|
||||||
|
|
||||||
frequencies[`${i}`] = {
|
frequencies[`${i}`] = {
|
||||||
channelNumber: channel[dataIndex],
|
channelNumber: manualChannelNumber[dataIndex],
|
||||||
|
backupChannelNumber: manualBackupChannelNumber[dataIndex],
|
||||||
rxCellSizeDb: {
|
rxCellSizeDb: {
|
||||||
auto: true,
|
auto: true,
|
||||||
value: cellSize[dataIndex],
|
value: cellSize[dataIndex],
|
||||||
@@ -286,42 +321,41 @@ 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,
|
manualChannelNumber,
|
||||||
channel,
|
manualBackupChannelNumber,
|
||||||
cellSize,
|
cellSize,
|
||||||
probeResponseThreshold,
|
probeResponseThreshold,
|
||||||
clientDisconnectThreshold,
|
clientDisconnectThreshold,
|
||||||
snrDrop,
|
snrDrop,
|
||||||
minLoad,
|
minLoad,
|
||||||
}) => {
|
} = updatedRows[key];
|
||||||
const updatedEuips = setUpdatedBulkEditTableData(
|
const updatedEuips = setUpdatedBulkEditTableData(
|
||||||
equipmentId,
|
equipmentId,
|
||||||
channel,
|
manualChannelNumber,
|
||||||
cellSize,
|
manualBackupChannelNumber,
|
||||||
probeResponseThreshold,
|
cellSize,
|
||||||
clientDisconnectThreshold,
|
probeResponseThreshold,
|
||||||
snrDrop,
|
clientDisconnectThreshold,
|
||||||
minLoad,
|
snrDrop,
|
||||||
equipData && equipData.filterEquipment
|
minLoad,
|
||||||
);
|
equipData && equipData.filterEquipment
|
||||||
const tempObj = {
|
|
||||||
equipmentId,
|
|
||||||
perRadioDetails: {},
|
|
||||||
};
|
|
||||||
updatedEuips.map(item => {
|
|
||||||
Object.keys(item).forEach(i => {
|
|
||||||
tempObj.perRadioDetails[i] = item[i];
|
|
||||||
});
|
|
||||||
return tempObj;
|
|
||||||
});
|
|
||||||
return editedRowsArr.push(tempObj);
|
|
||||||
}
|
|
||||||
);
|
);
|
||||||
updateEquipments(editedRowsArr);
|
const tempObj = {
|
||||||
}
|
equipmentId,
|
||||||
|
perRadioDetails: {},
|
||||||
|
};
|
||||||
|
updatedEuips.map(item => {
|
||||||
|
Object.keys(item).forEach(i => {
|
||||||
|
tempObj.perRadioDetails[i] = item[i];
|
||||||
|
});
|
||||||
|
return tempObj;
|
||||||
|
});
|
||||||
|
return editedRowsArr.push(tempObj);
|
||||||
|
});
|
||||||
|
updateEquipments(editedRowsArr);
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleLoadMore = () => {
|
const handleLoadMore = () => {
|
||||||
@@ -356,18 +390,9 @@ const BulkEditAPs = ({ locations, checkedLocations }) => {
|
|||||||
return (
|
return (
|
||||||
<BulkEditAccessPoints
|
<BulkEditAccessPoints
|
||||||
tableColumns={accessPointsChannelTableColumns}
|
tableColumns={accessPointsChannelTableColumns}
|
||||||
tableData={
|
tableData={setAccessPointsBulkEditTableData(equipData?.filterEquipment)}
|
||||||
equipData &&
|
|
||||||
equipData.filterEquipment &&
|
|
||||||
setAccessPointsBulkEditTableData(equipData && equipData.filterEquipment)
|
|
||||||
}
|
|
||||||
onLoadMore={handleLoadMore}
|
onLoadMore={handleLoadMore}
|
||||||
isLastPage={
|
isLastPage={equipData?.filterEquipment?.context?.lastPage}
|
||||||
equipData &&
|
|
||||||
equipData.filterEquipment &&
|
|
||||||
equipData.filterEquipment.context &&
|
|
||||||
equipData.filterEquipment.context.lastPage
|
|
||||||
}
|
|
||||||
onSaveChanges={handleSaveChanges}
|
onSaveChanges={handleSaveChanges}
|
||||||
breadcrumbPath={getBreadcrumbPath(id, locations)}
|
breadcrumbPath={getBreadcrumbPath(id, locations)}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
.tabColumn {
|
.tabColumn {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
padding: 0 30px;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,11 +4,11 @@ import { useQuery, useMutation, gql } from '@apollo/client';
|
|||||||
import { Alert, notification } from 'antd';
|
import { Alert, notification } from 'antd';
|
||||||
import { ProfileDetails as ProfileDetailsPage, Loading } from '@tip-wlan/wlan-cloud-ui-library';
|
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 UserContext from 'contexts/UserContext';
|
||||||
import { GET_ALL_PROFILES } from 'graphql/queries';
|
import { GET_ALL_PROFILES, GET_API_URL } from 'graphql/queries';
|
||||||
import { FILE_UPLOAD } from 'graphql/mutations';
|
import { fetchMoreProfiles } from 'graphql/functions';
|
||||||
import { updateQueryGetAllProfiles } from 'graphql/functions';
|
import { getItem } from 'utils/localStorage';
|
||||||
|
|
||||||
const GET_PROFILE = gql`
|
const GET_PROFILE = gql`
|
||||||
query GetProfile($id: ID!) {
|
query GetProfile($id: ID!) {
|
||||||
@@ -23,6 +23,16 @@ const GET_PROFILE = gql`
|
|||||||
profileType
|
profileType
|
||||||
details
|
details
|
||||||
}
|
}
|
||||||
|
associatedSsidProfiles {
|
||||||
|
id
|
||||||
|
name
|
||||||
|
profileType
|
||||||
|
details
|
||||||
|
}
|
||||||
|
osuSsidProfile {
|
||||||
|
id
|
||||||
|
name
|
||||||
|
}
|
||||||
childProfileIds
|
childProfileIds
|
||||||
createdTimestamp
|
createdTimestamp
|
||||||
lastModifiedTimestamp
|
lastModifiedTimestamp
|
||||||
@@ -75,6 +85,8 @@ const ProfileDetails = () => {
|
|||||||
|
|
||||||
const [redirect, setRedirect] = useState(false);
|
const [redirect, setRedirect] = useState(false);
|
||||||
|
|
||||||
|
const { data: apiUrl } = useQuery(GET_API_URL);
|
||||||
|
|
||||||
const { loading, error, data } = useQuery(GET_PROFILE, {
|
const { loading, error, data } = useQuery(GET_PROFILE, {
|
||||||
variables: { id },
|
variables: { id },
|
||||||
fetchPolicy: 'network-only',
|
fetchPolicy: 'network-only',
|
||||||
@@ -82,12 +94,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 +109,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,18 +130,18 @@ 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);
|
||||||
const [deleteProfile] = useMutation(DELETE_PROFILE);
|
const [deleteProfile] = useMutation(DELETE_PROFILE);
|
||||||
|
|
||||||
const [fileUpload] = useMutation(FILE_UPLOAD);
|
|
||||||
|
|
||||||
const handleDeleteProfile = () => {
|
const handleDeleteProfile = () => {
|
||||||
deleteProfile({ variables: { id } })
|
deleteProfile({ variables: { id } })
|
||||||
.then(() => {
|
.then(() => {
|
||||||
@@ -170,145 +187,89 @@ const ProfileDetails = () => {
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleFileUpload = (fileName, file) =>
|
const handleFileUpload = async (fileName, file) => {
|
||||||
fileUpload({ variables: { fileName, file } })
|
const token = getItem(AUTH_TOKEN);
|
||||||
.then(() => {
|
|
||||||
notification.success({
|
if (apiUrl?.getApiUrl) {
|
||||||
message: 'Success',
|
fetch(`${apiUrl?.getApiUrl}filestore/${fileName}`, {
|
||||||
description: 'File successfully uploaded.',
|
method: 'POST',
|
||||||
});
|
headers: {
|
||||||
|
Authorization: token ? `Bearer ${token.access_token}` : '',
|
||||||
|
'Content-Type': 'application/octet-stream',
|
||||||
|
},
|
||||||
|
body: file,
|
||||||
})
|
})
|
||||||
.catch(() =>
|
.then(response => response.json())
|
||||||
notification.error({
|
.then(resp => {
|
||||||
message: 'Error',
|
if (resp?.success) {
|
||||||
description: 'File could not be uploaded.',
|
notification.success({
|
||||||
|
message: 'Success',
|
||||||
|
description: 'File successfully uploaded.',
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
notification.error({
|
||||||
|
message: 'Error',
|
||||||
|
description: 'File could not be uploaded.',
|
||||||
|
});
|
||||||
|
}
|
||||||
})
|
})
|
||||||
);
|
.catch(() => {
|
||||||
|
notification.error({
|
||||||
const handleFetchProfiles = e => {
|
message: 'Error',
|
||||||
if (ssidProfiles.getAllProfiles.context.lastPage) {
|
description: 'File could not be uploaded.',
|
||||||
return false;
|
});
|
||||||
}
|
});
|
||||||
|
} else {
|
||||||
e.persist();
|
notification.error({
|
||||||
const { target } = e;
|
message: 'Error',
|
||||||
|
description: 'File could not be uploaded.',
|
||||||
if (target.scrollTop + target.offsetHeight === target.scrollHeight) {
|
|
||||||
fetchMore({
|
|
||||||
variables: { context: { ...ssidProfiles.getAllProfiles.context } },
|
|
||||||
updateQuery: updateQueryGetAllProfiles,
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleFetchRadiusProfiles = e => {
|
const handleDownloadFile = async name => {
|
||||||
if (radiusProfiles.getAllProfiles.context.lastPage) {
|
const token = getItem(AUTH_TOKEN);
|
||||||
return false;
|
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({
|
||||||
e.persist();
|
message: 'Error',
|
||||||
const { target } = e;
|
description: 'File could not be retrieved.',
|
||||||
|
});
|
||||||
if (target.scrollTop + target.offsetHeight === target.scrollHeight) {
|
|
||||||
fetchMoreRadiusProfiles({
|
|
||||||
variables: { context: { ...radiusProfiles.getAllProfiles.context } },
|
|
||||||
updateQuery: updateQueryGetAllProfiles,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleFetchCaptiveProfiles = e => {
|
const handleFetchMoreProfiles = (e, key) => {
|
||||||
if (captiveProfiles.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')
|
||||||
fetchMoreCaptiveProfiles({
|
fetchMoreProfiles(e, idProviderProfiles, fetchMoreIdProviderProfiles);
|
||||||
variables: { context: { ...captiveProfiles.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;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
if (loading) {
|
if (loading) {
|
||||||
@@ -341,14 +302,11 @@ const ProfileDetails = () => {
|
|||||||
venueProfiles={venueProfiles?.getAllProfiles?.items}
|
venueProfiles={venueProfiles?.getAllProfiles?.items}
|
||||||
operatorProfiles={operatorProfiles?.getAllProfiles?.items}
|
operatorProfiles={operatorProfiles?.getAllProfiles?.items}
|
||||||
idProviderProfiles={idProviderProfiles?.getAllProfiles?.items}
|
idProviderProfiles={idProviderProfiles?.getAllProfiles?.items}
|
||||||
|
associatedSsidProfiles={data.getProfile?.associatedSsidProfiles}
|
||||||
|
osuSsidProfile={data.getProfile?.osuSsidProfile}
|
||||||
fileUpload={handleFileUpload}
|
fileUpload={handleFileUpload}
|
||||||
onFetchMoreProfiles={handleFetchProfiles}
|
onFetchMoreProfiles={handleFetchMoreProfiles}
|
||||||
onFetchMoreRfProfiles={handleFetchRfProfiles}
|
onDownloadFile={handleDownloadFile}
|
||||||
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;
|
||||||
|
};
|
||||||
|
|||||||
@@ -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`
|
export const UPDATE_CUSTOMER = gql`
|
||||||
mutation UpdateCustomer(
|
mutation UpdateCustomer(
|
||||||
$id: ID!
|
$id: ID!
|
||||||
|
|||||||
@@ -70,6 +70,9 @@ export const FILTER_EQUIPMENT = gql`
|
|||||||
firmware {
|
firmware {
|
||||||
detailsJSON
|
detailsJSON
|
||||||
}
|
}
|
||||||
|
channel {
|
||||||
|
detailsJSON
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
context
|
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`
|
export const FILTER_EQUIPMENT_BULK_EDIT_APS = gql`
|
||||||
query FilterEquipment(
|
query FilterEquipment(
|
||||||
$locationIds: [ID]
|
$locationIds: [ID]
|
||||||
|
|||||||
5894
package-lock.json
generated
5894
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "wlan-cloud-ui",
|
"name": "wlan-cloud-ui",
|
||||||
"version": "0.7.5",
|
"version": "1.0.7",
|
||||||
"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": "^1.0.10",
|
||||||
"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