mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-08-14 17:15:54 +08:00
fix: knowledge create display error (#3157)
This commit is contained in:
parent
9eba6ffdd4
commit
2fb9850af5
@ -20,6 +20,8 @@ import { Plan } from '@/app/components/billing/type'
|
|||||||
import { ZapFast } from '@/app/components/base/icons/src/vender/solid/general'
|
import { ZapFast } from '@/app/components/base/icons/src/vender/solid/general'
|
||||||
import UpgradeBtn from '@/app/components/billing/upgrade-btn'
|
import UpgradeBtn from '@/app/components/billing/upgrade-btn'
|
||||||
import { useProviderContext } from '@/context/provider-context'
|
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 = {
|
type Props = {
|
||||||
datasetId: string
|
datasetId: string
|
||||||
@ -243,8 +245,22 @@ const EmbeddingProcess: FC<Props> = ({ datasetId, batchId, documents = [], index
|
|||||||
{isSourceEmbedding(indexingStatusDetail) && (
|
{isSourceEmbedding(indexingStatusDetail) && (
|
||||||
<div className={s.percent}>{`${getSourcePercent(indexingStatusDetail)}%`}</div>
|
<div className={s.percent}>{`${getSourcePercent(indexingStatusDetail)}%`}</div>
|
||||||
)}
|
)}
|
||||||
{indexingStatusDetail.indexing_status === 'error' && (
|
{indexingStatusDetail.indexing_status === 'error' && indexingStatusDetail.error && (
|
||||||
<div className={cn(s.percent, s.error)}>Error</div>
|
<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' && (
|
{indexingStatusDetail.indexing_status === 'completed' && (
|
||||||
<div className={cn(s.percent, s.success)}>100%</div>
|
<div className={cn(s.percent, s.success)}>100%</div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user