Reorder the target envs
Update the order of envs based on new changes in master
This commit is contained in:
parent
47f626e94f
commit
dbcd753bb9
6 changed files with 28 additions and 27 deletions
|
|
@ -110,7 +110,7 @@ const CreateImage = () => {
|
||||||
const dispatch = useDispatch();
|
const dispatch = useDispatch();
|
||||||
const history = useHistory();
|
const history = useHistory();
|
||||||
const [ user, setUser ] = useState();
|
const [ user, setUser ] = useState();
|
||||||
const [ isSaving, setIsSaving ] = useState();
|
const [ , setIsSaving ] = useState();
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
(async () => {
|
(async () => {
|
||||||
const userData = await insights.chrome.auth.getUser();
|
const userData = await insights.chrome.auth.getUser();
|
||||||
|
|
@ -170,8 +170,8 @@ https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/up
|
||||||
fields: [
|
fields: [
|
||||||
imageOutput,
|
imageOutput,
|
||||||
awsTarget,
|
awsTarget,
|
||||||
msAzureTarget,
|
|
||||||
googleCloudTarger,
|
googleCloudTarger,
|
||||||
|
msAzureTarget,
|
||||||
registration(user),
|
registration(user),
|
||||||
packages,
|
packages,
|
||||||
review,
|
review,
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,7 @@ const RadioWithPopover = ({ Popover, ...props }) => {
|
||||||
|
|
||||||
RadioWithPopover.propTypes = {
|
RadioWithPopover.propTypes = {
|
||||||
Popover: PropTypes.elementType.isRequired,
|
Popover: PropTypes.elementType.isRequired,
|
||||||
|
label: PropTypes.node
|
||||||
};
|
};
|
||||||
|
|
||||||
export default RadioWithPopover;
|
export default RadioWithPopover;
|
||||||
|
|
|
||||||
|
|
@ -40,6 +40,24 @@ const TargetEnvironment = ({ label, isRequired, ...props }) => {
|
||||||
isSelected={ environemt.aws }
|
isSelected={ environemt.aws }
|
||||||
isStacked
|
isStacked
|
||||||
isDisplayLarge />
|
isDisplayLarge />
|
||||||
|
<Tile
|
||||||
|
className="tile"
|
||||||
|
data-testid="upload-google"
|
||||||
|
title="Google Cloud Platform"
|
||||||
|
icon={ <img
|
||||||
|
className='provider-icon'
|
||||||
|
src={ '/apps/frontend-assets/partners-icons/google-cloud-short.svg' } /> }
|
||||||
|
onClick={ () => setEnvironment((prevEnv) => {
|
||||||
|
const newEnv = ({
|
||||||
|
...prevEnv,
|
||||||
|
google: !prevEnv.google
|
||||||
|
});
|
||||||
|
change(input.name, newEnv);
|
||||||
|
return newEnv;
|
||||||
|
}) }
|
||||||
|
isSelected={ environemt.google }
|
||||||
|
isStacked
|
||||||
|
isDisplayLarge />
|
||||||
<Tile
|
<Tile
|
||||||
className="tile pf-u-mr-sm"
|
className="tile pf-u-mr-sm"
|
||||||
data-testid="upload-azure"
|
data-testid="upload-azure"
|
||||||
|
|
@ -59,24 +77,6 @@ const TargetEnvironment = ({ label, isRequired, ...props }) => {
|
||||||
isSelected={ environemt.azure }
|
isSelected={ environemt.azure }
|
||||||
isStacked
|
isStacked
|
||||||
isDisplayLarge />
|
isDisplayLarge />
|
||||||
<Tile
|
|
||||||
className="tile"
|
|
||||||
data-testid="upload-google"
|
|
||||||
title="Google Cloud Platform"
|
|
||||||
icon={ <img
|
|
||||||
className='provider-icon'
|
|
||||||
src={ '/apps/frontend-assets/partners-icons/google-cloud-short.svg' } /> }
|
|
||||||
onClick={ () => setEnvironment((prevEnv) => {
|
|
||||||
const newEnv = ({
|
|
||||||
...prevEnv,
|
|
||||||
google: !prevEnv.google
|
|
||||||
});
|
|
||||||
change(input.name, newEnv);
|
|
||||||
return newEnv;
|
|
||||||
}) }
|
|
||||||
isSelected={ environemt.google }
|
|
||||||
isStacked
|
|
||||||
isDisplayLarge />
|
|
||||||
</div>
|
</div>
|
||||||
</FormGroup>;
|
</FormGroup>;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@ import React from 'react';
|
||||||
import componentTypes from '@data-driven-forms/react-form-renderer/component-types';
|
import componentTypes from '@data-driven-forms/react-form-renderer/component-types';
|
||||||
import validatorTypes from '@data-driven-forms/react-form-renderer/validator-types';
|
import validatorTypes from '@data-driven-forms/react-form-renderer/validator-types';
|
||||||
import { HelpIcon } from '@patternfly/react-icons';
|
import { HelpIcon } from '@patternfly/react-icons';
|
||||||
|
import nextStepMapper from './stepMapper';
|
||||||
import { Title, Text, Popover, TextContent, TextList, TextListItem, Button } from '@patternfly/react-core';
|
import { Title, Text, Popover, TextContent, TextList, TextListItem, Button } from '@patternfly/react-core';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
|
|
||||||
|
|
@ -58,7 +59,7 @@ export default {
|
||||||
customTitle: <Title headingLevel="h1" size="xl">Target Environment - Google Cloud Platform</Title>,
|
customTitle: <Title headingLevel="h1" size="xl">Target Environment - Google Cloud Platform</Title>,
|
||||||
name: 'google-cloud-target-env',
|
name: 'google-cloud-target-env',
|
||||||
substepOf: 'Target environment',
|
substepOf: 'Target environment',
|
||||||
nextStep: 'registration',
|
nextStep: ({ values }) => nextStepMapper(values, true, true),
|
||||||
fields: [
|
fields: [
|
||||||
{
|
{
|
||||||
component: componentTypes.PLAIN_TEXT,
|
component: componentTypes.PLAIN_TEXT,
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import componentTypes from '@data-driven-forms/react-form-renderer/component-types';
|
import componentTypes from '@data-driven-forms/react-form-renderer/component-types';
|
||||||
import validatorTypes from '@data-driven-forms/react-form-renderer/validator-types';
|
import validatorTypes from '@data-driven-forms/react-form-renderer/validator-types';
|
||||||
import nextStepMapper from './stepMapper';
|
|
||||||
import { Title, Text, Button } from '@patternfly/react-core';
|
import { Title, Text, Button } from '@patternfly/react-core';
|
||||||
import { ExternalLinkAltIcon } from '@patternfly/react-icons';
|
import { ExternalLinkAltIcon } from '@patternfly/react-icons';
|
||||||
|
|
||||||
|
|
@ -10,7 +9,7 @@ export default {
|
||||||
customTitle: <Title headingLevel="h1" size="xl">Target Environment - Microsoft Azure</Title>,
|
customTitle: <Title headingLevel="h1" size="xl">Target Environment - Microsoft Azure</Title>,
|
||||||
name: 'ms-azure-target-env',
|
name: 'ms-azure-target-env',
|
||||||
substepOf: 'Target environment',
|
substepOf: 'Target environment',
|
||||||
nextStep: ({ values }) => nextStepMapper(values, true, true),
|
nextStep: 'registration',
|
||||||
fields: [
|
fields: [
|
||||||
{
|
{
|
||||||
component: componentTypes.PLAIN_TEXT,
|
component: componentTypes.PLAIN_TEXT,
|
||||||
|
|
|
||||||
|
|
@ -3,12 +3,12 @@ export default ({ 'target-environment': targetEnv } = {}, skipFirst, skipSecond)
|
||||||
return 'aws-target-env';
|
return 'aws-target-env';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!skipSecond && targetEnv?.azure) {
|
if (!skipSecond && targetEnv?.google) {
|
||||||
return 'ms-azure-target-env';
|
return 'google-cloud-target-env';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (targetEnv?.google) {
|
if (targetEnv?.azure) {
|
||||||
return 'google-cloud-target-env';
|
return 'ms-azure-target-env';
|
||||||
}
|
}
|
||||||
|
|
||||||
return 'registration';
|
return 'registration';
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue