diff --git a/libs/locales/lib/en/translation.json b/libs/locales/lib/en/translation.json index 341c68628c..c803587311 100644 --- a/libs/locales/lib/en/translation.json +++ b/libs/locales/lib/en/translation.json @@ -142,7 +142,6 @@ "ai:Check assisted-installer logs": "Check assisted-installer logs", "ai:Check bootkube logs": "Check bootkube logs", "ai:Check the proxy settings and verify that the assisted installer service is connected to a network. You can use nmcli to get additional information about your network configuration.": "Check the proxy settings and verify that the assisted installer service is connected to a network. You can use nmcli to get additional information about your network configuration.", - "ai:Check this option if you want to use the arm64 CPU architecture instead of the default x86_64 CPU architecture. Please note that some features will not be available.": "Select this option if you want to use the arm64 CPU architecture instead of the default x86_64 CPU architecture. Note that some features will not be available.", "ai:Check your VM reboot configuration": "Check your VM reboot configuration.", "ai:Choose a namespace from your existing host inventory in order to select hosts for your node pools. The namespace will be composed of 1 or more infrastructure environments. After the cluster is created, a host will become a worker node.": "Select a namespace from your existing host inventory in order to select hosts for your node pools. The namespace will contain 1 or more infrastructure environments. After the cluster is created, a host becomes a worker node.", "ai:Clear": "Clear", @@ -491,7 +490,6 @@ "ai:Machine CIDR": "Machine CIDR", "ai:Machine CIDR conforms expected": "Machine CIDR conforms expected", "ai:Machine networks": "Machine networks", - "ai:Make sure all the hosts are using arm64 CPU architecture.": "Make sure all the hosts are using arm64 CPU architecture.", "ai:Make sure that the VIP is unique and not used by any other device on your network.": "Make sure that the VIP is unique and not used by any other device on your network.", "ai:Make sure that you expect and recognize the host before approving.": "Make sure that you expect and recognize the host before approving.", "ai:Manage hosts": "Manage hosts", @@ -846,7 +844,6 @@ "ai:Use a comma to separate each listed domain. Preface a domain with . to include its subdomains. Use * to bypass the proxy for all destinations.": "Use a comma to separate each listed domain. Preface a domain with . to include its subdomains. Use * to bypass the proxy for all destinations.", "ai:Use advanced networking": "Use advanced networking", "ai:Use alphanumeric characters, dot (.), underscore (_) or hyphen (-)": "Use alphanumeric characters, dot (.), underscore (_) or hyphen (-)", - "ai:Use arm64 CPU architecture": "Use arm64 CPU architecture", "ai:Use autoscaling": "Use autoscaling", "ai:Use lowercase alphanumeric characters or hyphen (-)": "Use lowercase alphanumeric characters or hyphen (-)", "ai:Use lowercase alphanumeric characters, dot (.) or hyphen (-)": "Use lowercase alphanumeric characters, dot (.) or hyphen (-)", diff --git a/libs/ui-lib/lib/cim/components/ClusterDeployment/ArmCheckbox.tsx b/libs/ui-lib/lib/cim/components/ClusterDeployment/ArmCheckbox.tsx deleted file mode 100644 index 9b72309c66..0000000000 --- a/libs/ui-lib/lib/cim/components/ClusterDeployment/ArmCheckbox.tsx +++ /dev/null @@ -1,101 +0,0 @@ -import * as React from 'react'; -import { Checkbox, FormGroup, Tooltip } from '@patternfly/react-core'; -import { useField, useFormikContext } from 'formik'; -import { - CpuArchitecture, - getFieldId, - HelperText, - OpenshiftVersionOptionType, - PopoverIcon, -} from '../../../common'; -import { - FeatureSupportLevelBadge, - useFeatureSupportLevel, -} from '../../../common/components/featureSupportLevels'; -import { useTranslation } from '../../../common/hooks/use-translation-wrapper'; -import { ClusterCreateParams } from '@openshift-assisted/types/assisted-installer-service'; - -const Label = ({ version }: { version: string }) => { - const { t } = useTranslation(); - return ( - <> - {t('ai:Use arm64 CPU architecture')}{' '} - - {t( - 'ai:Check this option if you want to use the arm64 CPU architecture instead of the default x86_64 CPU architecture. Please note that some features will not be available.', - )} -

- } - /> - - - ); -}; - -type ArmCheckboxProps = { versions: OpenshiftVersionOptionType[] }; - -const ArmCheckbox: React.FC = ({ versions }) => { - const { t } = useTranslation(); - const { - values: { openshiftVersion }, - } = useFormikContext(); - const [{ name, value }, , { setValue }] = useField('cpuArchitecture'); - const fieldId = getFieldId(name, 'input'); - - const featureSupportLevelContext = useFeatureSupportLevel(); - const isSupportedVersionAvailable = !!versions.find((version) => - featureSupportLevelContext.isFeatureSupported(version.value, 'ARM64_ARCHITECTURE'), - ); - - const prevVersionRef = React.useRef(openshiftVersion); - const handleChange = React.useCallback( - (checked: boolean) => setValue(checked ? CpuArchitecture.ARM : CpuArchitecture.x86), - [setValue], - ); - - React.useEffect(() => { - if ( - prevVersionRef.current !== openshiftVersion && - !featureSupportLevelContext.isFeatureSupported(openshiftVersion, 'ARM64_ARCHITECTURE') - ) { - //invoke updating cpu architecture value only if the version changed to not be in danger of touching existing clusters - handleChange(false); - } - prevVersionRef.current = openshiftVersion; - }, [openshiftVersion, handleChange, featureSupportLevelContext]); - if (!isSupportedVersionAvailable) { - return null; - } - const disabledReason = featureSupportLevelContext.getFeatureDisabledReason( - openshiftVersion, - 'ARM64_ARCHITECTURE', - ); - return ( - - - - ); -}; - -export default ArmCheckbox;