mirror of
https://github.com/Telecominfraproject/wlan-cloud-graphql-gw.git
synced 2025-11-02 03:28:00 +00:00
Merge branch 'master' into feature/TW-475
This commit is contained in:
@@ -179,6 +179,11 @@ export class API extends RESTDataSource {
|
||||
paginationContext: buildPaginationContext(cursor, limit),
|
||||
});
|
||||
}
|
||||
async getProfilesById(profileIdSet) {
|
||||
return this.get('portal/profile/inSet', {
|
||||
profileIdSet,
|
||||
});
|
||||
}
|
||||
|
||||
async getAllAlarms(customerId, cursor, limit) {
|
||||
return this.get('portal/alarm/forCustomer', {
|
||||
|
||||
@@ -237,6 +237,9 @@ const resolvers = {
|
||||
radioUtilization: ({ items }) => items.find((i) => i.statusDataType === 'RADIO_UTILIZATION'),
|
||||
clientDetails: ({ items }) => items.find((i) => i.statusDataType === 'CLIENT_DETAILS'),
|
||||
},
|
||||
Status: {
|
||||
detailsJSON: ({ details }) => details,
|
||||
},
|
||||
StatusDetails: {
|
||||
reportedMacAddr: ({ reportedMacAddr }) => reportedMacAddr && reportedMacAddr.addressAsString,
|
||||
capacityDetails: ({ capacityDetails }) => {
|
||||
@@ -250,6 +253,11 @@ const resolvers = {
|
||||
return values;
|
||||
},
|
||||
},
|
||||
Profile: {
|
||||
childProfiles: ({ childProfileIds }, args, { dataSources }) => {
|
||||
return dataSources.api.getProfilesById(childProfileIds);
|
||||
},
|
||||
},
|
||||
ClientSession: {
|
||||
id: ({ macAddress }) => macAddress.addressAsString,
|
||||
macAddress: ({ macAddress }) => macAddress.addressAsString,
|
||||
|
||||
@@ -104,6 +104,7 @@ const typeDefs = gql`
|
||||
lastModifiedTimestamp: String
|
||||
profile: Profile
|
||||
status: StatusPagination
|
||||
details: JSONObject
|
||||
}
|
||||
|
||||
type EquipmentPagination {
|
||||
@@ -123,6 +124,7 @@ const typeDefs = gql`
|
||||
statusDataType: String
|
||||
lastModifiedTimestamp: String
|
||||
details: StatusDetails
|
||||
detailsJSON: JSONObject
|
||||
}
|
||||
|
||||
type StatusDetails {
|
||||
@@ -139,7 +141,7 @@ const typeDefs = gql`
|
||||
profileType: String!
|
||||
customerId: Int!
|
||||
name: String!
|
||||
childProfileIds: [Int]
|
||||
childProfiles: [Profile]
|
||||
createdTimestamp: String
|
||||
lastModifiedTimestamp: String
|
||||
details: JSONObject
|
||||
|
||||
Reference in New Issue
Block a user