balibabu
commited on
Commit
·
2faf924
1
Parent(s):
92890f8
feat: Hide KnowledgeGraphModal #162 (#1783)
Browse files### What problem does this PR solve?
feat: Hide KnowledgeGraphModal #162
### Type of change
- [x] New Feature (non-breaking change which adds functionality)
web/src/components/chunk-method-modal/index.tsx
CHANGED
|
@@ -22,7 +22,7 @@ import React, { useEffect, useMemo } from 'react';
|
|
| 22 |
import { useFetchParserListOnMount } from './hooks';
|
| 23 |
|
| 24 |
import { useTranslate } from '@/hooks/common-hooks';
|
| 25 |
-
import
|
| 26 |
import LayoutRecognize from '../layout-recognize';
|
| 27 |
import ParseConfiguration, {
|
| 28 |
showRaptorParseConfiguration,
|
|
@@ -272,7 +272,7 @@ const ChunkMethodModal: React.FC<IProps> = ({
|
|
| 272 |
{showRaptorParseConfiguration(selectedTag) && (
|
| 273 |
<ParseConfiguration></ParseConfiguration>
|
| 274 |
)}
|
| 275 |
-
{showEntityTypes && <
|
| 276 |
</Form>
|
| 277 |
</Modal>
|
| 278 |
);
|
|
|
|
| 22 |
import { useFetchParserListOnMount } from './hooks';
|
| 23 |
|
| 24 |
import { useTranslate } from '@/hooks/common-hooks';
|
| 25 |
+
import EntityTypesItem from '../entity-types-item';
|
| 26 |
import LayoutRecognize from '../layout-recognize';
|
| 27 |
import ParseConfiguration, {
|
| 28 |
showRaptorParseConfiguration,
|
|
|
|
| 272 |
{showRaptorParseConfiguration(selectedTag) && (
|
| 273 |
<ParseConfiguration></ParseConfiguration>
|
| 274 |
)}
|
| 275 |
+
{showEntityTypes && <EntityTypesItem></EntityTypesItem>}
|
| 276 |
</Form>
|
| 277 |
</Modal>
|
| 278 |
);
|
web/src/components/{entity-types-form.tsx → entity-types-item.tsx}
RENAMED
|
@@ -10,7 +10,7 @@ const initialEntityTypes = [
|
|
| 10 |
'time',
|
| 11 |
];
|
| 12 |
|
| 13 |
-
const
|
| 14 |
const { t } = useTranslate('knowledgeConfiguration');
|
| 15 |
return (
|
| 16 |
<Form.Item
|
|
@@ -26,4 +26,4 @@ const EntityTypesForm = () => {
|
|
| 26 |
);
|
| 27 |
};
|
| 28 |
|
| 29 |
-
export default
|
|
|
|
| 10 |
'time',
|
| 11 |
];
|
| 12 |
|
| 13 |
+
const EntityTypesItem = () => {
|
| 14 |
const { t } = useTranslate('knowledgeConfiguration');
|
| 15 |
return (
|
| 16 |
<Form.Item
|
|
|
|
| 26 |
);
|
| 27 |
};
|
| 28 |
|
| 29 |
+
export default EntityTypesItem;
|
web/src/pages/add-knowledge/components/knowledge-chunk/index.tsx
CHANGED
|
@@ -195,7 +195,7 @@ const Chunk = () => {
|
|
| 195 |
onOk={onChunkUpdatingOk}
|
| 196 |
/>
|
| 197 |
)}
|
| 198 |
-
<KnowledgeGraphModal></KnowledgeGraphModal>
|
| 199 |
</>
|
| 200 |
);
|
| 201 |
};
|
|
|
|
| 195 |
onOk={onChunkUpdatingOk}
|
| 196 |
/>
|
| 197 |
)}
|
| 198 |
+
{false && <KnowledgeGraphModal></KnowledgeGraphModal>}
|
| 199 |
</>
|
| 200 |
);
|
| 201 |
};
|
web/src/pages/add-knowledge/components/knowledge-setting/configuration.tsx
CHANGED
|
@@ -1,19 +1,18 @@
|
|
| 1 |
-
import
|
| 2 |
-
import { PlusOutlined } from '@ant-design/icons';
|
| 3 |
-
import { Button, Form, Input, Radio, Select, Space, Upload } from 'antd';
|
| 4 |
-
import {
|
| 5 |
-
useFetchKnowledgeConfigurationOnMount,
|
| 6 |
-
useSubmitKnowledgeConfiguration,
|
| 7 |
-
} from './hooks';
|
| 8 |
-
|
| 9 |
-
import EntityTypesForm from '@/components/entity-types-form';
|
| 10 |
import LayoutRecognize from '@/components/layout-recognize';
|
| 11 |
import MaxTokenNumber from '@/components/max-token-number';
|
| 12 |
import ParseConfiguration, {
|
| 13 |
showRaptorParseConfiguration,
|
| 14 |
} from '@/components/parse-configuration';
|
| 15 |
import { useTranslate } from '@/hooks/common-hooks';
|
|
|
|
|
|
|
|
|
|
| 16 |
import { FormInstance } from 'antd/lib';
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
import styles from './index.less';
|
| 18 |
|
| 19 |
const { Option } = Select;
|
|
@@ -99,7 +98,7 @@ const ConfigurationForm = ({ form }: { form: FormInstance }) => {
|
|
| 99 |
))}
|
| 100 |
</Select>
|
| 101 |
</Form.Item>
|
| 102 |
-
<
|
| 103 |
<Form.Item noStyle dependencies={['parser_id']}>
|
| 104 |
{({ getFieldValue }) => {
|
| 105 |
const parserId = getFieldValue('parser_id');
|
|
|
|
| 1 |
+
import EntityTypesItem from '@/components/entity-types-item';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
import LayoutRecognize from '@/components/layout-recognize';
|
| 3 |
import MaxTokenNumber from '@/components/max-token-number';
|
| 4 |
import ParseConfiguration, {
|
| 5 |
showRaptorParseConfiguration,
|
| 6 |
} from '@/components/parse-configuration';
|
| 7 |
import { useTranslate } from '@/hooks/common-hooks';
|
| 8 |
+
import { normFile } from '@/utils/file-util';
|
| 9 |
+
import { PlusOutlined } from '@ant-design/icons';
|
| 10 |
+
import { Button, Form, Input, Radio, Select, Space, Upload } from 'antd';
|
| 11 |
import { FormInstance } from 'antd/lib';
|
| 12 |
+
import {
|
| 13 |
+
useFetchKnowledgeConfigurationOnMount,
|
| 14 |
+
useSubmitKnowledgeConfiguration,
|
| 15 |
+
} from './hooks';
|
| 16 |
import styles from './index.less';
|
| 17 |
|
| 18 |
const { Option } = Select;
|
|
|
|
| 98 |
))}
|
| 99 |
</Select>
|
| 100 |
</Form.Item>
|
| 101 |
+
<EntityTypesItem></EntityTypesItem>
|
| 102 |
<Form.Item noStyle dependencies={['parser_id']}>
|
| 103 |
{({ getFieldValue }) => {
|
| 104 |
const parserId = getFieldValue('parser_id');
|