diff --git a/app/containers/System/containers/Firmware/index.js b/app/containers/System/containers/Firmware/index.js index 489afe9..db434aa 100644 --- a/app/containers/System/containers/Firmware/index.js +++ b/app/containers/System/containers/Firmware/index.js @@ -1,8 +1,23 @@ import React from 'react'; -import { Firmware as FirmwarePage } from '@tip-wlan/wlan-cloud-ui-library'; +import { useQuery } from '@apollo/react-hooks'; +import { Alert } from 'antd'; +import { GET_ALL_FIRMWARE } from 'graphql/queries'; +import { Firmware as FirmwarePage, Loading } from '@tip-wlan/wlan-cloud-ui-library'; const Firmware = () => { - return ; + const { data, error, loading } = useQuery(GET_ALL_FIRMWARE); + + if (error) { + return ( + + ); + } + + if (loading) { + return ; + } + + return ; }; export default Firmware; diff --git a/app/graphql/queries.js b/app/graphql/queries.js index f5fa9d1..afd422e 100644 --- a/app/graphql/queries.js +++ b/app/graphql/queries.js @@ -223,3 +223,17 @@ export const GET_ALL_STATUS = gql` } } `; + +export const GET_ALL_FIRMWARE = gql` + query GetAllFirmware { + getAllFirmware { + id + modelId + versionName + description + filename + commit + releaseDate + } + } +`;