Skip to content

Commit

Permalink
[UI] Fix artifact preview with outdated content (kubeflow#3749)
Browse files Browse the repository at this point in the history
* Fix preview with outdated content

* Update snapshot
  • Loading branch information
Bobgy authored and Jeffwan committed Dec 9, 2020
1 parent ca92bfb commit 400a734
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
14 changes: 12 additions & 2 deletions frontend/src/pages/RunDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -356,9 +356,14 @@ class RunDetails extends Page<RunDetailsInternalProps, RunDetailsState> {

{sidepanelSelectedTab === SidePaneTab.INPUT_OUTPUT && (
<div className={padding(20)}>
<DetailsTable title='Input parameters' fields={inputParams} />
<DetailsTable
key={`input-parameters-${selectedNodeId}`}
title='Input parameters'
fields={inputParams}
/>

<DetailsTable
key={`input-artifacts-${selectedNodeId}`}
title='Input artifacts'
fields={inputArtifacts}
valueComponent={MinioArtifactPreview}
Expand All @@ -367,9 +372,14 @@ class RunDetails extends Page<RunDetailsInternalProps, RunDetailsState> {
}}
/>

<DetailsTable title='Output parameters' fields={outputParams} />
<DetailsTable
key={`output-parameters-${selectedNodeId}`}
title='Output parameters'
fields={outputParams}
/>

<DetailsTable
key={`output-artifacts-${selectedNodeId}`}
title='Output artifacts'
fields={outputArtifacts}
valueComponent={MinioArtifactPreview}
Expand Down
8 changes: 8 additions & 0 deletions frontend/src/pages/__snapshots__/RunDetails.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -1056,10 +1056,12 @@ exports[`RunDetails opens side panel when graph node is clicked 1`] = `
>
<DetailsTable
fields={Array []}
key="input-parameters-node1"
title="Input parameters"
/>
<DetailsTable
fields={Array []}
key="input-artifacts-node1"
title="Input artifacts"
valueComponent={[Function]}
valueComponentProps={
Expand All @@ -1070,10 +1072,12 @@ exports[`RunDetails opens side panel when graph node is clicked 1`] = `
/>
<DetailsTable
fields={Array []}
key="output-parameters-node1"
title="Output parameters"
/>
<DetailsTable
fields={Array []}
key="output-artifacts-node1"
title="Output artifacts"
valueComponent={[Function]}
valueComponentProps={
Expand Down Expand Up @@ -1645,10 +1649,12 @@ exports[`RunDetails switches to inputs/outputs tab in side pane 1`] = `
],
]
}
key="input-parameters-node1"
title="Input parameters"
/>
<DetailsTable
fields={Array []}
key="input-artifacts-node1"
title="Input artifacts"
valueComponent={[Function]}
valueComponentProps={
Expand All @@ -1670,10 +1676,12 @@ exports[`RunDetails switches to inputs/outputs tab in side pane 1`] = `
],
]
}
key="output-parameters-node1"
title="Output parameters"
/>
<DetailsTable
fields={Array []}
key="output-artifacts-node1"
title="Output artifacts"
valueComponent={[Function]}
valueComponentProps={
Expand Down

0 comments on commit 400a734

Please sign in to comment.