@openshift-assisted/ui-lib 2.36.4 → 2.37.0
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/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/ClusterDeployment/wizardTransition.d.ts +1 -1
- package/build/@types/cim/components/ClusterDeployment/wizardTransition.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 +4 -0
- package/build/@types/cim/components/InfraEnv/InfraEnvFormPage.d.ts.map +1 -1
- package/build/@types/cim/components/InfraEnv/OpenshiftVersionDropdown.d.ts +7 -0
- package/build/@types/cim/components/InfraEnv/OpenshiftVersionDropdown.d.ts.map +1 -0
- package/build/@types/cim/components/common/CpuArchitectureDropdown.d.ts +2 -1
- package/build/@types/cim/components/common/CpuArchitectureDropdown.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 +1 -0
- 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/HostStatus.d.ts.map +1 -1
- package/build/@types/common/components/hosts/HostValidationGroups.d.ts +2 -1
- package/build/@types/common/components/hosts/HostValidationGroups.d.ts.map +1 -1
- package/build/@types/common/config/constants.d.ts +35 -0
- package/build/@types/common/config/constants.d.ts.map +1 -1
- package/build/@types/common/config/docs_links.d.ts +5 -0
- package/build/@types/common/config/docs_links.d.ts.map +1 -1
- package/build/@types/common/types/clusters.d.ts +2 -0
- package/build/@types/common/types/clusters.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterConfiguration/ControlPlaneNodesDropdown.d.ts +9 -0
- package/build/@types/ocm/components/clusterConfiguration/ControlPlaneNodesDropdown.d.ts.map +1 -0
- package/build/@types/ocm/components/clusterConfiguration/OcmClusterDetailsFormFields.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterConfiguration/operators/CnvCheckbox.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterConfiguration/operators/MtvOperatorCheckbox.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterConfiguration/operators/OpenShiftAICheckbox.d.ts +4 -0
- package/build/@types/ocm/components/clusterConfiguration/operators/OpenShiftAICheckbox.d.ts.map +1 -0
- package/build/@types/ocm/components/clusterConfiguration/operators/OpenShiftAIRequirements.d.ts +4 -0
- package/build/@types/ocm/components/clusterConfiguration/operators/OpenShiftAIRequirements.d.ts.map +1 -0
- package/build/@types/ocm/components/clusterConfiguration/operators/OscCheckbox.d.ts +4 -0
- package/build/@types/ocm/components/clusterConfiguration/operators/OscCheckbox.d.ts.map +1 -0
- package/build/@types/ocm/components/clusterConfiguration/staticIp/data/formDataToInfraEnvField.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterConfiguration/staticIp/data/nmstateYaml.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterDetail/ClusterDetailsButtonGroup.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterWizard/Operators.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterWizard/OperatorsStep.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterWizard/wizardTransition.d.ts +1 -1
- package/build/@types/ocm/components/clusterWizard/wizardTransition.d.ts.map +1 -1
- package/build/@types/ocm/components/featureSupportLevels/featureStateUtils.d.ts +2 -0
- package/build/@types/ocm/components/featureSupportLevels/featureStateUtils.d.ts.map +1 -1
- package/build/@types/ocm/services/ClusterDetailsService.d.ts.map +1 -1
- package/build/@types/ocm/services/OperatorsService.d.ts.map +1 -1
- package/build/@types/ocm/store/slices/current-cluster/slice.d.ts +1 -0
- package/build/@types/ocm/store/slices/current-cluster/slice.d.ts.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 +2 -2
- package/build/cjs/cim/components/ClusterDeployment/ClusterDetailsFormFields.js.map +1 -1
- package/build/cjs/cim/components/InfraEnv/EnvironmentDetails.js +10 -7
- package/build/cjs/cim/components/InfraEnv/EnvironmentDetails.js.map +1 -1
- package/build/cjs/cim/components/InfraEnv/InfraEnvFormPage.js +4 -1
- package/build/cjs/cim/components/InfraEnv/InfraEnvFormPage.js.map +1 -1
- package/build/cjs/cim/components/InfraEnv/OpenshiftVersionDropdown.js +35 -0
- package/build/cjs/cim/components/InfraEnv/OpenshiftVersionDropdown.js.map +1 -0
- package/build/cjs/cim/components/common/CpuArchitectureDropdown.js +23 -7
- package/build/cjs/cim/components/common/CpuArchitectureDropdown.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 +2 -1
- package/build/cjs/common/components/clusterWizard/clusterDetailsValidation.js.map +1 -1
- package/build/cjs/common/components/hosts/HostStatus.js +1 -1
- package/build/cjs/common/components/hosts/HostStatus.js.map +1 -1
- package/build/cjs/common/components/hosts/HostValidationGroups.js +27 -5
- package/build/cjs/common/components/hosts/HostValidationGroups.js.map +1 -1
- package/build/cjs/common/components/hosts/utils.js +1 -1
- 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/config/constants.js +49 -1
- package/build/cjs/common/config/constants.js.map +1 -1
- package/build/cjs/common/config/docs_links.js +7 -1
- package/build/cjs/common/config/docs_links.js.map +1 -1
- package/build/cjs/common/types/clusters.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/ControlPlaneNodesDropdown.js +67 -0
- package/build/cjs/ocm/components/clusterConfiguration/ControlPlaneNodesDropdown.js.map +1 -0
- package/build/cjs/ocm/components/clusterConfiguration/OcmClusterDetailsFormFields.js +5 -5
- package/build/cjs/ocm/components/clusterConfiguration/OcmClusterDetailsFormFields.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/operators/CnvCheckbox.js +3 -0
- package/build/cjs/ocm/components/clusterConfiguration/operators/CnvCheckbox.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/operators/MtvOperatorCheckbox.js +3 -1
- package/build/cjs/ocm/components/clusterConfiguration/operators/MtvOperatorCheckbox.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/operators/OpenShiftAICheckbox.js +48 -0
- package/build/cjs/ocm/components/clusterConfiguration/operators/OpenShiftAICheckbox.js.map +1 -0
- package/build/cjs/ocm/components/clusterConfiguration/operators/OpenShiftAIRequirements.js +30 -0
- package/build/cjs/ocm/components/clusterConfiguration/operators/OpenShiftAIRequirements.js.map +1 -0
- package/build/cjs/ocm/components/clusterConfiguration/operators/OscCheckbox.js +47 -0
- package/build/cjs/ocm/components/clusterConfiguration/operators/OscCheckbox.js.map +1 -0
- package/build/cjs/ocm/components/clusterConfiguration/staticIp/data/formDataToInfraEnvField.js +0 -2
- package/build/cjs/ocm/components/clusterConfiguration/staticIp/data/formDataToInfraEnvField.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/staticIp/data/nmstateYaml.js +7 -2
- package/build/cjs/ocm/components/clusterConfiguration/staticIp/data/nmstateYaml.js.map +1 -1
- package/build/cjs/ocm/components/clusterDetail/ClusterDetailsButtonGroup.js +8 -6
- package/build/cjs/ocm/components/clusterDetail/ClusterDetailsButtonGroup.js.map +1 -1
- package/build/cjs/ocm/components/clusterWizard/Operators.js +2 -0
- package/build/cjs/ocm/components/clusterWizard/Operators.js.map +1 -1
- package/build/cjs/ocm/components/clusterWizard/OperatorsStep.js +6 -1
- package/build/cjs/ocm/components/clusterWizard/OperatorsStep.js.map +1 -1
- package/build/cjs/ocm/components/clusterWizard/wizardTransition.js +8 -1
- package/build/cjs/ocm/components/clusterWizard/wizardTransition.js.map +1 -1
- package/build/cjs/ocm/components/featureSupportLevels/featureStateUtils.js +51 -1
- package/build/cjs/ocm/components/featureSupportLevels/featureStateUtils.js.map +1 -1
- package/build/cjs/ocm/services/ClusterDetailsService.js +2 -1
- package/build/cjs/ocm/services/ClusterDetailsService.js.map +1 -1
- package/build/cjs/ocm/services/OperatorsService.js +12 -4
- package/build/cjs/ocm/services/OperatorsService.js.map +1 -1
- 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 +3 -2
- package/lib/cim/components/InfraEnv/EnvironmentDetails.tsx +10 -0
- package/lib/cim/components/InfraEnv/InfraEnvFormPage.tsx +8 -0
- package/lib/cim/components/InfraEnv/OpenshiftVersionDropdown.tsx +72 -0
- package/lib/cim/components/common/CpuArchitectureDropdown.tsx +47 -27
- 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 +1 -0
- package/lib/common/components/clusterWizard/clusterDetailsValidation.ts +1 -0
- package/lib/common/components/clusterWizard/types.ts +1 -0
- package/lib/common/components/hosts/HostStatus.tsx +1 -2
- package/lib/common/components/hosts/HostValidationGroups.tsx +52 -5
- package/lib/common/components/hosts/utils.ts +1 -1
- package/lib/common/components/ui/formik/LabelField.css +5 -0
- package/lib/common/config/constants.ts +48 -0
- package/lib/common/config/docs_links.ts +16 -0
- package/lib/common/types/clusters.ts +2 -0
- package/lib/ocm/components/clusterConfiguration/ControlPlaneNodesDropdown.tsx +142 -0
- package/lib/ocm/components/clusterConfiguration/OcmClusterDetailsFormFields.tsx +11 -9
- package/lib/ocm/components/clusterConfiguration/operators/CnvCheckbox.tsx +7 -1
- package/lib/ocm/components/clusterConfiguration/operators/MtvOperatorCheckbox.tsx +2 -1
- package/lib/ocm/components/clusterConfiguration/operators/OpenShiftAICheckbox.tsx +80 -0
- package/lib/ocm/components/clusterConfiguration/operators/OpenShiftAIRequirements.tsx +36 -0
- package/lib/ocm/components/clusterConfiguration/operators/OscCheckbox.tsx +88 -0
- package/lib/ocm/components/clusterConfiguration/staticIp/data/formDataToInfraEnvField.ts +0 -2
- package/lib/ocm/components/clusterConfiguration/staticIp/data/nmstateYaml.ts +0 -1
- package/lib/ocm/components/clusterDetail/ClusterDetailsButtonGroup.tsx +14 -10
- package/lib/ocm/components/clusterWizard/Operators.tsx +4 -0
- package/lib/ocm/components/clusterWizard/OperatorsStep.tsx +8 -1
- package/lib/ocm/components/clusterWizard/_wizardTransition.test.ts +35 -0
- package/lib/ocm/components/clusterWizard/wizardTransition.ts +8 -1
- package/lib/ocm/components/featureSupportLevels/featureStateUtils.ts +62 -0
- package/lib/ocm/services/ClusterDetailsService.ts +2 -1
- package/lib/ocm/services/OperatorsService.tsx +19 -5
- package/package.json +3 -3
- package/build/@types/ocm/components/clusterConfiguration/OcmSNOControlGroup.d.ts +0 -10
- package/build/@types/ocm/components/clusterConfiguration/OcmSNOControlGroup.d.ts.map +0 -1
- package/build/cjs/ocm/components/clusterConfiguration/OcmSNOControlGroup.js +0 -20
- package/build/cjs/ocm/components/clusterConfiguration/OcmSNOControlGroup.js.map +0 -1
- package/lib/ocm/components/clusterConfiguration/OcmSNOControlGroup.tsx +0 -62
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
import { FormGroup, HelperText, HelperTextItem, Tooltip } from '@patternfly/react-core';
|
|
3
|
+
import { ExternalLinkAltIcon } from '@patternfly/react-icons/dist/js/icons/external-link-alt-icon';
|
|
4
|
+
import { useFormikContext } from 'formik';
|
|
5
|
+
import {
|
|
6
|
+
getFieldId,
|
|
7
|
+
PopoverIcon,
|
|
8
|
+
OSC_REQUIREMENTS_LINK,
|
|
9
|
+
OSC_LINK,
|
|
10
|
+
OperatorsValues,
|
|
11
|
+
} from '../../../../common';
|
|
12
|
+
import { OcmCheckboxField } from '../../ui/OcmFormFields';
|
|
13
|
+
import { useNewFeatureSupportLevel } from '../../../../common/components/newFeatureSupportLevels';
|
|
14
|
+
import NewFeatureSupportLevelBadge from '../../../../common/components/newFeatureSupportLevels/NewFeatureSupportLevelBadge';
|
|
15
|
+
import { SupportLevel } from '@openshift-assisted/types/assisted-installer-service';
|
|
16
|
+
|
|
17
|
+
const OSC_FIELD_NAME = 'useOsc';
|
|
18
|
+
|
|
19
|
+
type OscLabelProps = {
|
|
20
|
+
disabledReason?: string;
|
|
21
|
+
supportLevel?: SupportLevel;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
const OscLabel = ({ disabledReason, supportLevel }: OscLabelProps) => {
|
|
25
|
+
return (
|
|
26
|
+
<>
|
|
27
|
+
<Tooltip hidden={!disabledReason} content={disabledReason}>
|
|
28
|
+
<span>Install OpenShift sandboxed containers </span>
|
|
29
|
+
</Tooltip>
|
|
30
|
+
<PopoverIcon
|
|
31
|
+
component={'a'}
|
|
32
|
+
headerContent="Additional requirements"
|
|
33
|
+
bodyContent={
|
|
34
|
+
<a href={OSC_REQUIREMENTS_LINK} target="_blank" rel="noopener noreferrer">
|
|
35
|
+
Learn more about the requirements for OpenShift sandboxed containers{' '}
|
|
36
|
+
<ExternalLinkAltIcon />.
|
|
37
|
+
</a>
|
|
38
|
+
}
|
|
39
|
+
/>
|
|
40
|
+
<NewFeatureSupportLevelBadge featureId="OSC" supportLevel={supportLevel} />
|
|
41
|
+
</>
|
|
42
|
+
);
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
const OscHelperText = () => {
|
|
46
|
+
return (
|
|
47
|
+
<HelperText>
|
|
48
|
+
<HelperTextItem variant="indeterminate">
|
|
49
|
+
OpenShift sandboxed containers support for OpenShift Container Platform provides users with
|
|
50
|
+
built-in support for running Kata Containers as an additional optional runtime. It provides
|
|
51
|
+
an additional virtualization machine(VM) isolation layer for pods.{' '}
|
|
52
|
+
<a href={OSC_LINK} target="_blank" rel="noopener noreferrer">
|
|
53
|
+
{'Learn more'} <ExternalLinkAltIcon />
|
|
54
|
+
</a>
|
|
55
|
+
</HelperTextItem>
|
|
56
|
+
</HelperText>
|
|
57
|
+
);
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
const OscCheckbox = () => {
|
|
61
|
+
const featureSupportLevel = useNewFeatureSupportLevel();
|
|
62
|
+
const { values } = useFormikContext<OperatorsValues>();
|
|
63
|
+
const fieldId = getFieldId(OSC_FIELD_NAME, 'input');
|
|
64
|
+
const [disabledReason, setDisabledReason] = useState<string | undefined>();
|
|
65
|
+
|
|
66
|
+
React.useEffect(() => {
|
|
67
|
+
const disabledReason = featureSupportLevel.getFeatureDisabledReason('OSC');
|
|
68
|
+
setDisabledReason(disabledReason);
|
|
69
|
+
}, [values, featureSupportLevel]);
|
|
70
|
+
|
|
71
|
+
return (
|
|
72
|
+
<FormGroup isInline fieldId={fieldId}>
|
|
73
|
+
<OcmCheckboxField
|
|
74
|
+
name={OSC_FIELD_NAME}
|
|
75
|
+
label={
|
|
76
|
+
<OscLabel
|
|
77
|
+
disabledReason={disabledReason}
|
|
78
|
+
supportLevel={featureSupportLevel.getFeatureSupportLevel('OSC')}
|
|
79
|
+
/>
|
|
80
|
+
}
|
|
81
|
+
isDisabled={!!disabledReason}
|
|
82
|
+
helperText={<OscHelperText />}
|
|
83
|
+
/>
|
|
84
|
+
</FormGroup>
|
|
85
|
+
);
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
export default OscCheckbox;
|
|
@@ -41,8 +41,8 @@ const ClusterDetailsButtonGroup: React.FC<ClusterDetailsButtonGroupProps> = ({
|
|
|
41
41
|
direction={{ default: 'row' }}
|
|
42
42
|
justifyContent={{ default: 'justifyContentFlexStart' }}
|
|
43
43
|
>
|
|
44
|
-
<
|
|
45
|
-
<
|
|
44
|
+
<RenderIf condition={cluster.status === 'error'}>
|
|
45
|
+
<FlexItem>
|
|
46
46
|
<Button
|
|
47
47
|
id={getID('button-reset-cluster')}
|
|
48
48
|
variant={ButtonVariant.danger}
|
|
@@ -50,18 +50,22 @@ const ClusterDetailsButtonGroup: React.FC<ClusterDetailsButtonGroupProps> = ({
|
|
|
50
50
|
>
|
|
51
51
|
Reset Cluster
|
|
52
52
|
</Button>
|
|
53
|
-
</
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
53
|
+
</FlexItem>
|
|
54
|
+
</RenderIf>
|
|
55
|
+
<RenderIf
|
|
56
|
+
condition={showKubeConfig && hasConsoleUrlAndNoError && canOpenConsole(cluster.status)}
|
|
57
|
+
>
|
|
58
|
+
<FlexItem>
|
|
57
59
|
<LaunchOpenshiftConsoleButton
|
|
58
60
|
isDisabled={false}
|
|
59
61
|
cluster={cluster}
|
|
60
62
|
consoleUrl={credentials?.consoleUrl}
|
|
61
63
|
id={getID('button-launch-console')}
|
|
62
64
|
/>
|
|
63
|
-
</
|
|
64
|
-
|
|
65
|
+
</FlexItem>
|
|
66
|
+
</RenderIf>
|
|
67
|
+
<RenderIf condition={canAbortInstallation(cluster)}>
|
|
68
|
+
<FlexItem>
|
|
65
69
|
<Button
|
|
66
70
|
data-testid="cluster-installation-abort-button"
|
|
67
71
|
variant={ButtonVariant.danger}
|
|
@@ -70,8 +74,8 @@ const ClusterDetailsButtonGroup: React.FC<ClusterDetailsButtonGroupProps> = ({
|
|
|
70
74
|
>
|
|
71
75
|
Abort installation
|
|
72
76
|
</Button>
|
|
73
|
-
</
|
|
74
|
-
</
|
|
77
|
+
</FlexItem>
|
|
78
|
+
</RenderIf>
|
|
75
79
|
<FlexItem>
|
|
76
80
|
<KubeconfigDownload
|
|
77
81
|
status={cluster.status}
|
|
@@ -10,6 +10,8 @@ import {
|
|
|
10
10
|
OPERATOR_NAME_MCE,
|
|
11
11
|
OPERATOR_NAME_MTV,
|
|
12
12
|
OPERATOR_NAME_ODF,
|
|
13
|
+
OPERATOR_NAME_OPENSHIFT_AI,
|
|
14
|
+
OPERATOR_NAME_OSC,
|
|
13
15
|
OperatorsValues,
|
|
14
16
|
selectMonitoredOperators,
|
|
15
17
|
useAlerts,
|
|
@@ -36,6 +38,8 @@ export const getOperatorsInitialValues = (
|
|
|
36
38
|
useContainerNativeVirtualization: isOperatorEnabled([OPERATOR_NAME_CNV]),
|
|
37
39
|
useMultiClusterEngine: isOperatorEnabled([OPERATOR_NAME_MCE]),
|
|
38
40
|
useMigrationToolkitforVirtualization: isOperatorEnabled([OPERATOR_NAME_MTV]),
|
|
41
|
+
useOpenShiftAI: isOperatorEnabled([OPERATOR_NAME_OPENSHIFT_AI]),
|
|
42
|
+
useOsc: isOperatorEnabled([OPERATOR_NAME_OSC]),
|
|
39
43
|
};
|
|
40
44
|
};
|
|
41
45
|
|
|
@@ -9,6 +9,8 @@ import MceCheckbox from '../clusterConfiguration/operators/MceCheckbox';
|
|
|
9
9
|
import { selectIsCurrentClusterSNO } from '../../store/slices/current-cluster/selectors';
|
|
10
10
|
import { isOCPVersionEqualsOrMajor } from '../utils';
|
|
11
11
|
import MtvOperatorCheckbox from '../clusterConfiguration/operators/MtvOperatorCheckbox';
|
|
12
|
+
import OpenShiftAICheckbox from '../clusterConfiguration/operators/OpenShiftAICheckbox';
|
|
13
|
+
import OscCheckbox from '../clusterConfiguration/operators/OscCheckbox';
|
|
12
14
|
|
|
13
15
|
export const OperatorsStep = (props: ClusterOperatorProps) => {
|
|
14
16
|
const isSNO = useSelector(selectIsCurrentClusterSNO);
|
|
@@ -24,6 +26,9 @@ export const OperatorsStep = (props: ClusterOperatorProps) => {
|
|
|
24
26
|
<StackItem>
|
|
25
27
|
<CnvCheckbox {...props} isVersionEqualsOrMajorThan4_15={isVersionEqualsOrMajorThan4_15} />
|
|
26
28
|
</StackItem>
|
|
29
|
+
<StackItem>
|
|
30
|
+
<MtvOperatorCheckbox clusterId={props.clusterId} />
|
|
31
|
+
</StackItem>
|
|
27
32
|
<StackItem>
|
|
28
33
|
<MceCheckbox
|
|
29
34
|
clusterId={props.clusterId}
|
|
@@ -43,7 +48,9 @@ export const OperatorsStep = (props: ClusterOperatorProps) => {
|
|
|
43
48
|
) : (
|
|
44
49
|
<StackItem>{isSNO ? <LvmCheckbox {...props} /> : <OdfCheckbox />}</StackItem>
|
|
45
50
|
)}
|
|
46
|
-
|
|
51
|
+
|
|
52
|
+
<OpenShiftAICheckbox />
|
|
53
|
+
<OscCheckbox />
|
|
47
54
|
</Stack>
|
|
48
55
|
);
|
|
49
56
|
};
|
|
@@ -72,6 +72,21 @@ const validationInfoHostsDisovery: ValidationsInfo = {
|
|
|
72
72
|
message: 'a validation message',
|
|
73
73
|
status: 'success',
|
|
74
74
|
},
|
|
75
|
+
{
|
|
76
|
+
id: 'nvidia-gpu-requirements-satisfied',
|
|
77
|
+
message: 'a validation message',
|
|
78
|
+
status: 'success',
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
id: 'openshift-ai-requirements-satisfied',
|
|
82
|
+
message: 'a validation message',
|
|
83
|
+
status: 'success',
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
id: 'osc-requirements-satisfied',
|
|
87
|
+
message: 'a validation message',
|
|
88
|
+
status: 'success',
|
|
89
|
+
},
|
|
75
90
|
{
|
|
76
91
|
id: 'api-vips-defined',
|
|
77
92
|
message: 'a validation unrelated to the canNextHostDiscovery',
|
|
@@ -170,6 +185,26 @@ const flatValidationHostsDiscovery: HostValidation[] = [
|
|
|
170
185
|
message: 'a host validation message',
|
|
171
186
|
status: 'success',
|
|
172
187
|
},
|
|
188
|
+
{
|
|
189
|
+
id: 'nvidia-gpu-requirements-satisfied',
|
|
190
|
+
message: 'a host validation message',
|
|
191
|
+
status: 'success',
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
id: 'openshift-ai-requirements-satisfied',
|
|
195
|
+
message: 'a host validation message',
|
|
196
|
+
status: 'success',
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
id: 'osc-requirements-satisfied',
|
|
200
|
+
message: 'a host validation message',
|
|
201
|
+
status: 'success',
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
id: 'mtu-valid',
|
|
205
|
+
message: 'a host validation message',
|
|
206
|
+
status: 'success',
|
|
207
|
+
},
|
|
173
208
|
];
|
|
174
209
|
|
|
175
210
|
const flatValidationHostsStorage: HostValidation[] = [
|
|
@@ -171,6 +171,9 @@ const hostDiscoveryStepValidationsMap: WizardStepValidationMap = {
|
|
|
171
171
|
'odf-requirements-satisfied',
|
|
172
172
|
'lvm-requirements-satisfied',
|
|
173
173
|
'cnv-requirements-satisfied',
|
|
174
|
+
'nvidia-gpu-requirements-satisfied',
|
|
175
|
+
'openshift-ai-requirements-satisfied',
|
|
176
|
+
'osc-requirements-satisfied',
|
|
174
177
|
],
|
|
175
178
|
},
|
|
176
179
|
host: {
|
|
@@ -183,6 +186,10 @@ const hostDiscoveryStepValidationsMap: WizardStepValidationMap = {
|
|
|
183
186
|
'odf-requirements-satisfied',
|
|
184
187
|
'lvm-requirements-satisfied',
|
|
185
188
|
'cnv-requirements-satisfied',
|
|
189
|
+
'nvidia-gpu-requirements-satisfied',
|
|
190
|
+
'openshift-ai-requirements-satisfied',
|
|
191
|
+
'osc-requirements-satisfied',
|
|
192
|
+
'mtu-valid',
|
|
186
193
|
],
|
|
187
194
|
},
|
|
188
195
|
softValidationIds: ['no-skip-installation-disk', 'no-skip-missing-disk'],
|
|
@@ -221,7 +228,7 @@ const networkingStepValidationsMap: WizardStepValidationMap = {
|
|
|
221
228
|
// Alternatively we would have to whitelist network validations instead of using group
|
|
222
229
|
// TODO(mlibra): remove that container-images-available from soft validations and let backend drive it via disabling it.
|
|
223
230
|
// Depends on: https://issues.redhat.com/browse/MGMT-5265
|
|
224
|
-
softValidationIds: ['ntp-synced', 'container-images-available'],
|
|
231
|
+
softValidationIds: ['ntp-synced', 'container-images-available', 'mtu-valid'],
|
|
225
232
|
};
|
|
226
233
|
|
|
227
234
|
const reviewStepValidationsMap: WizardStepValidationMap = {
|
|
@@ -18,6 +18,9 @@ const CNV_OPERATOR_LABEL = 'Openshift Virtualization';
|
|
|
18
18
|
const LVMS_OPERATOR_LABEL = 'Logical Volume Manager Storage';
|
|
19
19
|
const LVM_OPERATOR_LABEL = 'Logical Volume Manager';
|
|
20
20
|
const ODF_OPERATOR_LABEL = 'OpenShift Data Foundation';
|
|
21
|
+
const OPENSHIFT_AI_OPERATOR_LABEL = 'OpenShift AI';
|
|
22
|
+
const MTV_OPERATOR_LABEL = 'Migration Toolkit for Virtualization';
|
|
23
|
+
const OSC_OPERATOR_LABEL = 'OpenShift sandboxed containers';
|
|
21
24
|
|
|
22
25
|
export const clusterExistsReason = 'This option is not editable after the draft cluster is created';
|
|
23
26
|
|
|
@@ -133,6 +136,20 @@ const getLvmDisabledReason = (
|
|
|
133
136
|
return undefined;
|
|
134
137
|
};
|
|
135
138
|
|
|
139
|
+
const getOscDisabledReason = (
|
|
140
|
+
cluster: Cluster | undefined,
|
|
141
|
+
activeFeatureConfiguration: ActiveFeatureConfiguration | undefined,
|
|
142
|
+
isSupported: boolean,
|
|
143
|
+
) => {
|
|
144
|
+
if (!cluster) {
|
|
145
|
+
return undefined;
|
|
146
|
+
}
|
|
147
|
+
if (!isSupported) {
|
|
148
|
+
return `${OSC_OPERATOR_LABEL} is not supported in this OpenShift version.`;
|
|
149
|
+
}
|
|
150
|
+
return undefined;
|
|
151
|
+
};
|
|
152
|
+
|
|
136
153
|
const getNetworkTypeSelectionDisabledReason = (cluster: Cluster | undefined) => {
|
|
137
154
|
if (!cluster) {
|
|
138
155
|
return undefined;
|
|
@@ -185,6 +202,12 @@ export const getNewFeatureDisabledReason = (
|
|
|
185
202
|
case 'ODF': {
|
|
186
203
|
return getOdfDisabledReason(cluster, activeFeatureConfiguration, isSupported);
|
|
187
204
|
}
|
|
205
|
+
case 'OPENSHIFT_AI': {
|
|
206
|
+
return getOpenShiftAIDisabledReason(cluster, activeFeatureConfiguration, isSupported);
|
|
207
|
+
}
|
|
208
|
+
case 'OSC': {
|
|
209
|
+
return getOscDisabledReason(cluster, activeFeatureConfiguration, isSupported);
|
|
210
|
+
}
|
|
188
211
|
case 'NETWORK_TYPE_SELECTION': {
|
|
189
212
|
return getNetworkTypeSelectionDisabledReason(cluster);
|
|
190
213
|
}
|
|
@@ -247,6 +270,14 @@ export const getOdfIncompatibleWithLvmsReason = (operatorValues: OperatorsValues
|
|
|
247
270
|
: undefined;
|
|
248
271
|
};
|
|
249
272
|
|
|
273
|
+
export const getOpenShiftAIIncompatibleWithLvmsReason = (operatorValues: OperatorsValues) => {
|
|
274
|
+
// Currently OpenShift AI requires ODF, and that is incompatible with LVM.
|
|
275
|
+
const mustDisableOpenShiftAI = operatorValues.useOdfLogicalVolumeManager;
|
|
276
|
+
return mustDisableOpenShiftAI
|
|
277
|
+
? `Currently the ${OPENSHIFT_AI_OPERATOR_LABEL} requires ${ODF_OPERATOR_LABEL}, and you cannot install that at the same time as ${LVMS_OPERATOR_LABEL} operator.`
|
|
278
|
+
: undefined;
|
|
279
|
+
};
|
|
280
|
+
|
|
250
281
|
export const getLvmsIncompatibleWithOdfReason = (operatorValues: OperatorsValues) => {
|
|
251
282
|
const mustDisableLvms = operatorValues.useOpenShiftDataFoundation;
|
|
252
283
|
// In versions >= 4.15, it's not possible to select ODF + LVMS
|
|
@@ -254,3 +285,34 @@ export const getLvmsIncompatibleWithOdfReason = (operatorValues: OperatorsValues
|
|
|
254
285
|
? `Currently, you cannot install ${LVMS_OPERATOR_LABEL} operator at the same time as ${ODF_OPERATOR_LABEL} operator.`
|
|
255
286
|
: undefined;
|
|
256
287
|
};
|
|
288
|
+
|
|
289
|
+
const getOpenShiftAIDisabledReason = (
|
|
290
|
+
cluster: Cluster | undefined,
|
|
291
|
+
activeFeatureConfiguration: ActiveFeatureConfiguration | undefined,
|
|
292
|
+
isSupported: boolean,
|
|
293
|
+
) => {
|
|
294
|
+
if (!cluster) {
|
|
295
|
+
return undefined;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
const isArm = activeFeatureConfiguration?.underlyingCpuArchitecture === CpuArchitecture.ARM;
|
|
299
|
+
if (isArm) {
|
|
300
|
+
return `${OPENSHIFT_AI_OPERATOR_LABEL} is not available when ARM CPU architecture is selected.`;
|
|
301
|
+
}
|
|
302
|
+
if (isSNO(cluster)) {
|
|
303
|
+
return `${OPENSHIFT_AI_OPERATOR_LABEL} is not available when deploying a Single Node OpenShift.`;
|
|
304
|
+
}
|
|
305
|
+
if (!isSupported) {
|
|
306
|
+
return `The installer cannot currently enable ${OPENSHIFT_AI_OPERATOR_LABEL} with the selected OpenShift version, but it can be enabled later through the OpenShift Console once the installation is complete.`;
|
|
307
|
+
}
|
|
308
|
+
return undefined;
|
|
309
|
+
};
|
|
310
|
+
|
|
311
|
+
export const getCnvDisabledWithMtvReason = (operatorValues: OperatorsValues) => {
|
|
312
|
+
const mustDisableCnv =
|
|
313
|
+
operatorValues.useContainerNativeVirtualization &&
|
|
314
|
+
operatorValues.useMigrationToolkitforVirtualization;
|
|
315
|
+
return mustDisableCnv
|
|
316
|
+
? `Currently, you need to install ${CNV_OPERATOR_LABEL} operator at the same time as ${MTV_OPERATOR_LABEL} operator.`
|
|
317
|
+
: undefined;
|
|
318
|
+
};
|
|
@@ -21,6 +21,7 @@ import {
|
|
|
21
21
|
ManagedDomain,
|
|
22
22
|
PlatformType,
|
|
23
23
|
} from '@openshift-assisted/types/assisted-installer-service';
|
|
24
|
+
import toNumber from 'lodash-es/toNumber';
|
|
24
25
|
|
|
25
26
|
const getNewClusterCpuArchitecture = (urlSearchParams: string) => {
|
|
26
27
|
const params = new URLSearchParams(urlSearchParams);
|
|
@@ -36,7 +37,7 @@ const ClusterDetailsService = {
|
|
|
36
37
|
getClusterCreateParams(values: OcmClusterDetailsValues): ClusterCreateParamsWithStaticNetworking {
|
|
37
38
|
const params: ClusterCreateParamsWithStaticNetworking = {
|
|
38
39
|
name: values.name,
|
|
39
|
-
|
|
40
|
+
controlPlaneCount: toNumber(values.controlPlaneCount),
|
|
40
41
|
openshiftVersion: values.openshiftVersion,
|
|
41
42
|
pullSecret: values.pullSecret,
|
|
42
43
|
baseDnsDomain: values.baseDnsDomain,
|
|
@@ -7,6 +7,8 @@ import {
|
|
|
7
7
|
OperatorName,
|
|
8
8
|
OPERATOR_NAME_MCE,
|
|
9
9
|
OPERATOR_NAME_MTV,
|
|
10
|
+
OPERATOR_NAME_OPENSHIFT_AI,
|
|
11
|
+
OPERATOR_NAME_OSC,
|
|
10
12
|
} from '../../common';
|
|
11
13
|
import { getOlmOperatorCreateParamsByName } from '../components/clusters/utils';
|
|
12
14
|
import { getKeys } from '../../common/utils';
|
|
@@ -37,6 +39,8 @@ const OperatorsService = {
|
|
|
37
39
|
setOperator(OPERATOR_NAME_ODF, values.useOpenShiftDataFoundation);
|
|
38
40
|
setOperator(OPERATOR_NAME_MCE, values.useMultiClusterEngine);
|
|
39
41
|
setOperator(OPERATOR_NAME_MTV, values.useMigrationToolkitforVirtualization);
|
|
42
|
+
setOperator(OPERATOR_NAME_OPENSHIFT_AI, values.useOpenShiftAI);
|
|
43
|
+
setOperator(OPERATOR_NAME_OSC, values.useOsc);
|
|
40
44
|
|
|
41
45
|
// TODO: remove following once the LSO option is exposed to the user
|
|
42
46
|
if (!hasActiveOperators(values)) {
|
|
@@ -55,14 +59,24 @@ const OperatorsService = {
|
|
|
55
59
|
uiOperators: OperatorCreateParams[],
|
|
56
60
|
updatedOperators: Cluster['monitoredOperators'],
|
|
57
61
|
): Partial<OperatorsValues> {
|
|
58
|
-
// LVM operator can be automatically selected depending on Openshift version + other operators
|
|
59
|
-
const prevInactive = uiOperators?.find((op) => op.name === OPERATOR_NAME_LVM) === undefined;
|
|
60
|
-
const nowActive = updatedOperators?.find((op) => op.name === OPERATOR_NAME_LVM) !== undefined;
|
|
61
|
-
|
|
62
62
|
const updates: Partial<OperatorsValues> = {};
|
|
63
|
-
|
|
63
|
+
|
|
64
|
+
// LVM operator can be automatically selected depending on Openshift version + other operators
|
|
65
|
+
const lvmPrevInactive = uiOperators?.find((op) => op.name === OPERATOR_NAME_LVM) === undefined;
|
|
66
|
+
const lvmNowActive =
|
|
67
|
+
updatedOperators?.find((op) => op.name === OPERATOR_NAME_LVM) !== undefined;
|
|
68
|
+
if (lvmPrevInactive && lvmNowActive) {
|
|
64
69
|
updates.useOdfLogicalVolumeManager = true;
|
|
65
70
|
}
|
|
71
|
+
|
|
72
|
+
// ODF operator will be automatically selected when the OpenShift AI operator is selected:
|
|
73
|
+
const odfPrevInactive = uiOperators?.find((op) => op.name === OPERATOR_NAME_ODF) === undefined;
|
|
74
|
+
const odfNowActive =
|
|
75
|
+
updatedOperators?.find((op) => op.name === OPERATOR_NAME_ODF) !== undefined;
|
|
76
|
+
if (odfPrevInactive && odfNowActive) {
|
|
77
|
+
updates.useOpenShiftDataFoundation = true;
|
|
78
|
+
}
|
|
79
|
+
|
|
66
80
|
return updates;
|
|
67
81
|
},
|
|
68
82
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"dependencies": {
|
|
3
|
-
"@openshift-assisted/locales": "2.
|
|
4
|
-
"@openshift-assisted/types": "2.
|
|
3
|
+
"@openshift-assisted/locales": "2.37.0",
|
|
4
|
+
"@openshift-assisted/types": "2.37.0",
|
|
5
5
|
"@openshift-console/dynamic-plugin-sdk": "0.0.3",
|
|
6
6
|
"@patternfly/patternfly": "5.2.0",
|
|
7
7
|
"@patternfly/react-code-editor": "5.2.0",
|
|
@@ -139,5 +139,5 @@
|
|
|
139
139
|
]
|
|
140
140
|
}
|
|
141
141
|
},
|
|
142
|
-
"version": "2.
|
|
142
|
+
"version": "2.37.0"
|
|
143
143
|
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { ClusterDetailsValues } from '../../../common/components/clusterWizard/types';
|
|
3
|
-
import { NewFeatureSupportLevelMap } from '../../../common/components/newFeatureSupportLevels';
|
|
4
|
-
type OcmSNOControlGroupProps = {
|
|
5
|
-
highAvailabilityMode: ClusterDetailsValues['highAvailabilityMode'];
|
|
6
|
-
featureSupportLevelData?: NewFeatureSupportLevelMap;
|
|
7
|
-
};
|
|
8
|
-
declare const OcmSNOControlGroup: ({ highAvailabilityMode, featureSupportLevelData, }: OcmSNOControlGroupProps) => React.JSX.Element;
|
|
9
|
-
export default OcmSNOControlGroup;
|
|
10
|
-
//# sourceMappingURL=OcmSNOControlGroup.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"OcmSNOControlGroup.d.ts","sourceRoot":"","sources":["../../../../../lib/ocm/components/clusterConfiguration/OcmSNOControlGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,oBAAoB,EAAE,MAAM,gDAAgD,CAAC;AAEtF,OAAO,EACL,yBAAyB,EAE1B,MAAM,oDAAoD,CAAC;AAG5D,KAAK,uBAAuB,GAAG;IAC7B,oBAAoB,EAAE,oBAAoB,CAAC,sBAAsB,CAAC,CAAC;IACnE,uBAAuB,CAAC,EAAE,yBAAyB,CAAC;CACrD,CAAC;AAEF,QAAA,MAAM,kBAAkB,uDAGrB,uBAAuB,sBA0CzB,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
|
-
const react_1 = tslib_1.__importDefault(require("react"));
|
|
5
|
-
const OcmSingleNodeCheckbox_1 = tslib_1.__importDefault(require("./OcmSingleNodeCheckbox"));
|
|
6
|
-
const newFeatureSupportLevels_1 = require("../../../common/components/newFeatureSupportLevels");
|
|
7
|
-
const OcmSNODisclaimer_1 = tslib_1.__importDefault(require("./OcmSNODisclaimer"));
|
|
8
|
-
const OcmSNOControlGroup = ({ highAvailabilityMode, featureSupportLevelData, }) => {
|
|
9
|
-
const newFeatureSupportLevelContext = (0, newFeatureSupportLevels_1.useNewFeatureSupportLevel)();
|
|
10
|
-
const snoSupportLevel = newFeatureSupportLevelContext.getFeatureSupportLevel('SNO', featureSupportLevelData);
|
|
11
|
-
const snoExpansion = newFeatureSupportLevelContext.isFeatureSupported('SINGLE_NODE_EXPANSION', featureSupportLevelData);
|
|
12
|
-
const isDisabled = newFeatureSupportLevelContext.isFeatureDisabled('SNO', featureSupportLevelData);
|
|
13
|
-
const disabledReason = newFeatureSupportLevelContext.getFeatureDisabledReason('SNO', featureSupportLevelData);
|
|
14
|
-
const isSupportedVersionAvailable = newFeatureSupportLevelContext.isFeatureSupported('SNO', featureSupportLevelData);
|
|
15
|
-
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
16
|
-
react_1.default.createElement(OcmSingleNodeCheckbox_1.default, { name: "highAvailabilityMode", isDisabled: isDisabled, disabledReason: disabledReason, isSupportedVersionAvailable: isSupportedVersionAvailable, supportLevel: snoSupportLevel }),
|
|
17
|
-
highAvailabilityMode === 'None' && snoSupportLevel && (react_1.default.createElement(OcmSNODisclaimer_1.default, { isDisabled: isDisabled, snoSupportLevel: snoSupportLevel, snoExpansionSupported: snoExpansion }))));
|
|
18
|
-
};
|
|
19
|
-
exports.default = OcmSNOControlGroup;
|
|
20
|
-
//# sourceMappingURL=OcmSNOControlGroup.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"OcmSNOControlGroup.js","sourceRoot":"","sources":["../../../../../lib/ocm/components/clusterConfiguration/OcmSNOControlGroup.tsx"],"names":[],"mappings":";;;AAAA,0DAA0B;AAE1B,4FAA4D;AAC5D,gGAG4D;AAC5D,kFAAkD;AAOlD,MAAM,kBAAkB,GAAG,CAAC,EAC1B,oBAAoB,EACpB,uBAAuB,GACC,EAAE,EAAE;IAC5B,MAAM,6BAA6B,GAAG,IAAA,mDAAyB,GAAE,CAAC;IAElE,MAAM,eAAe,GAAG,6BAA6B,CAAC,sBAAsB,CAC1E,KAAK,EACL,uBAAuB,CACxB,CAAC;IACF,MAAM,YAAY,GAAG,6BAA6B,CAAC,kBAAkB,CACnE,uBAAuB,EACvB,uBAAuB,CACxB,CAAC;IACF,MAAM,UAAU,GAAG,6BAA6B,CAAC,iBAAiB,CAChE,KAAK,EACL,uBAAuB,CACxB,CAAC;IACF,MAAM,cAAc,GAAG,6BAA6B,CAAC,wBAAwB,CAC3E,KAAK,EACL,uBAAuB,CACxB,CAAC;IAEF,MAAM,2BAA2B,GAAG,6BAA6B,CAAC,kBAAkB,CAClF,KAAK,EACL,uBAAuB,CACxB,CAAC;IACF,OAAO,CACL;QACE,8BAAC,+BAAqB,IACpB,IAAI,EAAC,sBAAsB,EAC3B,UAAU,EAAE,UAAU,EACtB,cAAc,EAAE,cAAc,EAC9B,2BAA2B,EAAE,2BAA2B,EACxD,YAAY,EAAE,eAAe,GAC7B;QACD,oBAAoB,KAAK,MAAM,IAAI,eAAe,IAAI,CACrD,8BAAC,0BAAgB,IACf,UAAU,EAAE,UAAU,EACtB,eAAe,EAAE,eAAe,EAChC,qBAAqB,EAAE,YAAY,GACnC,CACH,CACA,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,kBAAkB,CAAC"}
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { ClusterDetailsValues } from '../../../common/components/clusterWizard/types';
|
|
3
|
-
import OcmSingleNodeCheckbox from './OcmSingleNodeCheckbox';
|
|
4
|
-
import {
|
|
5
|
-
NewFeatureSupportLevelMap,
|
|
6
|
-
useNewFeatureSupportLevel,
|
|
7
|
-
} from '../../../common/components/newFeatureSupportLevels';
|
|
8
|
-
import OcmSNODisclaimer from './OcmSNODisclaimer';
|
|
9
|
-
|
|
10
|
-
type OcmSNOControlGroupProps = {
|
|
11
|
-
highAvailabilityMode: ClusterDetailsValues['highAvailabilityMode'];
|
|
12
|
-
featureSupportLevelData?: NewFeatureSupportLevelMap;
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
const OcmSNOControlGroup = ({
|
|
16
|
-
highAvailabilityMode,
|
|
17
|
-
featureSupportLevelData,
|
|
18
|
-
}: OcmSNOControlGroupProps) => {
|
|
19
|
-
const newFeatureSupportLevelContext = useNewFeatureSupportLevel();
|
|
20
|
-
|
|
21
|
-
const snoSupportLevel = newFeatureSupportLevelContext.getFeatureSupportLevel(
|
|
22
|
-
'SNO',
|
|
23
|
-
featureSupportLevelData,
|
|
24
|
-
);
|
|
25
|
-
const snoExpansion = newFeatureSupportLevelContext.isFeatureSupported(
|
|
26
|
-
'SINGLE_NODE_EXPANSION',
|
|
27
|
-
featureSupportLevelData,
|
|
28
|
-
);
|
|
29
|
-
const isDisabled = newFeatureSupportLevelContext.isFeatureDisabled(
|
|
30
|
-
'SNO',
|
|
31
|
-
featureSupportLevelData,
|
|
32
|
-
);
|
|
33
|
-
const disabledReason = newFeatureSupportLevelContext.getFeatureDisabledReason(
|
|
34
|
-
'SNO',
|
|
35
|
-
featureSupportLevelData,
|
|
36
|
-
);
|
|
37
|
-
|
|
38
|
-
const isSupportedVersionAvailable = newFeatureSupportLevelContext.isFeatureSupported(
|
|
39
|
-
'SNO',
|
|
40
|
-
featureSupportLevelData,
|
|
41
|
-
);
|
|
42
|
-
return (
|
|
43
|
-
<>
|
|
44
|
-
<OcmSingleNodeCheckbox
|
|
45
|
-
name="highAvailabilityMode"
|
|
46
|
-
isDisabled={isDisabled}
|
|
47
|
-
disabledReason={disabledReason}
|
|
48
|
-
isSupportedVersionAvailable={isSupportedVersionAvailable}
|
|
49
|
-
supportLevel={snoSupportLevel}
|
|
50
|
-
/>
|
|
51
|
-
{highAvailabilityMode === 'None' && snoSupportLevel && (
|
|
52
|
-
<OcmSNODisclaimer
|
|
53
|
-
isDisabled={isDisabled}
|
|
54
|
-
snoSupportLevel={snoSupportLevel}
|
|
55
|
-
snoExpansionSupported={snoExpansion}
|
|
56
|
-
/>
|
|
57
|
-
)}
|
|
58
|
-
</>
|
|
59
|
-
);
|
|
60
|
-
};
|
|
61
|
-
|
|
62
|
-
export default OcmSNOControlGroup;
|