Wizard: temporarily disable OCI
Until we get our accounts back, there's nothing we can do here.
This commit is contained in:
parent
2d6b58cfdd
commit
efed39dd9d
1 changed files with 44 additions and 21 deletions
|
|
@ -10,6 +10,7 @@ import {
|
||||||
TextContent,
|
TextContent,
|
||||||
TextVariants,
|
TextVariants,
|
||||||
Tile,
|
Tile,
|
||||||
|
Tooltip,
|
||||||
} from '@patternfly/react-core';
|
} from '@patternfly/react-core';
|
||||||
import { HelpIcon, ExternalLinkAltIcon } from '@patternfly/react-icons';
|
import { HelpIcon, ExternalLinkAltIcon } from '@patternfly/react-icons';
|
||||||
|
|
||||||
|
|
@ -29,7 +30,10 @@ import {
|
||||||
selectImageTypes,
|
selectImageTypes,
|
||||||
} from '../../../../store/wizardSlice';
|
} from '../../../../store/wizardSlice';
|
||||||
import isRhel from '../../../../Utilities/isRhel';
|
import isRhel from '../../../../Utilities/isRhel';
|
||||||
import { useGetEnvironment } from '../../../../Utilities/useGetEnvironment';
|
import {
|
||||||
|
useFlag,
|
||||||
|
useGetEnvironment,
|
||||||
|
} from '../../../../Utilities/useGetEnvironment';
|
||||||
|
|
||||||
const TargetEnvironment = () => {
|
const TargetEnvironment = () => {
|
||||||
const arch = useAppSelector(selectArchitecture);
|
const arch = useAppSelector(selectArchitecture);
|
||||||
|
|
@ -53,6 +57,10 @@ const TargetEnvironment = () => {
|
||||||
const prefetchSources = provisioningApi.usePrefetch('getSourceList');
|
const prefetchSources = provisioningApi.usePrefetch('getSourceList');
|
||||||
const prefetchActivationKeys = rhsmApi.usePrefetch('listActivationKeys');
|
const prefetchActivationKeys = rhsmApi.usePrefetch('listActivationKeys');
|
||||||
|
|
||||||
|
const showOracleUnavailableWarning = useFlag(
|
||||||
|
'image-builder.oci.unavailable-warning.enabled'
|
||||||
|
);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!isFedoraEnv) prefetchActivationKeys();
|
if (!isFedoraEnv) prefetchActivationKeys();
|
||||||
}, []);
|
}, []);
|
||||||
|
|
@ -86,6 +94,28 @@ const TargetEnvironment = () => {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const ociTile = (
|
||||||
|
<Tile
|
||||||
|
className="tile pf-v5-u-mr-sm"
|
||||||
|
title="Oracle Cloud Infrastructure"
|
||||||
|
icon={
|
||||||
|
<img
|
||||||
|
className="provider-icon"
|
||||||
|
src={'/apps/frontend-assets/partners-icons/oracle-short.svg'}
|
||||||
|
alt="Oracle Cloud Infrastructure logo"
|
||||||
|
/>
|
||||||
|
}
|
||||||
|
onClick={() => {
|
||||||
|
handleToggleEnvironment('oci');
|
||||||
|
}}
|
||||||
|
onKeyDown={(e) => handleKeyDown(e, 'oci')}
|
||||||
|
isSelected={environments.includes('oci')}
|
||||||
|
isStacked
|
||||||
|
isDisplayLarge
|
||||||
|
isDisabled={showOracleUnavailableWarning}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<FormGroup
|
<FormGroup
|
||||||
isRequired={true}
|
isRequired={true}
|
||||||
|
|
@ -166,26 +196,19 @@ const TargetEnvironment = () => {
|
||||||
isDisplayLarge
|
isDisplayLarge
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
{supportedEnvironments?.includes('oci') && (
|
{supportedEnvironments?.includes('oci') &&
|
||||||
<Tile
|
showOracleUnavailableWarning && (
|
||||||
className="tile pf-v5-u-mr-sm"
|
<Tooltip
|
||||||
title="Oracle Cloud Infrastructure"
|
content={
|
||||||
icon={
|
<div>Oracle Cloud support is temporarily unavailable</div>
|
||||||
<img
|
}
|
||||||
className="provider-icon"
|
>
|
||||||
src={'/apps/frontend-assets/partners-icons/oracle-short.svg'}
|
<div>{ociTile}</div>
|
||||||
alt="Oracle Cloud Infrastructure logo"
|
</Tooltip>
|
||||||
/>
|
)}
|
||||||
}
|
{supportedEnvironments?.includes('oci') &&
|
||||||
onClick={() => {
|
!showOracleUnavailableWarning &&
|
||||||
handleToggleEnvironment('oci');
|
ociTile}
|
||||||
}}
|
|
||||||
onKeyDown={(e) => handleKeyDown(e, 'oci')}
|
|
||||||
isSelected={environments.includes('oci')}
|
|
||||||
isStacked
|
|
||||||
isDisplayLarge
|
|
||||||
/>
|
|
||||||
)}
|
|
||||||
</div>
|
</div>
|
||||||
</FormGroup>
|
</FormGroup>
|
||||||
{supportedEnvironments?.includes('vsphere') && (
|
{supportedEnvironments?.includes('vsphere') && (
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue