mirror of
https://github.com/Telecominfraproject/wlan-cloud-graphql-gw.git
synced 2026-03-22 12:39:22 +00:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6ac8ebbc63 | ||
|
|
1d099821a1 | ||
|
|
165f2b4d6b |
23
.github/workflows/dockerpublish.yml
vendored
23
.github/workflows/dockerpublish.yml
vendored
@@ -5,6 +5,7 @@ on:
|
||||
# Publish `master` as Docker `latest` image.
|
||||
branches:
|
||||
- master
|
||||
- Testing
|
||||
|
||||
# Publish `v1.2.3` tags as releases.
|
||||
tags:
|
||||
@@ -45,7 +46,23 @@ jobs:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
ssh-key: ${{ secrets.GH_AUTOMATION_KEY }}
|
||||
|
||||
|
||||
- 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,')
|
||||
|
||||
# Strip "v" prefix from tag name
|
||||
[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//')
|
||||
|
||||
# Use Docker `latest` tag convention
|
||||
[ "$VERSION" == "master" ] && VERSION=latest
|
||||
|
||||
TIMESTAMP=$(date +'%Y-%m-%d')
|
||||
echo date=$TIMESTAMP > commit.properties
|
||||
echo commitId=$GITHUB_SHA >> commit.properties
|
||||
echo projectVersion=$VERSION>> commit.properties
|
||||
|
||||
- name: Build image
|
||||
run: docker build . --file Dockerfile --tag image
|
||||
|
||||
@@ -74,5 +91,5 @@ jobs:
|
||||
echo IMAGE_ID=$IMAGE_ID
|
||||
echo VERSION=$VERSION
|
||||
|
||||
docker tag image $IMAGE_ID:$VERSION
|
||||
docker push $IMAGE_ID:$VERSION
|
||||
docker tag image $IMAGE_ID:$VERSION-AJ
|
||||
docker push $IMAGE_ID:$VERSION-AJ
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "wlan-cloud-graphql-apollo",
|
||||
"version": "0.3.0",
|
||||
"version": "0.3.1",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
|
||||
@@ -169,6 +169,17 @@ export class API extends RESTDataSource {
|
||||
`portal/equipmentGateway/requestFirmwareUpdate?equipmentId=${equipmentId}&firmwareVersionId=${firmwareVersionId}`
|
||||
);
|
||||
}
|
||||
async requestEquipmentSwitchBank(equipmentId) {
|
||||
return this.post(
|
||||
`portal/equipmentGateway/requestApSwitchSoftwareBank?equipmentId=${equipmentId}`
|
||||
);
|
||||
}
|
||||
async requestEquipmentReboot(equipmentId) {
|
||||
return this.post(`portal/equipmentGateway/requestApReboot?equipmentId=${equipmentId}`);
|
||||
}
|
||||
async requestEquipmentFactoryReset(equipmentId) {
|
||||
return this.post(`portal/equipmentGateway/requestApFactoryReset?equipmentId=${equipmentId}`);
|
||||
}
|
||||
|
||||
async getEquipmentStatus(customerId, equipmentIds, statusDataTypes) {
|
||||
return this.get('portal/status/forEquipmentWithFilter', {
|
||||
|
||||
@@ -155,6 +155,10 @@ const resolvers = {
|
||||
) => {
|
||||
return dataSources.api.getAllStatus(customerId, statusDataTypes, cursor, limit, context);
|
||||
},
|
||||
|
||||
getApiUrl: async (_, {}, { dataSources }) => {
|
||||
return dataSources.api.baseURL;
|
||||
},
|
||||
},
|
||||
Mutation: {
|
||||
authenticateUser: async (_, { email, password }, { dataSources }) => {
|
||||
@@ -266,6 +270,15 @@ const resolvers = {
|
||||
updateEquipmentFirmware: async (_, { equipmentId, firmwareVersionId }, { dataSources }) => {
|
||||
return dataSources.api.updateEquipmentFirmware(equipmentId, firmwareVersionId);
|
||||
},
|
||||
requestEquipmentSwitchBank: async (_, { equipmentId }, { dataSources }) => {
|
||||
return dataSources.api.requestEquipmentSwitchBank(equipmentId);
|
||||
},
|
||||
requestEquipmentReboot: async (_, { equipmentId }, { dataSources }) => {
|
||||
return dataSources.api.requestEquipmentReboot(equipmentId);
|
||||
},
|
||||
requestEquipmentFactoryReset: async (_, { equipmentId }, { dataSources }) => {
|
||||
return dataSources.api.requestEquipmentFactoryReset(equipmentId);
|
||||
},
|
||||
|
||||
createProfile: async (
|
||||
_,
|
||||
|
||||
@@ -7,6 +7,8 @@ const typeDefs = gql`
|
||||
scalar JSONObject
|
||||
|
||||
type Query {
|
||||
getApiUrl: String
|
||||
|
||||
getUser(id: ID!): User
|
||||
getAllUsers(customerId: ID!, cursor: String, limit: Int, context: JSONObject): UserPagination
|
||||
|
||||
@@ -404,6 +406,9 @@ const typeDefs = gql`
|
||||
updateEquipmentBulk(items: [EquipmentRrmUpdate]): GenericResponse
|
||||
deleteEquipment(id: ID!): Equipment
|
||||
updateEquipmentFirmware(equipmentId: ID, firmwareVersionId: ID): GenericResponse
|
||||
requestEquipmentSwitchBank(equipmentId: ID): GenericResponse
|
||||
requestEquipmentReboot(equipmentId: ID): GenericResponse
|
||||
requestEquipmentFactoryReset(equipmentId: ID): GenericResponse
|
||||
|
||||
createProfile(
|
||||
profileType: String!
|
||||
|
||||
Reference in New Issue
Block a user