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 {
|
import {
|
||||||
addImageType,
|
addImageType,
|
||||||
changeArchitecture,
|
changeArchitecture,
|
||||||
|
changeAwsShareMethod,
|
||||||
changeDistribution,
|
changeDistribution,
|
||||||
initializeWizard,
|
initializeWizard,
|
||||||
selectAwsAccountId,
|
selectAwsAccountId,
|
||||||
|
|
@ -235,6 +236,10 @@ const CreateImageWizard = ({ isEdit }: CreateImageWizardProps) => {
|
||||||
dispatch(changeArchitecture(arch));
|
dispatch(changeArchitecture(arch));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (process.env.IS_ON_PREMISE) {
|
||||||
|
dispatch(changeAwsShareMethod('manual'));
|
||||||
|
}
|
||||||
|
|
||||||
if (process.env.IS_ON_PREMISE && !isEdit) {
|
if (process.env.IS_ON_PREMISE && !isEdit) {
|
||||||
if (!searchParams.get('release')) {
|
if (!searchParams.get('release')) {
|
||||||
initializeHostDistro();
|
initializeHostDistro();
|
||||||
|
|
|
||||||
|
|
@ -68,19 +68,21 @@ const Aws = () => {
|
||||||
by Red Hat, to your own AWS account.
|
by Red Hat, to your own AWS account.
|
||||||
</Content>
|
</Content>
|
||||||
<FormGroup label="Share method:">
|
<FormGroup label="Share method:">
|
||||||
<Radio
|
{!process.env.IS_ON_PREMISE && (
|
||||||
id="radio-with-description"
|
<Radio
|
||||||
label="Use an account configured from Sources."
|
id="radio-with-description"
|
||||||
name="radio-7"
|
label="Use an account configured from Sources."
|
||||||
description="Use a configured source to launch environments directly from the console."
|
name="radio-7"
|
||||||
isChecked={shareMethod === 'sources'}
|
description="Use a configured source to launch environments directly from the console."
|
||||||
onChange={() => {
|
isChecked={shareMethod === 'sources'}
|
||||||
dispatch(changeAwsSourceId(undefined));
|
onChange={() => {
|
||||||
dispatch(changeAwsAccountId(''));
|
dispatch(changeAwsSourceId(undefined));
|
||||||
dispatch(changeAwsShareMethod('sources'));
|
dispatch(changeAwsAccountId(''));
|
||||||
}}
|
dispatch(changeAwsShareMethod('sources'));
|
||||||
autoFocus
|
}}
|
||||||
/>
|
autoFocus
|
||||||
|
/>
|
||||||
|
)}
|
||||||
<Radio
|
<Radio
|
||||||
id="radio"
|
id="radio"
|
||||||
label="Manually enter an account ID."
|
label="Manually enter an account ID."
|
||||||
|
|
@ -91,6 +93,7 @@ const Aws = () => {
|
||||||
dispatch(changeAwsAccountId(''));
|
dispatch(changeAwsAccountId(''));
|
||||||
dispatch(changeAwsShareMethod('manual'));
|
dispatch(changeAwsShareMethod('manual'));
|
||||||
}}
|
}}
|
||||||
|
autoFocus={!!process.env.IS_ON_PREMISE}
|
||||||
/>
|
/>
|
||||||
</FormGroup>
|
</FormGroup>
|
||||||
{shareMethod === 'sources' && (
|
{shareMethod === 'sources' && (
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue