diff --git a/packages/console/package.json b/packages/console/package.json index f348cf25c..db5ad95bf 100644 --- a/packages/console/package.json +++ b/packages/console/package.json @@ -1,6 +1,6 @@ { "name": "@flyteorg/console", - "version": "0.0.13", + "version": "0.0.14", "description": "Flyteconsole main app module", "main": "./dist/index.js", "module": "./lib/index.js", diff --git a/packages/console/src/components/Executions/TaskExecutionsList/utils.ts b/packages/console/src/components/Executions/TaskExecutionsList/utils.ts index 0f06b11c3..f12397eed 100644 --- a/packages/console/src/components/Executions/TaskExecutionsList/utils.ts +++ b/packages/console/src/components/Executions/TaskExecutionsList/utils.ts @@ -65,7 +65,9 @@ export const getGroupedLogs = ( // if there is no log with active url, just create an item with externalId, // for user to understand which array items are in this state const newLogs = - item.logs.length > 0 ? item.logs : [{ name: item.externalId }]; + item.logs.length > 0 + ? item.logs.map(l => ({ ...l, index: item.index })) + : [{ name: item.externalId, index: item.index }]; logsByPhase.set( phase, currentValue ? [...currentValue, ...newLogs] : [...newLogs], diff --git a/packages/console/src/components/common/MapTaskExecutionsList/TaskNameList.tsx b/packages/console/src/components/common/MapTaskExecutionsList/TaskNameList.tsx index 4d2dd4984..fd7ce0461 100644 --- a/packages/console/src/components/common/MapTaskExecutionsList/TaskNameList.tsx +++ b/packages/console/src/components/common/MapTaskExecutionsList/TaskNameList.tsx @@ -43,7 +43,7 @@ export const TaskNameList = ({ return ( <> - {logs.map((log, taskIndex) => { + {logs.map((log, _taskIndex) => { const taskLogName = getTaskLogName( taskExecution.id.taskId.name, log.name ?? '', @@ -57,7 +57,11 @@ export const TaskNameList = ({ )?.cacheStatus; const handleClick = () => { - onTaskSelected({ ...taskExecution, taskIndex }); + // Use the resource's index instead of the log index + onTaskSelected({ + ...taskExecution, + taskIndex: (log as any).index || 0, + }); }; return (