@openshift-assisted/ui-lib 2.41.2 → 2.42.1
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/ClusterDeploymentDetailsForm.d.ts.map +1 -1
- package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentHostsDiscovery.d.ts.map +1 -1
- package/build/@types/cim/components/ClusterDeployment/LabelsSelector.d.ts.map +1 -1
- package/build/@types/cim/components/ClusterDeployment/ScaleUpForm.d.ts +1 -0
- package/build/@types/cim/components/ClusterDeployment/ScaleUpForm.d.ts.map +1 -1
- package/build/@types/cim/components/InfraEnv/AddHostDropdown.d.ts.map +1 -1
- package/build/@types/cim/components/InfraEnv/EnvironmentDetails.d.ts.map +1 -1
- package/build/@types/cim/components/InfraEnv/InfraEnvOpenShiftVersionDropdown.d.ts.map +1 -1
- package/build/@types/cim/components/common/CpuArchitectureDropdown.d.ts.map +1 -1
- package/build/@types/cim/components/helpers/versions.d.ts.map +1 -1
- package/build/@types/cim/components/modals/ScaleUpModal.d.ts +1 -0
- package/build/@types/cim/components/modals/ScaleUpModal.d.ts.map +1 -1
- package/build/@types/common/components/clusterConfiguration/ControlPlaneNodesDropdown.d.ts.map +1 -1
- package/build/@types/common/components/clusterConfiguration/DiskEncryptionFields/DiskEncryptionControlGroup.d.ts.map +1 -1
- package/build/@types/common/components/clusterConfiguration/DiskEncryptionFields/DiskEncryptionValues.d.ts +1 -0
- package/build/@types/common/components/clusterConfiguration/DiskEncryptionFields/DiskEncryptionValues.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/DiskRole.d.ts.map +1 -1
- package/build/@types/common/components/hosts/TableToolbar.d.ts.map +1 -1
- package/build/@types/common/components/newFeatureSupportLevels/types.d.ts +1 -1
- package/build/@types/common/components/newFeatureSupportLevels/types.d.ts.map +1 -1
- package/build/@types/common/components/operators/operatorDescriptions.d.ts +23 -0
- package/build/@types/common/components/operators/operatorDescriptions.d.ts.map +1 -0
- package/build/@types/common/components/operators/operatorSpecs.d.ts +25 -4
- package/build/@types/common/components/operators/operatorSpecs.d.ts.map +1 -1
- package/build/@types/common/components/ui/ClusterEventsToolbar.d.ts.map +1 -1
- package/build/@types/common/components/ui/OpenShiftVersionDropdown.d.ts +0 -1
- package/build/@types/common/components/ui/OpenShiftVersionDropdown.d.ts.map +1 -1
- package/build/@types/common/components/ui/SimpleDropdown.d.ts +2 -2
- package/build/@types/common/components/ui/SimpleDropdown.d.ts.map +1 -1
- package/build/@types/common/config/constants.d.ts.map +1 -1
- package/build/@types/common/config/docs_links.d.ts +1 -2
- package/build/@types/common/config/docs_links.d.ts.map +1 -1
- package/build/@types/common/index.d.ts +1 -0
- package/build/@types/common/index.d.ts.map +1 -1
- package/build/@types/common/types/ui-settings.d.ts +1 -0
- package/build/@types/common/types/ui-settings.d.ts.map +1 -1
- package/build/@types/common/utils.d.ts +8 -0
- package/build/@types/common/utils.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterConfiguration/ControlPlaneNodesDropdown.d.ts +2 -0
- package/build/@types/ocm/components/clusterConfiguration/ControlPlaneNodesDropdown.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterConfiguration/CpuArchitectureDropdown.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterConfiguration/DiscoveryImageTypeDropdown.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterConfiguration/OcmBaseDomainField.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterConfiguration/OcmClusterDetailsFormFields.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterConfiguration/OcmTNADisclaimer.d.ts +4 -0
- package/build/@types/ocm/components/clusterConfiguration/OcmTNADisclaimer.d.ts.map +1 -0
- package/build/@types/ocm/components/clusterConfiguration/manifestsConfiguration/components/FolderDropdown.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterConfiguration/networkConfiguration/SubnetsDropdown.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterConfiguration/operators/utils.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterConfiguration/platformIntegration/ExternalPlatformDropdown.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterConfiguration/review/ReviewOperatorsTable.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterConfiguration/staticIp/commonValidationSchemas.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterWizard/ClusterDetails.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterWizard/OperatorsBundle.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterWizard/OperatorsSelect.d.ts.map +1 -1
- package/build/@types/ocm/components/featureSupportLevels/featureStateUtils.d.ts.map +1 -1
- package/build/@types/ocm/components/hosts/use-hosts-table.d.ts.map +1 -1
- package/build/@types/ocm/services/DiskEncryptionService.d.ts +1 -1
- package/build/@types/ocm/services/DiskEncryptionService.d.ts.map +1 -1
- package/build/@types/ocm/store/slices/current-cluster/slice.d.ts +1 -1
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentDetailsForm.js +2 -2
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentDetailsForm.js.map +1 -1
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentHostsDiscovery.js +2 -1
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentHostsDiscovery.js.map +1 -1
- package/build/cjs/cim/components/ClusterDeployment/LabelsSelector.js +5 -5
- package/build/cjs/cim/components/ClusterDeployment/LabelsSelector.js.map +1 -1
- package/build/cjs/cim/components/ClusterDeployment/ScaleUpForm.js +2 -2
- package/build/cjs/cim/components/ClusterDeployment/ScaleUpForm.js.map +1 -1
- package/build/cjs/cim/components/InfraEnv/AddHostDropdown.js +29 -28
- package/build/cjs/cim/components/InfraEnv/AddHostDropdown.js.map +1 -1
- package/build/cjs/cim/components/InfraEnv/EnvironmentDetails.js +16 -14
- package/build/cjs/cim/components/InfraEnv/EnvironmentDetails.js.map +1 -1
- package/build/cjs/cim/components/InfraEnv/InfraEnvAgentTable.js +2 -2
- package/build/cjs/cim/components/InfraEnv/InfraEnvAgentTable.js.map +1 -1
- package/build/cjs/cim/components/InfraEnv/InfraEnvOpenShiftVersionDropdown.js +4 -8
- package/build/cjs/cim/components/InfraEnv/InfraEnvOpenShiftVersionDropdown.js.map +1 -1
- package/build/cjs/cim/components/common/CpuArchitectureDropdown.js +3 -3
- package/build/cjs/cim/components/common/CpuArchitectureDropdown.js.map +1 -1
- package/build/cjs/cim/components/helpers/versions.js +1 -1
- package/build/cjs/cim/components/helpers/versions.js.map +1 -1
- package/build/cjs/cim/components/modals/MassApproveAction.js +2 -2
- package/build/cjs/cim/components/modals/MassApproveAction.js.map +1 -1
- package/build/cjs/cim/components/modals/ScaleUpModal.js +3 -3
- package/build/cjs/cim/components/modals/ScaleUpModal.js.map +1 -1
- package/build/cjs/common/components/clusterConfiguration/ControlPlaneNodesDropdown.js +5 -6
- package/build/cjs/common/components/clusterConfiguration/ControlPlaneNodesDropdown.js.map +1 -1
- package/build/cjs/common/components/clusterConfiguration/DiskEncryptionFields/DiskEncryptionControlGroup.js +11 -6
- package/build/cjs/common/components/clusterConfiguration/DiskEncryptionFields/DiskEncryptionControlGroup.js.map +1 -1
- package/build/cjs/common/components/clusterDetail/OperatorsProgressItem.js +1 -1
- package/build/cjs/common/components/clusterDetail/OperatorsProgressItem.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/DiskRole.js +5 -5
- package/build/cjs/common/components/hosts/DiskRole.js.map +1 -1
- package/build/cjs/common/components/hosts/HostToolbarActions.js +3 -3
- package/build/cjs/common/components/hosts/HostToolbarActions.js.map +1 -1
- package/build/cjs/common/components/hosts/TableToolbar.js +15 -15
- package/build/cjs/common/components/hosts/TableToolbar.js.map +1 -1
- package/build/cjs/common/components/operators/operatorDescriptions.js +26 -0
- package/build/cjs/common/components/operators/operatorDescriptions.js.map +1 -0
- package/build/cjs/common/components/operators/operatorSpecs.js +332 -189
- package/build/cjs/common/components/operators/operatorSpecs.js.map +1 -1
- package/build/cjs/common/components/ui/ClusterEventsToolbar.js +1 -1
- package/build/cjs/common/components/ui/ClusterEventsToolbar.js.map +1 -1
- package/build/cjs/common/components/ui/OpenShiftVersionDropdown.js +13 -16
- package/build/cjs/common/components/ui/OpenShiftVersionDropdown.js.map +1 -1
- package/build/cjs/common/components/ui/SimpleDropdown.js +4 -5
- package/build/cjs/common/components/ui/SimpleDropdown.js.map +1 -1
- package/build/cjs/common/config/constants.js +10 -0
- package/build/cjs/common/config/constants.js.map +1 -1
- package/build/cjs/common/config/docs_links.js +41 -25
- package/build/cjs/common/config/docs_links.js.map +1 -1
- package/build/cjs/common/index.js +1 -0
- package/build/cjs/common/index.js.map +1 -1
- package/build/cjs/common/utils.js +27 -1
- package/build/cjs/common/utils.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/ControlPlaneNodesDropdown.js +23 -13
- package/build/cjs/ocm/components/clusterConfiguration/ControlPlaneNodesDropdown.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/CpuArchitectureDropdown.js +3 -5
- package/build/cjs/ocm/components/clusterConfiguration/CpuArchitectureDropdown.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/DiscoveryImageTypeDropdown.js +15 -17
- package/build/cjs/ocm/components/clusterConfiguration/DiscoveryImageTypeDropdown.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/OcmBaseDomainField.js +5 -7
- package/build/cjs/ocm/components/clusterConfiguration/OcmBaseDomainField.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/OcmClusterDetailsFormFields.js +16 -0
- package/build/cjs/ocm/components/clusterConfiguration/OcmClusterDetailsFormFields.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/OcmOperatorProgressItem.js +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/OcmOperatorProgressItem.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/OcmTNADisclaimer.js +14 -0
- package/build/cjs/ocm/components/clusterConfiguration/OcmTNADisclaimer.js.map +1 -0
- package/build/cjs/ocm/components/clusterConfiguration/manifestsConfiguration/components/FolderDropdown.js +6 -8
- package/build/cjs/ocm/components/clusterConfiguration/manifestsConfiguration/components/FolderDropdown.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/networkConfiguration/SubnetsDropdown.js +7 -10
- package/build/cjs/ocm/components/clusterConfiguration/networkConfiguration/SubnetsDropdown.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/operators/OperatorCheckbox.js +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/operators/OperatorCheckbox.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/operators/utils.js +2 -1
- package/build/cjs/ocm/components/clusterConfiguration/operators/utils.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/platformIntegration/ExternalPlatformDropdown.js +11 -13
- package/build/cjs/ocm/components/clusterConfiguration/platformIntegration/ExternalPlatformDropdown.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/review/ReviewOperatorsTable.js +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/review/ReviewOperatorsTable.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/staticIp/commonValidationSchemas.js +4 -0
- package/build/cjs/ocm/components/clusterConfiguration/staticIp/commonValidationSchemas.js.map +1 -1
- package/build/cjs/ocm/components/clusterDetail/ProgressBarAlerts.js +1 -1
- package/build/cjs/ocm/components/clusterDetail/ProgressBarAlerts.js.map +1 -1
- package/build/cjs/ocm/components/clusterWizard/ClusterDetails.js +7 -4
- package/build/cjs/ocm/components/clusterWizard/ClusterDetails.js.map +1 -1
- package/build/cjs/ocm/components/clusterWizard/OperatorsBundle.js +14 -10
- package/build/cjs/ocm/components/clusterWizard/OperatorsBundle.js.map +1 -1
- package/build/cjs/ocm/components/clusterWizard/OperatorsSelect.js +13 -15
- package/build/cjs/ocm/components/clusterWizard/OperatorsSelect.js.map +1 -1
- package/build/cjs/ocm/components/featureSupportLevels/featureStateUtils.js +5 -15
- package/build/cjs/ocm/components/featureSupportLevels/featureStateUtils.js.map +1 -1
- package/build/cjs/ocm/components/hosts/use-hosts-table.js +9 -2
- package/build/cjs/ocm/components/hosts/use-hosts-table.js.map +1 -1
- package/build/cjs/ocm/services/DiskEncryptionService.js +11 -3
- package/build/cjs/ocm/services/DiskEncryptionService.js.map +1 -1
- package/lib/cim/components/ClusterDeployment/ClusterDeploymentDetailsForm.tsx +4 -2
- package/lib/cim/components/ClusterDeployment/ClusterDeploymentHostsDiscovery.tsx +8 -6
- package/lib/cim/components/ClusterDeployment/LabelsSelector.tsx +27 -14
- package/lib/cim/components/ClusterDeployment/ScaleUpForm.tsx +3 -0
- package/lib/cim/components/InfraEnv/AddHostDropdown.tsx +60 -47
- package/lib/cim/components/InfraEnv/EnvironmentDetails.tsx +7 -10
- package/lib/cim/components/InfraEnv/InfraEnvAgentTable.tsx +1 -1
- package/lib/cim/components/InfraEnv/InfraEnvOpenShiftVersionDropdown.tsx +34 -22
- package/lib/cim/components/common/CpuArchitectureDropdown.tsx +6 -3
- package/lib/cim/components/helpers/versions.ts +2 -2
- package/lib/cim/components/modals/MassApproveAction.tsx +1 -1
- package/lib/cim/components/modals/ScaleUpModal.tsx +5 -2
- package/lib/common/components/clusterConfiguration/ControlPlaneNodesDropdown.tsx +30 -17
- package/lib/common/components/clusterConfiguration/DiskEncryptionFields/DiskEncryptionControlGroup.tsx +20 -5
- package/lib/common/components/clusterConfiguration/DiskEncryptionFields/DiskEncryptionValues.ts +1 -0
- package/lib/common/components/clusterDetail/OperatorsProgressItem.tsx +1 -1
- package/lib/common/components/clusterWizard/clusterDetailsValidation.ts +3 -0
- package/lib/common/components/clusterWizard/types.ts +1 -0
- package/lib/common/components/hosts/DiskRole.tsx +23 -17
- package/lib/common/components/hosts/HostToolbarActions.tsx +1 -1
- package/lib/common/components/hosts/TableToolbar.tsx +54 -48
- package/lib/common/components/newFeatureSupportLevels/types.ts +1 -0
- package/lib/common/components/operators/operatorDescriptions.tsx +58 -0
- package/lib/common/components/operators/operatorSpecs.tsx +425 -257
- package/lib/common/components/ui/ClusterEventsToolbar.tsx +1 -0
- package/lib/common/components/ui/OpenShiftVersionDropdown.tsx +38 -44
- package/lib/common/components/ui/SimpleDropdown.tsx +23 -22
- package/lib/common/config/constants.ts +11 -0
- package/lib/common/config/docs_links.ts +44 -30
- package/lib/common/index.ts +1 -0
- package/lib/common/types/ui-settings.ts +1 -0
- package/lib/common/utils.ts +30 -0
- package/lib/ocm/components/clusterConfiguration/ControlPlaneNodesDropdown.tsx +46 -15
- package/lib/ocm/components/clusterConfiguration/CpuArchitectureDropdown.tsx +26 -20
- package/lib/ocm/components/clusterConfiguration/DiscoveryImageTypeDropdown.tsx +47 -46
- package/lib/ocm/components/clusterConfiguration/OcmBaseDomainField.tsx +16 -13
- package/lib/ocm/components/clusterConfiguration/OcmClusterDetailsFormFields.tsx +33 -1
- package/lib/ocm/components/clusterConfiguration/OcmOperatorProgressItem.tsx +1 -1
- package/lib/ocm/components/clusterConfiguration/OcmTNADisclaimer.tsx +23 -0
- package/lib/ocm/components/clusterConfiguration/manifestsConfiguration/components/FolderDropdown.tsx +26 -26
- package/lib/ocm/components/clusterConfiguration/networkConfiguration/SubnetsDropdown.tsx +26 -30
- package/lib/ocm/components/clusterConfiguration/operators/OperatorCheckbox.tsx +1 -1
- package/lib/ocm/components/clusterConfiguration/operators/utils.tsx +2 -1
- package/lib/ocm/components/clusterConfiguration/platformIntegration/ExternalPlatformDropdown.tsx +34 -33
- package/lib/ocm/components/clusterConfiguration/review/ReviewOperatorsTable.tsx +2 -1
- package/lib/ocm/components/clusterConfiguration/staticIp/commonValidationSchemas.tsx +4 -0
- package/lib/ocm/components/clusterDetail/ProgressBarAlerts.tsx +1 -1
- package/lib/ocm/components/clusterWizard/ClusterDetails.tsx +15 -5
- package/lib/ocm/components/clusterWizard/OperatorsBundle.tsx +15 -17
- package/lib/ocm/components/clusterWizard/OperatorsSelect.tsx +33 -27
- package/lib/ocm/components/featureSupportLevels/featureStateUtils.ts +7 -18
- package/lib/ocm/components/hosts/use-hosts-table.tsx +9 -3
- package/lib/ocm/services/DiskEncryptionService.ts +7 -1
- package/package.json +3 -3
- package/build/cjs/common/components/ui/OpenShiftVersionDropdown.css +0 -9
- package/lib/common/components/ui/OpenShiftVersionDropdown.css +0 -9
|
@@ -235,6 +235,7 @@ const ClusterEventsToolbar = ({
|
|
|
235
235
|
isOpen={isHostExpanded}
|
|
236
236
|
onSelect={(e, value) => onHostSelect(value as string, isSelectEventChecked(e))}
|
|
237
237
|
onOpenChange={onHostToggle}
|
|
238
|
+
isScrollable
|
|
238
239
|
toggle={(toggleRef: React.Ref<MenuToggleElement>) => (
|
|
239
240
|
<MenuToggle
|
|
240
241
|
id="cluster-events-hosts-dropdown-button"
|
|
@@ -5,15 +5,13 @@ import {
|
|
|
5
5
|
FormHelperText,
|
|
6
6
|
HelperTextItem,
|
|
7
7
|
Button,
|
|
8
|
-
} from '@patternfly/react-core';
|
|
9
|
-
import {
|
|
10
8
|
DropdownItem,
|
|
11
|
-
|
|
9
|
+
MenuToggle,
|
|
10
|
+
MenuToggleElement,
|
|
12
11
|
Dropdown,
|
|
13
12
|
DropdownGroup,
|
|
14
|
-
|
|
15
|
-
} from '@patternfly/react-core
|
|
16
|
-
import { CaretDownIcon } from '@patternfly/react-icons/dist/js/icons/caret-down-icon';
|
|
13
|
+
Divider,
|
|
14
|
+
} from '@patternfly/react-core';
|
|
17
15
|
|
|
18
16
|
import { OpenshiftVersionOptionType } from '../../types';
|
|
19
17
|
import { useTranslation } from '../../hooks/use-translation-wrapper';
|
|
@@ -22,7 +20,6 @@ import { getFieldId } from './formik';
|
|
|
22
20
|
import ExternalLink from './ExternalLink';
|
|
23
21
|
import { OCP_RELEASES_PAGE } from '../../config';
|
|
24
22
|
import { ClusterDetailsValues, ItemDropdown } from '../clusterWizard';
|
|
25
|
-
import './OpenShiftVersionDropdown.css';
|
|
26
23
|
|
|
27
24
|
export type HelperTextType = (value: string | undefined, inModal?: boolean) => JSX.Element | null;
|
|
28
25
|
|
|
@@ -77,13 +74,13 @@ export const OpenShiftVersionDropdown = ({
|
|
|
77
74
|
let lastY: string | undefined = '';
|
|
78
75
|
const dropdownItems = parsedVersionsForItems.parsedVersions.map(({ y, versions }) => {
|
|
79
76
|
const items = versions.map(({ value, label }) => (
|
|
80
|
-
<DropdownItem key={value} id={value}>
|
|
77
|
+
<DropdownItem key={value} id={value} value={value}>
|
|
81
78
|
{label}
|
|
82
79
|
</DropdownItem>
|
|
83
80
|
));
|
|
84
81
|
|
|
85
82
|
if (lastY !== null && y !== lastY) {
|
|
86
|
-
items.push(<
|
|
83
|
+
items.push(<Divider key={`separator-${y || ''}`} />);
|
|
87
84
|
}
|
|
88
85
|
lastY = y;
|
|
89
86
|
return items;
|
|
@@ -93,28 +90,24 @@ export const OpenShiftVersionDropdown = ({
|
|
|
93
90
|
let lastCustomY: string | undefined = '';
|
|
94
91
|
const customDropdownItems = parsedVersionsForCustomItems.parsedVersions.map(({ y, versions }) => {
|
|
95
92
|
const customItems = versions.map(({ value, label }) => (
|
|
96
|
-
<DropdownItem key={value} id={value}>
|
|
93
|
+
<DropdownItem key={value} id={value} value={value}>
|
|
97
94
|
{label}
|
|
98
95
|
</DropdownItem>
|
|
99
96
|
));
|
|
100
|
-
|
|
101
97
|
if (lastCustomY !== null && y !== lastCustomY) {
|
|
102
|
-
customItems.push(<
|
|
98
|
+
customItems.push(<Divider key={`separator-${y || ''}`} />);
|
|
103
99
|
}
|
|
104
100
|
lastCustomY = y;
|
|
105
|
-
|
|
106
101
|
return customItems;
|
|
107
102
|
});
|
|
108
103
|
|
|
109
104
|
const dropdownGroup = [
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
hidden={customDropdownItems.length === 0}
|
|
117
|
-
>
|
|
105
|
+
dropdownItems.length && (
|
|
106
|
+
<DropdownGroup label="Latest releases" key="latest-releases">
|
|
107
|
+
{dropdownItems}
|
|
108
|
+
</DropdownGroup>
|
|
109
|
+
),
|
|
110
|
+
<DropdownGroup label="Custom releases" key="custom-releases">
|
|
118
111
|
{customDropdownItems}
|
|
119
112
|
</DropdownGroup>,
|
|
120
113
|
<DropdownGroup key="all-available-versions">
|
|
@@ -132,9 +125,9 @@ export const OpenShiftVersionDropdown = ({
|
|
|
132
125
|
];
|
|
133
126
|
|
|
134
127
|
const onSelect = React.useCallback(
|
|
135
|
-
(event?: React.
|
|
136
|
-
const newLabel = event?.currentTarget.
|
|
137
|
-
const newValue =
|
|
128
|
+
(event?: React.MouseEvent<Element, MouseEvent>, val?: string | number) => {
|
|
129
|
+
const newLabel = event?.currentTarget.textContent;
|
|
130
|
+
const newValue = (val as string) || '';
|
|
138
131
|
if (newLabel && newValue !== 'all-versions') {
|
|
139
132
|
setCurrent(newLabel);
|
|
140
133
|
setValue(newValue);
|
|
@@ -144,19 +137,18 @@ export const OpenShiftVersionDropdown = ({
|
|
|
144
137
|
[setValue],
|
|
145
138
|
);
|
|
146
139
|
|
|
147
|
-
const
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
[setOpen, current, isDisabled],
|
|
140
|
+
const dropdownToggle = (toggleRef: React.Ref<MenuToggleElement>) => (
|
|
141
|
+
<MenuToggle
|
|
142
|
+
id={fieldId}
|
|
143
|
+
className="pf-v5-u-w-100"
|
|
144
|
+
ref={toggleRef}
|
|
145
|
+
isFullWidth
|
|
146
|
+
onClick={() => setOpen(!isOpen)}
|
|
147
|
+
isDisabled={isDisabled}
|
|
148
|
+
isExpanded={isOpen}
|
|
149
|
+
>
|
|
150
|
+
{current}
|
|
151
|
+
</MenuToggle>
|
|
160
152
|
);
|
|
161
153
|
|
|
162
154
|
const helperText = getHelperText && getHelperText(field.value);
|
|
@@ -170,14 +162,16 @@ export const OpenShiftVersionDropdown = ({
|
|
|
170
162
|
>
|
|
171
163
|
<Dropdown
|
|
172
164
|
{...field}
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
onSelect={onSelect}
|
|
176
|
-
dropdownItems={dropdownGroup}
|
|
177
|
-
toggle={toggle}
|
|
165
|
+
id={`${fieldId}-dropdown`}
|
|
166
|
+
shouldFocusToggleOnSelect
|
|
178
167
|
isOpen={isOpen}
|
|
179
|
-
|
|
180
|
-
|
|
168
|
+
onSelect={onSelect}
|
|
169
|
+
onOpenChange={() => setOpen(!isOpen)}
|
|
170
|
+
toggle={dropdownToggle}
|
|
171
|
+
>
|
|
172
|
+
{dropdownGroup}
|
|
173
|
+
</Dropdown>
|
|
174
|
+
|
|
181
175
|
{helperText && (
|
|
182
176
|
<FormHelperText>
|
|
183
177
|
<HelperText>
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import {
|
|
3
3
|
DropdownItem,
|
|
4
|
-
|
|
4
|
+
MenuToggle,
|
|
5
|
+
MenuToggleElement,
|
|
5
6
|
Dropdown,
|
|
6
|
-
|
|
7
|
-
} from '@patternfly/react-core
|
|
8
|
-
import { CaretDownIcon } from '@patternfly/react-icons/dist/js/icons/caret-down-icon';
|
|
7
|
+
DropdownPopperProps,
|
|
8
|
+
} from '@patternfly/react-core';
|
|
9
9
|
import { HostRole } from '../../../common/types/hosts';
|
|
10
10
|
import './SimpleDropdown.css';
|
|
11
11
|
|
|
@@ -16,7 +16,7 @@ type SimpleDropdownProps = {
|
|
|
16
16
|
setValue: (value?: string) => void;
|
|
17
17
|
isDisabled: boolean;
|
|
18
18
|
idPrefix?: string;
|
|
19
|
-
menuAppendTo?:
|
|
19
|
+
menuAppendTo?: DropdownPopperProps['appendTo'];
|
|
20
20
|
};
|
|
21
21
|
|
|
22
22
|
export const SimpleDropdown = ({
|
|
@@ -36,37 +36,38 @@ export const SimpleDropdown = ({
|
|
|
36
36
|
));
|
|
37
37
|
|
|
38
38
|
const onSelect = React.useCallback(
|
|
39
|
-
(event?: React.
|
|
39
|
+
(event?: React.MouseEvent<Element, MouseEvent>) => {
|
|
40
40
|
setValue(event?.currentTarget.id);
|
|
41
41
|
setOpen(false);
|
|
42
42
|
},
|
|
43
43
|
[setValue, setOpen],
|
|
44
44
|
);
|
|
45
45
|
|
|
46
|
-
const toggle = React.
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
[setOpen, current, isDisabled, defaultValue, idPrefix],
|
|
46
|
+
const toggle = (toggleRef: React.Ref<MenuToggleElement>) => (
|
|
47
|
+
<MenuToggle
|
|
48
|
+
id={idPrefix ? `${idPrefix}-dropdown-toggle-items` : undefined}
|
|
49
|
+
className="role-dropdown"
|
|
50
|
+
ref={toggleRef}
|
|
51
|
+
variant="plainText"
|
|
52
|
+
onClick={() => setOpen(!isOpen)}
|
|
53
|
+
isDisabled={isDisabled}
|
|
54
|
+
isExpanded={isOpen}
|
|
55
|
+
>
|
|
56
|
+
{current || defaultValue}
|
|
57
|
+
</MenuToggle>
|
|
59
58
|
);
|
|
60
59
|
|
|
61
60
|
return (
|
|
62
61
|
<Dropdown
|
|
63
62
|
onSelect={onSelect}
|
|
64
|
-
|
|
63
|
+
onOpenChange={() => setOpen(!isOpen)}
|
|
65
64
|
toggle={toggle}
|
|
66
65
|
isOpen={isOpen}
|
|
67
66
|
isPlain
|
|
68
67
|
id={idPrefix ? `${idPrefix}-dropdown-toggle` : undefined}
|
|
69
|
-
|
|
70
|
-
|
|
68
|
+
popperProps={{ appendTo: menuAppendTo }}
|
|
69
|
+
>
|
|
70
|
+
{dropdownItems}
|
|
71
|
+
</Dropdown>
|
|
71
72
|
);
|
|
72
73
|
};
|
|
@@ -5,10 +5,12 @@ import {
|
|
|
5
5
|
ClusterValidationId,
|
|
6
6
|
DiskRole,
|
|
7
7
|
Event,
|
|
8
|
+
HostRoleUpdateParams,
|
|
8
9
|
HostValidationId,
|
|
9
10
|
} from '@openshift-assisted/types/assisted-installer-service';
|
|
10
11
|
import { ValidationGroup as ClusterValidationGroup } from '../types/clusters';
|
|
11
12
|
import buildManifest from '@openshift-assisted/ui-lib/package.json';
|
|
13
|
+
import { isInOcm } from '../api/axiosClient';
|
|
12
14
|
|
|
13
15
|
export const POLLING_INTERVAL = 10 * 1000;
|
|
14
16
|
export const EVENTS_POLLING_INTERVAL = 10 * 1000 * 6;
|
|
@@ -33,6 +35,15 @@ export const hostRoles = (t: TFunction): HostRole[] => [
|
|
|
33
35
|
'ai:Runs application workloads. Connect at least 5 hosts to enable dedicated workers.',
|
|
34
36
|
),
|
|
35
37
|
},
|
|
38
|
+
...(isInOcm
|
|
39
|
+
? [
|
|
40
|
+
{
|
|
41
|
+
value: 'arbiter' as HostRoleUpdateParams,
|
|
42
|
+
label: t('ai:Arbiter'),
|
|
43
|
+
description: t('ai:Prevents split-brain scenarios and maintains quorum.'),
|
|
44
|
+
},
|
|
45
|
+
]
|
|
46
|
+
: []),
|
|
36
47
|
];
|
|
37
48
|
|
|
38
49
|
export const clusterStatusLabels = (t: TFunction): { [key in Cluster['status']]: string } => ({
|
|
@@ -1,14 +1,24 @@
|
|
|
1
|
-
|
|
1
|
+
import { isMajorMinorVersionEqualOrGreater } from '../utils';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
const LATEST_OPENSHIFT_DOCS_VERSION = '4.18';
|
|
4
|
+
const MIN_OPENSHIFT_DOCS_VERSION = '4.14';
|
|
5
|
+
|
|
6
|
+
const getDocsOpenshiftVersion = (ocpVersion?: string): string => {
|
|
4
7
|
if (!ocpVersion) {
|
|
5
|
-
return
|
|
8
|
+
return LATEST_OPENSHIFT_DOCS_VERSION;
|
|
9
|
+
}
|
|
10
|
+
if (isMajorMinorVersionEqualOrGreater(MIN_OPENSHIFT_DOCS_VERSION, ocpVersion)) {
|
|
11
|
+
return MIN_OPENSHIFT_DOCS_VERSION;
|
|
6
12
|
}
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
13
|
+
if (isMajorMinorVersionEqualOrGreater(ocpVersion, LATEST_OPENSHIFT_DOCS_VERSION)) {
|
|
14
|
+
return LATEST_OPENSHIFT_DOCS_VERSION;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
const versionParts = ocpVersion.split('.').slice(0, 2).map(Number);
|
|
18
|
+
if (versionParts.length < 2) {
|
|
19
|
+
return LATEST_OPENSHIFT_DOCS_VERSION;
|
|
10
20
|
}
|
|
11
|
-
return
|
|
21
|
+
return `${versionParts[0]}.${versionParts[1]}`;
|
|
12
22
|
};
|
|
13
23
|
|
|
14
24
|
export const getYearForAssistedInstallerDocumentationLink = () => {
|
|
@@ -31,19 +41,19 @@ export const CLUSTER_MANAGER_SITE_LINK = 'https://console.redhat.com/openshift/i
|
|
|
31
41
|
export const PULL_SECRET_INFO_LINK = CLUSTER_MANAGER_SITE_LINK;
|
|
32
42
|
|
|
33
43
|
export const getEncryptingDiskDuringInstallationDocsLink = (ocpVersion?: string) =>
|
|
34
|
-
`https://docs.redhat.com/en/documentation/openshift_container_platform/${
|
|
44
|
+
`https://docs.redhat.com/en/documentation/openshift_container_platform/${getDocsOpenshiftVersion(
|
|
35
45
|
ocpVersion,
|
|
36
46
|
)}/html/installation_configuration/installing-customizing#installation-special-config-encrypt-disk_installing-customizing`;
|
|
37
47
|
|
|
38
48
|
//Networking page
|
|
39
|
-
export const getOpenShiftNetworkingDocsLink = (ocpVersion?: string) =>
|
|
40
|
-
|
|
49
|
+
export const getOpenShiftNetworkingDocsLink = (ocpVersion?: string) => {
|
|
50
|
+
const variant = isMajorMinorVersionEqualOrGreater(ocpVersion, '4.18')
|
|
51
|
+
? 'user-provisioned-infrastructure'
|
|
52
|
+
: 'installing-bare-metal';
|
|
53
|
+
return `https://docs.redhat.com/en/documentation/openshift_container_platform/${getDocsOpenshiftVersion(
|
|
41
54
|
ocpVersion,
|
|
42
|
-
)}/html/installing_on_bare_metal/${
|
|
43
|
-
|
|
44
|
-
? 'user-provisioned-infrastructure'
|
|
45
|
-
: 'installing-bare-metal'
|
|
46
|
-
}#installation-network-user-infra_installing-bare-metal`;
|
|
55
|
+
)}/html/installing_on_bare_metal/${variant}#installation-network-user-infra_installing-bare-metal`;
|
|
56
|
+
};
|
|
47
57
|
|
|
48
58
|
export const SSH_GENERATION_DOC_LINK = 'https://www.redhat.com/sysadmin/configure-ssh-keygen';
|
|
49
59
|
|
|
@@ -52,7 +62,7 @@ export const getOcpConsoleNodesPage = (ocpConsoleUrl: string) =>
|
|
|
52
62
|
`${ocpConsoleUrl}/k8s/cluster/nodes`;
|
|
53
63
|
|
|
54
64
|
export const getApproveNodesInClLink = (ocpVersion?: string) =>
|
|
55
|
-
`https://docs.redhat.com/en/documentation/openshift_container_platform/${
|
|
65
|
+
`https://docs.redhat.com/en/documentation/openshift_container_platform/${getDocsOpenshiftVersion(
|
|
56
66
|
ocpVersion,
|
|
57
67
|
)}/html/installing_on_any_platform/installing-platform-agnostic#installation-approve-csrs_installing-platform-agnostic`;
|
|
58
68
|
|
|
@@ -90,18 +100,20 @@ export const OSC_REQUIREMENTS_LINK =
|
|
|
90
100
|
|
|
91
101
|
export const CNV_LINK = 'https://cloud.redhat.com/learn/topics/virtualization/';
|
|
92
102
|
|
|
93
|
-
export const
|
|
94
|
-
|
|
103
|
+
export const getKmmDocsLink = (ocpVersion?: string) =>
|
|
104
|
+
`https://docs.redhat.com/en/documentation/openshift_container_platform/${getDocsOpenshiftVersion(
|
|
105
|
+
ocpVersion,
|
|
106
|
+
)}/html/specialized_hardware_and_driver_enablement/kernel-module-management-operator`;
|
|
95
107
|
|
|
96
108
|
export const ODF_LINK = 'https://www.redhat.com/en/resources/openshift-data-foundation-datasheet';
|
|
97
109
|
|
|
98
110
|
export const getMceDocsLink = (ocpVersion?: string) =>
|
|
99
|
-
`https://docs.redhat.com/en/documentation/openshift_container_platform/${
|
|
111
|
+
`https://docs.redhat.com/en/documentation/openshift_container_platform/${getDocsOpenshiftVersion(
|
|
100
112
|
ocpVersion,
|
|
101
113
|
)}/html/architecture/about-the-multicluster-engine-for-kubernetes-operator`;
|
|
102
114
|
|
|
103
115
|
export const getLvmsDocsLink = (ocpVersion?: string) =>
|
|
104
|
-
`https://docs.redhat.com/en/documentation/openshift_container_platform/${
|
|
116
|
+
`https://docs.redhat.com/en/documentation/openshift_container_platform/${getDocsOpenshiftVersion(
|
|
105
117
|
ocpVersion,
|
|
106
118
|
)}/html/storage/configuring-persistent-storage#overview-of-lvm-storage-functionality_ways-to-provision-local-storage`;
|
|
107
119
|
|
|
@@ -118,7 +130,7 @@ export const NODE_MAINTENANCE_LINK =
|
|
|
118
130
|
'https://docs.redhat.com/en/documentation/workload_availability_for_red_hat_openshift/latest/html/remediation_fencing_and_maintenance/node-maintenance-operator';
|
|
119
131
|
|
|
120
132
|
export const getKubeDeschedulerLink = (ocpVersion?: string) =>
|
|
121
|
-
`https://docs.redhat.com/en/documentation/openshift_container_platform/${
|
|
133
|
+
`https://docs.redhat.com/en/documentation/openshift_container_platform/${getDocsOpenshiftVersion(
|
|
122
134
|
ocpVersion,
|
|
123
135
|
)}/html/nodes/controlling-pod-placement-onto-nodes-scheduling#descheduler`;
|
|
124
136
|
|
|
@@ -146,37 +158,39 @@ export const OPENSHIFT_AI_LINK =
|
|
|
146
158
|
export const OSC_LINK = 'https://docs.redhat.com/en/documentation/openshift_sandboxed_containers';
|
|
147
159
|
|
|
148
160
|
export const getMtuLink = (ocpVersion?: string) =>
|
|
149
|
-
`https://docs.redhat.com/en/documentation/openshift_container_platform/${
|
|
161
|
+
`https://docs.redhat.com/en/documentation/openshift_container_platform/${getDocsOpenshiftVersion(
|
|
150
162
|
ocpVersion,
|
|
151
163
|
)}/html/networking/changing-cluster-network-mtu#nw-cluster-mtu-change-about_changing-cluster-network-mtu`;
|
|
152
164
|
|
|
153
165
|
export const AUTHORINO_OPERATOR_LINK = 'https://github.com/Kuadrant/authorino-operator';
|
|
154
166
|
|
|
155
167
|
export const getLsoLink = (ocpVersion?: string) =>
|
|
156
|
-
`https://docs.openshift.com/container-platform/${
|
|
168
|
+
`https://docs.openshift.com/container-platform/${getDocsOpenshiftVersion(
|
|
157
169
|
ocpVersion,
|
|
158
170
|
)}/storage/persistent_storage/persistent_storage_local/ways-to-provision-local-storage.html`;
|
|
159
171
|
|
|
160
172
|
export const getNmstateLink = (ocpVersion?: string) =>
|
|
161
|
-
`https://docs.openshift.com/container-platform/${
|
|
173
|
+
`https://docs.openshift.com/container-platform/${getDocsOpenshiftVersion(
|
|
162
174
|
ocpVersion,
|
|
163
175
|
)}/networking/networking_operators/k8s-nmstate-about-the-k8s-nmstate-operator.html`;
|
|
164
176
|
|
|
165
177
|
export const getNodeFeatureDiscoveryLink = (ocpVersion?: string) =>
|
|
166
|
-
`https://docs.openshift.com/container-platform/${
|
|
178
|
+
`https://docs.openshift.com/container-platform/${getDocsOpenshiftVersion(
|
|
167
179
|
ocpVersion,
|
|
168
180
|
)}/hardware_enablement/psap-node-feature-discovery-operator.html`;
|
|
169
181
|
|
|
170
|
-
export const getNvidiaGpuLink = (ocpVersion?: string) =>
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
182
|
+
export const getNvidiaGpuLink = (ocpVersion?: string) => {
|
|
183
|
+
const version = getDocsOpenshiftVersion(ocpVersion);
|
|
184
|
+
return isMajorMinorVersionEqualOrGreater(ocpVersion, '4.18')
|
|
185
|
+
? `https://docs.redhat.com/en/documentation/openshift_container_platform/${version}/html/virtualization/managing-vms#virt-configuring-virtual-gpus`
|
|
186
|
+
: `https://docs.openshift.com/container-platform/${version}/virt/virtual_machines/advanced_vm_management/virt-configuring-virtual-gpus.html`;
|
|
187
|
+
};
|
|
174
188
|
|
|
175
189
|
export const PIPELINES_OPERATOR_LINK =
|
|
176
190
|
'https://docs.openshift.com/pipelines/1.17/install_config/installing-pipelines.html';
|
|
177
191
|
|
|
178
192
|
export const getServiceMeshLink = (ocpVersion?: string) =>
|
|
179
|
-
`https://docs.openshift.com/container-platform/${
|
|
193
|
+
`https://docs.openshift.com/container-platform/${getDocsOpenshiftVersion(
|
|
180
194
|
ocpVersion,
|
|
181
195
|
)}/service_mesh/v1x/preparing-ossm-installation.html`;
|
|
182
196
|
|
package/lib/common/index.ts
CHANGED
package/lib/common/utils.ts
CHANGED
|
@@ -111,3 +111,33 @@ export const getMajorMinorVersion = (version = '') => {
|
|
|
111
111
|
const match = /[0-9].[0-9][0-9]?/g.exec(version);
|
|
112
112
|
return match?.[0] || '';
|
|
113
113
|
};
|
|
114
|
+
|
|
115
|
+
// Converts an Openshift version to a comparable integer
|
|
116
|
+
const getComparableVersionInt = (version: string): number => {
|
|
117
|
+
const majorMinorParts = version.split('.').slice(0, 2).map(Number);
|
|
118
|
+
if (majorMinorParts.length < 2 || majorMinorParts.some(isNaN)) {
|
|
119
|
+
// If the version doesn't have the required format, returning 0 makes it be considered
|
|
120
|
+
// older than any other version
|
|
121
|
+
return 0;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
const major = majorMinorParts[0];
|
|
125
|
+
const minor = majorMinorParts[1];
|
|
126
|
+
|
|
127
|
+
// Assumes minor versions will not go past 999
|
|
128
|
+
return major * 1000 + minor;
|
|
129
|
+
};
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* Handles version comparison for major and minor parts only.
|
|
133
|
+
*
|
|
134
|
+
* @param checkVersion the version we want to know about
|
|
135
|
+
* @param toVersion the version we want to test against
|
|
136
|
+
* @returns true if "checkVersion" is equal or greater than "toVersion" (major and minor only)
|
|
137
|
+
*/
|
|
138
|
+
export const isMajorMinorVersionEqualOrGreater = (checkVersion = '', toVersion: string) => {
|
|
139
|
+
const checkVersionNum = getComparableVersionInt(checkVersion);
|
|
140
|
+
const toVersionNum = getComparableVersionInt(toVersion);
|
|
141
|
+
|
|
142
|
+
return checkVersionNum >= toVersionNum;
|
|
143
|
+
};
|
|
@@ -1,18 +1,26 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
|
|
2
|
+
import {
|
|
3
|
+
FormGroup,
|
|
4
|
+
Tooltip,
|
|
5
|
+
Dropdown,
|
|
6
|
+
DropdownItem,
|
|
7
|
+
MenuToggle,
|
|
8
|
+
MenuToggleElement,
|
|
9
|
+
DropdownList,
|
|
10
|
+
} from '@patternfly/react-core';
|
|
4
11
|
import { useField } from 'formik';
|
|
5
12
|
import { getFieldId, PopoverIcon } from '../../../common';
|
|
6
13
|
import {
|
|
7
14
|
NewFeatureSupportLevelMap,
|
|
8
15
|
useNewFeatureSupportLevel,
|
|
9
16
|
} from '../../../common/components/newFeatureSupportLevels';
|
|
10
|
-
import
|
|
17
|
+
import OcmTNADisclaimer from './OcmTNADisclaimer';
|
|
11
18
|
import toNumber from 'lodash-es/toNumber';
|
|
19
|
+
import OcmSNODisclaimer from './OcmSNODisclaimer';
|
|
12
20
|
|
|
13
21
|
const INPUT_NAME = 'controlPlaneCount';
|
|
14
22
|
const fieldId = getFieldId(INPUT_NAME, 'input');
|
|
15
|
-
const
|
|
23
|
+
export const DEFAULT_VALUE_CPN = 3;
|
|
16
24
|
|
|
17
25
|
export const ControlPlaneNodesLabel = () => {
|
|
18
26
|
return (
|
|
@@ -40,13 +48,17 @@ interface ControlPlaneNodesDropdownProps {
|
|
|
40
48
|
featureSupportLevelData?: NewFeatureSupportLevelMap | null;
|
|
41
49
|
}
|
|
42
50
|
|
|
43
|
-
const
|
|
51
|
+
export const isCPNDropdownItemEnabled = (
|
|
44
52
|
controlPlaneNodeCount: number,
|
|
45
53
|
isNonStandardControlPlaneEnabled: boolean,
|
|
54
|
+
isTnaEnabled: boolean,
|
|
46
55
|
): boolean => {
|
|
47
56
|
if (controlPlaneNodeCount === 4 || controlPlaneNodeCount === 5) {
|
|
48
57
|
return isNonStandardControlPlaneEnabled;
|
|
49
58
|
}
|
|
59
|
+
if (controlPlaneNodeCount === 2) {
|
|
60
|
+
return isTnaEnabled;
|
|
61
|
+
}
|
|
50
62
|
return true;
|
|
51
63
|
};
|
|
52
64
|
|
|
@@ -71,7 +83,7 @@ const ControlPlaneNodesDropdown: React.FC<ControlPlaneNodesDropdownProps> = ({
|
|
|
71
83
|
);
|
|
72
84
|
|
|
73
85
|
const disabledReason =
|
|
74
|
-
'This option is not available with the current configurations. Make sure that OpenShift version is 4.
|
|
86
|
+
'This option is not available with the current configurations. Make sure that OpenShift version is 4.19 or newer and no external platform integration is selected.';
|
|
75
87
|
|
|
76
88
|
const isNonStandardControlPlaneEnabled = newFeatureSupportLevelContext.isFeatureSupported(
|
|
77
89
|
'NON_STANDARD_HA_CONTROL_PLANE',
|
|
@@ -80,25 +92,35 @@ const ControlPlaneNodesDropdown: React.FC<ControlPlaneNodesDropdownProps> = ({
|
|
|
80
92
|
|
|
81
93
|
const options: ControlPlaneNodesOption[] = [
|
|
82
94
|
{ value: 1, label: '1 (Single Node OpenShift)' },
|
|
95
|
+
{ value: 2, label: '2 (Two-Nodes Arbiter)' },
|
|
83
96
|
{ value: 3, label: '3 (highly available cluster)' },
|
|
84
97
|
{ value: 4, label: '4 (highly available cluster+)' },
|
|
85
98
|
{ value: 5, label: '5 (highly available cluster++)' },
|
|
86
99
|
];
|
|
87
100
|
|
|
101
|
+
const isTnaEnabled = newFeatureSupportLevelContext.isFeatureSupported(
|
|
102
|
+
'TNA',
|
|
103
|
+
featureSupportLevelData ?? undefined,
|
|
104
|
+
);
|
|
105
|
+
|
|
88
106
|
React.useEffect(() => {
|
|
89
107
|
if (!field.value) {
|
|
90
|
-
setValue(
|
|
108
|
+
setValue(DEFAULT_VALUE_CPN);
|
|
91
109
|
}
|
|
92
110
|
}, [field.value, setValue]);
|
|
93
111
|
|
|
94
|
-
const onSelect = (event?: React.
|
|
112
|
+
const onSelect = (event?: React.MouseEvent<Element, MouseEvent>): void => {
|
|
95
113
|
const selectedValue = event?.currentTarget.id as string;
|
|
96
114
|
setValue(toNumber(selectedValue));
|
|
97
115
|
setOpen(false);
|
|
98
116
|
};
|
|
99
117
|
|
|
100
118
|
const dropdownItems = options.map(({ value, label }) => {
|
|
101
|
-
const isItemEnabled =
|
|
119
|
+
const isItemEnabled = isCPNDropdownItemEnabled(
|
|
120
|
+
value,
|
|
121
|
+
isNonStandardControlPlaneEnabled,
|
|
122
|
+
isTnaEnabled,
|
|
123
|
+
);
|
|
102
124
|
return (
|
|
103
125
|
<DropdownItem key={value} id={value.toString()} isAriaDisabled={!isItemEnabled}>
|
|
104
126
|
<Tooltip hidden={isItemEnabled} content={disabledReason} position="top">
|
|
@@ -108,10 +130,16 @@ const ControlPlaneNodesDropdown: React.FC<ControlPlaneNodesDropdownProps> = ({
|
|
|
108
130
|
);
|
|
109
131
|
});
|
|
110
132
|
|
|
111
|
-
const toggle = (
|
|
112
|
-
<
|
|
133
|
+
const toggle = (toggleRef: React.Ref<MenuToggleElement>) => (
|
|
134
|
+
<MenuToggle
|
|
135
|
+
id={fieldId}
|
|
136
|
+
ref={toggleRef}
|
|
137
|
+
onClick={() => setOpen(!isOpen)}
|
|
138
|
+
isExpanded={isOpen}
|
|
139
|
+
className="pf-v5-u-w-100"
|
|
140
|
+
>
|
|
113
141
|
{options.find((opt) => opt.value === field.value)?.label || 'Select'}
|
|
114
|
-
</
|
|
142
|
+
</MenuToggle>
|
|
115
143
|
);
|
|
116
144
|
|
|
117
145
|
return (
|
|
@@ -122,12 +150,14 @@ const ControlPlaneNodesDropdown: React.FC<ControlPlaneNodesDropdownProps> = ({
|
|
|
122
150
|
fieldId={fieldId}
|
|
123
151
|
>
|
|
124
152
|
<Dropdown
|
|
125
|
-
id={fieldId}
|
|
153
|
+
id={`${fieldId}-dropdown`}
|
|
126
154
|
isOpen={isOpen}
|
|
127
155
|
toggle={toggle}
|
|
128
|
-
|
|
156
|
+
onOpenChange={() => setOpen(!isOpen)}
|
|
129
157
|
onSelect={onSelect}
|
|
130
|
-
|
|
158
|
+
>
|
|
159
|
+
<DropdownList>{dropdownItems}</DropdownList>
|
|
160
|
+
</Dropdown>
|
|
131
161
|
</FormGroup>
|
|
132
162
|
{field.value === 1 && (
|
|
133
163
|
<OcmSNODisclaimer
|
|
@@ -136,6 +166,7 @@ const ControlPlaneNodesDropdown: React.FC<ControlPlaneNodesDropdownProps> = ({
|
|
|
136
166
|
snoExpansionSupported={snoExpansion}
|
|
137
167
|
/>
|
|
138
168
|
)}
|
|
169
|
+
{field.value === 2 && <OcmTNADisclaimer />}
|
|
139
170
|
</>
|
|
140
171
|
);
|
|
141
172
|
};
|