Skip to content

Commit

Permalink
Merge pull request #273 from mareklibra/OCPBUGSM-17474-pull-secret-au…
Browse files Browse the repository at this point in the history
…to-expand

OCPBUGSM-17474 PullSecret is expanded to all available height on New Cluster page
  • Loading branch information
mareklibra authored Nov 10, 2020
2 parents a509bc8 + 7966565 commit 12681f7
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 1 deletion.
11 changes: 11 additions & 0 deletions src/components/clusters/NewClusterPage.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
.form-new-cluster .form-group-pull-secret {
height: calc(100vh - 650px);
}

.form-new-cluster .form-group-pull-secret .pf-c-form__group-control {
height: 100%;
}

.form-new-cluster .form-group-pull-secret .pf-c-form__group-control textarea {
height: 100%;
}
4 changes: 3 additions & 1 deletion src/components/clusters/NewClusterPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ import { captureException } from '../../sentry';
import PullSecret from './PullSecret';
import { usePullSecretFetch } from '../fetching/pullSecret';

import './NewClusterPage.css';

type NewClusterFormProps = {
pullSecret?: string;
};
Expand Down Expand Up @@ -96,7 +98,7 @@ const NewClusterForm: React.FC<NewClusterFormProps> = ({ pullSecret = '' }) => {
<PageSection variant={PageSectionVariants.light} isMain>
<Grid hasGutter>
<GridItem span={12} lg={10} xl={6}>
<Form>
<Form className="form-new-cluster">
<TextContent>
<Text component="h1">
Install OpenShift on Bare Metal with the Assisted Installer
Expand Down
1 change: 1 addition & 0 deletions src/components/clusters/PullSecret.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ const PullSecret: React.FC<PullSecretProps> = ({ pullSecret }) => {
<TextAreaField
name="pullSecret"
label="Pull Secret"
groupClassName="form-group-pull-secret"
labelIcon={ocmClient ? undefined : <PullSecretInfo />}
getErrorText={(error) => (
<>
Expand Down
2 changes: 2 additions & 0 deletions src/components/ui/formik/TextAreaField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ const TextAreaField: React.FC<TextAreaFieldProps> = ({
children,
idPostfix,
labelIcon,
groupClassName,
...props
}) => {
const [field, { touched, error }] = useField(props.name);
Expand Down Expand Up @@ -51,6 +52,7 @@ const TextAreaField: React.FC<TextAreaFieldProps> = ({
validated={isValid ? 'default' : 'error'}
isRequired={isRequired}
labelIcon={labelIcon}
className={groupClassName}
>
{children}
<TextArea
Expand Down
1 change: 1 addition & 0 deletions src/components/ui/formik/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export interface FieldProps {
disableDeleteRow?: boolean;
disableAddRow?: boolean;
className?: string;
groupClassName?: string;
isDisabled?: boolean;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
ref?: React.Ref<any>;
Expand Down

0 comments on commit 12681f7

Please sign in to comment.