Skip to content

Commit

Permalink
fix(ui): show container logs when using templateRef
Browse files Browse the repository at this point in the history
- the component was incorrectly assuming that `node.templateName` exists, which it doesn't in the case of a `templateRef`
  - use the existing `getTemplateNameFromNode` function to properly handle that instead

Signed-off-by: Anton Gilgur <agilgur5@gmail.com>
  • Loading branch information
agilgur5 committed Apr 24, 2024
1 parent b1c3768 commit 71f4f51
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ export function WorkflowLogsViewer({workflow, initialNodeId, initialPodName, con
// default to the node id of the pod
const nodeId = initialNodeId || podNamesToNodeIDs.get(podName);
const node = workflow.status.nodes[nodeId];
const templates = execSpec(workflow).templates.filter(t => !node || t.name === node.templateName);
const templates = execSpec(workflow).templates.filter(t => !node || t.name === getTemplateNameFromNode(node));

const containers = [
...new Set(
Expand Down

0 comments on commit 71f4f51

Please sign in to comment.