diff --git a/frontend/src/concepts/pipelines/content/pipelinesDetails/pipelineRun/PipelineRunDrawerBottomTabs.tsx b/frontend/src/concepts/pipelines/content/pipelinesDetails/pipelineRun/PipelineRunDrawerBottomTabs.tsx index b795747ee6..99c470cd79 100644 --- a/frontend/src/concepts/pipelines/content/pipelinesDetails/pipelineRun/PipelineRunDrawerBottomTabs.tsx +++ b/frontend/src/concepts/pipelines/content/pipelinesDetails/pipelineRun/PipelineRunDrawerBottomTabs.tsx @@ -4,9 +4,11 @@ import PipelineRunTabDetails from '~/concepts/pipelines/content/pipelinesDetails import PipelineDetailsYAML from '~/concepts/pipelines/content/pipelinesDetails/PipelineDetailsYAML'; import { PipelineRunKind } from '~/k8sTypes'; import { PipelineRunKF } from '~/concepts/pipelines/kfTypes'; +import PipelineRunTabParameters from './PipelineRunTabParameters'; export enum RunDetailsTabs { DETAILS = 'Details', + PARAMETERS = 'Input parameters', YAML = 'Run output', } @@ -51,6 +53,14 @@ export const PipelineRunDrawerBottomTabs: React.FC pipelineRunKF={pipelineRunDetails?.kf} /> + = ({ pipelineRunKF }) => { + if (!pipelineRunKF) { + return ( + + + + Loading + + + ); + } + + if ( + !pipelineRunKF?.pipeline_spec.parameters || + pipelineRunKF.pipeline_spec.parameters.length === 0 + ) { + return ( + + + No parameters + + This pipeline run does not have any parameters defined. + + ); + } + + const details: DetailItem[] = pipelineRunKF.pipeline_spec.parameters.map((param) => ({ + key: param.name, + value: param.value, + })); + + return <>{renderDetailItems(details)}; +}; + +export default PipelineRunTabParameters; diff --git a/frontend/src/concepts/pipelines/content/pipelinesDetails/pipelineRun/utils.tsx b/frontend/src/concepts/pipelines/content/pipelinesDetails/pipelineRun/utils.tsx index a1a90e5d15..b4b18c6cca 100644 --- a/frontend/src/concepts/pipelines/content/pipelinesDetails/pipelineRun/utils.tsx +++ b/frontend/src/concepts/pipelines/content/pipelinesDetails/pipelineRun/utils.tsx @@ -20,7 +20,9 @@ export const renderDetailItems = (details: DetailItem[], flexKey?: boolean): Rea {details.map((detail) => ( - {detail.key} + + {detail.key} + {detail.value} diff --git a/frontend/src/concepts/pipelines/content/pipelinesDetails/taskDetails/TaskDetailsPrintKeyValues.tsx b/frontend/src/concepts/pipelines/content/pipelinesDetails/taskDetails/TaskDetailsPrintKeyValues.tsx index de6b814cc6..1e53303134 100644 --- a/frontend/src/concepts/pipelines/content/pipelinesDetails/taskDetails/TaskDetailsPrintKeyValues.tsx +++ b/frontend/src/concepts/pipelines/content/pipelinesDetails/taskDetails/TaskDetailsPrintKeyValues.tsx @@ -9,7 +9,9 @@ const TaskDetailsPrintKeyValues: React.FC = ({ i {items.map((result, i) => ( - {result.name} + + {result.name} + {result.value} ))}