diff --git a/.github/workflows/dockerpublish.yml b/.github/workflows/dockerpublish.yml index f47f578..c83bfdf 100644 --- a/.github/workflows/dockerpublish.yml +++ b/.github/workflows/dockerpublish.yml @@ -61,7 +61,7 @@ jobs: [[ "${{ github.ref }}" == "refs/heads/release/"* ]] && VERSION=$(echo "${{ github.ref }}" | sed -e 's/refs\/heads\/release\/[v]//' | awk '{print $1"-SNAPSHOT"}') # Use Docker `latest` tag convention - [ "$VERSION" == "master" ] && VERSION=0.0.1-SNAPSHOT + [ "$VERSION" == "master" ] && VERSION=1.1.0-SNAPSHOT TIMESTAMP=$(date +'%Y-%m-%d') @@ -96,7 +96,7 @@ jobs: [[ "${{ github.ref }}" == "refs/heads/release/"* ]] && VERSION=$(echo "${{ github.ref }}" | sed -e 's/refs\/heads\/release\/[v]//' | awk '{print $1"-SNAPSHOT"}') # Use Docker `latest` tag convention - [ "$VERSION" == "master" ] && VERSION=0.0.1-SNAPSHOT + [ "$VERSION" == "master" ] && VERSION=1.1.0-SNAPSHOT echo IMAGE_ID=$IMAGE_ID echo VERSION=$VERSION diff --git a/app/containers/Network/containers/AccessPointDetails/index.js b/app/containers/Network/containers/AccessPointDetails/index.js index 9fc4151..f882d67 100644 --- a/app/containers/Network/containers/AccessPointDetails/index.js +++ b/app/containers/Network/containers/AccessPointDetails/index.js @@ -63,6 +63,7 @@ const AccessPointDetails = ({ locations }) => { }`), { variables: { customerId, type: 'equipment_ap' }, + fetchPolicy: 'network-only', } ); diff --git a/app/containers/System/containers/AutoProvision/index.js b/app/containers/System/containers/AutoProvision/index.js index f087f8a..5b1b94c 100644 --- a/app/containers/System/containers/AutoProvision/index.js +++ b/app/containers/System/containers/AutoProvision/index.js @@ -6,6 +6,7 @@ import { AutoProvision as AutoProvisionPage, Loading } from '@tip-wlan/wlan-clou import UserContext from 'contexts/UserContext'; import { GET_CUSTOMER, GET_ALL_LOCATIONS, GET_ALL_PROFILES } from 'graphql/queries'; import { UPDATE_CUSTOMER } from 'graphql/mutations'; +import { fetchMoreProfiles } from 'graphql/functions'; const AutoProvision = () => { const { customerId } = useContext(UserContext); @@ -14,13 +15,13 @@ const AutoProvision = () => { }); const [updateCustomer] = useMutation(UPDATE_CUSTOMER); - const { data: dataLocation, loading: loadingLoaction, error: errorLocation } = useQuery( + const { data: dataLocation, loading: loadingLocation, error: errorLocation } = useQuery( GET_ALL_LOCATIONS, { variables: { customerId }, } ); - const { data: dataProfile, loading: loadingProfile, error: errorProfile } = useQuery( + const { data: dataProfile, loading: loadingProfile, error: errorProfile, fetchMore } = useQuery( GET_ALL_PROFILES(), { variables: { customerId, type: 'equipment_ap', limit: 100 }, @@ -60,6 +61,10 @@ const AutoProvision = () => { ); }; + const handleFetchMoreProfiles = e => { + fetchMoreProfiles(e, dataProfile, fetchMore); + }; + if (loading) { return ; } @@ -75,11 +80,12 @@ const AutoProvision = () => { data={data && data.getCustomer} dataLocation={dataLocation && dataLocation.getAllLocations} dataProfile={dataProfile && dataProfile.getAllProfiles.items} - loadingLoaction={loadingLoaction} + loadingLocation={loadingLocation} loadingProfile={loadingProfile} errorLocation={errorLocation} errorProfile={errorProfile} onUpdateCustomer={handleUpdateCustomer} + onFetchMoreProfiles={handleFetchMoreProfiles} /> ); }; diff --git a/package-lock.json b/package-lock.json index 7638921..88f7557 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "wlan-cloud-ui", - "version": "1.1.1", + "version": "1.1.7", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -2222,9 +2222,15 @@ } }, "@tip-wlan/wlan-cloud-ui-library": { +<<<<<<< HEAD "version": "1.1.4", "resolved": "https://tip.jfrog.io/artifactory/api/npm/tip-wlan-cloud-npm-repo/@tip-wlan/wlan-cloud-ui-library/-/@tip-wlan/wlan-cloud-ui-library-1.1.4.tgz", "integrity": "sha1-pAB8TRmyP4nHB8W4+zBQFZqulI8=" +======= + "version": "1.1.12", + "resolved": "https://tip.jfrog.io/artifactory/api/npm/tip-wlan-cloud-npm-repo/@tip-wlan/wlan-cloud-ui-library/-/@tip-wlan/wlan-cloud-ui-library-1.1.12.tgz", + "integrity": "sha1-pGw7ycPlaN4i6OZXK5b3paDou5s=" +>>>>>>> master }, "@types/anymatch": { "version": "1.3.1", diff --git a/package.json b/package.json index 73675a3..090c7cd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "wlan-cloud-ui", - "version": "1.1.1", + "version": "1.1.7", "author": "ConnectUs", "description": "React Portal", "engines": { @@ -10,8 +10,8 @@ "scripts": { "test": "jest --passWithNoTests --coverage", "start": "cross-env NODE_ENV=development webpack serve", - "start:bare": "cross-env API=ttps://portal.rtl.lab.netexperience.com NODE_ENV=bare webpack serve", - "start:dev": "cross-env API=https://portal.rtl.lab.netexperience.com NODE_ENV=development webpack serve", + "start:bare": "cross-env API=https://wlan-graphql.tip-sdk.lab.netexperience.com NODE_ENV=bare webpack serve", + "start:dev": "cross-env API=https://wlan-graphql.tip-sdk.lab.netexperience.com NODE_ENV=development webpack serve", "build": "webpack --mode=production", "format": "prettier --write 'app/**/*{.js,.scss}'", "eslint-fix": "eslint --fix 'app/**/*.js'", @@ -21,7 +21,7 @@ "dependencies": { "@ant-design/icons": "^4.2.1", "@apollo/client": "^3.1.3", - "@tip-wlan/wlan-cloud-ui-library": "^1.1.3", + "@tip-wlan/wlan-cloud-ui-library": "^1.1.12", "antd": "^4.5.2", "apollo-upload-client": "^13.0.0", "graphql": "^15.5.0",