ImageCreateWizard: Use imageOutputStepMapper in all imageOutput steps

Also renamed the stepMapper to clarify that it's just meant for the
imageOutput steps.
This commit is contained in:
Sanne Raymaekers 2021-06-30 11:20:49 +02:00
parent 1125222232
commit d8de57508d
6 changed files with 8 additions and 7 deletions

View file

@ -1,7 +1,7 @@
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 nextStepMapper from './stepMapper';
import nextStepMapper from './imageOutputStepMapper';
import { Title } from '@patternfly/react-core';
export default {

View file

@ -2,7 +2,7 @@ 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 { HelpIcon } from '@patternfly/react-icons';
import nextStepMapper from './stepMapper';
import nextStepMapper from './imageOutputStepMapper';
import { Title, Text, Popover, TextContent, TextList, TextListItem, Button } from '@patternfly/react-core';
import PropTypes from 'prop-types';

View file

@ -1,6 +1,6 @@
import componentTypes from '@data-driven-forms/react-form-renderer/component-types';
import validatorTypes from '@data-driven-forms/react-form-renderer/validator-types';
import nextStepMapper from './stepMapper';
import nextStepMapper from './imageOutputStepMapper';
export const releaseValues = {
'rhel-8': 'Red Hat Enterprise Linux (RHEL) 8',

View file

@ -1,4 +1,4 @@
export default ({ 'target-environment': targetEnv, release } = {}, { skipAws, skipGoogle, sipAzure } = {}) => {
export default ({ 'target-environment': targetEnv, release } = {}, { skipAws, skipGoogle, skipAzure } = {}) => {
if (!skipAws && targetEnv?.aws) {
return 'aws-target-env';
}
@ -7,7 +7,7 @@ export default ({ 'target-environment': targetEnv, release } = {}, { skipAws, sk
return 'google-cloud-target-env';
}
if (!sipAzure && targetEnv?.azure) {
if (!skipAzure && targetEnv?.azure) {
return 'ms-azure-target-env';
}

View file

@ -5,4 +5,4 @@ export { default as packages } from './packages';
export { default as registration } from './registration';
export { default as review } from './review';
export { default as imageOutput } from './imageOutput';
export { default as nextStepMapper } from './stepMapper';
export { default as nextStepMapper } from './imageOutputStepMapper';

View file

@ -3,13 +3,14 @@ import componentTypes from '@data-driven-forms/react-form-renderer/component-typ
import validatorTypes from '@data-driven-forms/react-form-renderer/validator-types';
import { Title, Text, Button } from '@patternfly/react-core';
import { ExternalLinkAltIcon } from '@patternfly/react-icons';
import nextStepMapper from './imageOutputStepMapper';
export default {
title: 'Microsoft Azure',
customTitle: <Title headingLevel="h1" size="xl">Target Environment - Microsoft Azure</Title>,
name: 'ms-azure-target-env',
substepOf: 'Target environment',
nextStep: ({ values }) => values?.release === 'rhel-8' ? 'registration' : 'packages',
nextStep: ({ values }) => nextStepMapper(values, { skipAws: true, skipGoogle: true, skipAzure: true }),
fields: [
{
component: componentTypes.PLAIN_TEXT,