fix: correct the sorting issue of Tracing information.
This commit is contained in:
parent
f6aa1f0d65
commit
5b2ac1e0d8
@ -6,6 +6,7 @@ import formatRetryNode from './retry'
|
||||
import formatAgentNode from './agent'
|
||||
import { cloneDeep } from 'lodash-es'
|
||||
import { BlockEnum } from '../../../types'
|
||||
import { orderBy } from 'lodash-es'
|
||||
|
||||
const formatToTracingNodeList = (list: NodeTracing[], t: any) => {
|
||||
const allItems = cloneDeep([...list]).sort((a, b) => a.index - b.index)
|
||||
@ -19,7 +20,8 @@ const formatToTracingNodeList = (list: NodeTracing[], t: any) => {
|
||||
// would change the structure of the list. Iteration and parallel can include each other.
|
||||
const formattedIterationList = formatIterationNode(formattedRetryList.filter(item => !loopRelatedList.includes(item)), t)
|
||||
const formattedLoopList = formatLoopNode(loopRelatedList, t)
|
||||
const formattedParallelList = formatParallelNode([...formattedIterationList, ...formattedLoopList], t)
|
||||
const orderedNodeList = orderBy([...formattedIterationList, ...formattedLoopList], 'index', 'asc')
|
||||
const formattedParallelList = formatParallelNode(orderedNodeList, t)
|
||||
|
||||
const result = formattedParallelList
|
||||
// console.log(allItems)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user