diff --git a/app/containers/Accounts/index.js b/app/containers/Accounts/index.js
index 54f4963..36303b8 100644
--- a/app/containers/Accounts/index.js
+++ b/app/containers/Accounts/index.js
@@ -8,7 +8,7 @@ import { Accounts as AccountsPage, Loading } from '@tip-wlan/wlan-cloud-ui-libra
import UserContext from 'contexts/UserContext';
const GET_ALL_USERS = gql`
- query GetAllUsers($customerId: Int!, $cursor: String) {
+ query GetAllUsers($customerId: ID!, $cursor: String) {
getAllUsers(customerId: $customerId, cursor: $cursor) {
items {
id
@@ -26,7 +26,7 @@ const GET_ALL_USERS = gql`
`;
const CREATE_USER = gql`
- mutation CreateUser($username: String!, $password: String!, $role: String!, $customerId: Int!) {
+ mutation CreateUser($username: String!, $password: String!, $role: String!, $customerId: ID!) {
createUser(username: $username, password: $password, role: $role, customerId: $customerId) {
username
role
@@ -37,11 +37,11 @@ const CREATE_USER = gql`
const UPDATE_USER = gql`
mutation UpdateUser(
- $id: Int!
+ $id: ID!
$username: String!
$password: String!
$role: String!
- $customerId: Int!
+ $customerId: ID!
$lastModifiedTimestamp: String
) {
updateUser(
@@ -62,7 +62,7 @@ const UPDATE_USER = gql`
`;
const DELETE_USER = gql`
- mutation DeleteUser($id: Int!) {
+ mutation DeleteUser($id: ID!) {
deleteUser(id: $id) {
id
}
diff --git a/app/containers/AddProfile/index.js b/app/containers/AddProfile/index.js
index 4d674ee..9f52c75 100644
--- a/app/containers/AddProfile/index.js
+++ b/app/containers/AddProfile/index.js
@@ -10,9 +10,9 @@ import { GET_ALL_PROFILES } from 'graphql/queries';
const CREATE_PROFILE = gql`
mutation CreateProfile(
$profileType: String!
- $customerId: Int!
+ $customerId: ID!
$name: String!
- $childProfileIds: [Int]
+ $childProfileIds: [ID]
$details: JSONObject
) {
createProfile(
diff --git a/app/containers/Alarms/index.js b/app/containers/Alarms/index.js
index f9479ed..5218731 100644
--- a/app/containers/Alarms/index.js
+++ b/app/containers/Alarms/index.js
@@ -7,7 +7,7 @@ import { Alarms as AlarmsPage, Loading } from '@tip-wlan/wlan-cloud-ui-library';
import UserContext from 'contexts/UserContext';
const GET_ALL_ALARMS = gql`
- query GetAllAlarms($customerId: Int!, $cursor: String) {
+ query GetAllAlarms($customerId: ID!, $cursor: String) {
getAllAlarms(customerId: $customerId, cursor: $cursor) {
items {
severity
diff --git a/app/containers/EditAccount/index.js b/app/containers/EditAccount/index.js
index 2efa8b3..aa98c9c 100644
--- a/app/containers/EditAccount/index.js
+++ b/app/containers/EditAccount/index.js
@@ -7,7 +7,7 @@ import { EditAccount as EditAccountPage, Loading } from '@tip-wlan/wlan-cloud-ui
import UserContext from 'contexts/UserContext';
const GET_USER = gql`
- query GetUser($id: Int!) {
+ query GetUser($id: ID!) {
getUser(id: $id) {
id
username
@@ -20,11 +20,11 @@ const GET_USER = gql`
const UPDATE_USER = gql`
mutation UpdateUser(
- $id: Int!
+ $id: ID!
$username: String!
$password: String!
$role: String!
- $customerId: Int!
+ $customerId: ID!
$lastModifiedTimestamp: String
) {
updateUser(
diff --git a/app/containers/Network/containers/AccessPointDetails/index.js b/app/containers/Network/containers/AccessPointDetails/index.js
index b46b310..b6e79fb 100644
--- a/app/containers/Network/containers/AccessPointDetails/index.js
+++ b/app/containers/Network/containers/AccessPointDetails/index.js
@@ -12,7 +12,7 @@ import { UPDATE_EQUIPMENT_FIRMWARE } from 'graphql/mutations';
import UserContext from 'contexts/UserContext';
const GET_EQUIPMENT = gql`
- query GetEquipment($id: Int!) {
+ query GetEquipment($id: ID!) {
getEquipment(id: $id) {
id
equipmentType
@@ -86,12 +86,12 @@ export const GET_ALL_FIRMWARE = gql`
const UPDATE_EQUIPMENT = gql`
mutation UpdateEquipment(
- $id: Int!
+ $id: ID!
$equipmentType: String!
$inventoryId: String!
- $customerId: Int!
- $profileId: Int!
- $locationId: Int!
+ $customerId: ID!
+ $profileId: ID!
+ $locationId: ID!
$name: String!
$latitude: String
$longitude: String
@@ -130,7 +130,7 @@ const UPDATE_EQUIPMENT = gql`
`;
export const GET_ALL_PROFILES = gql`
- query GetAllProfiles($customerId: Int!, $cursor: String, $type: String) {
+ query GetAllProfiles($customerId: ID!, $cursor: String, $type: String) {
getAllProfiles(customerId: $customerId, cursor: $cursor, type: $type) {
items {
id
@@ -151,14 +151,15 @@ export const GET_ALL_PROFILES = gql`
}
`;
+const toTime = moment();
+const fromTime = moment().subtract(24, 'hours');
+
const AccessPointDetails = ({ locations }) => {
- const toTime = moment();
- const fromTime = toTime.subtract(24, 'hours');
const { id } = useParams();
const { customerId } = useContext(UserContext);
const { loading, error, data, refetch } = useQuery(GET_EQUIPMENT, {
- variables: { id: parseInt(id, 10) },
+ variables: { id },
});
const { data: dataProfiles, error: errorProfiles, loading: landingProfiles } = useQuery(
GET_ALL_PROFILES,
@@ -174,9 +175,9 @@ const AccessPointDetails = ({ locations }) => {
} = useQuery(FILTER_SERVICE_METRICS, {
variables: {
customerId,
- fromTime: fromTime.unix(),
- toTime: toTime.unix(),
- equipmentIds: [parseInt(id, 10)],
+ fromTime: fromTime.valueOf().toString(),
+ toTime: toTime.valueOf().toString(),
+ equipmentIds: [id],
dataTypes: ['ApNode'],
},
});
diff --git a/app/containers/Network/containers/BulkEditAccessPoints/index.js b/app/containers/Network/containers/BulkEditAccessPoints/index.js
index c408514..1138a30 100644
--- a/app/containers/Network/containers/BulkEditAccessPoints/index.js
+++ b/app/containers/Network/containers/BulkEditAccessPoints/index.js
@@ -143,7 +143,7 @@ const BulkEditAPs = ({ locations, checkedLocations }) => {
const { id } = useParams();
const { customerId } = useContext(UserContext);
const locationIds = useMemo(() => {
- const locationPath = getLocationPath(parseInt(id, 10), locations);
+ const locationPath = getLocationPath(id, locations);
return locationPath.filter(f => checkedLocations.includes(f));
}, [id, locations, checkedLocations]);
@@ -369,7 +369,7 @@ const BulkEditAPs = ({ locations, checkedLocations }) => {
equipData.filterEquipment.context.lastPage
}
onSaveChanges={handleSaveChanges}
- breadcrumbPath={getBreadcrumbPath(parseInt(id, 10), locations)}
+ breadcrumbPath={getBreadcrumbPath(id, locations)}
/>
);
};
diff --git a/app/containers/Network/containers/ClientDeviceDetails/index.js b/app/containers/Network/containers/ClientDeviceDetails/index.js
index e37511b..e08659b 100644
--- a/app/containers/Network/containers/ClientDeviceDetails/index.js
+++ b/app/containers/Network/containers/ClientDeviceDetails/index.js
@@ -11,10 +11,10 @@ import {
import UserContext from 'contexts/UserContext';
import { GET_CLIENT_SESSION, FILTER_SERVICE_METRICS } from 'graphql/queries';
-const ClientDeviceDetails = () => {
- const toTime = moment();
- const fromTime = toTime.subtract(24, 'hours');
+const toTime = moment();
+const fromTime = moment().subtract(24, 'hours');
+const ClientDeviceDetails = () => {
const { id } = useParams();
const { customerId } = useContext(UserContext);
const { loading, error, data, refetch } = useQuery(GET_CLIENT_SESSION, {
@@ -28,8 +28,8 @@ const ClientDeviceDetails = () => {
} = useQuery(FILTER_SERVICE_METRICS, {
variables: {
customerId,
- fromTime: fromTime.unix(),
- toTime: toTime.unix(),
+ fromTime: fromTime.valueOf().toString(),
+ toTime: toTime.valueOf().toString(),
clientMacs: [id],
dataTypes: ['Client'],
},
diff --git a/app/containers/Network/index.js b/app/containers/Network/index.js
index 5630afe..7a8d972 100644
--- a/app/containers/Network/index.js
+++ b/app/containers/Network/index.js
@@ -60,7 +60,7 @@ const Network = () => {
function unflatten(array, p, t) {
let tree = typeof t !== 'undefined' ? t : [];
- const parent = typeof p !== 'undefined' ? p : { id: 0 };
+ const parent = typeof p !== 'undefined' ? p : { id: '0' };
let children = _.filter(array, child => child.parentId === parent.id);
children = children.map(c => ({
title: (
@@ -80,7 +80,7 @@ const Network = () => {
...c,
}));
if (!_.isEmpty(children)) {
- if (parent.id === 0) {
+ if (parent.id === '0') {
tree = children;
} else {
parent.children = children;
@@ -96,9 +96,9 @@ const Network = () => {
Network
),
- id: 0,
+ id: '0',
value: '0',
- key: 0,
+ key: '0',
children: unflatten(list),
},
];
diff --git a/app/containers/ProfileDetails/index.js b/app/containers/ProfileDetails/index.js
index a4676e1..c28acb2 100644
--- a/app/containers/ProfileDetails/index.js
+++ b/app/containers/ProfileDetails/index.js
@@ -10,7 +10,7 @@ import { GET_ALL_PROFILES } from 'graphql/queries';
import { FILE_UPLOAD } from 'graphql/mutations';
const GET_PROFILE = gql`
- query GetProfile($id: Int!) {
+ query GetProfile($id: ID!) {
getProfile(id: $id) {
id
profileType
@@ -32,11 +32,11 @@ const GET_PROFILE = gql`
const UPDATE_PROFILE = gql`
mutation UpdateProfile(
- $id: Int!
+ $id: ID!
$profileType: String!
- $customerId: Int!
+ $customerId: ID!
$name: String!
- $childProfileIds: [Int]
+ $childProfileIds: [ID]
$lastModifiedTimestamp: String
$details: JSONObject
) {
@@ -61,7 +61,7 @@ const UPDATE_PROFILE = gql`
`;
const DELETE_PROFILE = gql`
- mutation DeleteProfile($id: Int!) {
+ mutation DeleteProfile($id: ID!) {
deleteProfile(id: $id) {
id
}
@@ -75,7 +75,7 @@ const ProfileDetails = () => {
const [redirect, setRedirect] = useState(false);
const { loading, error, data } = useQuery(GET_PROFILE, {
- variables: { id: parseInt(id, 10) },
+ variables: { id },
});
const { data: ssidProfiles } = useQuery(GET_ALL_PROFILES, {
variables: { customerId, type: 'ssid' },
@@ -86,7 +86,7 @@ const ProfileDetails = () => {
const [fileUpload] = useMutation(FILE_UPLOAD);
const handleDeleteProfile = () => {
- deleteProfile({ variables: { id: parseInt(id, 10) } })
+ deleteProfile({ variables: { id } })
.then(() => {
notification.success({
message: 'Success',
diff --git a/app/containers/Profiles/index.js b/app/containers/Profiles/index.js
index 4e94ba7..83cbf20 100644
--- a/app/containers/Profiles/index.js
+++ b/app/containers/Profiles/index.js
@@ -8,7 +8,7 @@ import { Profile as ProfilePage } from '@tip-wlan/wlan-cloud-ui-library';
import UserContext from 'contexts/UserContext';
const GET_ALL_PROFILES = gql`
- query GetAllProfiles($customerId: Int!, $cursor: String) {
+ query GetAllProfiles($customerId: ID!, $cursor: String) {
getAllProfiles(customerId: $customerId, cursor: $cursor) {
items {
id
@@ -25,7 +25,7 @@ const GET_ALL_PROFILES = gql`
`;
const DELETE_PROFILE = gql`
- mutation DeleteProfile($id: Int!) {
+ mutation DeleteProfile($id: ID!) {
deleteProfile(id: $id) {
id
}
diff --git a/app/containers/System/containers/Firmware/index.js b/app/containers/System/containers/Firmware/index.js
index 3a09550..8ae7da7 100644
--- a/app/containers/System/containers/Firmware/index.js
+++ b/app/containers/System/containers/Firmware/index.js
@@ -1,7 +1,255 @@
import React from 'react';
+import { useQuery, useMutation, useLazyQuery } from '@apollo/react-hooks';
+import { notification } from 'antd';
+import {
+ GET_ALL_FIRMWARE,
+ GET_TRACK_ASSIGNMENTS,
+ GET_FIRMWARE_TRACK,
+ GET_ALL_FIRMWARE_MODELS,
+} from 'graphql/queries';
+import {
+ UPDATE_TRACK_ASSIGNMENT,
+ DELETE_TRACK_ASSIGNMENT,
+ CREATE_FIRMWARE,
+ UPDATE_FIRMWARE,
+ DELETE_FIRMWARE,
+} from 'graphql/mutations';
+import { Firmware as FirmwarePage } from '@tip-wlan/wlan-cloud-ui-library';
const Firmware = () => {
- return
Firmware Page
;
+ const { data, error, loading, refetch } = useQuery(GET_ALL_FIRMWARE);
+
+ const [
+ getAllFirmware,
+ { data: firmwareVersionData, loading: firmwareVersionLoading },
+ ] = useLazyQuery(GET_ALL_FIRMWARE);
+
+ const {
+ data: trackAssignmentData,
+ error: trackAssignmentError,
+ loading: trackAssignmentLoading,
+ refetch: refetchAssignmentData,
+ } = useQuery(GET_TRACK_ASSIGNMENTS);
+
+ const {
+ data: firmwareTrackData,
+ error: firmwareTrackError,
+ loading: firmwareTrackLoading,
+ } = useQuery(GET_FIRMWARE_TRACK, {
+ variables: { firmwareTrackName: 'DEFAULT' },
+ });
+
+ const {
+ data: firmwareModelData,
+ error: firmwareModelError,
+ loading: firmwareModelLoading,
+ } = useQuery(GET_ALL_FIRMWARE_MODELS);
+
+ const [updateTrackAssignment] = useMutation(UPDATE_TRACK_ASSIGNMENT);
+ const [deleteTrackAssignment] = useMutation(DELETE_TRACK_ASSIGNMENT);
+ const [createFirmware] = useMutation(CREATE_FIRMWARE);
+ const [updateFirmware] = useMutation(UPDATE_FIRMWARE);
+ const [deleteFirmware] = useMutation(DELETE_FIRMWARE);
+
+ const handleSearchFirmware = modelId => {
+ getAllFirmware({ variables: { modelId } });
+ };
+
+ const handleCreateTrackAssignment = (firmwareVersionRecordId, modelId) => {
+ updateTrackAssignment({
+ variables: {
+ trackRecordId: firmwareTrackData.getFirmwareTrack.recordId,
+ firmwareVersionRecordId,
+ modelId,
+ },
+ })
+ .then(() => {
+ refetchAssignmentData();
+ notification.success({
+ message: 'Success',
+ description: 'Track Assignment successfully created.',
+ });
+ })
+ .catch(() =>
+ notification.error({
+ message: 'Error',
+ description: 'Track Assignment could not be created.',
+ })
+ );
+ };
+
+ const handleUpdateTrackAssignment = (
+ firmwareVersionRecordId,
+ modelId,
+ createdTimestamp,
+ lastModifiedTimestamp
+ ) => {
+ updateTrackAssignment({
+ variables: {
+ trackRecordId: firmwareTrackData.getFirmwareTrack.recordId,
+ firmwareVersionRecordId,
+ modelId,
+ createdTimestamp,
+ lastModifiedTimestamp,
+ },
+ })
+ .then(() => {
+ refetchAssignmentData();
+ notification.success({
+ message: 'Success',
+ description: 'Track Assignment successfully updated.',
+ });
+ })
+ .catch(() =>
+ notification.error({
+ message: 'Error',
+ description: 'Track Assignment could not be updated.',
+ })
+ );
+ };
+
+ const handleDeleteTrackAssignment = (firmwareTrackId, firmwareVersionId) => {
+ deleteTrackAssignment({
+ variables: {
+ firmwareTrackId,
+ firmwareVersionId,
+ },
+ })
+ .then(() => {
+ refetchAssignmentData();
+ notification.success({
+ message: 'Success',
+ description: 'Track Assignment successfully deleted.',
+ });
+ })
+ .catch(() =>
+ notification.error({
+ message: 'Error',
+ description: 'Track Assignment could not be deleted.',
+ })
+ );
+ };
+ const handleCreateFirmware = (
+ modelId,
+ versionName,
+ description,
+ filename,
+ commit,
+ releaseDate,
+ validationCode
+ ) => {
+ createFirmware({
+ variables: {
+ modelId,
+ versionName,
+ description,
+ filename,
+ commit,
+ releaseDate,
+ validationCode,
+ },
+ })
+ .then(() => {
+ refetch();
+ notification.success({
+ message: 'Success',
+ description: 'Firmware version successfully created.',
+ });
+ })
+ .catch(() =>
+ notification.error({
+ message: 'Error',
+ description: 'Firmware version could not be created.',
+ })
+ );
+ };
+
+ const handleUpdateFirmware = (
+ id,
+ modelId,
+ versionName,
+ description,
+ filename,
+ commit,
+ releaseDate,
+ validationCode,
+ createdTimestamp,
+ lastModifiedTimestamp
+ ) => {
+ updateFirmware({
+ variables: {
+ id,
+ modelId,
+ versionName,
+ description,
+ filename,
+ commit,
+ releaseDate,
+ validationCode,
+ createdTimestamp,
+ lastModifiedTimestamp,
+ },
+ })
+ .then(() => {
+ refetch();
+ notification.success({
+ message: 'Success',
+ description: 'Firmware version successfully updated.',
+ });
+ })
+ .catch(() =>
+ notification.error({
+ message: 'Error',
+ description: 'Firmware version could not be updated.',
+ })
+ );
+ };
+
+ const handleDeleteFirmware = id => {
+ deleteFirmware({
+ variables: {
+ id,
+ },
+ })
+ .then(() => {
+ refetch();
+ notification.success({
+ message: 'Success',
+ description: 'Firmware version successfully deleted.',
+ });
+ })
+ .catch(() =>
+ notification.error({
+ message: 'Error',
+ description: 'Firmware version could not be deleted.',
+ })
+ );
+ };
+
+ return (
+
+ );
};
export default Firmware;
diff --git a/app/graphql/mutations.js b/app/graphql/mutations.js
index b1a4a2b..e03b841 100644
--- a/app/graphql/mutations.js
+++ b/app/graphql/mutations.js
@@ -13,8 +13,8 @@ export const REFRESH_TOKEN = gql`
export const CREATE_LOCATION = gql`
mutation CreateLocation(
$locationType: String!
- $customerId: Int!
- $parentId: Int!
+ $customerId: ID!
+ $parentId: ID!
$name: String!
) {
createLocation(
@@ -33,10 +33,10 @@ export const CREATE_LOCATION = gql`
export const UPDATE_LOCATION = gql`
mutation UpdateLocation(
- $id: Int!
+ $id: ID!
$locationType: String!
- $customerId: Int!
- $parentId: Int!
+ $customerId: ID!
+ $parentId: ID!
$name: String!
$lastModifiedTimestamp: String
) {
@@ -59,7 +59,7 @@ export const UPDATE_LOCATION = gql`
`;
export const DELETE_LOCATION = gql`
- mutation DeleteLocation($id: Int!) {
+ mutation DeleteLocation($id: ID!) {
deleteLocation(id: $id) {
id
}
@@ -100,13 +100,129 @@ export const UPDATE_EQUIPMENT_FIRMWARE = gql`
}
`;
+export const UPDATE_TRACK_ASSIGNMENT = gql`
+ mutation UpdateFirmwareTrackAssignment(
+ $trackRecordId: ID!
+ $firmwareVersionRecordId: ID!
+ $modelId: String!
+ $createdTimestamp: String
+ $lastModifiedTimestamp: String
+ ) {
+ updateFirmwareTrackAssignment(
+ trackRecordId: $trackRecordId
+ firmwareVersionRecordId: $firmwareVersionRecordId
+ modelId: $modelId
+ createdTimestamp: $createdTimestamp
+ lastModifiedTimestamp: $lastModifiedTimestamp
+ ) {
+ trackRecordId
+ firmwareVersionRecordId
+ modelId
+ createdTimestamp
+ lastModifiedTimestamp
+ }
+ }
+`;
+
+export const DELETE_TRACK_ASSIGNMENT = gql`
+ mutation UpdateEquipmentFirmware($firmwareTrackId: ID!, $firmwareVersionId: ID!) {
+ deleteFirmwareTrackAssignment(
+ firmwareTrackId: $firmwareTrackId
+ firmwareVersionId: $firmwareVersionId
+ ) {
+ trackRecordId
+ firmwareVersionRecordId
+ modelId
+ createdTimestamp
+ lastModifiedTimestamp
+ }
+ }
+`;
+
+export const CREATE_FIRMWARE = gql`
+ mutation CreateFirmware(
+ $modelId: String!
+ $versionName: String
+ $description: String
+ $filename: String
+ $commit: String
+ $releaseDate: String
+ $validationCode: String
+ ) {
+ createFirmware(
+ modelId: $modelId
+ versionName: $versionName
+ description: $description
+ filename: $filename
+ commit: $commit
+ releaseDate: $releaseDate
+ validationCode: $validationCode
+ ) {
+ modelId
+ versionName
+ description
+ filename
+ commit
+ releaseDate
+ validationCode
+ }
+ }
+`;
+
+export const UPDATE_FIRMWARE = gql`
+ mutation UpdateFirmware(
+ $id: ID!
+ $modelId: String!
+ $versionName: String
+ $description: String
+ $filename: String
+ $commit: String
+ $releaseDate: String
+ $validationCode: String
+ $createdTimestamp: String
+ $lastModifiedTimestamp: String
+ ) {
+ updateFirmware(
+ id: $id
+ modelId: $modelId
+ versionName: $versionName
+ description: $description
+ filename: $filename
+ commit: $commit
+ releaseDate: $releaseDate
+ validationCode: $validationCode
+ createdTimestamp: $createdTimestamp
+ lastModifiedTimestamp: $lastModifiedTimestamp
+ ) {
+ id
+ modelId
+ versionName
+ description
+ filename
+ commit
+ releaseDate
+ validationCode
+ createdTimestamp
+ lastModifiedTimestamp
+ }
+ }
+`;
+
+export const DELETE_FIRMWARE = gql`
+ mutation DeleteFirmware($id: ID!) {
+ deleteFirmware(id: $id) {
+ id
+ }
+ }
+`;
+
export const CREATE_EQUIPMENT = gql`
mutation CreateEquipment(
- $customerId: Int!
+ $customerId: ID!
$inventoryId: String!
- $locationId: Int!
+ $locationId: ID!
$name: String!
- $profileId: Int!
+ $profileId: ID!
) {
createEquipment(
customerId: $customerId
diff --git a/app/graphql/queries.js b/app/graphql/queries.js
index 239ef17..8acb9c3 100644
--- a/app/graphql/queries.js
+++ b/app/graphql/queries.js
@@ -1,7 +1,7 @@
import gql from 'graphql-tag';
export const GET_ALL_LOCATIONS = gql`
- query GetAllLocations($customerId: Int!) {
+ query GetAllLocations($customerId: ID!) {
getAllLocations(customerId: $customerId) {
id
name
@@ -13,8 +13,8 @@ export const GET_ALL_LOCATIONS = gql`
export const FILTER_EQUIPMENT = gql`
query FilterEquipment(
- $locationIds: [Int]
- $customerId: Int!
+ $locationIds: [ID]
+ $customerId: ID!
$equipmentType: String
$cursor: String
) {
@@ -73,8 +73,8 @@ export const FILTER_EQUIPMENT = gql`
export const FILTER_EQUIPMENT_BULK_EDIT_APS = gql`
query FilterEquipment(
- $locationIds: [Int]
- $customerId: Int!
+ $locationIds: [ID]
+ $customerId: ID!
$equipmentType: String
$cursor: String
) {
@@ -100,7 +100,7 @@ export const FILTER_EQUIPMENT_BULK_EDIT_APS = gql`
`;
export const GET_LOCATION = gql`
- query GetLocation($id: Int!) {
+ query GetLocation($id: ID!) {
getLocation(id: $id) {
id
parentId
@@ -112,7 +112,7 @@ export const GET_LOCATION = gql`
`;
export const FILTER_CLIENT_SESSIONS = gql`
- query FilterClientSessions($customerId: Int!, $locationIds: [Int], $cursor: String) {
+ query FilterClientSessions($customerId: ID!, $locationIds: [ID], $cursor: String) {
filterClientSessions(customerId: $customerId, locationIds: $locationIds, cursor: $cursor) {
items {
id
@@ -136,7 +136,7 @@ export const FILTER_CLIENT_SESSIONS = gql`
`;
export const GET_CLIENT_SESSION = gql`
- query GetClientSession($customerId: Int!, $macAddress: String!) {
+ query GetClientSession($customerId: ID!, $macAddress: String!) {
getClientSession(customerId: $customerId, macAddress: $macAddress) {
id
macAddress
@@ -156,7 +156,7 @@ export const GET_CLIENT_SESSION = gql`
export const FILTER_SERVICE_METRICS = gql`
query FilterServiceMetrics(
- $customerId: Int!
+ $customerId: ID!
$cursor: String
$fromTime: String!
$toTime: String!
@@ -189,7 +189,7 @@ export const FILTER_SERVICE_METRICS = gql`
`;
export const GET_ALL_PROFILES = gql`
- query GetAllProfiles($customerId: Int!, $cursor: String, $type: String) {
+ query GetAllProfiles($customerId: ID!, $cursor: String, $type: String) {
getAllProfiles(customerId: $customerId, cursor: $cursor, type: $type) {
items {
id
@@ -206,7 +206,7 @@ export const GET_ALL_PROFILES = gql`
`;
export const GET_ALL_STATUS = gql`
- query GetAllStatus($customerId: Int!, $statusDataTypes: [String]) {
+ query GetAllStatus($customerId: ID!, $statusDataTypes: [String]) {
getAllStatus(customerId: $customerId, statusDataTypes: $statusDataTypes) {
items {
customerId
@@ -224,8 +224,53 @@ export const GET_ALL_STATUS = gql`
}
`;
+export const GET_ALL_FIRMWARE_MODELS = gql`
+ query GetAllFirmwareModelId {
+ getAllFirmwareModelId
+ }
+`;
+
+export const GET_FIRMWARE_TRACK = gql`
+ query GetFirmwareTrack($firmwareTrackName: String!) {
+ getFirmwareTrack(firmwareTrackName: $firmwareTrackName) {
+ recordId
+ trackName
+ createdTimestamp
+ lastModifiedTimestamp
+ }
+ }
+`;
+
+export const GET_ALL_FIRMWARE = gql`
+ query GetAllFirmware($modelId: String) {
+ getAllFirmware(modelId: $modelId) {
+ id
+ modelId
+ versionName
+ description
+ filename
+ commit
+ releaseDate
+ validationCode
+ createdTimestamp
+ lastModifiedTimestamp
+ }
+ }
+`;
+
+export const GET_TRACK_ASSIGNMENTS = gql`
+ query GetAllFirmwareTrackAssignment {
+ getAllFirmwareTrackAssignment {
+ modelId
+ firmwareVersionRecordId
+ trackRecordId
+ lastModifiedTimestamp
+ }
+ }
+`;
+
export const GET_ALARM_COUNT = gql`
- query GetAlarmCount($customerId: Int!) {
+ query GetAlarmCount($customerId: ID!) {
getAlarmCount(customerId: $customerId)
}
`;
diff --git a/package-lock.json b/package-lock.json
index 0cffa74..0c60f75 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,6 +1,6 @@
{
"name": "wlan-cloud-ui",
- "version": "0.1.4",
+ "version": "0.2.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
@@ -1874,9 +1874,9 @@
}
},
"@tip-wlan/wlan-cloud-ui-library": {
- "version": "0.1.23",
- "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.1.23.tgz",
- "integrity": "sha1-U8nPz1M/olJWIw2LsK15q8pgJQc="
+ "version": "0.2.0",
+ "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.2.0.tgz",
+ "integrity": "sha1-Pth6gnl6Cz51flPuD1OpaOhu/Lw="
},
"@types/anymatch": {
"version": "1.3.1",
diff --git a/package.json b/package.json
index 03424c7..bef2e80 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "wlan-cloud-ui",
- "version": "0.1.4",
+ "version": "0.2.0",
"author": "ConnectUs",
"description": "React Portal",
"engines": {
@@ -20,7 +20,7 @@
"@ant-design/icons": "^4.2.1",
"@apollo/react-hoc": "^3.1.4",
"@apollo/react-hooks": "^3.1.3",
- "@tip-wlan/wlan-cloud-ui-library": "^0.1.23",
+ "@tip-wlan/wlan-cloud-ui-library": "^0.2.0",
"antd": "^4.3.1",
"apollo-cache-inmemory": "^1.6.6",
"apollo-client": "^2.6.10",