mirror of
				https://github.com/Telecominfraproject/wlan-cloud-ui.git
				synced 2025-10-31 18:57:59 +00:00 
			
		
		
		
	Merge pull request #54 from Telecominfraproject/feature/WIFI-661
Feature/WIFI-661: Upgrade Apollo Client
This commit is contained in:
		| @@ -1,6 +1,5 @@ | |||||||
| import React, { useContext } from 'react'; | import React, { useContext } from 'react'; | ||||||
| import gql from 'graphql-tag'; | import { useQuery, useMutation, gql } from '@apollo/client'; | ||||||
| import { useQuery, useMutation } from '@apollo/react-hooks'; |  | ||||||
| import { Alert, notification } from 'antd'; | import { Alert, notification } from 'antd'; | ||||||
|  |  | ||||||
| import { Accounts as AccountsPage, Loading } from '@tip-wlan/wlan-cloud-ui-library'; | import { Accounts as AccountsPage, Loading } from '@tip-wlan/wlan-cloud-ui-library'; | ||||||
|   | |||||||
| @@ -1,7 +1,6 @@ | |||||||
| import React, { useContext } from 'react'; | import React, { useContext } from 'react'; | ||||||
| import { AddProfile as AddProfilePage } from '@tip-wlan/wlan-cloud-ui-library'; | import { AddProfile as AddProfilePage } from '@tip-wlan/wlan-cloud-ui-library'; | ||||||
| import gql from 'graphql-tag'; | import { useMutation, useQuery, gql } from '@apollo/client'; | ||||||
| import { useMutation, useQuery } from '@apollo/react-hooks'; |  | ||||||
| import { notification } from 'antd'; | import { notification } from 'antd'; | ||||||
| import { useHistory } from 'react-router-dom'; | import { useHistory } from 'react-router-dom'; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -1,6 +1,5 @@ | |||||||
| import React, { useContext } from 'react'; | import React, { useContext } from 'react'; | ||||||
| import gql from 'graphql-tag'; | import { useQuery, gql } from '@apollo/client'; | ||||||
| import { useQuery } from '@apollo/react-hooks'; |  | ||||||
| import { Alert, notification } from 'antd'; | import { Alert, notification } from 'antd'; | ||||||
| import { Alarms as AlarmsPage, Loading } from '@tip-wlan/wlan-cloud-ui-library'; | import { Alarms as AlarmsPage, Loading } from '@tip-wlan/wlan-cloud-ui-library'; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -1,7 +1,7 @@ | |||||||
| import React, { useContext, useEffect, useMemo, useState, useRef } from 'react'; | import React, { useContext, useEffect, useMemo, useState, useRef } from 'react'; | ||||||
| import { Alert } from 'antd'; | import { Alert } from 'antd'; | ||||||
| import moment from 'moment'; | import moment from 'moment'; | ||||||
| import { useQuery } from '@apollo/react-hooks'; | import { useQuery } from '@apollo/client'; | ||||||
| import { Dashboard as DashboardPage, Loading } from '@tip-wlan/wlan-cloud-ui-library'; | import { Dashboard as DashboardPage, Loading } from '@tip-wlan/wlan-cloud-ui-library'; | ||||||
| import UserContext from 'contexts/UserContext'; | import UserContext from 'contexts/UserContext'; | ||||||
| import { FILTER_SYSTEM_EVENTS, GET_ALL_STATUS } from 'graphql/queries'; | import { FILTER_SYSTEM_EVENTS, GET_ALL_STATUS } from 'graphql/queries'; | ||||||
|   | |||||||
| @@ -1,6 +1,5 @@ | |||||||
| import React, { useContext } from 'react'; | import React, { useContext } from 'react'; | ||||||
| import gql from 'graphql-tag'; | import { useMutation, useQuery, gql } from '@apollo/client'; | ||||||
| import { useMutation, useQuery } from '@apollo/react-hooks'; |  | ||||||
| import { notification, Alert } from 'antd'; | import { notification, Alert } from 'antd'; | ||||||
| import { EditAccount as EditAccountPage, Loading } from '@tip-wlan/wlan-cloud-ui-library'; | import { EditAccount as EditAccountPage, Loading } from '@tip-wlan/wlan-cloud-ui-library'; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -1,6 +1,5 @@ | |||||||
| import React, { useContext } from 'react'; | import React, { useContext } from 'react'; | ||||||
| import gql from 'graphql-tag'; | import { useMutation, useApolloClient, gql } from '@apollo/client'; | ||||||
| import { useMutation, useApolloClient } from '@apollo/react-hooks'; |  | ||||||
| import { useHistory } from 'react-router-dom'; | import { useHistory } from 'react-router-dom'; | ||||||
| import { notification } from 'antd'; | import { notification } from 'antd'; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -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 { useLocation } from 'react-router-dom'; | import { useLocation } from 'react-router-dom'; | ||||||
| import { useApolloClient, useQuery } from '@apollo/react-hooks'; | import { useApolloClient, useQuery } from '@apollo/client'; | ||||||
| import { AppLayout as Layout } from '@tip-wlan/wlan-cloud-ui-library'; | import { AppLayout as Layout } from '@tip-wlan/wlan-cloud-ui-library'; | ||||||
|  |  | ||||||
| import { GET_ALARM_COUNT } from 'graphql/queries'; | import { GET_ALARM_COUNT } from 'graphql/queries'; | ||||||
|   | |||||||
| @@ -1,8 +1,7 @@ | |||||||
| import React, { useContext } from 'react'; | import React, { useContext } from 'react'; | ||||||
| import PropTypes from 'prop-types'; | import PropTypes from 'prop-types'; | ||||||
| import { useParams } from 'react-router-dom'; | import { useParams } from 'react-router-dom'; | ||||||
| import gql from 'graphql-tag'; | import { useQuery, useMutation, gql } from '@apollo/client'; | ||||||
| import { useQuery, useMutation } from '@apollo/react-hooks'; |  | ||||||
| import { Alert, notification } from 'antd'; | import { Alert, notification } from 'antd'; | ||||||
| import moment from 'moment'; | import moment from 'moment'; | ||||||
| import { | import { | ||||||
|   | |||||||
| @@ -1,7 +1,7 @@ | |||||||
| import React, { useEffect, useContext } from 'react'; | import React, { useEffect, useContext } from 'react'; | ||||||
| import PropTypes from 'prop-types'; | import PropTypes from 'prop-types'; | ||||||
| import moment from 'moment'; | import moment from 'moment'; | ||||||
| import { useLazyQuery } from '@apollo/react-hooks'; | import { useLazyQuery } from '@apollo/client'; | ||||||
| import { notification } from 'antd'; | import { notification } from 'antd'; | ||||||
| import { floor, padStart } from 'lodash'; | import { floor, padStart } from 'lodash'; | ||||||
| import { NetworkTableContainer } from '@tip-wlan/wlan-cloud-ui-library'; | import { NetworkTableContainer } from '@tip-wlan/wlan-cloud-ui-library'; | ||||||
|   | |||||||
| @@ -2,7 +2,7 @@ import React, { useContext, useMemo } from 'react'; | |||||||
| import PropTypes from 'prop-types'; | import PropTypes from 'prop-types'; | ||||||
| import { Alert, notification } from 'antd'; | import { Alert, notification } from 'antd'; | ||||||
| import { useParams } from 'react-router-dom'; | import { useParams } from 'react-router-dom'; | ||||||
| import { useQuery, useMutation } from '@apollo/react-hooks'; | import { useQuery, useMutation } from '@apollo/client'; | ||||||
| import { BulkEditAccessPoints, Loading } from '@tip-wlan/wlan-cloud-ui-library'; | import { BulkEditAccessPoints, Loading } from '@tip-wlan/wlan-cloud-ui-library'; | ||||||
|  |  | ||||||
| import { FILTER_EQUIPMENT_BULK_EDIT_APS } from 'graphql/queries'; | import { FILTER_EQUIPMENT_BULK_EDIT_APS } from 'graphql/queries'; | ||||||
|   | |||||||
| @@ -1,6 +1,6 @@ | |||||||
| import React, { useContext } from 'react'; | import React, { useContext } from 'react'; | ||||||
| import { useParams } from 'react-router-dom'; | import { useParams } from 'react-router-dom'; | ||||||
| import { useQuery } from '@apollo/react-hooks'; | import { useQuery } from '@apollo/client'; | ||||||
| import moment from 'moment'; | import moment from 'moment'; | ||||||
| import { Alert, notification } from 'antd'; | import { Alert, notification } from 'antd'; | ||||||
| import { | import { | ||||||
|   | |||||||
| @@ -1,6 +1,6 @@ | |||||||
| import React, { useEffect, useContext } from 'react'; | import React, { useEffect, useContext } from 'react'; | ||||||
| import PropTypes from 'prop-types'; | import PropTypes from 'prop-types'; | ||||||
| import { useLazyQuery } from '@apollo/react-hooks'; | import { useLazyQuery } from '@apollo/client'; | ||||||
| import { notification } from 'antd'; | import { notification } from 'antd'; | ||||||
|  |  | ||||||
| import { NetworkTableContainer } from '@tip-wlan/wlan-cloud-ui-library'; | import { NetworkTableContainer } from '@tip-wlan/wlan-cloud-ui-library'; | ||||||
|   | |||||||
| @@ -1,6 +1,6 @@ | |||||||
| import React, { useMemo, useContext, useState } from 'react'; | import React, { useMemo, useContext, useState } from 'react'; | ||||||
| import { Switch, Route, useRouteMatch, Redirect } from 'react-router-dom'; | import { Switch, Route, useRouteMatch, Redirect } from 'react-router-dom'; | ||||||
| import { useQuery, useMutation, useLazyQuery } from '@apollo/react-hooks'; | import { useQuery, useMutation, useLazyQuery } from '@apollo/client'; | ||||||
| import { Alert, notification } from 'antd'; | import { Alert, notification } from 'antd'; | ||||||
| import _ from 'lodash'; | import _ from 'lodash'; | ||||||
| import { Network as NetworkPage, PopoverMenu, Loading } from '@tip-wlan/wlan-cloud-ui-library'; | import { Network as NetworkPage, PopoverMenu, Loading } from '@tip-wlan/wlan-cloud-ui-library'; | ||||||
|   | |||||||
| @@ -1,7 +1,6 @@ | |||||||
| import React, { useState, useContext } from 'react'; | import React, { useState, useContext } from 'react'; | ||||||
| import { useParams, Redirect } from 'react-router-dom'; | import { useParams, Redirect } from 'react-router-dom'; | ||||||
| import gql from 'graphql-tag'; | import { useQuery, useMutation, gql } from '@apollo/client'; | ||||||
| import { useQuery, useMutation } from '@apollo/react-hooks'; |  | ||||||
| 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'; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -1,6 +1,5 @@ | |||||||
| import React, { useContext, useEffect } from 'react'; | import React, { useContext, useEffect } from 'react'; | ||||||
| import gql from 'graphql-tag'; | import { useQuery, useMutation, gql } from '@apollo/client'; | ||||||
| import { useQuery, useMutation } from '@apollo/react-hooks'; |  | ||||||
| import { useLocation } from 'react-router-dom'; | import { useLocation } from 'react-router-dom'; | ||||||
| import { Alert, notification } from 'antd'; | import { Alert, notification } from 'antd'; | ||||||
| import { Profile as ProfilePage, Loading } from '@tip-wlan/wlan-cloud-ui-library'; | import { Profile as ProfilePage, Loading } from '@tip-wlan/wlan-cloud-ui-library'; | ||||||
|   | |||||||
| @@ -1,5 +1,5 @@ | |||||||
| import React, { useContext } from 'react'; | import React, { useContext } from 'react'; | ||||||
| import { useQuery, useMutation } from '@apollo/react-hooks'; | import { useQuery, useMutation } from '@apollo/client'; | ||||||
| import { Alert, notification } from 'antd'; | import { Alert, notification } from 'antd'; | ||||||
| import { AutoProvision as AutoProvisionPage, Loading } from '@tip-wlan/wlan-cloud-ui-library'; | import { AutoProvision as AutoProvisionPage, Loading } from '@tip-wlan/wlan-cloud-ui-library'; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -1,5 +1,5 @@ | |||||||
| import React, { useContext } from 'react'; | import React, { useContext } from 'react'; | ||||||
| import { useQuery, useMutation } from '@apollo/react-hooks'; | import { useQuery, useMutation } from '@apollo/client'; | ||||||
| import { Alert, notification } from 'antd'; | import { Alert, notification } from 'antd'; | ||||||
| import { BlockedList as BlockedListPage, Loading } from '@tip-wlan/wlan-cloud-ui-library'; | import { BlockedList as BlockedListPage, Loading } from '@tip-wlan/wlan-cloud-ui-library'; | ||||||
| import { GET_BLOCKED_CLIENTS } from 'graphql/queries'; | import { GET_BLOCKED_CLIENTS } from 'graphql/queries'; | ||||||
|   | |||||||
| @@ -1,5 +1,5 @@ | |||||||
| import React from 'react'; | import React from 'react'; | ||||||
| import { useQuery, useMutation, useLazyQuery } from '@apollo/react-hooks'; | import { useQuery, useMutation, useLazyQuery } from '@apollo/client'; | ||||||
| import { notification } from 'antd'; | import { notification } from 'antd'; | ||||||
| import { | import { | ||||||
|   GET_ALL_FIRMWARE, |   GET_ALL_FIRMWARE, | ||||||
|   | |||||||
| @@ -1,6 +1,5 @@ | |||||||
| import React from 'react'; | import React from 'react'; | ||||||
| import gql from 'graphql-tag'; | import { useMutation, useLazyQuery, gql } from '@apollo/client'; | ||||||
| import { useMutation, useLazyQuery } from '@apollo/react-hooks'; |  | ||||||
| import { notification } from 'antd'; | import { notification } from 'antd'; | ||||||
| import { Manufacturer as ManufacturerPage } from '@tip-wlan/wlan-cloud-ui-library'; | import { Manufacturer as ManufacturerPage } from '@tip-wlan/wlan-cloud-ui-library'; | ||||||
| import { OUI_UPLOAD } from 'graphql/mutations'; | import { OUI_UPLOAD } from 'graphql/mutations'; | ||||||
|   | |||||||
| @@ -1,4 +1,4 @@ | |||||||
| import gql from 'graphql-tag'; | import { gql } from '@apollo/client'; | ||||||
|  |  | ||||||
| export const REFRESH_TOKEN = gql` | export const REFRESH_TOKEN = gql` | ||||||
|   mutation UpdateToken($refreshToken: String!) { |   mutation UpdateToken($refreshToken: String!) { | ||||||
|   | |||||||
| @@ -1,4 +1,4 @@ | |||||||
| import gql from 'graphql-tag'; | import { gql } from '@apollo/client'; | ||||||
|  |  | ||||||
| export const GET_ALL_LOCATIONS = gql` | export const GET_ALL_LOCATIONS = gql` | ||||||
|   query GetAllLocations($customerId: ID!) { |   query GetAllLocations($customerId: ID!) { | ||||||
|   | |||||||
| @@ -1,12 +1,10 @@ | |||||||
| import React from 'react'; | import React from 'react'; | ||||||
| import ReactDOM from 'react-dom'; | import ReactDOM from 'react-dom'; | ||||||
| import { Router } from 'react-router-dom'; | import { Router } from 'react-router-dom'; | ||||||
| import { ApolloClient } from 'apollo-client'; | import { ApolloClient, ApolloProvider, ApolloLink, Observable } from '@apollo/client'; | ||||||
| import { InMemoryCache } from 'apollo-cache-inmemory'; | import { InMemoryCache } from '@apollo/client/cache'; | ||||||
| import { onError } from 'apollo-link-error'; | import { onError } from '@apollo/client/link/error'; | ||||||
| import { createUploadLink } from 'apollo-upload-client'; | import { createUploadLink } from 'apollo-upload-client'; | ||||||
| import { ApolloLink, Observable } from 'apollo-link'; |  | ||||||
| import { ApolloProvider } from '@apollo/react-hooks'; |  | ||||||
|  |  | ||||||
| import 'styles/antd.less'; | import 'styles/antd.less'; | ||||||
| import 'styles/index.scss'; | import 'styles/index.scss'; | ||||||
|   | |||||||
							
								
								
									
										5638
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										5638
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							| @@ -18,19 +18,12 @@ | |||||||
|   "license": "MIT", |   "license": "MIT", | ||||||
|   "dependencies": { |   "dependencies": { | ||||||
|     "@ant-design/icons": "^4.2.1", |     "@ant-design/icons": "^4.2.1", | ||||||
|     "@apollo/react-hoc": "^3.1.4", |     "@apollo/client": "^3.1.3", | ||||||
|     "@apollo/react-hooks": "^3.1.3", |  | ||||||
|     "@tip-wlan/wlan-cloud-ui-library": "^0.3.0", |     "@tip-wlan/wlan-cloud-ui-library": "^0.3.0", | ||||||
|     "antd": "^4.5.2", |     "antd": "^4.5.2", | ||||||
|     "apollo-cache-inmemory": "^1.6.6", |  | ||||||
|     "apollo-client": "^2.6.10", |  | ||||||
|     "apollo-link": "^1.2.14", |  | ||||||
|     "apollo-link-error": "^1.1.13", |  | ||||||
|     "apollo-link-http": "^1.5.17", |  | ||||||
|     "apollo-upload-client": "^13.0.0", |     "apollo-upload-client": "^13.0.0", | ||||||
|     "clean-webpack-plugin": "^3.0.0", |     "clean-webpack-plugin": "^3.0.0", | ||||||
|     "graphql": "^14.6.0", |     "graphql": "^14.6.0", | ||||||
|     "graphql-tag": "^2.10.3", |  | ||||||
|     "highcharts": "^8.1.1", |     "highcharts": "^8.1.1", | ||||||
|     "highcharts-react-official": "^3.0.0", |     "highcharts-react-official": "^3.0.0", | ||||||
|     "history": "^4.10.1", |     "history": "^4.10.1", | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Sean Macfarlane
					Sean Macfarlane