fix tracing

This commit is contained in:
JzoNg
2024-03-12 22:21:45 +08:00
parent e5cf4ea60e
commit 294128d43a
8 changed files with 47 additions and 22 deletions

View File

@ -4,14 +4,17 @@ import { useStore } from '../store'
import { XClose } from '@/app/components/base/icons/src/vender/line/general'
const Record = () => {
const { workflowRunId, setWorkflowRunId } = useStore()
const { currentSequenceNumber, setCurrentSequenceNumber, workflowRunId, setWorkflowRunId } = useStore()
return (
<div className='flex flex-col w-[400px] h-full rounded-2xl border-[0.5px] border-gray-200 shadow-xl bg-white'>
<div className='flex items-center justify-between p-4 pb-1 text-base font-semibold text-gray-900'>
Test Run#5
{`Test Run#${currentSequenceNumber}`}
<div
className='flex items-center justify-center w-6 h-6 cursor-pointer'
onClick={() => setWorkflowRunId('')}
onClick={() => {
setWorkflowRunId('')
setCurrentSequenceNumber(0)
}}
>
<XClose className='w-4 h-4 text-gray-500' />
</div>

View File

@ -48,7 +48,11 @@ const RunHistory = () => {
'flex mb-0.5 px-2 py-[7px] rounded-lg hover:bg-primary-50 cursor-pointer',
item.id === workflowRunId && 'bg-primary-50',
)}
onClick={() => useRunHistoryStore.setState({ workflowRunId: item.id, runningStatus: item.status as WorkflowRunningStatus })}
onClick={() => useRunHistoryStore.setState({
currentSequenceNumber: item.sequence_number,
workflowRunId: item.id,
runningStatus: item.status as WorkflowRunningStatus,
})}
>
{
appDetail?.mode === 'workflow' && item.status === WorkflowRunningStatus.Failed && (