Wizard: remove Sources from Azure step (HMS-9092)

As part of the Launch decommissioning, Sources are getting rid of the
Launch option. Based on mocks provided from UX, we need to also get rid
of some parts that mention sources directly in our Wizard, and that will
be useless. This commit conditionally removes sources based on a feature
flag that we'll turn on once the decommissioning happens.
This commit is contained in:
Anna Vítová 2025-08-21 09:51:56 +02:00
parent 4d783537fb
commit 1c04ce8186

View file

@ -12,6 +12,7 @@ import {
Title,
} from '@patternfly/react-core';
import { ExternalLinkAltIcon } from '@patternfly/react-icons';
import { useFlag } from '@unleash/proxy-client-react';
import { AzureAuthButton } from './AzureAuthButton';
import { AzureHyperVSelect } from './AzureHyperVSelect';
@ -63,6 +64,8 @@ const Azure = () => {
const subscriptionId = useAppSelector(selectAzureSubscriptionId);
const resourceGroup = useAppSelector(selectAzureResourceGroup);
const launchEofFlag = useFlag('image-builder.launcheof');
return (
<Form>
<Title headingLevel='h1' size='xl'>
@ -93,37 +96,39 @@ const Azure = () => {
</Button>
</Content>
<AzureHyperVSelect />
<FormGroup label='Share method:'>
<Radio
id='radio-with-description'
label='Use an account configured from Sources.'
name='radio-7'
description='Use a configured source to launch environments directly from the console.'
isChecked={shareMethod === 'sources'}
onChange={() => {
dispatch(changeAzureSource(''));
dispatch(changeAzureTenantId(''));
dispatch(changeAzureSubscriptionId(''));
dispatch(changeAzureShareMethod('sources'));
dispatch(changeAzureResourceGroup(''));
}}
autoFocus
/>
<Radio
id='radio'
label='Manually enter the account information.'
name='radio-8'
isChecked={shareMethod === 'manual'}
onChange={() => {
dispatch(changeAzureSource(''));
dispatch(changeAzureTenantId(''));
dispatch(changeAzureSubscriptionId(''));
dispatch(changeAzureShareMethod('manual'));
dispatch(changeAzureResourceGroup(''));
}}
/>
</FormGroup>
{shareMethod === 'sources' && (
{!launchEofFlag && (
<FormGroup label='Share method:'>
<Radio
id='radio-with-description'
label='Use an account configured from Sources.'
name='radio-7'
description='Use a configured source to launch environments directly from the console.'
isChecked={shareMethod === 'sources'}
onChange={() => {
dispatch(changeAzureSource(''));
dispatch(changeAzureTenantId(''));
dispatch(changeAzureSubscriptionId(''));
dispatch(changeAzureShareMethod('sources'));
dispatch(changeAzureResourceGroup(''));
}}
autoFocus
/>
<Radio
id='radio'
label='Manually enter the account information.'
name='radio-8'
isChecked={shareMethod === 'manual'}
onChange={() => {
dispatch(changeAzureSource(''));
dispatch(changeAzureTenantId(''));
dispatch(changeAzureSubscriptionId(''));
dispatch(changeAzureShareMethod('manual'));
dispatch(changeAzureResourceGroup(''));
}}
/>
</FormGroup>
)}
{!launchEofFlag && shareMethod === 'sources' && (
<>
<AzureSourcesSelect />
<SourcesButton />
@ -156,7 +161,7 @@ const Azure = () => {
<AzureResourceGroups />
</>
)}
{shareMethod === 'manual' && (
{(launchEofFlag || shareMethod === 'manual') && (
<>
<FormGroup label='Azure tenant GUID' isRequired>
<ValidatedInput