From 78e01b9353949e8e8de8aeea29622074f016b899 Mon Sep 17 00:00:00 2001 From: Younglina Date: Mon, 17 Mar 2025 13:56:00 +0800 Subject: [PATCH] fix: add text overflow ellipsis and title for iteration and loop log triggers --- .../iteration-log/iteration-log-trigger.tsx | 18 ++++++++++++------ .../workflow/run/loop-log/loop-log-trigger.tsx | 18 ++++++++++++------ 2 files changed, 24 insertions(+), 12 deletions(-) diff --git a/web/app/components/workflow/run/iteration-log/iteration-log-trigger.tsx b/web/app/components/workflow/run/iteration-log/iteration-log-trigger.tsx index 93c6495216..cc2e8146b8 100644 --- a/web/app/components/workflow/run/iteration-log/iteration-log-trigger.tsx +++ b/web/app/components/workflow/run/iteration-log/iteration-log-trigger.tsx @@ -37,18 +37,24 @@ const IterationLogTrigger = ({ e.nativeEvent.stopImmediatePropagation() onShowIterationResultList(nodeInfo.details || [], nodeInfo?.iterDurationMap || nodeInfo.execution_metadata?.iteration_duration_map || {}) } + + const iterationText = t('workflow.nodes.iteration.iteration', { count: getCount(nodeInfo.details?.length, nodeInfo.metadata?.iterator_length) }) + + (getErrorCount(nodeInfo.details) > 0 ? + `${t('workflow.nodes.iteration.comma')}${t('workflow.nodes.iteration.error', { count: getErrorCount(nodeInfo.details) })}` : + '') + return ( ) diff --git a/web/app/components/workflow/run/loop-log/loop-log-trigger.tsx b/web/app/components/workflow/run/loop-log/loop-log-trigger.tsx index 378f09119f..3b7524de7c 100644 --- a/web/app/components/workflow/run/loop-log/loop-log-trigger.tsx +++ b/web/app/components/workflow/run/loop-log/loop-log-trigger.tsx @@ -37,18 +37,24 @@ const LoopLogTrigger = ({ e.nativeEvent.stopImmediatePropagation() onShowLoopResultList(nodeInfo.details || [], nodeInfo?.loopDurationMap || nodeInfo.execution_metadata?.loop_duration_map || {}) } + + const loopText = t('workflow.nodes.loop.loop', { count: getCount(nodeInfo.details?.length, nodeInfo.metadata?.loop_length) }) + + (getErrorCount(nodeInfo.details) > 0 ? + `${t('workflow.nodes.loop.comma')}${t('workflow.nodes.loop.error', { count: getErrorCount(nodeInfo.details) })}` : + '') + return ( )