mirror of
https://github.com/Telecominfraproject/wlan-cloud-ucentralgw-ui.git
synced 2025-10-29 18:02:31 +00:00
[WIFI-11563] Added import file button to configure modal
Signed-off-by: Charles <charles.bourque96@gmail.com>
This commit is contained in:
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "ucentral-client",
|
||||
"version": "2.8.0(5)",
|
||||
"version": "2.8.0(8)",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "ucentral-client",
|
||||
"version": "2.8.0(5)",
|
||||
"version": "2.8.0(8)",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"@chakra-ui/icons": "^2.0.11",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "ucentral-client",
|
||||
"version": "2.8.0(5)",
|
||||
"version": "2.8.0(8)",
|
||||
"description": "",
|
||||
"private": true,
|
||||
"main": "index.tsx",
|
||||
|
||||
@@ -14,6 +14,7 @@ import {
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { SaveButton } from '../../Buttons/SaveButton';
|
||||
import { Modal } from '../Modal';
|
||||
import { FileInputButton } from 'components/Buttons/FileInputButton';
|
||||
import { useConfigureDevice } from 'hooks/Network/Commands';
|
||||
|
||||
export type ConfigureModalProps = {
|
||||
@@ -91,7 +92,16 @@ export const ConfigureModal = ({ serialNumber, modalProps }: ConfigureModalProps
|
||||
</Alert>
|
||||
<FormControl isInvalid={!isValid && newConfig.length > 0}>
|
||||
<FormLabel>{t('configurations.one')}</FormLabel>
|
||||
<Textarea height="auto" minH="200px" value={newConfig} onChange={onChange} />
|
||||
<Box mb={2} w="240px">
|
||||
<FileInputButton
|
||||
value={newConfig}
|
||||
setValue={(v) => setNewConfig(v)}
|
||||
refreshId="1"
|
||||
accept=".json"
|
||||
isStringFile
|
||||
/>
|
||||
</Box>
|
||||
<Textarea height="auto" minH="600px" value={newConfig} onChange={onChange} />
|
||||
<FormErrorMessage>{t('controller.configure.invalid')}</FormErrorMessage>
|
||||
</FormControl>
|
||||
</>
|
||||
|
||||
Reference in New Issue
Block a user