Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

fix: knowledge create display error (#3157)

zxhlyh2fb9850af56d
diff --git a/web/app/components/datasets/create/embedding-process/index.tsx b/web/app/components/datasets/create/embedding-process/index.tsx
index 0cea26712ee..f15091832e6 100644
--- a/web/app/components/datasets/create/embedding-process/index.tsx
+++ b/web/app/components/datasets/create/embedding-process/index.tsx
@@ -20,6 +20,8 @@ import { Plan } from '@/app/components/billing/type'
import { ZapFast } from '@/app/components/base/icons/src/vender/solid/general'
import UpgradeBtn from '@/app/components/billing/upgrade-btn'
import { useProviderContext } from '@/context/provider-context'
+import TooltipPlus from '@/app/components/base/tooltip-plus'
+import { AlertCircle } from '@/app/components/base/icons/src/vender/solid/alertsAndFeedback'
type Props = {
datasetId: string
@@ -243,8 +245,22 @@ const EmbeddingProcess: FC<Props> = ({ datasetId, batchId, documents = [], index
{isSourceEmbedding(indexingStatusDetail) && (
<div className={s.percent}>{`${getSourcePercent(indexingStatusDetail)}%`}</div>
)}
- {indexingStatusDetail.indexing_status === 'error' && (
- <div className={cn(s.percent, s.error)}>Error</div>
+ {indexingStatusDetail.indexing_status === 'error' && indexingStatusDetail.error && (
+ <TooltipPlus popupContent={(
+ <div className='max-w-[400px]'>
+ {indexingStatusDetail.error}
+ </div>
+ )}>
+ <div className={cn(s.percent, s.error, 'flex items-center')}>
+ Error
+ <AlertCircle className='ml-1 w-4 h-4' />
+ </div>
+ </TooltipPlus>
+ )}
+ {indexingStatusDetail.indexing_status === 'error' && !indexingStatusDetail.error && (
+ <div className={cn(s.percent, s.error, 'flex items-center')}>
+ Error
+ </div>
)}
{indexingStatusDetail.indexing_status === 'completed' && (
<div className={cn(s.percent, s.success)}>100%</div>