feat: add workflow run result page

pull/17608/head
keting lu 1 year ago
parent 8afd983d98
commit 53a7be496d

@ -0,0 +1,10 @@
import React from 'react'
import Main from '@/app/components/result'
const Result = async ({ params }: { params: { appid: string, runId: string } }) => {
return (
<Main runID={params.runId}/>
)
}
export default Result

@ -0,0 +1,21 @@
'use client'
import type { FC } from 'react'
import { useTranslation } from 'react-i18next'
import Run from '@/app/components/workflow/run'
type ResultDetail = {
runID: string
}
const Result: FC<ResultDetail> = ({ runID }) => {
const { t } = useTranslation()
return (
<div className='h-full grow relative flex flex-col pt-3'>
<h1 className='shrink-0 px-4 py-1 text-text-primary system-xl-semibold'>{t('appLog.runDetail.workflowTitle')}</h1>
<Run runID={runID} activeTab="TRACING"/>
</div>
)
}
export default Result

@ -350,7 +350,7 @@ const Result: FC<IResultProps> = ({
<TracingPanel <TracingPanel
className='bg-background-section-burn' className='bg-background-section-burn'
list={workflowProcessData?.tracing || []} list={workflowProcessData?.tracing || []}
ifForRun={true} isForRun={true}
/> />
// <TextGenerationRes // <TextGenerationRes
// isWorkflow={isWorkflow} // isWorkflow={isWorkflow}

@ -162,6 +162,7 @@ const RunPanel: FC<RunProps> = ({ hideResult, activeTab = 'RESULT', runID, getRe
<TracingPanel <TracingPanel
className='bg-background-section-burn' className='bg-background-section-burn'
list={list} list={list}
isForRun
/> />
)} )}
</div> </div>

@ -24,7 +24,7 @@ type TracingPanelProps = {
className?: string className?: string
hideNodeInfo?: boolean hideNodeInfo?: boolean
hideNodeProcessDetail?: boolean hideNodeProcessDetail?: boolean
ifForRun?: boolean isForRun?: boolean
} }
const TracingPanel: FC<TracingPanelProps> = ({ const TracingPanel: FC<TracingPanelProps> = ({
@ -32,7 +32,7 @@ const TracingPanel: FC<TracingPanelProps> = ({
className, className,
hideNodeInfo = false, hideNodeInfo = false,
hideNodeProcessDetail = false, hideNodeProcessDetail = false,
ifForRun = false, isForRun = false,
}) => { }) => {
const { t } = useTranslation() const { t } = useTranslation()
const treeNodes = formatNodeList(list, t) const treeNodes = formatNodeList(list, t)
@ -140,7 +140,7 @@ const TracingPanel: FC<TracingPanelProps> = ({
{node?.parallelDetail?.branchTitle} {node?.parallelDetail?.branchTitle}
</div> </div>
{ {
ifForRun ? <NodePanelForRun isForRun ? <NodePanelForRun
nodeInfo={node!} nodeInfo={node!}
onShowIterationDetail={handleShowIterationResultList} onShowIterationDetail={handleShowIterationResultList}
onShowRetryDetail={handleShowRetryResultList} onShowRetryDetail={handleShowRetryResultList}

Loading…
Cancel
Save