Skip to content

Commit

Permalink
navigate on new run form (#1321)
Browse files Browse the repository at this point in the history
* make project name unchangeable

* linting errors
  • Loading branch information
Gkrumbach07 authored Jun 2, 2023
1 parent 3129a4d commit 73dc3ba
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
16 changes: 6 additions & 10 deletions frontend/src/concepts/pipelines/content/createRun/RunForm.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import * as React from 'react';
import { Form, FormSection } from '@patternfly/react-core';
import { Form, FormGroup, FormSection, Text } from '@patternfly/react-core';
import NameDescriptionField from '~/concepts/k8s/NameDescriptionField';
import ProjectSelector from '~/concepts/projects/ProjectSelector';
import { RunFormData } from '~/concepts/pipelines/content/createRun/types';
import { ValueOf } from '~/typeHelpers';
import RunTypeSection from '~/concepts/pipelines/content/createRun/contentSections/RunTypeSection';
import ParamsSection from '~/concepts/pipelines/content/createRun/contentSections/ParamsSection';
import { getProjectDisplayName } from '~/pages/projects/utils';
import PipelineSection from './contentSections/PipelineSection';
import { CreateRunPageSections, runPageSectionTitles } from './const';

Expand All @@ -21,14 +21,10 @@ const RunForm: React.FC<RunFormProps> = ({ data, onValueChange }) => (
e.preventDefault();
}}
>
<FormSection
id={CreateRunPageSections.PROJECT}
title={runPageSectionTitles[CreateRunPageSections.PROJECT]}
>
<ProjectSelector
onSelection={(project) => onValueChange('project', project)}
namespace={data.project.metadata.name}
/>
<FormSection id="run-section-project-name" title="Project">
<FormGroup label="Project">
<Text>{getProjectDisplayName(data.project)}</Text>
</FormGroup>
</FormSection>
<FormSection
id={CreateRunPageSections.NAME_DESC}
Expand Down
2 changes: 0 additions & 2 deletions frontend/src/concepts/pipelines/content/createRun/const.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ export const DATE_FORMAT = 'YYYY-MM-DD';
export const DEFAULT_TIME = '12:00 AM';

export enum CreateRunPageSections {
PROJECT = 'run-section-project',
NAME_DESC = 'run-section-name-desc',
PIPELINE = 'run-section-pipeline',
// EXPERIMENT = 'run-section-experiment',
Expand All @@ -15,7 +14,6 @@ export enum CreateRunPageSections {
}

export const runPageSectionTitles: Record<CreateRunPageSections, string> = {
[CreateRunPageSections.PROJECT]: 'Project',
[CreateRunPageSections.NAME_DESC]: 'Name and description',
[CreateRunPageSections.PIPELINE]: 'Pipeline',
// [CreateRunPageSections.EXPERIMENT]: 'Experiment',
Expand Down

0 comments on commit 73dc3ba

Please sign in to comment.