diff --git a/frontend/src/concepts/pipelines/content/createRun/RunPage.tsx b/frontend/src/concepts/pipelines/content/createRun/RunPage.tsx index 97e3f11d85..308522b900 100644 --- a/frontend/src/concepts/pipelines/content/createRun/RunPage.tsx +++ b/frontend/src/concepts/pipelines/content/createRun/RunPage.tsx @@ -25,6 +25,7 @@ import { useGetSearchParamValues } from '~/utilities/useGetSearchParamValues'; import { PipelineRunSearchParam } from '~/concepts/pipelines/content/types'; import { PipelineRunType } from '~/pages/pipelines/global/runs'; import useExperimentById from '~/concepts/pipelines/apiHooks/useExperimentById'; +import { useIsAreaAvailable, SupportedArea } from '~/concepts/areas'; type RunPageProps = { cloneRun?: PipelineRunKFv2 | PipelineRunJobKFv2 | null; @@ -48,6 +49,14 @@ const RunPage: React.FC = ({ cloneRun, contextPath, testId }) => { const [cloneRunPipeline] = usePipelineById(cloneRunPipelineId); const [cloneRunExperiment] = useExperimentById(cloneRunExperimentId); + const isExperimentsAvailable = useIsAreaAvailable(SupportedArea.PIPELINE_EXPERIMENTS).status; + + const sections = isExperimentsAvailable + ? Object.values(CreateRunPageSections) + : Object.values(CreateRunPageSections).filter( + (section) => section !== CreateRunPageSections.EXPERIMENT, + ); + const [formData, setFormDataValue] = useRunFormData(cloneRun, { runType: { ...(runType === PipelineRunType.Scheduled @@ -73,11 +82,7 @@ const RunPage: React.FC = ({ cloneRun, contextPath, testId }) => { return (
- + = { [CreateRunPageSections.NAME_DESC]: 'Name and description', + [CreateRunPageSections.EXPERIMENT]: 'Experiment', [CreateRunPageSections.PIPELINE]: 'Pipeline', [CreateRunPageSections.PIPELINE_VERSION]: 'Pipeline version', - [CreateRunPageSections.EXPERIMENT]: 'Experiment', [CreateRunPageSections.PARAMS]: 'Pipeline input parameters', };