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,
|
||||
TextVariants,
|
||||
Tile,
|
||||
Tooltip,
|
||||
} from '@patternfly/react-core';
|
||||
import { HelpIcon, ExternalLinkAltIcon } from '@patternfly/react-icons';
|
||||
|
||||
|
|
@ -29,7 +30,10 @@ import {
|
|||
selectImageTypes,
|
||||
} from '../../../../store/wizardSlice';
|
||||
import isRhel from '../../../../Utilities/isRhel';
|
||||
import { useGetEnvironment } from '../../../../Utilities/useGetEnvironment';
|
||||
import {
|
||||
useFlag,
|
||||
useGetEnvironment,
|
||||
} from '../../../../Utilities/useGetEnvironment';
|
||||
|
||||
const TargetEnvironment = () => {
|
||||
const arch = useAppSelector(selectArchitecture);
|
||||
|
|
@ -53,6 +57,10 @@ const TargetEnvironment = () => {
|
|||
const prefetchSources = provisioningApi.usePrefetch('getSourceList');
|
||||
const prefetchActivationKeys = rhsmApi.usePrefetch('listActivationKeys');
|
||||
|
||||
const showOracleUnavailableWarning = useFlag(
|
||||
'image-builder.oci.unavailable-warning.enabled'
|
||||
);
|
||||
|
||||
useEffect(() => {
|
||||
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 (
|
||||
<FormGroup
|
||||
isRequired={true}
|
||||
|
|
@ -166,26 +196,19 @@ const TargetEnvironment = () => {
|
|||
isDisplayLarge
|
||||
/>
|
||||
)}
|
||||
{supportedEnvironments?.includes('oci') && (
|
||||
<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
|
||||
/>
|
||||
)}
|
||||
{supportedEnvironments?.includes('oci') &&
|
||||
showOracleUnavailableWarning && (
|
||||
<Tooltip
|
||||
content={
|
||||
<div>Oracle Cloud support is temporarily unavailable</div>
|
||||
}
|
||||
>
|
||||
<div>{ociTile}</div>
|
||||
</Tooltip>
|
||||
)}
|
||||
{supportedEnvironments?.includes('oci') &&
|
||||
!showOracleUnavailableWarning &&
|
||||
ociTile}
|
||||
</div>
|
||||
</FormGroup>
|
||||
{supportedEnvironments?.includes('vsphere') && (
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue