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 history = useHistory();
|
||||
const [ user, setUser ] = useState();
|
||||
const [ isSaving, setIsSaving ] = useState();
|
||||
const [ , setIsSaving ] = useState();
|
||||
useEffect(() => {
|
||||
(async () => {
|
||||
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: [
|
||||
imageOutput,
|
||||
awsTarget,
|
||||
msAzureTarget,
|
||||
googleCloudTarger,
|
||||
msAzureTarget,
|
||||
registration(user),
|
||||
packages,
|
||||
review,
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ const RadioWithPopover = ({ Popover, ...props }) => {
|
|||
|
||||
RadioWithPopover.propTypes = {
|
||||
Popover: PropTypes.elementType.isRequired,
|
||||
label: PropTypes.node
|
||||
};
|
||||
|
||||
export default RadioWithPopover;
|
||||
|
|
|
|||
|
|
@ -40,6 +40,24 @@ const TargetEnvironment = ({ label, isRequired, ...props }) => {
|
|||
isSelected={ environemt.aws }
|
||||
isStacked
|
||||
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
|
||||
className="tile pf-u-mr-sm"
|
||||
data-testid="upload-azure"
|
||||
|
|
@ -59,24 +77,6 @@ const TargetEnvironment = ({ label, isRequired, ...props }) => {
|
|||
isSelected={ environemt.azure }
|
||||
isStacked
|
||||
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>
|
||||
</FormGroup>;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -2,6 +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 { Title, Text, Popover, TextContent, TextList, TextListItem, Button } from '@patternfly/react-core';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
|
|
@ -58,7 +59,7 @@ export default {
|
|||
customTitle: <Title headingLevel="h1" size="xl">Target Environment - Google Cloud Platform</Title>,
|
||||
name: 'google-cloud-target-env',
|
||||
substepOf: 'Target environment',
|
||||
nextStep: 'registration',
|
||||
nextStep: ({ values }) => nextStepMapper(values, true, true),
|
||||
fields: [
|
||||
{
|
||||
component: componentTypes.PLAIN_TEXT,
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
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 { Title, Text, Button } from '@patternfly/react-core';
|
||||
import { ExternalLinkAltIcon } from '@patternfly/react-icons';
|
||||
|
||||
|
|
@ -10,7 +9,7 @@ export default {
|
|||
customTitle: <Title headingLevel="h1" size="xl">Target Environment - Microsoft Azure</Title>,
|
||||
name: 'ms-azure-target-env',
|
||||
substepOf: 'Target environment',
|
||||
nextStep: ({ values }) => nextStepMapper(values, true, true),
|
||||
nextStep: 'registration',
|
||||
fields: [
|
||||
{
|
||||
component: componentTypes.PLAIN_TEXT,
|
||||
|
|
|
|||
|
|
@ -3,12 +3,12 @@ export default ({ 'target-environment': targetEnv } = {}, skipFirst, skipSecond)
|
|||
return 'aws-target-env';
|
||||
}
|
||||
|
||||
if (!skipSecond && targetEnv?.azure) {
|
||||
return 'ms-azure-target-env';
|
||||
if (!skipSecond && targetEnv?.google) {
|
||||
return 'google-cloud-target-env';
|
||||
}
|
||||
|
||||
if (targetEnv?.google) {
|
||||
return 'google-cloud-target-env';
|
||||
if (targetEnv?.azure) {
|
||||
return 'ms-azure-target-env';
|
||||
}
|
||||
|
||||
return 'registration';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue