Skip to content

Commit

Permalink
fix: issue
Browse files Browse the repository at this point in the history
  • Loading branch information
NicolaCage committed Dec 6, 2022
1 parent e56d856 commit f434abc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion app/pages/Import/TaskCreate/PasswordInputModal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const PasswordInputModal = (props: IProps) => {
onChange={e => setPassword(e.target.value)}
/>
<div className={styles.btns}>
<Button onClick={() => handleConfirm()}>
<Button onClick={() => handleCancel()}>
{intl.get('common.cancel')}
</Button>
<Button
Expand Down
13 changes: 6 additions & 7 deletions app/utils/import.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { message } from 'antd';
import _ from 'lodash';

import { useI18n } from '@vesoft-inc/i18n';
import { handleEscape } from './function';

export function configToJson(payload) {
Expand Down Expand Up @@ -84,10 +84,9 @@ export function edgeDataToJSON(
edgePorps.push(_prop);
}
});
const fileName = edge.file.name.replace('.csv', '');
const edgeConfig = {
path: edge.file.name,
failDataPath: `${fileName}Fail.csv`,
failDataPath: `.`,
batchSize: Number(batchSize) || 60,
type: 'csv',
csv: {
Expand Down Expand Up @@ -136,10 +135,9 @@ export function vertexDataToJSON(
};
return _tag;
});
const fileName = vertex.file.name.replace('.csv', '');
const vertexConfig: any = {
path: vertex.file.name,
failDataPath: `${fileName}Fail.csv`,
failDataPath: `.`,
batchSize: Number(batchSize) || 60,
type: 'csv',
csv: {
Expand All @@ -164,6 +162,7 @@ export function vertexDataToJSON(

export function indexJudge(index: number | null, name: string) {
if (index === null) {
const { intl } = useI18n();
message.error(`${name} ${intl.get('import.indexNotEmpty')}`);
throw new Error();
}
Expand Down Expand Up @@ -191,7 +190,7 @@ export const exampleJson = {
'files': [
{
'path': 'item.csv',
'failDataPath': 'itemFail.csv',
'failDataPath': '.',
'batchSize': 60,
'limit': null,
'inOrder': null,
Expand Down Expand Up @@ -248,7 +247,7 @@ export const exampleJson = {
},
{
'path': 'orderr.csv',
'failDataPath': 'orderrFail.csv',
'failDataPath': '.',
'batchSize': 60,
'limit': null,
'inOrder': null,
Expand Down

0 comments on commit f434abc

Please sign in to comment.