Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Hide KnowledgeGraphModal #162 #1783

Merged
merged 1 commit into from
Aug 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions web/src/components/chunk-method-modal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import React, { useEffect, useMemo } from 'react';
import { useFetchParserListOnMount } from './hooks';

import { useTranslate } from '@/hooks/common-hooks';
import EntityTypesForm from '../entity-types-form';
import EntityTypesItem from '../entity-types-item';
import LayoutRecognize from '../layout-recognize';
import ParseConfiguration, {
showRaptorParseConfiguration,
Expand Down Expand Up @@ -272,7 +272,7 @@ const ChunkMethodModal: React.FC<IProps> = ({
{showRaptorParseConfiguration(selectedTag) && (
<ParseConfiguration></ParseConfiguration>
)}
{showEntityTypes && <EntityTypesForm></EntityTypesForm>}
{showEntityTypes && <EntityTypesItem></EntityTypesItem>}
</Form>
</Modal>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const initialEntityTypes = [
'time',
];

const EntityTypesForm = () => {
const EntityTypesItem = () => {
const { t } = useTranslate('knowledgeConfiguration');
return (
<Form.Item
Expand All @@ -26,4 +26,4 @@ const EntityTypesForm = () => {
);
};

export default EntityTypesForm;
export default EntityTypesItem;
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ const Chunk = () => {
onOk={onChunkUpdatingOk}
/>
)}
<KnowledgeGraphModal></KnowledgeGraphModal>
{false && <KnowledgeGraphModal></KnowledgeGraphModal>}
</>
);
};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
import { normFile } from '@/utils/file-util';
import { PlusOutlined } from '@ant-design/icons';
import { Button, Form, Input, Radio, Select, Space, Upload } from 'antd';
import {
useFetchKnowledgeConfigurationOnMount,
useSubmitKnowledgeConfiguration,
} from './hooks';

import EntityTypesForm from '@/components/entity-types-form';
import EntityTypesItem from '@/components/entity-types-item';
import LayoutRecognize from '@/components/layout-recognize';
import MaxTokenNumber from '@/components/max-token-number';
import ParseConfiguration, {
showRaptorParseConfiguration,
} from '@/components/parse-configuration';
import { useTranslate } from '@/hooks/common-hooks';
import { normFile } from '@/utils/file-util';
import { PlusOutlined } from '@ant-design/icons';
import { Button, Form, Input, Radio, Select, Space, Upload } from 'antd';
import { FormInstance } from 'antd/lib';
import {
useFetchKnowledgeConfigurationOnMount,
useSubmitKnowledgeConfiguration,
} from './hooks';
import styles from './index.less';

const { Option } = Select;
Expand Down Expand Up @@ -99,7 +98,7 @@ const ConfigurationForm = ({ form }: { form: FormInstance }) => {
))}
</Select>
</Form.Item>
<EntityTypesForm></EntityTypesForm>
<EntityTypesItem></EntityTypesItem>
<Form.Item noStyle dependencies={['parser_id']}>
{({ getFieldValue }) => {
const parserId = getFieldValue('parser_id');
Expand Down