diff --git a/src/pages/deployments/create-update-base.tsx b/src/pages/deployments/create-update-base.tsx index 5af43e3..ef4d684 100644 --- a/src/pages/deployments/create-update-base.tsx +++ b/src/pages/deployments/create-update-base.tsx @@ -10,6 +10,7 @@ import { FormControlLabel, Radio, Slider, + LinearProgress, } from '@mui/material'; import { pipe } from 'fp-ts/lib/function'; import { useAtom } from 'jotai'; @@ -57,6 +58,7 @@ const CreateUpdateDeploymentBase: React.FC = ({ const standardValueRef = useRef(null); const [replicaRange, setReplicaRange] = useState([1, 4]); const [radioValue, setRadioValue] = useState('REPLICAS'); + const [isUploading, setIsUploading] = useState(false); const handleChangeModel = ( event: SelectChangeEvent, @@ -133,6 +135,8 @@ const CreateUpdateDeploymentBase: React.FC = ({ maxReplicas: replicaRange[1], }; + setIsUploading(true); + const data = await createDeploymentOrPut( { name: itemsWithValues['Deployment Name'] as string, @@ -405,6 +409,7 @@ const CreateUpdateDeploymentBase: React.FC = ({ /> )} + {isUploading && } ); }; diff --git a/src/pages/models/create-update-base.tsx b/src/pages/models/create-update-base.tsx index f8a0580..f551317 100644 --- a/src/pages/models/create-update-base.tsx +++ b/src/pages/models/create-update-base.tsx @@ -10,6 +10,7 @@ import { RadioGroup, FormControlLabel, Radio, + LinearProgress, } from '@mui/material'; import { useAtom } from 'jotai'; import { ReactNode, useRef, useState } from 'react'; @@ -38,6 +39,7 @@ const CreateUpdateModelBase: React.FC = ({ const [library, setLibrary] = useState('tensorflow'); const [file, setFile] = useState(null); const [deviceType, setDeviceType] = useState('cpu'); + const [isUploading, setIsUploading] = useState(false); const modelNameRef = useRef(null); const inputShapeRef = useRef(null); @@ -110,6 +112,8 @@ const CreateUpdateModelBase: React.FC = ({ const submitMode = type === 'create' ? 'post' : 'put'; + setIsUploading(true); + const data = await createModelOrAddModelMetadata( { name: items['모델 이름'] ?? '', @@ -265,6 +269,7 @@ const CreateUpdateModelBase: React.FC = ({ ))} + {isUploading && } );