浏览代码

fix: can not show loop detail in one step run (#20215)

tags/1.4.1
Joel 5 个月前
父节点
当前提交
ba7a2fd135
没有帐户链接到提交者的电子邮件

+ 1
- 2
web/app/components/workflow/run/iteration-log/iteration-log-trigger.tsx 查看文件

if (parallelNodes.length > 0) if (parallelNodes.length > 0)
return parallelNodes return parallelNodes


const serialIndex = parseInt(key, 10)
const serialIndex = Number.parseInt(key, 10)
if (!isNaN(serialIndex)) { if (!isNaN(serialIndex)) {
const serialNodes = allExecutions.filter(exec => const serialNodes = allExecutions.filter(exec =>
exec.execution_metadata?.iteration_id === nodeInfo.node_id exec.execution_metadata?.iteration_id === nodeInfo.node_id
const iterDurationMap = nodeInfo?.iterDurationMap || iterationNodeMeta?.iteration_duration_map || {} const iterDurationMap = nodeInfo?.iterDurationMap || iterationNodeMeta?.iteration_duration_map || {}


let structuredList: NodeTracing[][] = [] let structuredList: NodeTracing[][] = []

if (iterationNodeMeta?.iteration_duration_map) { if (iterationNodeMeta?.iteration_duration_map) {
const instanceKeys = Object.keys(iterationNodeMeta.iteration_duration_map) const instanceKeys = Object.keys(iterationNodeMeta.iteration_duration_map)
structuredList = instanceKeys structuredList = instanceKeys

+ 5
- 6
web/app/components/workflow/run/loop-log/loop-log-trigger.tsx 查看文件

if (parallelNodes.length > 0) if (parallelNodes.length > 0)
return parallelNodes return parallelNodes


const serialIndex = parseInt(key, 10)
const serialIndex = Number.parseInt(key, 10)
if (!isNaN(serialIndex)) { if (!isNaN(serialIndex)) {
const serialNodes = allExecutions.filter(exec => const serialNodes = allExecutions.filter(exec =>
exec.execution_metadata?.loop_id === nodeInfo.node_id exec.execution_metadata?.loop_id === nodeInfo.node_id
const loopVarMap = loopNodeMeta?.loop_variable_map || {} const loopVarMap = loopNodeMeta?.loop_variable_map || {}


let structuredList: NodeTracing[][] = [] let structuredList: NodeTracing[][] = []

if (loopNodeMeta?.loop_duration_map) {
if (nodeInfo.details?.length) {
structuredList = nodeInfo.details
}
else if (loopNodeMeta?.loop_duration_map) {
const instanceKeys = Object.keys(loopNodeMeta.loop_duration_map) const instanceKeys = Object.keys(loopNodeMeta.loop_duration_map)
structuredList = instanceKeys structuredList = instanceKeys
.map(key => filterNodesForInstance(key)) .map(key => filterNodesForInstance(key))
.filter(branchNodes => branchNodes.length > 0) .filter(branchNodes => branchNodes.length > 0)
} }
else if (nodeInfo.details?.length) {
structuredList = nodeInfo.details
}


onShowLoopResultList( onShowLoopResultList(
structuredList, structuredList,

正在加载...
取消
保存