CreateImageWizard: hide aws sources for on-prem
For now just allow manual entry of the aws account id, since we aren't able to configure sources on-premise yet (if ever).
This commit is contained in:
parent
8dd82d5801
commit
253317497e
2 changed files with 21 additions and 13 deletions
|
|
@ -74,6 +74,7 @@ import './CreateImageWizard.scss';
|
|||
import {
|
||||
addImageType,
|
||||
changeArchitecture,
|
||||
changeAwsShareMethod,
|
||||
changeDistribution,
|
||||
initializeWizard,
|
||||
selectAwsAccountId,
|
||||
|
|
@ -235,6 +236,10 @@ const CreateImageWizard = ({ isEdit }: CreateImageWizardProps) => {
|
|||
dispatch(changeArchitecture(arch));
|
||||
};
|
||||
|
||||
if (process.env.IS_ON_PREMISE) {
|
||||
dispatch(changeAwsShareMethod('manual'));
|
||||
}
|
||||
|
||||
if (process.env.IS_ON_PREMISE && !isEdit) {
|
||||
if (!searchParams.get('release')) {
|
||||
initializeHostDistro();
|
||||
|
|
|
|||
|
|
@ -68,19 +68,21 @@ const Aws = () => {
|
|||
by Red Hat, to your own AWS account.
|
||||
</Content>
|
||||
<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(changeAwsSourceId(undefined));
|
||||
dispatch(changeAwsAccountId(''));
|
||||
dispatch(changeAwsShareMethod('sources'));
|
||||
}}
|
||||
autoFocus
|
||||
/>
|
||||
{!process.env.IS_ON_PREMISE && (
|
||||
<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(changeAwsSourceId(undefined));
|
||||
dispatch(changeAwsAccountId(''));
|
||||
dispatch(changeAwsShareMethod('sources'));
|
||||
}}
|
||||
autoFocus
|
||||
/>
|
||||
)}
|
||||
<Radio
|
||||
id="radio"
|
||||
label="Manually enter an account ID."
|
||||
|
|
@ -91,6 +93,7 @@ const Aws = () => {
|
|||
dispatch(changeAwsAccountId(''));
|
||||
dispatch(changeAwsShareMethod('manual'));
|
||||
}}
|
||||
autoFocus={!!process.env.IS_ON_PREMISE}
|
||||
/>
|
||||
</FormGroup>
|
||||
{shareMethod === 'sources' && (
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue