mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-16 17:46:45 +00:00
fix(editor): Canvas connections show X items total label when multiple run iterations (#19648)
This commit is contained in:
@@ -1197,6 +1197,7 @@
|
|||||||
"ndv.output.branch": "Branch",
|
"ndv.output.branch": "Branch",
|
||||||
"ndv.output.executing": "Executing node...",
|
"ndv.output.executing": "Executing node...",
|
||||||
"ndv.output.items": "{count} item | {count} items",
|
"ndv.output.items": "{count} item | {count} items",
|
||||||
|
"ndv.output.itemsTotal": "{count} item total | {count} items total",
|
||||||
"ndv.output.andSubExecutions": ", {count} sub-execution | , {count} sub-executions",
|
"ndv.output.andSubExecutions": ", {count} sub-execution | , {count} sub-executions",
|
||||||
"ndv.output.noOutputData.message": "n8n stops executing the workflow when a node has no output data. You can change this default behaviour via",
|
"ndv.output.noOutputData.message": "n8n stops executing the workflow when a node has no output data. You can change this default behaviour via",
|
||||||
"ndv.output.noOutputData.message.settings": "Settings",
|
"ndv.output.noOutputData.message.settings": "Settings",
|
||||||
|
|||||||
@@ -754,12 +754,18 @@ export function useCanvasMapping({
|
|||||||
const { type, index } = parseCanvasConnectionHandleString(connection.sourceHandle);
|
const { type, index } = parseCanvasConnectionHandleString(connection.sourceHandle);
|
||||||
const runDataTotal =
|
const runDataTotal =
|
||||||
nodeExecutionRunDataOutputMapById.value[fromNode.id]?.[type]?.[index]?.total ?? 0;
|
nodeExecutionRunDataOutputMapById.value[fromNode.id]?.[type]?.[index]?.total ?? 0;
|
||||||
|
const hasMultipleRunDataIterations =
|
||||||
|
(nodeExecutionRunDataOutputMapById.value[fromNode.id]?.[type]?.[index]?.iterations ?? 1) >
|
||||||
|
1;
|
||||||
|
|
||||||
return runDataTotal > 0
|
return runDataTotal > 0
|
||||||
? i18n.baseText('ndv.output.items', {
|
? i18n.baseText(
|
||||||
|
hasMultipleRunDataIterations ? 'ndv.output.itemsTotal' : 'ndv.output.items',
|
||||||
|
{
|
||||||
adjustToNumber: runDataTotal,
|
adjustToNumber: runDataTotal,
|
||||||
interpolate: { count: String(runDataTotal) },
|
interpolate: { count: String(runDataTotal) },
|
||||||
})
|
},
|
||||||
|
)
|
||||||
: '';
|
: '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user