Fix: Interface integration for the file log page in the overview #9869 (#10222)

### What problem does this PR solve?

Fix: Interface integration for the file log page in the overview

- Support for selecting data pipeline parsing types
- Use the RunningStatus enumeration instead of numeric status
- Obtain and display data pipeline file log details
- Replace existing mock data with new interface data on the page
- Link the file log list to the real data source
- Optimize log information display
- Fixed a typo in the field name "pipeline_id" → "pipeline_id"

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
chanx
2025-09-23 10:33:17 +08:00
committed by GitHub
parent 0c557e37ad
commit f20dca2895
21 changed files with 417 additions and 212 deletions

View File

@ -19,7 +19,7 @@ import { Input } from '@/components/ui/input';
import { useNavigatePage } from '@/hooks/logic-hooks/navigate-hooks';
import { IModalProps } from '@/interfaces/common';
import { zodResolver } from '@hookform/resolvers/zod';
import { useForm } from 'react-hook-form';
import { useForm, useWatch } from 'react-hook-form';
import { useTranslation } from 'react-i18next';
import { z } from 'zod';
@ -50,7 +50,7 @@ export function InputForm({ onOk }: IModalProps<any>) {
})
.trim(),
parser_id: z.string().optional(),
pipline_id: z.string().optional(),
pipeline_id: z.string().optional(),
})
.superRefine((data, ctx) => {
// When parseType === 1, parser_id is required
@ -67,11 +67,11 @@ export function InputForm({ onOk }: IModalProps<any>) {
console.log('form-data', data);
// When parseType === 1, pipline_id required
if (data.parseType === 2 && !data.pipline_id) {
if (data.parseType === 2 && !data.pipeline_id) {
ctx.addIssue({
code: z.ZodIssueCode.custom,
message: t('knowledgeList.dataFlowRequired'),
path: ['pipline_id'],
path: ['pipeline_id'],
});
}
});
@ -126,19 +126,13 @@ export function InputForm({ onOk }: IModalProps<any>) {
<EmbeddingModelItem line={2} isEdit={false} />
<ParseTypeItem />
{parseType === 1 && (
<>
<ChunkMethodItem></ChunkMethodItem>
</>
)}
{parseType === 1 && <ChunkMethodItem></ChunkMethodItem>}
{parseType === 2 && (
<>
<DataFlowSelect
isMult={false}
toDataPipeline={navigateToAgents}
formFieldName="pipline_id"
/>
</>
<DataFlowSelect
isMult={false}
toDataPipeline={navigateToAgents}
formFieldName="pipeline_id"
/>
)}
</form>
</Form>