@openshift-assisted/ui-lib 2.12.0-cim → 2.13.0-cim
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/@types/cim/components/Agent/NoAgentsAlert.d.ts.map +1 -1
- package/build/@types/cim/components/ClusterDeployment/ACMClusterDeploymentDetailsStep.d.ts +2 -0
- package/build/@types/cim/components/ClusterDeployment/ACMClusterDeploymentDetailsStep.d.ts.map +1 -1
- package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentDetailsForm.d.ts +2 -1
- package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentDetailsForm.d.ts.map +1 -1
- package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentDetailsStep.d.ts +3 -5
- package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentDetailsStep.d.ts.map +1 -1
- package/build/@types/cim/components/ClusterDeployment/ClusterDetailsFormFields.d.ts +1 -0
- package/build/@types/cim/components/ClusterDeployment/ClusterDetailsFormFields.d.ts.map +1 -1
- package/build/@types/cim/components/InfraEnv/EnvironmentDetails.d.ts.map +1 -1
- package/build/@types/cim/components/InfraEnv/InfraEnvFormPage.d.ts +5 -1
- package/build/@types/cim/components/InfraEnv/InfraEnvFormPage.d.ts.map +1 -1
- package/build/@types/cim/components/InfraEnv/InfraTableToolbar.d.ts.map +1 -1
- package/build/@types/cim/components/InfraEnv/OpenshiftVersionDropdown.d.ts +6 -0
- package/build/@types/cim/components/InfraEnv/OpenshiftVersionDropdown.d.ts.map +1 -0
- package/build/@types/cim/components/common/CpuArchitectureDropdown.d.ts +6 -0
- package/build/@types/cim/components/common/CpuArchitectureDropdown.d.ts.map +1 -0
- package/build/@types/cim/components/helpers/agentStatus.d.ts.map +1 -1
- package/build/@types/cim/components/helpers/clusterDeployment.d.ts +1 -1
- package/build/@types/cim/components/helpers/clusterDeployment.d.ts.map +1 -1
- package/build/@types/cim/components/helpers/versions.d.ts +2 -2
- package/build/@types/cim/components/helpers/versions.d.ts.map +1 -1
- package/build/@types/cim/types/k8s/agent-service-config.d.ts +7 -0
- package/build/@types/cim/types/k8s/agent-service-config.d.ts.map +1 -1
- package/build/@types/cim/types/k8s/infra-env-k8s-resource.d.ts +2 -1
- package/build/@types/cim/types/k8s/infra-env-k8s-resource.d.ts.map +1 -1
- package/build/@types/common/components/clusterWizard/clusterDetailsValidation.d.ts.map +1 -1
- package/build/@types/common/components/clusterWizard/types.d.ts +1 -0
- package/build/@types/common/components/clusterWizard/types.d.ts.map +1 -1
- package/build/@types/common/components/hosts/utils.d.ts.map +1 -1
- package/build/@types/common/types/cpuArchitecture.d.ts +6 -0
- package/build/@types/common/types/cpuArchitecture.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterConfiguration/CpuArchitectureDropdown.d.ts +1 -7
- package/build/@types/ocm/components/clusterConfiguration/CpuArchitectureDropdown.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterConfiguration/OcmClusterDetailsFormFields.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterConfiguration/platformIntegration/ExternalPlatformDropdown.d.ts.map +1 -1
- package/build/@types/ocm/components/featureSupportLevels/featureStateUtils.d.ts.map +1 -1
- package/build/@types/ocm/store/slices/current-cluster/slice.d.ts +1 -1
- package/build/cjs/cim/components/Agent/NoAgentsAlert.js +10 -5
- package/build/cjs/cim/components/Agent/NoAgentsAlert.js.map +1 -1
- package/build/cjs/cim/components/ClusterDeployment/ACMClusterDeploymentDetailsStep.js +7 -6
- package/build/cjs/cim/components/ClusterDeployment/ACMClusterDeploymentDetailsStep.js.map +1 -1
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentDetailsForm.js +19 -4
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentDetailsForm.js.map +1 -1
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentDetailsStep.js +4 -5
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentDetailsStep.js.map +1 -1
- package/build/cjs/cim/components/ClusterDeployment/ClusterDetailsFormFields.js +3 -3
- package/build/cjs/cim/components/ClusterDeployment/ClusterDetailsFormFields.js.map +1 -1
- package/build/cjs/cim/components/InfraEnv/EnvironmentDetails.js +12 -8
- package/build/cjs/cim/components/InfraEnv/EnvironmentDetails.js.map +1 -1
- package/build/cjs/cim/components/InfraEnv/InfraEnvFormPage.js +6 -10
- package/build/cjs/cim/components/InfraEnv/InfraEnvFormPage.js.map +1 -1
- package/build/cjs/cim/components/InfraEnv/InfraTableToolbar.js +1 -4
- package/build/cjs/cim/components/InfraEnv/InfraTableToolbar.js.map +1 -1
- package/build/cjs/cim/components/InfraEnv/OpenshiftVersionDropdown.js +34 -0
- package/build/cjs/cim/components/InfraEnv/OpenshiftVersionDropdown.js.map +1 -0
- package/build/cjs/cim/components/common/CpuArchitectureDropdown.js +46 -0
- package/build/cjs/cim/components/common/CpuArchitectureDropdown.js.map +1 -0
- package/build/cjs/cim/components/helpers/agentStatus.js +5 -0
- package/build/cjs/cim/components/helpers/agentStatus.js.map +1 -1
- package/build/cjs/cim/components/helpers/clusterDeployment.js +8 -1
- package/build/cjs/cim/components/helpers/clusterDeployment.js.map +1 -1
- package/build/cjs/cim/components/helpers/versions.js +6 -1
- package/build/cjs/cim/components/helpers/versions.js.map +1 -1
- package/build/cjs/common/components/clusterWizard/clusterDetailsValidation.js +1 -0
- package/build/cjs/common/components/clusterWizard/clusterDetailsValidation.js.map +1 -1
- package/build/cjs/common/components/hosts/utils.js +1 -0
- package/build/cjs/common/components/hosts/utils.js.map +1 -1
- package/build/cjs/common/components/ui/formik/LabelField.css +5 -0
- package/build/cjs/common/types/cpuArchitecture.js +22 -1
- package/build/cjs/common/types/cpuArchitecture.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/CpuArchitectureDropdown.js +5 -27
- package/build/cjs/ocm/components/clusterConfiguration/CpuArchitectureDropdown.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/OcmClusterDetailsFormFields.js +2 -4
- package/build/cjs/ocm/components/clusterConfiguration/OcmClusterDetailsFormFields.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/platformIntegration/ExternalPlatformDropdown.js +1 -2
- package/build/cjs/ocm/components/clusterConfiguration/platformIntegration/ExternalPlatformDropdown.js.map +1 -1
- package/build/cjs/ocm/components/featureSupportLevels/featureStateUtils.js +1 -2
- package/build/cjs/ocm/components/featureSupportLevels/featureStateUtils.js.map +1 -1
- package/lib/cim/components/Agent/NoAgentsAlert.tsx +8 -4
- package/lib/cim/components/ClusterDeployment/ACMClusterDeploymentDetailsStep.tsx +17 -3
- package/lib/cim/components/ClusterDeployment/ClusterDeploymentDetailsForm.tsx +30 -4
- package/lib/cim/components/ClusterDeployment/ClusterDeploymentDetailsStep.tsx +9 -9
- package/lib/cim/components/ClusterDeployment/ClusterDetailsFormFields.tsx +5 -3
- package/lib/cim/components/InfraEnv/EnvironmentDetails.tsx +18 -2
- package/lib/cim/components/InfraEnv/InfraEnvFormPage.tsx +15 -22
- package/lib/cim/components/InfraEnv/InfraTableToolbar.tsx +1 -3
- package/lib/cim/components/InfraEnv/OpenshiftVersionDropdown.tsx +71 -0
- package/lib/cim/components/common/CpuArchitectureDropdown.tsx +93 -0
- package/lib/cim/components/helpers/agentStatus.tsx +5 -0
- package/lib/cim/components/helpers/clusterDeployment.ts +8 -1
- package/lib/cim/components/helpers/versions.ts +12 -0
- package/lib/cim/types/k8s/agent-service-config.ts +8 -0
- package/lib/cim/types/k8s/infra-env-k8s-resource.ts +2 -1
- package/lib/common/components/clusterWizard/clusterDetailsValidation.ts +1 -0
- package/lib/common/components/clusterWizard/types.ts +1 -0
- package/lib/common/components/hosts/utils.ts +2 -0
- package/lib/common/components/ui/formik/LabelField.css +5 -0
- package/lib/common/types/cpuArchitecture.ts +28 -0
- package/lib/ocm/components/clusterConfiguration/CpuArchitectureDropdown.tsx +2 -33
- package/lib/ocm/components/clusterConfiguration/OcmClusterDetailsFormFields.tsx +4 -7
- package/lib/ocm/components/clusterConfiguration/platformIntegration/ExternalPlatformDropdown.tsx +1 -1
- package/lib/ocm/components/featureSupportLevels/featureStateUtils.ts +1 -1
- package/package.json +3 -3
- package/build/@types/cim/components/ClusterDeployment/ArmCheckbox.d.ts +0 -8
- package/build/@types/cim/components/ClusterDeployment/ArmCheckbox.d.ts.map +0 -1
- package/build/cjs/cim/components/ClusterDeployment/ArmCheckbox.js +0 -44
- package/build/cjs/cim/components/ClusterDeployment/ArmCheckbox.js.map +0 -1
- package/lib/cim/components/ClusterDeployment/ArmCheckbox.tsx +0 -101
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { Checkbox, FormGroup, Tooltip } from '@patternfly/react-core';
|
|
3
|
-
import { useField, useFormikContext } from 'formik';
|
|
4
|
-
import {
|
|
5
|
-
CpuArchitecture,
|
|
6
|
-
getFieldId,
|
|
7
|
-
HelperText,
|
|
8
|
-
OpenshiftVersionOptionType,
|
|
9
|
-
PopoverIcon,
|
|
10
|
-
} from '../../../common';
|
|
11
|
-
import {
|
|
12
|
-
FeatureSupportLevelBadge,
|
|
13
|
-
useFeatureSupportLevel,
|
|
14
|
-
} from '../../../common/components/featureSupportLevels';
|
|
15
|
-
import { useTranslation } from '../../../common/hooks/use-translation-wrapper';
|
|
16
|
-
import { ClusterCreateParams } from '@openshift-assisted/types/assisted-installer-service';
|
|
17
|
-
|
|
18
|
-
const Label = ({ version }: { version: string }) => {
|
|
19
|
-
const { t } = useTranslation();
|
|
20
|
-
return (
|
|
21
|
-
<>
|
|
22
|
-
{t('ai:Use arm64 CPU architecture')}{' '}
|
|
23
|
-
<PopoverIcon
|
|
24
|
-
noVerticalAlign
|
|
25
|
-
bodyContent={
|
|
26
|
-
<p>
|
|
27
|
-
{t(
|
|
28
|
-
'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.',
|
|
29
|
-
)}
|
|
30
|
-
</p>
|
|
31
|
-
}
|
|
32
|
-
/>
|
|
33
|
-
<FeatureSupportLevelBadge featureId="ARM64_ARCHITECTURE" openshiftVersion={version} />
|
|
34
|
-
</>
|
|
35
|
-
);
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
type ArmCheckboxProps = { versions: OpenshiftVersionOptionType[] };
|
|
39
|
-
|
|
40
|
-
const ArmCheckbox: React.FC<ArmCheckboxProps> = ({ versions }) => {
|
|
41
|
-
const { t } = useTranslation();
|
|
42
|
-
const {
|
|
43
|
-
values: { openshiftVersion },
|
|
44
|
-
} = useFormikContext<ClusterCreateParams>();
|
|
45
|
-
const [{ name, value }, , { setValue }] = useField<CpuArchitecture>('cpuArchitecture');
|
|
46
|
-
const fieldId = getFieldId(name, 'input');
|
|
47
|
-
|
|
48
|
-
const featureSupportLevelContext = useFeatureSupportLevel();
|
|
49
|
-
const isSupportedVersionAvailable = !!versions.find((version) =>
|
|
50
|
-
featureSupportLevelContext.isFeatureSupported(version.value, 'ARM64_ARCHITECTURE'),
|
|
51
|
-
);
|
|
52
|
-
|
|
53
|
-
const prevVersionRef = React.useRef(openshiftVersion);
|
|
54
|
-
const handleChange = React.useCallback(
|
|
55
|
-
(checked: boolean) => setValue(checked ? CpuArchitecture.ARM : CpuArchitecture.x86),
|
|
56
|
-
[setValue],
|
|
57
|
-
);
|
|
58
|
-
|
|
59
|
-
React.useEffect(() => {
|
|
60
|
-
if (
|
|
61
|
-
prevVersionRef.current !== openshiftVersion &&
|
|
62
|
-
!featureSupportLevelContext.isFeatureSupported(openshiftVersion, 'ARM64_ARCHITECTURE')
|
|
63
|
-
) {
|
|
64
|
-
//invoke updating cpu architecture value only if the version changed to not be in danger of touching existing clusters
|
|
65
|
-
handleChange(false);
|
|
66
|
-
}
|
|
67
|
-
prevVersionRef.current = openshiftVersion;
|
|
68
|
-
}, [openshiftVersion, handleChange, featureSupportLevelContext]);
|
|
69
|
-
if (!isSupportedVersionAvailable) {
|
|
70
|
-
return null;
|
|
71
|
-
}
|
|
72
|
-
const disabledReason = featureSupportLevelContext.getFeatureDisabledReason(
|
|
73
|
-
openshiftVersion,
|
|
74
|
-
'ARM64_ARCHITECTURE',
|
|
75
|
-
);
|
|
76
|
-
return (
|
|
77
|
-
<FormGroup isInline fieldId={fieldId}>
|
|
78
|
-
<Tooltip hidden={!disabledReason} content={disabledReason}>
|
|
79
|
-
<Checkbox
|
|
80
|
-
id={fieldId}
|
|
81
|
-
name={name}
|
|
82
|
-
isDisabled={featureSupportLevelContext.isFeatureDisabled(
|
|
83
|
-
openshiftVersion,
|
|
84
|
-
'ARM64_ARCHITECTURE',
|
|
85
|
-
)}
|
|
86
|
-
label={<Label version={openshiftVersion} />}
|
|
87
|
-
aria-describedby={`${fieldId}-helper`}
|
|
88
|
-
description={
|
|
89
|
-
<HelperText fieldId={fieldId}>
|
|
90
|
-
{t('ai:Make sure all the hosts are using arm64 CPU architecture.')}
|
|
91
|
-
</HelperText>
|
|
92
|
-
}
|
|
93
|
-
isChecked={value === CpuArchitecture.ARM}
|
|
94
|
-
onChange={handleChange}
|
|
95
|
-
/>
|
|
96
|
-
</Tooltip>
|
|
97
|
-
</FormGroup>
|
|
98
|
-
);
|
|
99
|
-
};
|
|
100
|
-
|
|
101
|
-
export default ArmCheckbox;
|