Skip to content

Commit

Permalink
fix(ui): Fix container-set log viewing in UI (#5348)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexec authored Mar 10, 2021
1 parent bde9f21 commit 80b5ab9
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export const WorkflowLogsViewer = ({workflow, nodeId, container, archived}: Work

const containers = ['init', 'wait'].concat(
templates
.map(t => (t.containerSet.graph || t.containerSet.sequence || [{name: 'main'}]).concat(t.sidecars || []))
.map(t => ((t.containerSet && t.containerSet.containers) || [{name: 'main'}]).concat(t.sidecars || []))
.reduce((a, v) => a.concat(v), [])
.map(c => c.name)
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ class WorkflowNodeContainers extends React.Component<Props, {selectedSidecar: st
</div>
);
}
const containers = (template.containerSet ? template.containerSet.graph || template.containerSet.sequence : []).concat(template.sidecars || []);
const containers = (template.containerSet ? template.containerSet.containers : []).concat(template.sidecars || []);

const container = (this.state.selectedSidecar && containers.find(item => item.name === this.state.selectedSidecar)) || template.container || template.script;

Expand Down
3 changes: 1 addition & 2 deletions ui/src/models/workflows.ts
Original file line number Diff line number Diff line change
Expand Up @@ -316,8 +316,7 @@ export interface Template {
container?: kubernetes.Container;

containerSet?: {
sequence: kubernetes.Container[];
graph: ContainerNode[];
containers: ContainerNode[];
};
/**
* Deamon will allow a workflow to proceed to the next step so long as the container reaches readiness
Expand Down

0 comments on commit 80b5ab9

Please sign in to comment.