Skip to content

Commit

Permalink
fix(ImportForm): add build secret section
Browse files Browse the repository at this point in the history
  • Loading branch information
sahil143 authored and rohitkrai03 committed May 28, 2024
1 parent 402e2ac commit 2be13bd
Show file tree
Hide file tree
Showing 18 changed files with 245 additions and 430 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as React from 'react';
import { Flex, FlexItem, FormSection } from '@patternfly/react-core';
import { useFormikContext } from 'formik';
import { InputField } from 'formik-pf';
import { InputField } from '../../../shared';
import { ApplicationThumbnail } from '../../ApplicationDetails/ApplicationThumbnail';
import { ImportFormValues } from '../type';

Expand All @@ -22,9 +22,8 @@ const ApplicationSection: React.FunctionComponent<React.PropsWithChildren<unknow
label="Application name"
placeholder="Enter name"
isDisabled={inAppContext}
isRequired
required
dataTest="app-name-field"
className="hac-input-field"
/>
</FormSection>
</FlexItem>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react';
import { FormSection, Text, TextContent, TextVariants } from '@patternfly/react-core';
import { InputField } from 'formik-pf';
import { InputField } from '../../../shared';
import { SourceSection } from './SourceSection';

export const ComponentSection = () => {
Expand All @@ -13,7 +13,7 @@ export const ComponentSection = () => {
</Text>
</TextContent>
<SourceSection />
<InputField name="componentName" label="Component name" isRequired />
<InputField name="componentName" label="Component name" required />
</FormSection>
);
};
38 changes: 21 additions & 17 deletions src/components/ImportForm_new/ComponentSection/GitOptions.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react';
import { ExpandableSection } from '@patternfly/react-core';
import { InputField } from 'formik-pf';
import { ExpandableSection, FormSection, PageSection } from '@patternfly/react-core';
import { InputField } from '../../../shared';
import HelpPopover from '../../HelpPopover';

const GitOptions: React.FC<React.PropsWithChildren<unknown>> = () => {
Expand All @@ -9,22 +9,26 @@ const GitOptions: React.FC<React.PropsWithChildren<unknown>> = () => {
toggleTextExpanded="Hide advanced Git options"
toggleTextCollapsed="Show advanced Git options"
>
<InputField
name="source.git.revision"
label="Git reference"
// helperText="Optional branch, tag or commit."
data-test="git-reference"
/>
<PageSection>
<FormSection>
<InputField
name="source.git.revision"
label="Git reference"
helpText="Optional branch, tag or commit."
data-test="git-reference"
/>

<InputField
name="source.git.context"
label="Context directory"
// helperText="Optional subdirectory for the application source code."
data-test="context-dir"
labelIcon={
<HelpPopover bodyContent="Make sure this path is correct. You might get an error if your build context folder is your root directory but your Dockerfile is in a subdirectory of that folder." />
}
/>
<InputField
name="source.git.context"
label="Context directory"
helpText="Optional subdirectory for the application source code."
data-test="context-dir"
labelIcon={
<HelpPopover bodyContent="Make sure this path is correct. You might get an error if your build context folder is your root directory but your Dockerfile is in a subdirectory of that folder." />
}
/>
</FormSection>
</PageSection>
</ExpandableSection>
);
};
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 2be13bd

Please sign in to comment.