@openshift-assisted/ui-lib 2.41.1 → 2.42.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/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/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.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/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/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/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/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/operatorSpecs.js +6 -4
- package/build/cjs/common/components/operators/operatorSpecs.js.map +1 -1
- package/build/cjs/common/components/storage/DisksTable.js +1 -1
- package/build/cjs/common/components/storage/DisksTable.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 +18 -9
- 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/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/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/staticIp/commonValidationSchemas.js +4 -0
- package/build/cjs/ocm/components/clusterConfiguration/staticIp/commonValidationSchemas.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 +6 -1
- package/build/cjs/ocm/components/clusterWizard/OperatorsBundle.js.map +1 -1
- package/build/cjs/ocm/components/clusterWizard/OperatorsSelect.js +2 -1
- package/build/cjs/ocm/components/clusterWizard/OperatorsSelect.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/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/operators/operatorSpecs.tsx +7 -4
- package/lib/common/components/storage/DisksTable.tsx +1 -1
- 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 +42 -11
- 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/OcmTNADisclaimer.tsx +23 -0
- package/lib/ocm/components/clusterConfiguration/manifestsConfiguration/components/FolderDropdown.tsx +25 -26
- package/lib/ocm/components/clusterConfiguration/networkConfiguration/SubnetsDropdown.tsx +26 -30
- 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/staticIp/commonValidationSchemas.tsx +4 -0
- package/lib/ocm/components/clusterWizard/ClusterDetails.tsx +15 -5
- package/lib/ocm/components/clusterWizard/OperatorsBundle.tsx +5 -1
- package/lib/ocm/components/clusterWizard/OperatorsSelect.tsx +5 -1
- 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
package/lib/ocm/components/clusterConfiguration/manifestsConfiguration/components/FolderDropdown.tsx
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
import {
|
|
3
|
+
HelperText,
|
|
4
|
+
FormGroup,
|
|
5
|
+
Dropdown,
|
|
6
|
+
DropdownItem,
|
|
7
|
+
MenuToggle,
|
|
8
|
+
MenuToggleElement,
|
|
9
|
+
} from '@patternfly/react-core';
|
|
5
10
|
import { useField } from 'formik';
|
|
6
11
|
import { getFieldId } from '../../../../../common/components/ui/formik';
|
|
7
12
|
import { PopoverIcon } from '../../../../../common';
|
|
@@ -40,40 +45,34 @@ export const FolderDropdown = ({ name }: FolderDropdownProps) => {
|
|
|
40
45
|
const [isOpen, setOpen] = React.useState(false);
|
|
41
46
|
const fieldId = getFieldId(name, 'input');
|
|
42
47
|
|
|
43
|
-
const onSelect = React.
|
|
44
|
-
(event
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
},
|
|
48
|
-
[setOpen, setValue],
|
|
49
|
-
);
|
|
48
|
+
const onSelect = (event?: React.MouseEvent<Element, MouseEvent>): void => {
|
|
49
|
+
setValue(event?.currentTarget.id as string);
|
|
50
|
+
setOpen(false);
|
|
51
|
+
};
|
|
50
52
|
|
|
51
|
-
const toggle = React.
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
</DropdownToggle>
|
|
61
|
-
),
|
|
62
|
-
[setOpen, value],
|
|
53
|
+
const toggle = (toggleRef: React.Ref<MenuToggleElement>) => (
|
|
54
|
+
<MenuToggle
|
|
55
|
+
ref={toggleRef}
|
|
56
|
+
onClick={() => setOpen(!isOpen)}
|
|
57
|
+
isExpanded={isOpen}
|
|
58
|
+
className="pf-v5-u-w-100"
|
|
59
|
+
>
|
|
60
|
+
{value || 'manifests'}
|
|
61
|
+
</MenuToggle>
|
|
63
62
|
);
|
|
64
63
|
|
|
65
64
|
return (
|
|
66
65
|
<FormGroup fieldId={fieldId} label={<FolderLabel />} isRequired>
|
|
67
66
|
<Dropdown
|
|
68
67
|
{...field}
|
|
69
|
-
name={name}
|
|
70
68
|
id={fieldId}
|
|
69
|
+
onOpenChange={() => setOpen(!isOpen)}
|
|
71
70
|
onSelect={onSelect}
|
|
72
|
-
dropdownItems={dropdownItems}
|
|
73
71
|
toggle={toggle}
|
|
74
72
|
isOpen={isOpen}
|
|
75
|
-
|
|
76
|
-
|
|
73
|
+
>
|
|
74
|
+
{dropdownItems}
|
|
75
|
+
</Dropdown>
|
|
77
76
|
<HelperText style={{ display: 'inherit' }}>
|
|
78
77
|
{'Manifests can be placed in "manifests" or "openshift" directories.'}
|
|
79
78
|
</HelperText>
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { DropdownItem,
|
|
3
|
-
import { CaretDownIcon } from '@patternfly/react-icons/dist/js/icons/caret-down-icon';
|
|
2
|
+
import { Dropdown, DropdownItem, MenuToggle, MenuToggleElement } from '@patternfly/react-core';
|
|
4
3
|
import { useField } from 'formik';
|
|
5
4
|
import { getFieldId, HostSubnet, NO_SUBNET_SET } from '../../../../common';
|
|
6
5
|
|
|
@@ -64,46 +63,43 @@ export const SubnetsDropdown = ({ name, machineSubnets, isDisabled }: SubnetsDro
|
|
|
64
63
|
}, []);
|
|
65
64
|
|
|
66
65
|
const dropdownItems = itemsSubnets.map(({ value, label, isDisabled }) => (
|
|
67
|
-
<DropdownItem key={value} id={value} isDisabled={isDisabled}>
|
|
66
|
+
<DropdownItem key={value} id={value} isDisabled={isDisabled} value={value}>
|
|
68
67
|
{label}
|
|
69
68
|
</DropdownItem>
|
|
70
69
|
));
|
|
71
70
|
|
|
72
|
-
const onSelect =
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
);
|
|
71
|
+
const onSelect = (
|
|
72
|
+
event?: React.MouseEvent<Element, MouseEvent>,
|
|
73
|
+
value?: string | number,
|
|
74
|
+
): void => {
|
|
75
|
+
setCurrentDisplayValue(value as string);
|
|
76
|
+
setValue(event?.currentTarget.id);
|
|
77
|
+
setOpen(false);
|
|
78
|
+
};
|
|
81
79
|
|
|
82
|
-
const toggle = React.
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
),
|
|
94
|
-
[setOpen, currentDisplayValue, isDisabled],
|
|
80
|
+
const toggle = (toggleRef: React.Ref<MenuToggleElement>) => (
|
|
81
|
+
<MenuToggle
|
|
82
|
+
ref={toggleRef}
|
|
83
|
+
onClick={() => setOpen(!isOpen)}
|
|
84
|
+
isExpanded={isOpen}
|
|
85
|
+
isDisabled={isDisabled}
|
|
86
|
+
className="pf-v5-u-w-100"
|
|
87
|
+
id={fieldId}
|
|
88
|
+
>
|
|
89
|
+
{currentDisplayValue}
|
|
90
|
+
</MenuToggle>
|
|
95
91
|
);
|
|
96
92
|
|
|
97
93
|
return (
|
|
98
94
|
<Dropdown
|
|
99
95
|
{...field}
|
|
100
|
-
|
|
101
|
-
|
|
96
|
+
id={`${fieldId}-dropdown`}
|
|
97
|
+
onOpenChange={() => setOpen(!isOpen)}
|
|
102
98
|
onSelect={onSelect}
|
|
103
|
-
dropdownItems={dropdownItems}
|
|
104
99
|
toggle={toggle}
|
|
105
100
|
isOpen={isOpen}
|
|
106
|
-
|
|
107
|
-
|
|
101
|
+
>
|
|
102
|
+
{dropdownItems}
|
|
103
|
+
</Dropdown>
|
|
108
104
|
);
|
|
109
105
|
};
|
|
@@ -35,7 +35,8 @@ export const getNewOperators = (
|
|
|
35
35
|
const dependencies = getOperatorDependencies(operatorId, preflightRequirements);
|
|
36
36
|
|
|
37
37
|
if (add) {
|
|
38
|
-
|
|
38
|
+
const uniqueOps = new Set([...currentOperators, ...dependencies, operatorId]);
|
|
39
|
+
return Array.from(uniqueOps);
|
|
39
40
|
}
|
|
40
41
|
|
|
41
42
|
const newOperators = currentOperators.filter((op) => op !== operatorId);
|
package/lib/ocm/components/clusterConfiguration/platformIntegration/ExternalPlatformDropdown.tsx
CHANGED
|
@@ -6,9 +6,12 @@ import {
|
|
|
6
6
|
Split,
|
|
7
7
|
SplitItem,
|
|
8
8
|
Tooltip,
|
|
9
|
+
Dropdown,
|
|
10
|
+
DropdownItem,
|
|
11
|
+
MenuToggle,
|
|
12
|
+
MenuToggleElement,
|
|
13
|
+
DropdownList,
|
|
9
14
|
} from '@patternfly/react-core';
|
|
10
|
-
import { Dropdown, DropdownItem, DropdownToggle } from '@patternfly/react-core/deprecated';
|
|
11
|
-
import { CaretDownIcon } from '@patternfly/react-icons/dist/js/icons/caret-down-icon';
|
|
12
15
|
import { useField } from 'formik';
|
|
13
16
|
import {
|
|
14
17
|
CpuArchitecture,
|
|
@@ -199,7 +202,12 @@ export const ExternalPlatformDropdown = ({
|
|
|
199
202
|
] as ExternalPlatformInfo;
|
|
200
203
|
|
|
201
204
|
return (
|
|
202
|
-
<DropdownItem
|
|
205
|
+
<DropdownItem
|
|
206
|
+
value={platform}
|
|
207
|
+
key={platform}
|
|
208
|
+
id={platform}
|
|
209
|
+
isAriaDisabled={disabledReason !== undefined}
|
|
210
|
+
>
|
|
203
211
|
<Split>
|
|
204
212
|
<SplitItem>
|
|
205
213
|
<Tooltip hidden={!disabledReason} content={disabledReason} position="top">
|
|
@@ -234,29 +242,17 @@ export const ExternalPlatformDropdown = ({
|
|
|
234
242
|
);
|
|
235
243
|
});
|
|
236
244
|
|
|
237
|
-
const
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
() => (
|
|
249
|
-
<DropdownToggle
|
|
250
|
-
onToggle={(_event, val) => setOpen(val)}
|
|
251
|
-
toggleIndicator={CaretDownIcon}
|
|
252
|
-
isText
|
|
253
|
-
className="pf-v5-u-w-100"
|
|
254
|
-
isDisabled={dropdownIsDisabled}
|
|
255
|
-
>
|
|
256
|
-
{externalPlatformTypes[field.value as PlatformType]?.label}
|
|
257
|
-
</DropdownToggle>
|
|
258
|
-
),
|
|
259
|
-
[externalPlatformTypes, field, dropdownIsDisabled],
|
|
245
|
+
const toggle = (toggleRef: React.Ref<MenuToggleElement>) => (
|
|
246
|
+
<MenuToggle
|
|
247
|
+
id={fieldId}
|
|
248
|
+
className="pf-v5-u-w-100"
|
|
249
|
+
ref={toggleRef}
|
|
250
|
+
onClick={() => setOpen(!isOpen)}
|
|
251
|
+
isDisabled={dropdownIsDisabled}
|
|
252
|
+
isExpanded={isOpen}
|
|
253
|
+
>
|
|
254
|
+
{externalPlatformTypes[field.value as PlatformType]?.label}
|
|
255
|
+
</MenuToggle>
|
|
260
256
|
);
|
|
261
257
|
|
|
262
258
|
return (
|
|
@@ -272,15 +268,20 @@ export const ExternalPlatformDropdown = ({
|
|
|
272
268
|
distance={7}
|
|
273
269
|
>
|
|
274
270
|
<Dropdown
|
|
275
|
-
{
|
|
276
|
-
id={fieldId}
|
|
277
|
-
dropdownItems={enabledItems}
|
|
271
|
+
id={`${fieldId}-dropdown`}
|
|
278
272
|
toggle={toggle}
|
|
279
273
|
isOpen={isOpen}
|
|
280
|
-
|
|
281
|
-
onSelect={
|
|
282
|
-
|
|
283
|
-
|
|
274
|
+
onOpenChange={() => setOpen(!isOpen)}
|
|
275
|
+
onSelect={(event) => {
|
|
276
|
+
const selectedPlatform = event?.currentTarget.id as PlatformType;
|
|
277
|
+
setValue(selectedPlatform);
|
|
278
|
+
setOpen(false);
|
|
279
|
+
onChange(selectedPlatform);
|
|
280
|
+
}}
|
|
281
|
+
shouldFocusToggleOnSelect
|
|
282
|
+
>
|
|
283
|
+
<DropdownList>{enabledItems}</DropdownList>
|
|
284
|
+
</Dropdown>
|
|
284
285
|
</Tooltip>
|
|
285
286
|
</FormGroup>
|
|
286
287
|
);
|
|
@@ -232,6 +232,10 @@ export const getIpIsNotNetworkOrBroadcastAddressSchema = (
|
|
|
232
232
|
'is-not-network-or-broadcast',
|
|
233
233
|
`The IP address must not match the network or broadcast address`,
|
|
234
234
|
(value) => {
|
|
235
|
+
// Allow both addresses for IPv4 /31 subnets (RFC 3021)
|
|
236
|
+
if (protocolVersion === ProtocolVersion.ipv4 && subnet.endsWith('/31')) {
|
|
237
|
+
return true;
|
|
238
|
+
}
|
|
235
239
|
const subnetAddr = getAddressObject(subnet, protocolVersion);
|
|
236
240
|
if (!subnetAddr) {
|
|
237
241
|
return true;
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { useLocation, useNavigate } from 'react-router-dom-v5-compat';
|
|
3
3
|
import { useDispatch } from 'react-redux';
|
|
4
|
-
import {
|
|
4
|
+
import {
|
|
5
|
+
useAlerts,
|
|
6
|
+
LoadingState,
|
|
7
|
+
ClusterWizardStep,
|
|
8
|
+
ErrorState,
|
|
9
|
+
UISettingsValues,
|
|
10
|
+
} from '../../../common';
|
|
5
11
|
import { usePullSecret } from '../../hooks';
|
|
6
12
|
import { getApiErrorMessage, handleApiError, isUnknownServerError } from '../../../common/api';
|
|
7
13
|
import { setServerUpdateError, updateCluster } from '../../store/slices/current-cluster/slice';
|
|
@@ -81,11 +87,15 @@ const ClusterDetails = ({ cluster, infraEnv }: ClusterDetailsProps) => {
|
|
|
81
87
|
}
|
|
82
88
|
const cluster = await ClustersService.create(params, isAssistedMigration);
|
|
83
89
|
navigate(`../${cluster.id}`, { state: ClusterWizardFlowStateNew });
|
|
84
|
-
|
|
85
|
-
|
|
90
|
+
|
|
91
|
+
const uiPatch: UISettingsValues = { addCustomManifests };
|
|
86
92
|
if (isAssistedMigration) {
|
|
87
|
-
|
|
93
|
+
//For Assisted Migration we need to enable virtualization bundle
|
|
94
|
+
uiPatch.bundlesSelected = ['virtualization'];
|
|
95
|
+
uiPatch.isAssistedMigration = true;
|
|
88
96
|
}
|
|
97
|
+
await UISettingService.update(cluster.id, uiPatch);
|
|
98
|
+
await clusterWizardContext.updateUISettings(uiPatch); // keeps local state current
|
|
89
99
|
} catch (e) {
|
|
90
100
|
handleApiError(e, () =>
|
|
91
101
|
addAlert({ title: 'Failed to create new cluster', message: getApiErrorMessage(e) }),
|
|
@@ -95,7 +105,7 @@ const ClusterDetails = ({ cluster, infraEnv }: ClusterDetailsProps) => {
|
|
|
95
105
|
}
|
|
96
106
|
}
|
|
97
107
|
},
|
|
98
|
-
[clearAlerts, location.search, navigate, addAlert, dispatch],
|
|
108
|
+
[clearAlerts, location.search, navigate, clusterWizardContext, addAlert, dispatch],
|
|
99
109
|
);
|
|
100
110
|
|
|
101
111
|
const navigation = <ClusterWizardNavigation cluster={cluster} />;
|
|
@@ -36,6 +36,7 @@ import { bundleSpecs } from '../clusterConfiguration/operators/bundleSpecs';
|
|
|
36
36
|
import { useOperatorSpecs } from '../../../common/components/operators/operatorSpecs';
|
|
37
37
|
|
|
38
38
|
import './OperatorsBundle.css';
|
|
39
|
+
import { useClusterWizardContext } from './ClusterWizardContext';
|
|
39
40
|
|
|
40
41
|
const BundleLabel = ({ bundle }: { bundle: Bundle }) => {
|
|
41
42
|
const opSpecs = useOperatorSpecs();
|
|
@@ -114,6 +115,7 @@ const BundleCard = ({
|
|
|
114
115
|
const isSNO = useSelector(selectIsCurrentClusterSNO);
|
|
115
116
|
const { isFeatureSupported, getFeatureSupportLevel } = useNewFeatureSupportLevel();
|
|
116
117
|
const opSpecs = useOperatorSpecs();
|
|
118
|
+
const { uiSettings } = useClusterWizardContext();
|
|
117
119
|
|
|
118
120
|
const supportLevel = getBundleSupportLevel(bundle, opSpecs, getFeatureSupportLevel);
|
|
119
121
|
|
|
@@ -130,7 +132,7 @@ const BundleCard = ({
|
|
|
130
132
|
const incompatibleBundle = bundleSpec?.incompatibleBundles?.find((b) =>
|
|
131
133
|
values.selectedBundles.includes(b),
|
|
132
134
|
);
|
|
133
|
-
|
|
135
|
+
const isAssistedMigration = uiSettings?.isAssistedMigration;
|
|
134
136
|
const disabledReason = hasUnsupportedOperators
|
|
135
137
|
? 'Some operators in this bundle are not supported with the current configuration.'
|
|
136
138
|
: isSNO && bundleSpec?.noSNO
|
|
@@ -139,6 +141,8 @@ const BundleCard = ({
|
|
|
139
141
|
? `Bundle cannot be installed together with ${
|
|
140
142
|
bundles.find(({ id }) => id === incompatibleBundle)?.title || incompatibleBundle
|
|
141
143
|
}`
|
|
144
|
+
: isAssistedMigration
|
|
145
|
+
? 'This bundle needs to be selected for clusters created from Migration Assessment'
|
|
142
146
|
: undefined;
|
|
143
147
|
|
|
144
148
|
const onSelect = (checked: boolean) => {
|
|
@@ -74,9 +74,13 @@ const OperatorsSelect = ({
|
|
|
74
74
|
return <LoadingState />;
|
|
75
75
|
}
|
|
76
76
|
|
|
77
|
+
const selectedOperators = values.selectedOperators.filter(
|
|
78
|
+
(opKey) => operators.includes(opKey) && !!opSpecs[opKey],
|
|
79
|
+
);
|
|
80
|
+
|
|
77
81
|
return (
|
|
78
82
|
<ExpandableSection
|
|
79
|
-
toggleText={`Single Operators (${operators.length} | ${
|
|
83
|
+
toggleText={`Single Operators (${operators.length} | ${selectedOperators.length} selected)`}
|
|
80
84
|
onToggle={() => setIsExpanded(!isExpanded)}
|
|
81
85
|
isExpanded={isExpanded}
|
|
82
86
|
data-testid="single-operators-section"
|
|
@@ -60,8 +60,10 @@ import {
|
|
|
60
60
|
selectCurrentClusterPermissionsState,
|
|
61
61
|
selectCurrentClusterState,
|
|
62
62
|
} from '../../store/slices/current-cluster/selectors';
|
|
63
|
+
import { useFeature } from '../../hooks/use-feature';
|
|
63
64
|
|
|
64
65
|
export const useHostsTable = (cluster: Cluster) => {
|
|
66
|
+
const isSingleClusterFeatureEnabled = useFeature('ASSISTED_INSTALLER_SINGLE_CLUSTER_FEATURE');
|
|
65
67
|
const { addAlert } = useAlerts();
|
|
66
68
|
const {
|
|
67
69
|
eventsDialog,
|
|
@@ -248,8 +250,12 @@ export const useHostsTable = (cluster: Cluster) => {
|
|
|
248
250
|
|
|
249
251
|
const actionChecks = React.useMemo(
|
|
250
252
|
() => ({
|
|
251
|
-
canEditRole: (host: Host) =>
|
|
252
|
-
|
|
253
|
+
canEditRole: (host: Host) => {
|
|
254
|
+
if (isSingleClusterFeatureEnabled && host.bootstrap) {
|
|
255
|
+
return false;
|
|
256
|
+
}
|
|
257
|
+
return !isViewerMode && canEditRoleUtil(cluster.status, host.status, isSNO(cluster));
|
|
258
|
+
},
|
|
253
259
|
canInstallHost: (host: Host) => !isViewerMode && canInstallHostUtil(cluster, host.status),
|
|
254
260
|
canEditDisks: (host: Host) => !isViewerMode && canEditDisksUtil(cluster.status, host.status),
|
|
255
261
|
canEnable: (host: Host) => !isViewerMode && canEnableUtil(cluster.status, host.status),
|
|
@@ -259,7 +265,7 @@ export const useHostsTable = (cluster: Cluster) => {
|
|
|
259
265
|
canReset: (host: Host) => !isViewerMode && canResetUtil(cluster.status, host.status),
|
|
260
266
|
canEditHostname: () => !isViewerMode && canEditHostnameUtil(cluster.status),
|
|
261
267
|
}),
|
|
262
|
-
[cluster, isViewerMode],
|
|
268
|
+
[cluster, isViewerMode, isSingleClusterFeatureEnabled],
|
|
263
269
|
);
|
|
264
270
|
|
|
265
271
|
const onReset = React.useCallback(() => {
|
|
@@ -8,9 +8,14 @@ const DiskEncryptionService = {
|
|
|
8
8
|
diskEncryptionEnableOn(
|
|
9
9
|
isEnableOnMasters: boolean,
|
|
10
10
|
isEnableOnWorkers: boolean,
|
|
11
|
+
isEnableOnArbiters: boolean,
|
|
11
12
|
): DiskEncryption['enableOn'] {
|
|
12
13
|
let enableOnParam: DiskEncryption['enableOn'];
|
|
13
|
-
if (isEnableOnMasters && isEnableOnWorkers) enableOnParam = 'all';
|
|
14
|
+
if (isEnableOnMasters && isEnableOnWorkers && isEnableOnArbiters) enableOnParam = 'all';
|
|
15
|
+
else if (isEnableOnMasters && isEnableOnWorkers) enableOnParam = 'masters,workers';
|
|
16
|
+
else if (isEnableOnMasters && isEnableOnArbiters) enableOnParam = 'masters,arbiters';
|
|
17
|
+
else if (isEnableOnWorkers && isEnableOnArbiters) enableOnParam = 'arbiters,workers';
|
|
18
|
+
else if (isEnableOnArbiters) enableOnParam = 'arbiters';
|
|
14
19
|
else if (isEnableOnWorkers) enableOnParam = 'workers';
|
|
15
20
|
else if (isEnableOnMasters) enableOnParam = 'masters';
|
|
16
21
|
else enableOnParam = 'none';
|
|
@@ -28,6 +33,7 @@ const DiskEncryptionService = {
|
|
|
28
33
|
: DiskEncryptionService.diskEncryptionEnableOn(
|
|
29
34
|
values.enableDiskEncryptionOnMasters,
|
|
30
35
|
values.enableDiskEncryptionOnWorkers,
|
|
36
|
+
values.enableDiskEncryptionOnArbiters,
|
|
31
37
|
),
|
|
32
38
|
tangServers:
|
|
33
39
|
values.diskEncryptionMode === 'tang'
|
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.42.0",
|
|
4
|
+
"@openshift-assisted/types": "2.42.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",
|
|
@@ -140,5 +140,5 @@
|
|
|
140
140
|
]
|
|
141
141
|
}
|
|
142
142
|
},
|
|
143
|
-
"version": "2.
|
|
143
|
+
"version": "2.42.0"
|
|
144
144
|
}
|