fix: delay querying backends
This commit is contained in:
@@ -37,6 +37,7 @@ const ListSkeleton: React.FC<{
|
||||
<SpinWrapper>
|
||||
<Spin
|
||||
spinning={loading}
|
||||
size="middle"
|
||||
style={{
|
||||
width: '100%'
|
||||
}}
|
||||
|
||||
@@ -472,6 +472,9 @@ const AddModal: FC<AddModalProps> = (props) => {
|
||||
};
|
||||
|
||||
const handleOnOpen = async () => {
|
||||
await new Promise((resolve) => {
|
||||
setTimeout(resolve, 100);
|
||||
});
|
||||
const [backendOptions, gpuOptions] = await Promise.all([
|
||||
form.current?.getBackendOptions?.({
|
||||
cluster_id: initClusterId()
|
||||
|
||||
@@ -321,6 +321,7 @@ const HFModelFile: React.FC<HFModelFileProps> = forwardRef((props, ref) => {
|
||||
<div className="spin-wrapper">
|
||||
<Spin
|
||||
spinning={dataSource.loading}
|
||||
size="middle"
|
||||
style={{ height: '100%', width: '100%' }}
|
||||
></Spin>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user