Skip to content

Commit

Permalink
Merge pull request #175 from zilliztech/gs
Browse files Browse the repository at this point in the history
fix import dialog disable button
  • Loading branch information
shanghaikid authored Mar 28, 2023
2 parents 71e3d88 + f8fb010 commit 7debb85
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 13 deletions.
6 changes: 0 additions & 6 deletions client/src/pages/collections/Types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,3 @@ export enum TAB_EMUM {
'data-preview',
'data-query',
}

export interface LoadSampleParam {
collection_name: string;
// e.g. [{vector: [1,2,3], age: 10}]
size: string;
}
2 changes: 1 addition & 1 deletion client/src/pages/dialogs/ImportSampleDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ const ImportSampleDialog: FC<{ collection: string }> = props => {
: insertStatus
}
handleConfirm={handleNext}
confirmDisabled={false}
confirmDisabled={insertStatus === InsertStatusEnum.loading}
showActions={true}
showCancel={false}
// don't show close icon when insert not finish
Expand Down
7 changes: 2 additions & 5 deletions client/src/pages/dialogs/LoadCollectionDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const LoadCollectionDialog = (props: any) => {
const { t: warningTrans } = useTranslation('warning');
const { handleCloseDialog } = useContext(rootContext);
const [form, setForm] = useState({
replica: 0,
replica: 1,
});
const [enableRelica, setEnableRelica] = useState(false);
const [replicaToggle, setReplicaToggle] = useState(false);
Expand Down Expand Up @@ -78,9 +78,6 @@ const LoadCollectionDialog = (props: any) => {

// only show replica toggle in distributed mode && query node > 1
if (enableRelica && queryNodes.length > 1) {
setForm({
replica: queryNodes.length,
});
setMaxQueryNode(queryNodes.length);
setEnableRelica(enableRelica);
}
Expand Down Expand Up @@ -156,7 +153,7 @@ const LoadCollectionDialog = (props: any) => {
const handleChange = () => {
setReplicaToggle(!replicaToggle);
if (!replicaToggle === false) {
setForm({ replica: 0 });
setForm({ replica: 1 });
}
};

Expand Down
7 changes: 6 additions & 1 deletion client/src/pages/dialogs/Types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,9 @@ export interface CreateAliasProps {
export interface RenameCollectionProps {
collectionName: string;
cb?: () => void;
}
}
export interface LoadSampleParam {
collection_name: string;
// e.g. [{vector: [1,2,3], age: 10}]
size: string;
}

0 comments on commit 7debb85

Please sign in to comment.