CreateImageWizard: only enable registration for rhel images

This commit is contained in:
Jacob Kozol 2021-06-07 11:38:32 +02:00 committed by jkozol
parent 120398be8c
commit 043b775ced
2 changed files with 18 additions and 9 deletions

View file

@ -271,13 +271,16 @@ class CreateImageWizard extends Component {
steps: uploadDestinationSteps
};
const StepImageRegistration = {
name: 'Registration',
component: <WizardStepRegistration
isValidSubscription={ this.state.isValidSubscription } />
};
const steps = [
StepImageOutput,
...(StepTargetEnv.steps.length > 0 ? [ StepTargetEnv ] : []),
{
name: 'Registration',
component: <WizardStepRegistration
isValidSubscription={ this.state.isValidSubscription } /> },
...(this.props.release.distro === 'rhel-8' ? [ StepImageRegistration ] : []),
{
name: 'Packages',
component: <WizardStepPackages /> },

View file

@ -99,6 +99,16 @@ class WizardStepReview extends Component {
</>);
}
const registrationReview = (
<>
<Text component={ TextVariants.h3 }>Registration</Text>
<TextList component={ TextListVariants.dl } data-testid='review-image-registration'>
<TextListItem component={ TextListItemVariants.dt }>Subscription</TextListItem>
{ subscriptionReview }
</TextList>
</>
);
return (
<>
{ (Object.keys(this.props.uploadAWSErrors).length > 0 ||
@ -118,11 +128,7 @@ class WizardStepReview extends Component {
<Text component={ TextVariants.h3 }>Target environment</Text>
{this.props.uploadDestinations.aws && awsReview }
{this.props.uploadDestinations.google && googleReview }
<Text component={ TextVariants.h3 }>Registration</Text>
<TextList component={ TextListVariants.dl } data-testid='review-image-registration'>
<TextListItem component={ TextListItemVariants.dt }>Subscription</TextListItem>
{ subscriptionReview }
</TextList>
{this.props.release.distro === 'rhel-8' && registrationReview }
</TextContent>
</>
);