@openshift-assisted/ui-lib 2.41.2 → 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/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/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
|
@@ -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,14 +1,22 @@
|
|
|
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');
|
|
@@ -43,10 +51,14 @@ interface ControlPlaneNodesDropdownProps {
|
|
|
43
51
|
const isDropdownItemEnabled = (
|
|
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
|
|
|
@@ -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
108
|
setValue(DEFAULT_VALUE);
|
|
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 = isDropdownItemEnabled(
|
|
119
|
+
const isItemEnabled = isDropdownItemEnabled(
|
|
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
|
};
|
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
import {
|
|
3
|
+
FormGroup,
|
|
4
|
+
Split,
|
|
5
|
+
SplitItem,
|
|
6
|
+
Tooltip,
|
|
7
|
+
Dropdown,
|
|
8
|
+
DropdownItem,
|
|
9
|
+
MenuToggle,
|
|
10
|
+
MenuToggleElement,
|
|
11
|
+
} from '@patternfly/react-core';
|
|
5
12
|
import { useField } from 'formik';
|
|
6
13
|
import {
|
|
7
14
|
architectureData,
|
|
@@ -119,7 +126,7 @@ const CpuArchitectureDropdown = ({
|
|
|
119
126
|
]);
|
|
120
127
|
|
|
121
128
|
const onSelect = React.useCallback(
|
|
122
|
-
(event?: React.
|
|
129
|
+
(event?: React.MouseEvent<Element, MouseEvent>): void => {
|
|
123
130
|
const selectedCpuArch = event?.currentTarget.id as SupportedCpuArchitecture;
|
|
124
131
|
setValue(selectedCpuArch);
|
|
125
132
|
setOpen(false);
|
|
@@ -146,31 +153,30 @@ const CpuArchitectureDropdown = ({
|
|
|
146
153
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
147
154
|
}, [cpuArchitectures, openshiftVersion, selectedCpuArchitecture]);
|
|
148
155
|
|
|
149
|
-
const toggle = React.
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
),
|
|
160
|
-
[setOpen, currentCpuArch],
|
|
156
|
+
const toggle = (toggleRef: React.Ref<MenuToggleElement>) => (
|
|
157
|
+
<MenuToggle
|
|
158
|
+
id={fieldId}
|
|
159
|
+
ref={toggleRef}
|
|
160
|
+
onClick={() => setOpen(!isOpen)}
|
|
161
|
+
isExpanded={isOpen}
|
|
162
|
+
className="pf-v5-u-w-100"
|
|
163
|
+
>
|
|
164
|
+
{currentCpuArch}
|
|
165
|
+
</MenuToggle>
|
|
161
166
|
);
|
|
162
167
|
|
|
163
168
|
return (
|
|
164
169
|
<FormGroup id={`form-control__${fieldId}`} fieldId={fieldId} label={'CPU architecture'}>
|
|
165
170
|
<Dropdown
|
|
166
171
|
{...field}
|
|
167
|
-
id={fieldId}
|
|
168
|
-
dropdownItems={enabledItems}
|
|
172
|
+
id={`${fieldId}-dropdown`}
|
|
169
173
|
toggle={toggle}
|
|
170
174
|
isOpen={isOpen}
|
|
171
|
-
className="pf-v5-u-w-100"
|
|
172
175
|
onSelect={onSelect}
|
|
173
|
-
|
|
176
|
+
onOpenChange={() => setOpen(!isOpen)}
|
|
177
|
+
>
|
|
178
|
+
{enabledItems}
|
|
179
|
+
</Dropdown>
|
|
174
180
|
</FormGroup>
|
|
175
181
|
);
|
|
176
182
|
};
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { FormGroup } from '@patternfly/react-core';
|
|
2
|
+
import { FormGroup, Tooltip } from '@patternfly/react-core';
|
|
3
3
|
import {
|
|
4
4
|
DropdownItem,
|
|
5
|
-
|
|
5
|
+
Divider,
|
|
6
6
|
Dropdown,
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
MenuToggle,
|
|
8
|
+
MenuToggleElement,
|
|
9
|
+
DropdownList,
|
|
10
|
+
} from '@patternfly/react-core';
|
|
10
11
|
import { useField } from 'formik';
|
|
11
12
|
import {
|
|
12
13
|
CpuArchitecture,
|
|
@@ -47,74 +48,74 @@ export const DiscoveryImageTypeDropdown = ({
|
|
|
47
48
|
key="full-iso"
|
|
48
49
|
id="full-iso"
|
|
49
50
|
description={'Use when configuring custom networking for easier debugging'}
|
|
51
|
+
value={discoveryImageTypes['full-iso']}
|
|
50
52
|
>
|
|
51
53
|
{discoveryImageTypes['full-iso']}
|
|
52
54
|
</DropdownItem>,
|
|
53
|
-
<
|
|
54
|
-
<
|
|
55
|
-
key="minimal-iso"
|
|
56
|
-
|
|
57
|
-
description={'Use when provisioning with default networking options'}
|
|
58
|
-
tooltip={
|
|
55
|
+
<Divider component="li" key="separator1" />,
|
|
56
|
+
<Tooltip
|
|
57
|
+
key="minimal-iso-tooltip"
|
|
58
|
+
content={
|
|
59
59
|
isMinimalISODisabled ? (
|
|
60
60
|
<p>{'This provisioning type is not supported when using s390x architecture'}</p>
|
|
61
61
|
) : undefined
|
|
62
62
|
}
|
|
63
|
-
isAriaDisabled={!!isMinimalISODisabled}
|
|
64
63
|
>
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
64
|
+
<DropdownItem
|
|
65
|
+
key="minimal-iso"
|
|
66
|
+
id="minimal-iso"
|
|
67
|
+
description={'Use when provisioning with default networking options'}
|
|
68
|
+
isAriaDisabled={!!isMinimalISODisabled}
|
|
69
|
+
value={discoveryImageTypes['minimal-iso']}
|
|
70
|
+
>
|
|
71
|
+
{discoveryImageTypes['minimal-iso']}
|
|
72
|
+
</DropdownItem>
|
|
73
|
+
</Tooltip>,
|
|
74
|
+
<Divider component="li" key="separator2" />,
|
|
68
75
|
<DropdownItem
|
|
69
76
|
key="discovery-image-ipxe"
|
|
70
77
|
id="discovery-image-ipxe"
|
|
71
78
|
description={'Use when your platform does not support booting from ISO'}
|
|
79
|
+
value={discoveryImageTypes['discovery-image-ipxe']}
|
|
72
80
|
>
|
|
73
81
|
{discoveryImageTypes['discovery-image-ipxe']}
|
|
74
82
|
</DropdownItem>,
|
|
75
83
|
];
|
|
76
84
|
|
|
77
|
-
const onSelect = React.
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
setValue(imageTypeSelection);
|
|
85
|
-
setOpen(false);
|
|
86
|
-
onChange(imageTypeSelection === 'discovery-image-ipxe');
|
|
87
|
-
},
|
|
88
|
-
[setCurrent, setOpen, defaultValue, setValue, onChange],
|
|
89
|
-
);
|
|
85
|
+
const onSelect = (event?: React.MouseEvent<Element, MouseEvent>, value?: string | number) => {
|
|
86
|
+
const imageTypeSelection = value as string;
|
|
87
|
+
setCurrent(imageTypeSelection ? imageTypeSelection : '');
|
|
88
|
+
setValue(event?.currentTarget.id as DiscoveryImageType);
|
|
89
|
+
setOpen(false);
|
|
90
|
+
onChange(imageTypeSelection === 'discovery-image-ipxe');
|
|
91
|
+
};
|
|
90
92
|
|
|
91
|
-
const toggle = React.
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
[setOpen, current, value, isDisabled],
|
|
93
|
+
const toggle = (toggleRef: React.Ref<MenuToggleElement>) => (
|
|
94
|
+
<MenuToggle
|
|
95
|
+
id={fieldId}
|
|
96
|
+
className="pf-v5-u-w-100"
|
|
97
|
+
ref={toggleRef}
|
|
98
|
+
isFullWidth
|
|
99
|
+
onClick={() => setOpen(!isOpen)}
|
|
100
|
+
isExpanded={isOpen}
|
|
101
|
+
isDisabled={isDisabled}
|
|
102
|
+
>
|
|
103
|
+
{current || value}
|
|
104
|
+
</MenuToggle>
|
|
104
105
|
);
|
|
105
106
|
|
|
106
107
|
return (
|
|
107
108
|
<FormGroup fieldId={fieldId} label={'Provisioning type'}>
|
|
108
109
|
<Dropdown
|
|
109
110
|
{...field}
|
|
110
|
-
|
|
111
|
-
id={fieldId}
|
|
112
|
-
dropdownItems={dropdownItems}
|
|
111
|
+
id={`${fieldId}-dropdown`}
|
|
113
112
|
toggle={toggle}
|
|
114
113
|
isOpen={isOpen}
|
|
115
|
-
className="pf-v5-u-w-100"
|
|
116
114
|
onSelect={onSelect}
|
|
117
|
-
|
|
115
|
+
onOpenChange={() => setOpen(!isOpen)}
|
|
116
|
+
>
|
|
117
|
+
<DropdownList>{dropdownItems}</DropdownList>
|
|
118
|
+
</Dropdown>
|
|
118
119
|
</FormGroup>
|
|
119
120
|
);
|
|
120
121
|
};
|
|
@@ -5,11 +5,13 @@ import {
|
|
|
5
5
|
HelperText,
|
|
6
6
|
HelperTextItem,
|
|
7
7
|
Tooltip,
|
|
8
|
+
Dropdown,
|
|
9
|
+
DropdownItem,
|
|
10
|
+
MenuToggle,
|
|
11
|
+
MenuToggleElement,
|
|
8
12
|
} from '@patternfly/react-core';
|
|
9
|
-
import { Dropdown, DropdownItem, DropdownToggle } from '@patternfly/react-core/deprecated';
|
|
10
13
|
import { useField, useFormikContext } from 'formik';
|
|
11
14
|
import { ClusterDetailsValues, getFieldId } from '../../../common';
|
|
12
|
-
import { CaretDownIcon } from '@patternfly/react-icons/dist/js/icons/caret-down-icon';
|
|
13
15
|
import { OcmCheckboxField, OcmInputField } from '../ui/OcmFormFields';
|
|
14
16
|
import { ManagedDomain } from '@openshift-assisted/types/assisted-installer-service';
|
|
15
17
|
import { clusterExistsReason } from '../featureSupportLevels/featureStateUtils';
|
|
@@ -62,25 +64,25 @@ export const OcmBaseDomainField = ({
|
|
|
62
64
|
));
|
|
63
65
|
}, [managedDomains]);
|
|
64
66
|
|
|
65
|
-
const dropdownToggle = React.
|
|
67
|
+
const dropdownToggle = (toggleRef: React.Ref<MenuToggleElement>) => {
|
|
66
68
|
const selectedDomain = managedDomains.find((d) => d.domain === value);
|
|
67
69
|
return (
|
|
68
|
-
<
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
70
|
+
<MenuToggle
|
|
71
|
+
ref={toggleRef}
|
|
72
|
+
onClick={() => setOpen(!isOpen)}
|
|
73
|
+
isExpanded={isOpen}
|
|
72
74
|
className="pf-v5-u-w-100"
|
|
73
75
|
>
|
|
74
76
|
{selectedDomain ? getManagedDomainLabel(selectedDomain) : 'Base domain'}
|
|
75
|
-
</
|
|
77
|
+
</MenuToggle>
|
|
76
78
|
);
|
|
77
|
-
}
|
|
79
|
+
};
|
|
78
80
|
|
|
79
81
|
const toggleRedHatDnsService = (checked: boolean) =>
|
|
80
82
|
setValue((checked && managedDomains.map((d) => d.domain)[0]) || '');
|
|
81
83
|
|
|
82
84
|
const onSelect = React.useCallback(
|
|
83
|
-
(event?: React.
|
|
85
|
+
(event?: React.MouseEvent<Element, MouseEvent>): void => {
|
|
84
86
|
const selectedDomain = event?.currentTarget.id || '';
|
|
85
87
|
setValue(selectedDomain);
|
|
86
88
|
setOpen(false);
|
|
@@ -111,11 +113,12 @@ export const OcmBaseDomainField = ({
|
|
|
111
113
|
{useRedHatDnsService ? (
|
|
112
114
|
<Dropdown
|
|
113
115
|
toggle={dropdownToggle}
|
|
114
|
-
dropdownItems={dropdownItems}
|
|
115
116
|
isOpen={isOpen}
|
|
116
117
|
onSelect={onSelect}
|
|
117
|
-
|
|
118
|
-
|
|
118
|
+
onOpenChange={() => setOpen(!isOpen)}
|
|
119
|
+
>
|
|
120
|
+
{dropdownItems}
|
|
121
|
+
</Dropdown>
|
|
119
122
|
) : (
|
|
120
123
|
<OcmInputField
|
|
121
124
|
name={INPUT_NAME}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Alert, AlertVariant, List, ListItem } from '@patternfly/react-core';
|
|
3
|
+
import { useTranslation } from '../../../common/hooks/use-translation-wrapper';
|
|
4
|
+
|
|
5
|
+
const OcmTNADisclaimer = () => {
|
|
6
|
+
const { t } = useTranslation();
|
|
7
|
+
|
|
8
|
+
return (
|
|
9
|
+
<Alert
|
|
10
|
+
variant={AlertVariant.info}
|
|
11
|
+
title={t('ai:Requirements for Two Node control plane OpenShift')}
|
|
12
|
+
isInline
|
|
13
|
+
>
|
|
14
|
+
<List>
|
|
15
|
+
<ListItem>
|
|
16
|
+
{t('ai:Two nodes control plane OpenShift must include an additional arbiter node.')}
|
|
17
|
+
</ListItem>
|
|
18
|
+
</List>
|
|
19
|
+
</Alert>
|
|
20
|
+
);
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export default OcmTNADisclaimer;
|