Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update upstream PR #2184 with fix for LogViewer rendering issue #1

Merged
merged 2 commits into from
Dec 6, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,24 @@ const PipelineRunDrawerRightTabs: React.FC<PipelineRunDrawerRightTabsProps> = ({
taskReferences,
parameters,
}) => {
const [selection, setSelection] = React.useState(PipelineRunNodeTabs.LOGS);
const [selection, setSelection] = React.useState(PipelineRunNodeTabs.INPUT_OUTPUT);

const tabContentProps = (tab: PipelineRunNodeTabs): React.ComponentProps<typeof TabContent> => ({
id: tab,
eventKey: tab,
activeKey: selection ?? '',
hidden: tab !== selection,
style: { flex: '1 1 auto' },
});
const tabContents: Record<PipelineRunNodeTabs, React.ReactNode> = {
[PipelineRunNodeTabs.INPUT_OUTPUT]: (
<SelectedNodeInputOutputTab
taskReferences={taskReferences}
task={task}
parameters={parameters}
/>
),
// [PipelineRunNodeTabs.VISUALIZATIONS]: <>TBD 2</>,
[PipelineRunNodeTabs.DETAILS]: <SelectedNodeDetailsTab task={task} />,
[PipelineRunNodeTabs.VOLUMES]: <SelectedNodeVolumeMountsTab task={task} />,
[PipelineRunNodeTabs.LOGS]: <LogsTab task={task} />,
// [PipelineRunNodeTabs.POD]: <>TBD 6</>,
// [PipelineRunNodeTabs.EVENTS]: <>TBD 7</>,
// [PipelineRunNodeTabs.ML_METADATA]: <>TBD 8</>,
};

return (
<>
Expand All @@ -54,26 +63,14 @@ const PipelineRunDrawerRightTabs: React.FC<PipelineRunDrawerRightTabsProps> = ({
</Tabs>
{selection && (
<DrawerPanelBody style={{ display: 'flex', flexDirection: 'column' }}>
<TabContent {...tabContentProps(PipelineRunNodeTabs.INPUT_OUTPUT)}>
<SelectedNodeInputOutputTab
taskReferences={taskReferences}
task={task}
parameters={parameters}
/>
<TabContent
id={selection}
eventKey={selection}
activeKey={selection ?? ''}
style={{ flex: '1 1 auto' }}
>
{tabContents[selection]}
</TabContent>
{/*<TabContent {...tabContentProps(PipelineRunNodeTabs.VISUALIZATIONS)}>TBD 2</TabContent>*/}
<TabContent {...tabContentProps(PipelineRunNodeTabs.DETAILS)}>
<SelectedNodeDetailsTab task={task} />
</TabContent>
<TabContent {...tabContentProps(PipelineRunNodeTabs.VOLUMES)}>
<SelectedNodeVolumeMountsTab task={task} />
</TabContent>
<TabContent {...tabContentProps(PipelineRunNodeTabs.LOGS)}>
<LogsTab task={task} />
</TabContent>
{/*<TabContent {...tabContentProps(PipelineRunNodeTabs.POD)}>TBD 6</TabContent>*/}
{/*<TabContent {...tabContentProps(PipelineRunNodeTabs.EVENTS)}>TBD 7</TabContent>*/}
{/*<TabContent {...tabContentProps(PipelineRunNodeTabs.ML_METADATA)}>TBD 8</TabContent>*/}
</DrawerPanelBody>
)}
</>
Expand Down
Loading