Wizard: Display default region

This commit is contained in:
lucasgarfield 2022-10-21 18:41:50 +02:00 committed by Sanne Raymaekers
parent 1541818326
commit ed9325615c
2 changed files with 44 additions and 5 deletions

View file

@ -117,7 +117,7 @@ const ReviewStep = () => {
Review the information and click "Create image" to create the
image using the following criteria.
</Text>
<DescriptionList isCompact isHorizontal>
<DescriptionList isCompact>
<DescriptionListGroup>
{getState()?.values?.['image-name'] && (
<>
@ -167,6 +167,12 @@ const ReviewStep = () => {
<TextListItem component={TextListItemVariants.dd}>
{getState()?.values?.['aws-account-id']}
</TextListItem>
<TextListItem component={TextListItemVariants.dt}>
Default Region
</TextListItem>
<TextListItem component={TextListItemVariants.dd}>
us-east-1
</TextListItem>
</TextList>
</TextContent>
</ListItem>

View file

@ -1,9 +1,10 @@
import React from 'react';
import componentTypes from '@data-driven-forms/react-form-renderer/component-types';
import validatorTypes from '@data-driven-forms/react-form-renderer/validator-types';
import { Title } from '@patternfly/react-core';
import { HelperText, HelperTextItem, Title } from '@patternfly/react-core';
import nextStepMapper from './imageOutputStepMapper';
import StepTemplate from './stepTemplate';
import { DEFAULT_AWS_REGION } from '../../../constants';
export default {
StepTemplate,
@ -24,9 +25,18 @@ export default {
label: (
<p>
Your image will be uploaded to AWS and shared with the account you
provide below. <br />
The shared image will expire within 14 days. To keep the image longer,
copy it to your AWS account.
provide below.
</p>
),
},
{
component: componentTypes.PLAIN_TEXT,
name: 'plain-text-component',
label: (
<p>
<b>The shared image will expire within 14 days.</b> To permanently
access the image, copy the image, which will be shared to your account
by Red Hat, to your own AWS account.
</p>
),
},
@ -49,5 +59,28 @@ export default {
},
],
},
{
component: componentTypes.TEXT_FIELD,
name: 'aws-default-region',
className: 'pf-u-w-25',
'data-testid': 'aws-default-region',
type: 'text',
label: 'Default Region',
value: DEFAULT_AWS_REGION,
isReadOnly: true,
isRequired: true,
helperText: (
<HelperText>
<HelperTextItem
component="div"
variant="indeterminate"
className="pf-u-w-25"
>
Images are built in the default region but can be copied to other
regions later.
</HelperTextItem>
</HelperText>
),
},
],
};