@openshift-assisted/ui-lib 2.8.2-cim → 2.9.0-cim
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/@types/cim/components/ClusterDeployment/ClusterDeploymentHostSelectionStep.d.ts.map +1 -1
- package/@types/cim/components/ClusterDeployment/ClusterDeploymentHostsDiscoveryStep.d.ts.map +1 -1
- package/@types/cim/components/ClusterDeployment/ClusterDeploymentHostsSelectionBasic.d.ts.map +1 -1
- package/@types/cim/components/ClusterDeployment/validationSchemas.d.ts.map +1 -1
- package/@types/cim/components/Hypershift/HostedClusterWizard/NetworkStep/types.d.ts +0 -1
- package/@types/cim/components/Hypershift/HostedClusterWizard/NetworkStep/types.d.ts.map +1 -1
- package/@types/cim/components/InfraEnv/InfraEnvFormPage.d.ts.map +1 -1
- package/@types/cim/components/modals/AddHostModal.d.ts.map +1 -1
- package/@types/cim/components/modals/EditProxyModal.d.ts.map +1 -1
- package/@types/common/components/clusterConfiguration/DiscoveryImageConfigForm.d.ts +1 -0
- package/@types/common/components/clusterConfiguration/DiscoveryImageConfigForm.d.ts.map +1 -1
- package/@types/common/components/clusterWizard/ClusterWizardStep.d.ts +1 -1
- package/@types/common/components/clusterWizard/ClusterWizardStep.d.ts.map +1 -1
- package/@types/common/components/clusterWizard/networkingSteps/ManagedNetworkingControlGroup.d.ts.map +1 -1
- package/@types/common/components/fetching/EventListFetch.d.ts.map +1 -1
- package/@types/common/components/ui/ClusterEventsToolbar.d.ts.map +1 -1
- package/@types/common/components/ui/StaticTextField.d.ts +1 -1
- package/@types/common/components/ui/StaticTextField.d.ts.map +1 -1
- package/@types/common/components/ui/eventsModal.d.ts.map +1 -1
- package/@types/common/components/ui/formik/validationSchemas.d.ts +5 -1
- package/@types/common/components/ui/formik/validationSchemas.d.ts.map +1 -1
- package/@types/common/config/constants.d.ts +1 -0
- package/@types/common/config/constants.d.ts.map +1 -1
- package/@types/common/types/events.d.ts +1 -0
- package/@types/common/types/events.d.ts.map +1 -1
- package/@types/ocm/components/AddHosts/day2Wizard/Day2ClusterDetails.d.ts.map +1 -1
- package/@types/ocm/components/AddHosts/day2Wizard/Day2StaticIP.d.ts.map +1 -1
- package/@types/ocm/components/AddHosts/day2Wizard/Day2Wizard.d.ts.map +1 -1
- package/@types/ocm/components/HostsClusterDetailTab/HostsClusterDetailTabContent.d.ts.map +1 -1
- package/@types/ocm/components/HostsClusterDetailTab/utils.d.ts.map +1 -1
- package/@types/ocm/components/clusterConfiguration/CpuArchitectureDropdown.d.ts +2 -1
- package/@types/ocm/components/clusterConfiguration/CpuArchitectureDropdown.d.ts.map +1 -1
- package/@types/ocm/components/clusterConfiguration/DiscoveryImageForm.d.ts.map +1 -1
- package/@types/ocm/components/clusterConfiguration/OcmDiscoveryImageConfigForm.d.ts.map +1 -1
- package/@types/ocm/components/clusterConfiguration/networkConfiguration/AdvancedNetworkFields.d.ts.map +1 -1
- package/@types/ocm/components/clusterConfiguration/networkConfiguration/NetworkConfigurationForm.d.ts.map +1 -1
- package/@types/ocm/components/clusterConfiguration/networkConfiguration/StackTypeControl.d.ts.map +1 -1
- package/@types/ocm/components/clusterConfiguration/networkConfiguration/VirtualIPControlGroup.d.ts.map +1 -1
- package/@types/ocm/components/clusterDetail/AssistedInstallerDetailCard.d.ts.map +1 -1
- package/@types/ocm/components/clusterDetail/AssistedInstallerExtraDetailCard.d.ts.map +1 -1
- package/@types/ocm/components/clusters/ClusterPage.d.ts.map +1 -1
- package/@types/ocm/components/featureSupportLevels/FeatureSupportLevelProvider.d.ts.map +1 -1
- package/@types/ocm/components/fetching/fetchEvents.d.ts.map +1 -1
- package/@types/ocm/components/newFeatureSupportLevels/NewFeatureSupportLevelProvider.d.ts.map +1 -1
- package/@types/ocm/hooks/useInfraEnv.d.ts +1 -1
- package/@types/ocm/hooks/useInfraEnv.d.ts.map +1 -1
- package/@types/ocm/hooks/useInfraEnvId.d.ts +1 -1
- package/@types/ocm/hooks/useInfraEnvId.d.ts.map +1 -1
- package/@types/ocm/services/Day2ClusterService.d.ts +3 -3
- package/@types/ocm/services/Day2ClusterService.d.ts.map +1 -1
- package/@types/ocm/services/InfraEnvIdsCacheService.d.ts +1 -1
- package/@types/ocm/services/InfraEnvIdsCacheService.d.ts.map +1 -1
- package/@types/ocm/services/InfraEnvsService.d.ts +4 -3
- package/@types/ocm/services/InfraEnvsService.d.ts.map +1 -1
- package/@types/ocm/services/apis/EventsAPI.d.ts +1 -0
- package/@types/ocm/services/apis/EventsAPI.d.ts.map +1 -1
- package/build/build.json +1 -1
- package/build/cim/components/Agent/BMCForm.js +1 -1
- package/build/cim/components/Agent/BMCForm.js.map +1 -1
- package/build/cim/components/ClusterDeployment/ClusterDeploymentHostSelectionStep.js +1 -9
- package/build/cim/components/ClusterDeployment/ClusterDeploymentHostSelectionStep.js.map +1 -1
- package/build/cim/components/ClusterDeployment/ClusterDeploymentHostsDiscoveryStep.js +1 -2
- package/build/cim/components/ClusterDeployment/ClusterDeploymentHostsDiscoveryStep.js.map +1 -1
- package/build/cim/components/ClusterDeployment/ClusterDeploymentHostsSelectionBasic.js +3 -10
- package/build/cim/components/ClusterDeployment/ClusterDeploymentHostsSelectionBasic.js.map +1 -1
- package/build/cim/components/ClusterDeployment/use-networking-formik.js +2 -2
- package/build/cim/components/ClusterDeployment/use-networking-formik.js.map +1 -1
- package/build/cim/components/ClusterDeployment/validationSchemas.js +0 -1
- package/build/cim/components/ClusterDeployment/validationSchemas.js.map +1 -1
- package/build/cim/components/Hypershift/HostedClusterWizard/NetworkStep/NetworkStep.js +2 -2
- package/build/cim/components/Hypershift/HostedClusterWizard/NetworkStep/NetworkStep.js.map +1 -1
- package/build/cim/components/InfraEnv/InfraEnvFormPage.js +10 -2
- package/build/cim/components/InfraEnv/InfraEnvFormPage.js.map +1 -1
- package/build/cim/components/modals/AddHostModal.js +1 -1
- package/build/cim/components/modals/AddHostModal.js.map +1 -1
- package/build/cim/components/modals/EditProxyModal.js +18 -7
- package/build/cim/components/modals/EditProxyModal.js.map +1 -1
- package/build/common/components/clusterConfiguration/DiscoveryImageConfigForm.js +5 -5
- package/build/common/components/clusterConfiguration/DiscoveryImageConfigForm.js.map +1 -1
- package/build/common/components/clusterWizard/ClusterWizardStep.js +1 -1
- package/build/common/components/clusterWizard/ClusterWizardStep.js.map +1 -1
- package/build/common/components/clusterWizard/networkingSteps/ManagedNetworkingControlGroup.js +5 -2
- package/build/common/components/clusterWizard/networkingSteps/ManagedNetworkingControlGroup.js.map +1 -1
- package/build/common/components/clusterWizard/networkingSteps/NetworkTypeControlGroup.js +1 -1
- package/build/common/components/clusterWizard/networkingSteps/NetworkTypeControlGroup.js.map +1 -1
- package/build/common/components/fetching/EventListFetch.js +6 -5
- package/build/common/components/fetching/EventListFetch.js.map +1 -1
- package/build/common/components/hosts/status.js +1 -1
- package/build/common/components/hosts/status.js.map +1 -1
- package/build/common/components/ui/ClusterEventsToolbar.js +1 -1
- package/build/common/components/ui/ClusterEventsToolbar.js.map +1 -1
- package/build/common/components/ui/eventsModal.js +8 -3
- package/build/common/components/ui/eventsModal.js.map +1 -1
- package/build/common/components/ui/formik/validationSchemas.js +19 -12
- package/build/common/components/ui/formik/validationSchemas.js.map +1 -1
- package/build/common/config/constants.js +2 -0
- package/build/common/config/constants.js.map +1 -1
- package/build/ocm/components/AddHosts/day2Wizard/Day2ClusterDetails.js +94 -20
- package/build/ocm/components/AddHosts/day2Wizard/Day2ClusterDetails.js.map +1 -1
- package/build/ocm/components/AddHosts/day2Wizard/Day2DownloadISO.js +1 -1
- package/build/ocm/components/AddHosts/day2Wizard/Day2DownloadISO.js.map +1 -1
- package/build/ocm/components/AddHosts/day2Wizard/Day2StaticIP.js +16 -9
- package/build/ocm/components/AddHosts/day2Wizard/Day2StaticIP.js.map +1 -1
- package/build/ocm/components/AddHosts/day2Wizard/Day2Wizard.js +1 -1
- package/build/ocm/components/AddHosts/day2Wizard/Day2Wizard.js.map +1 -1
- package/build/ocm/components/HostsClusterDetailTab/HostsClusterDetailTabContent.js +5 -2
- package/build/ocm/components/HostsClusterDetailTab/HostsClusterDetailTabContent.js.map +1 -1
- package/build/ocm/components/HostsClusterDetailTab/utils.js +5 -2
- package/build/ocm/components/HostsClusterDetailTab/utils.js.map +1 -1
- package/build/ocm/components/clusterConfiguration/CpuArchitectureDropdown.js +5 -4
- package/build/ocm/components/clusterConfiguration/CpuArchitectureDropdown.js.map +1 -1
- package/build/ocm/components/clusterConfiguration/DiscoveryImageForm.js +3 -1
- package/build/ocm/components/clusterConfiguration/DiscoveryImageForm.js.map +1 -1
- package/build/ocm/components/clusterConfiguration/OcmDiscoveryImageConfigForm.js +11 -8
- package/build/ocm/components/clusterConfiguration/OcmDiscoveryImageConfigForm.js.map +1 -1
- package/build/ocm/components/clusterConfiguration/networkConfiguration/AdvancedNetworkFields.js +16 -5
- package/build/ocm/components/clusterConfiguration/networkConfiguration/AdvancedNetworkFields.js.map +1 -1
- package/build/ocm/components/clusterConfiguration/networkConfiguration/NetworkConfigurationForm.js +3 -2
- package/build/ocm/components/clusterConfiguration/networkConfiguration/NetworkConfigurationForm.js.map +1 -1
- package/build/ocm/components/clusterConfiguration/networkConfiguration/StackTypeControl.js +1 -2
- package/build/ocm/components/clusterConfiguration/networkConfiguration/StackTypeControl.js.map +1 -1
- package/build/ocm/components/clusterConfiguration/networkConfiguration/VirtualIPControlGroup.js +27 -16
- package/build/ocm/components/clusterConfiguration/networkConfiguration/VirtualIPControlGroup.js.map +1 -1
- package/build/ocm/components/clusterConfiguration/platformIntegration/PlatformIntegration.js +1 -1
- package/build/ocm/components/clusterConfiguration/platformIntegration/PlatformIntegration.js.map +1 -1
- package/build/ocm/components/clusterDetail/AssistedInstallerDetailCard.js +5 -2
- package/build/ocm/components/clusterDetail/AssistedInstallerDetailCard.js.map +1 -1
- package/build/ocm/components/clusterDetail/AssistedInstallerExtraDetailCard.js +5 -2
- package/build/ocm/components/clusterDetail/AssistedInstallerExtraDetailCard.js.map +1 -1
- package/build/ocm/components/clusters/ClusterPage.js +8 -4
- package/build/ocm/components/clusters/ClusterPage.js.map +1 -1
- package/build/ocm/components/featureSupportLevels/FeatureSupportLevelProvider.js +3 -2
- package/build/ocm/components/featureSupportLevels/FeatureSupportLevelProvider.js.map +1 -1
- package/build/ocm/components/fetching/fetchEvents.js +7 -3
- package/build/ocm/components/fetching/fetchEvents.js.map +1 -1
- package/build/ocm/components/newFeatureSupportLevels/NewFeatureSupportLevelProvider.js +3 -2
- package/build/ocm/components/newFeatureSupportLevels/NewFeatureSupportLevelProvider.js.map +1 -1
- package/build/ocm/hooks/useInfraEnv.js +2 -2
- package/build/ocm/hooks/useInfraEnv.js.map +1 -1
- package/build/ocm/hooks/useInfraEnvId.js +18 -3
- package/build/ocm/hooks/useInfraEnvId.js.map +1 -1
- package/build/ocm/hooks/useInfraEnvImageUrl.js +1 -1
- package/build/ocm/hooks/useInfraEnvImageUrl.js.map +1 -1
- package/build/ocm/hooks/useInfraEnvIpxeImageUrl.js +1 -1
- package/build/ocm/hooks/useInfraEnvIpxeImageUrl.js.map +1 -1
- package/build/ocm/services/Day2ClusterService.js +11 -20
- package/build/ocm/services/Day2ClusterService.js.map +1 -1
- package/build/ocm/services/InfraEnvIdsCacheService.js +5 -4
- package/build/ocm/services/InfraEnvIdsCacheService.js.map +1 -1
- package/build/ocm/services/InfraEnvsService.js +7 -4
- package/build/ocm/services/InfraEnvsService.js.map +1 -1
- package/build/ocm/services/apis/EventsAPI.js +13 -1
- package/build/ocm/services/apis/EventsAPI.js.map +1 -1
- package/lib/cim/components/Agent/BMCForm.tsx +1 -1
- package/lib/cim/components/ClusterDeployment/ClusterDeploymentHostSelectionStep.tsx +1 -12
- package/lib/cim/components/ClusterDeployment/ClusterDeploymentHostsDiscoveryStep.tsx +1 -2
- package/lib/cim/components/ClusterDeployment/ClusterDeploymentHostsSelectionBasic.tsx +2 -10
- package/lib/cim/components/ClusterDeployment/use-networking-formik.ts +2 -2
- package/lib/cim/components/ClusterDeployment/validationSchemas.ts +0 -1
- package/lib/cim/components/Hypershift/HostedClusterWizard/NetworkStep/NetworkStep.tsx +2 -2
- package/lib/cim/components/Hypershift/HostedClusterWizard/NetworkStep/types.ts +0 -1
- package/lib/cim/components/InfraEnv/InfraEnvFormPage.tsx +10 -2
- package/lib/cim/components/modals/AddHostModal.tsx +1 -0
- package/lib/cim/components/modals/EditProxyModal.tsx +15 -3
- package/lib/common/components/clusterConfiguration/DiscoveryImageConfigForm.tsx +12 -9
- package/lib/common/components/clusterWizard/ClusterWizardStep.tsx +5 -1
- package/lib/common/components/clusterWizard/networkingSteps/ManagedNetworkingControlGroup.tsx +11 -2
- package/lib/common/components/clusterWizard/networkingSteps/NetworkTypeControlGroup.tsx +1 -1
- package/lib/common/components/fetching/EventListFetch.tsx +6 -5
- package/lib/common/components/hosts/status.tsx +1 -1
- package/lib/common/components/ui/ClusterEventsToolbar.tsx +3 -0
- package/lib/common/components/ui/StaticTextField.tsx +1 -1
- package/lib/common/components/ui/eventsModal.tsx +18 -2
- package/lib/common/components/ui/formik/validationSchemas.ts +32 -14
- package/lib/common/config/constants.ts +4 -0
- package/lib/common/types/events.ts +1 -0
- package/lib/ocm/components/AddHosts/day2Wizard/Day2ClusterDetails.tsx +129 -21
- package/lib/ocm/components/AddHosts/day2Wizard/Day2DownloadISO.tsx +1 -1
- package/lib/ocm/components/AddHosts/day2Wizard/Day2StaticIP.tsx +15 -10
- package/lib/ocm/components/AddHosts/day2Wizard/Day2Wizard.tsx +1 -0
- package/lib/ocm/components/HostsClusterDetailTab/HostsClusterDetailTabContent.tsx +7 -3
- package/lib/ocm/components/HostsClusterDetailTab/utils.ts +8 -3
- package/lib/ocm/components/clusterConfiguration/CpuArchitectureDropdown.tsx +6 -3
- package/lib/ocm/components/clusterConfiguration/DiscoveryImageForm.tsx +9 -1
- package/lib/ocm/components/clusterConfiguration/OcmDiscoveryImageConfigForm.tsx +25 -16
- package/lib/ocm/components/clusterConfiguration/networkConfiguration/AdvancedNetworkFields.tsx +29 -8
- package/lib/ocm/components/clusterConfiguration/networkConfiguration/NetworkConfigurationForm.tsx +9 -2
- package/lib/ocm/components/clusterConfiguration/networkConfiguration/StackTypeControl.tsx +6 -13
- package/lib/ocm/components/clusterConfiguration/networkConfiguration/VirtualIPControlGroup.tsx +30 -32
- package/lib/ocm/components/clusterConfiguration/platformIntegration/PlatformIntegration.tsx +1 -1
- package/lib/ocm/components/clusterDetail/AssistedInstallerDetailCard.tsx +12 -2
- package/lib/ocm/components/clusterDetail/AssistedInstallerExtraDetailCard.tsx +9 -2
- package/lib/ocm/components/clusters/ClusterPage.tsx +17 -5
- package/lib/ocm/components/featureSupportLevels/FeatureSupportLevelProvider.tsx +6 -2
- package/lib/ocm/components/fetching/fetchEvents.ts +8 -3
- package/lib/ocm/components/newFeatureSupportLevels/NewFeatureSupportLevelProvider.tsx +6 -2
- package/lib/ocm/hooks/useInfraEnv.ts +10 -1
- package/lib/ocm/hooks/useInfraEnvId.ts +24 -4
- package/lib/ocm/hooks/useInfraEnvImageUrl.ts +1 -1
- package/lib/ocm/hooks/useInfraEnvIpxeImageUrl.ts +1 -1
- package/lib/ocm/services/Day2ClusterService.ts +12 -42
- package/lib/ocm/services/InfraEnvIdsCacheService.ts +9 -6
- package/lib/ocm/services/InfraEnvsService.ts +12 -13
- package/lib/ocm/services/apis/EventsAPI.ts +15 -1
- package/package.json +1 -1
|
@@ -1,14 +1,19 @@
|
|
|
1
|
-
import { Grid, GridItem } from '@patternfly/react-core';
|
|
1
|
+
import { Alert, Grid, GridItem } from '@patternfly/react-core';
|
|
2
2
|
import { Form, Formik } from 'formik';
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import {
|
|
5
5
|
Cluster,
|
|
6
|
+
ClusterCpuArchitecture,
|
|
6
7
|
ClusterWizardStep,
|
|
7
8
|
ClusterWizardStepHeader,
|
|
8
9
|
CpuArchitecture,
|
|
9
10
|
ErrorState,
|
|
11
|
+
ExternalLink,
|
|
10
12
|
getSupportedCpuArchitectures,
|
|
13
|
+
HOW_TO_KNOW_IF_CLUSTER_SUPPORTS_MULTIPLE_CPU_ARCHS,
|
|
14
|
+
InfraEnv,
|
|
11
15
|
LoadingState,
|
|
16
|
+
SupportedCpuArchitecture,
|
|
12
17
|
useFeature,
|
|
13
18
|
} from '../../../../common';
|
|
14
19
|
import { HostsNetworkConfigurationType, InfraEnvsService } from '../../../services';
|
|
@@ -21,24 +26,50 @@ import Day2WizardFooter from './Day2WizardFooter';
|
|
|
21
26
|
import Day2HostStaticIpConfigurations from './Day2StaticIpHostConfigurations';
|
|
22
27
|
import { mapClusterCpuArchToInfraEnvCpuArch } from '../../../services/CpuArchitectureService';
|
|
23
28
|
import CpuArchitectureDropdown from '../../clusterConfiguration/CpuArchitectureDropdown';
|
|
24
|
-
import { useOpenshiftVersions } from '../../../hooks';
|
|
29
|
+
import { useOpenshiftVersions, usePullSecret } from '../../../hooks';
|
|
25
30
|
|
|
26
31
|
const getDay2ClusterDetailInitialValues = async (
|
|
27
32
|
clusterId: Cluster['id'],
|
|
28
33
|
day1CpuArchitecture: CpuArchitecture,
|
|
29
|
-
|
|
34
|
+
pullSecret?: string,
|
|
35
|
+
name?: string,
|
|
36
|
+
openshiftVersion?: string,
|
|
37
|
+
): Promise<Day2ClusterDetailValues | Error> => {
|
|
30
38
|
try {
|
|
31
39
|
const infraEnv = await InfraEnvsService.getInfraEnv(clusterId, day1CpuArchitecture);
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
40
|
+
if (infraEnv && !(infraEnv instanceof Error)) {
|
|
41
|
+
return {
|
|
42
|
+
cpuArchitecture: day1CpuArchitecture as SupportedCpuArchitecture,
|
|
43
|
+
hostsNetworkConfigurationType: infraEnv.staticNetworkConfig
|
|
44
|
+
? HostsNetworkConfigurationType.STATIC
|
|
45
|
+
: HostsNetworkConfigurationType.DHCP,
|
|
46
|
+
};
|
|
47
|
+
} else {
|
|
48
|
+
//Create a new InfraEnv because is not found
|
|
49
|
+
if (pullSecret) {
|
|
50
|
+
const infraEnv = await InfraEnvsService.create({
|
|
51
|
+
name: InfraEnvsService.makeInfraEnvName(
|
|
52
|
+
day1CpuArchitecture as ClusterCpuArchitecture,
|
|
53
|
+
name,
|
|
54
|
+
),
|
|
55
|
+
pullSecret,
|
|
56
|
+
clusterId,
|
|
57
|
+
openshiftVersion,
|
|
58
|
+
cpuArchitecture: day1CpuArchitecture as ClusterCpuArchitecture,
|
|
59
|
+
});
|
|
60
|
+
return {
|
|
61
|
+
cpuArchitecture: day1CpuArchitecture as SupportedCpuArchitecture,
|
|
62
|
+
hostsNetworkConfigurationType: infraEnv.staticNetworkConfig
|
|
63
|
+
? HostsNetworkConfigurationType.STATIC
|
|
64
|
+
: HostsNetworkConfigurationType.DHCP,
|
|
65
|
+
};
|
|
66
|
+
} else {
|
|
67
|
+
return new Error('Could not get infraEnv for this cpu architecture');
|
|
68
|
+
}
|
|
69
|
+
}
|
|
39
70
|
} catch (error) {
|
|
40
71
|
handleApiError(error);
|
|
41
|
-
return
|
|
72
|
+
return new Error('Could not get infraEnv for this cpu architecture');
|
|
42
73
|
}
|
|
43
74
|
};
|
|
44
75
|
|
|
@@ -49,15 +80,16 @@ const Day2ClusterDetails = () => {
|
|
|
49
80
|
data: { cluster: day2Cluster },
|
|
50
81
|
} = day2DiscoveryImageDialog;
|
|
51
82
|
const wizardContext = useDay2WizardContext();
|
|
52
|
-
const [initialValues, setInitialValues] = React.useState<
|
|
53
|
-
Day2ClusterDetailValues | Error | null
|
|
54
|
-
>();
|
|
83
|
+
const [initialValues, setInitialValues] = React.useState<Day2ClusterDetailValues | null>(null);
|
|
55
84
|
const [isSubmitting, setSubmitting] = React.useState(false);
|
|
56
|
-
|
|
85
|
+
const [isAlternativeCpuSelected, setIsAlternativeCpuSelected] = React.useState(false);
|
|
57
86
|
const canSelectCpuArch = useFeature('ASSISTED_INSTALLER_MULTIARCH_SUPPORTED');
|
|
58
87
|
const { getCpuArchitectures } = useOpenshiftVersions();
|
|
59
88
|
const cpuArchitecturesByVersionImage = getCpuArchitectures(day2Cluster.openshiftVersion);
|
|
60
89
|
const day1CpuArchitecture = mapClusterCpuArchToInfraEnvCpuArch(day2Cluster.cpuArchitecture);
|
|
90
|
+
const [errorState, setErrorState] = React.useState<Error | null>(null);
|
|
91
|
+
const pullSecret = usePullSecret();
|
|
92
|
+
|
|
61
93
|
const cpuArchitectures = React.useMemo(
|
|
62
94
|
() =>
|
|
63
95
|
getSupportedCpuArchitectures(
|
|
@@ -72,13 +104,26 @@ const Day2ClusterDetails = () => {
|
|
|
72
104
|
const initialValues = await getDay2ClusterDetailInitialValues(
|
|
73
105
|
day2Cluster.id,
|
|
74
106
|
day1CpuArchitecture,
|
|
107
|
+
pullSecret,
|
|
108
|
+
day2Cluster.name,
|
|
109
|
+
day2Cluster.openshiftVersion,
|
|
75
110
|
);
|
|
76
111
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
77
112
|
// @ts-ignore
|
|
78
|
-
|
|
113
|
+
if (initialValues instanceof Error) {
|
|
114
|
+
setErrorState(initialValues);
|
|
115
|
+
} else {
|
|
116
|
+
setInitialValues(initialValues);
|
|
117
|
+
}
|
|
79
118
|
};
|
|
80
119
|
void fetchAndSetInitialValues();
|
|
81
|
-
}, [
|
|
120
|
+
}, [
|
|
121
|
+
day2Cluster.id,
|
|
122
|
+
day1CpuArchitecture,
|
|
123
|
+
pullSecret,
|
|
124
|
+
day2Cluster.name,
|
|
125
|
+
day2Cluster.openshiftVersion,
|
|
126
|
+
]);
|
|
82
127
|
|
|
83
128
|
const handleSubmit = React.useCallback(
|
|
84
129
|
async (values: Day2ClusterDetailValues) => {
|
|
@@ -102,10 +147,54 @@ const Day2ClusterDetails = () => {
|
|
|
102
147
|
[day2Cluster.id, wizardContext],
|
|
103
148
|
);
|
|
104
149
|
|
|
105
|
-
|
|
150
|
+
const changeCpuArchitectureDropdownAsync = React.useCallback(
|
|
151
|
+
async (value: string, initialValues: Day2ClusterDetailValues) => {
|
|
152
|
+
if (!pullSecret) {
|
|
153
|
+
setErrorState(new Error('Pull secret is missing'));
|
|
154
|
+
} else {
|
|
155
|
+
if (value !== initialValues.cpuArchitecture) {
|
|
156
|
+
//Fetch infraEnv by clusterId and cpu architecture
|
|
157
|
+
let infraEnv: InfraEnv | Error;
|
|
158
|
+
try {
|
|
159
|
+
infraEnv = await InfraEnvsService.getInfraEnv(
|
|
160
|
+
day2Cluster.id,
|
|
161
|
+
value as SupportedCpuArchitecture,
|
|
162
|
+
);
|
|
163
|
+
if (!infraEnv) {
|
|
164
|
+
try {
|
|
165
|
+
infraEnv = await InfraEnvsService.create({
|
|
166
|
+
name: InfraEnvsService.makeInfraEnvName(
|
|
167
|
+
value as ClusterCpuArchitecture,
|
|
168
|
+
day2Cluster.name,
|
|
169
|
+
),
|
|
170
|
+
pullSecret,
|
|
171
|
+
clusterId: day2Cluster.id,
|
|
172
|
+
openshiftVersion: day2Cluster.openshiftVersion,
|
|
173
|
+
cpuArchitecture: value as ClusterCpuArchitecture,
|
|
174
|
+
});
|
|
175
|
+
} catch {
|
|
176
|
+
setErrorState(new Error('Could not get infraEnv for this cpu architecture'));
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
} catch {
|
|
180
|
+
setErrorState(new Error('Could not get infraEnv for this cpu architecture'));
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
setIsAlternativeCpuSelected(value !== initialValues.cpuArchitecture);
|
|
185
|
+
},
|
|
186
|
+
[day2Cluster.id, day2Cluster.name, day2Cluster.openshiftVersion, pullSecret],
|
|
187
|
+
);
|
|
188
|
+
const handleChangeCpuArchitectureDropdown = React.useCallback(
|
|
189
|
+
(value: string, initialValues: Day2ClusterDetailValues) =>
|
|
190
|
+
void changeCpuArchitectureDropdownAsync(value, initialValues),
|
|
191
|
+
[changeCpuArchitectureDropdownAsync],
|
|
192
|
+
);
|
|
193
|
+
|
|
194
|
+
if (initialValues === null) {
|
|
106
195
|
return <LoadingState />;
|
|
107
|
-
} else if (
|
|
108
|
-
return <ErrorState content=
|
|
196
|
+
} else if (errorState !== null) {
|
|
197
|
+
return <ErrorState content={errorState.message} />;
|
|
109
198
|
}
|
|
110
199
|
|
|
111
200
|
return (
|
|
@@ -129,13 +218,32 @@ const Day2ClusterDetails = () => {
|
|
|
129
218
|
<GridItem>
|
|
130
219
|
<ClusterWizardStepHeader>Cluster details</ClusterWizardStepHeader>
|
|
131
220
|
</GridItem>
|
|
132
|
-
<GridItem span={12}
|
|
221
|
+
<GridItem span={12} xl={10}>
|
|
133
222
|
<CpuArchitectureDropdown
|
|
134
223
|
openshiftVersion={day2Cluster.openshiftVersion}
|
|
135
224
|
day1CpuArchitecture={initialValues.cpuArchitecture}
|
|
136
225
|
cpuArchitectures={cpuArchitectures}
|
|
226
|
+
onChange={(value) => handleChangeCpuArchitectureDropdown(value, initialValues)}
|
|
137
227
|
/>
|
|
138
228
|
</GridItem>
|
|
229
|
+
{isAlternativeCpuSelected && (
|
|
230
|
+
<GridItem span={12} xl={10}>
|
|
231
|
+
<Alert
|
|
232
|
+
isInline
|
|
233
|
+
variant="info"
|
|
234
|
+
title={
|
|
235
|
+
'To check if the current version of your cluster supports multiple CPU architectures,'
|
|
236
|
+
}
|
|
237
|
+
>
|
|
238
|
+
<>
|
|
239
|
+
<ExternalLink href={HOW_TO_KNOW_IF_CLUSTER_SUPPORTS_MULTIPLE_CPU_ARCHS}>
|
|
240
|
+
follow these steps
|
|
241
|
+
</ExternalLink>
|
|
242
|
+
</>
|
|
243
|
+
</Alert>
|
|
244
|
+
</GridItem>
|
|
245
|
+
)}
|
|
246
|
+
|
|
139
247
|
<GridItem>
|
|
140
248
|
<Day2HostStaticIpConfigurations />
|
|
141
249
|
</GridItem>
|
|
@@ -13,7 +13,7 @@ const Day2DownloadISO = () => {
|
|
|
13
13
|
const wizardContext = useDay2WizardContext();
|
|
14
14
|
const isoDownloadUrl = wizardContext.selectedIsoUrl;
|
|
15
15
|
const ipxeDownloadUrl = wizardContext.selectedIpxeUrl;
|
|
16
|
-
const nameImageSuffix = `${cluster.name || ''}
|
|
16
|
+
const nameImageSuffix = `${cluster.name || ''}`;
|
|
17
17
|
return (
|
|
18
18
|
<ClusterWizardStep navigation={<Day2WizardNav />}>
|
|
19
19
|
<Stack hasGutter>
|
|
@@ -65,18 +65,23 @@ const Day2StaticIP = () => {
|
|
|
65
65
|
setInfraEnv(undefined);
|
|
66
66
|
return;
|
|
67
67
|
}
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
68
|
+
if (infraEnv && !(infraEnv instanceof Error)) {
|
|
69
|
+
if (!infraEnv.staticNetworkConfig) {
|
|
70
|
+
// Make sure the infraEnv we store in the state has staticIP config
|
|
71
|
+
// This is required to be able to reuse the StaticIP services
|
|
72
|
+
infraEnv = await InfraEnvsService.setDummyStaticConfigToInfraEnv(infraEnv.id);
|
|
73
|
+
}
|
|
74
|
+
const staticIpInfo = getStaticIpInfo(infraEnv);
|
|
75
|
+
if (staticIpInfo) {
|
|
76
|
+
setInfraEnv(infraEnv);
|
|
77
|
+
setInitialStaticIpInfo(staticIpInfo);
|
|
78
|
+
} else {
|
|
79
|
+
setHasLoadError(true);
|
|
80
|
+
}
|
|
78
81
|
} else {
|
|
79
82
|
setHasLoadError(true);
|
|
83
|
+
setInfraEnv(undefined);
|
|
84
|
+
return;
|
|
80
85
|
}
|
|
81
86
|
};
|
|
82
87
|
void setCurrentStaticConfig();
|
|
@@ -18,6 +18,7 @@ import { AddHosts } from '../AddHosts';
|
|
|
18
18
|
import { HostsClusterDetailTabProps } from './types';
|
|
19
19
|
import { NewFeatureSupportLevelProvider } from '../newFeatureSupportLevels';
|
|
20
20
|
import useInfraEnv from '../../hooks/useInfraEnv';
|
|
21
|
+
import { mapOcmArchToCpuArchitecture } from '../../services/CpuArchitectureService';
|
|
21
22
|
|
|
22
23
|
export const HostsClusterDetailTabContent = ({
|
|
23
24
|
cluster: ocmCluster,
|
|
@@ -37,7 +38,12 @@ export const HostsClusterDetailTabContent = ({
|
|
|
37
38
|
|
|
38
39
|
const { infraEnv } = useInfraEnv(
|
|
39
40
|
ocmCluster.id ? ocmCluster.id : '',
|
|
40
|
-
|
|
41
|
+
ocmCluster.cpu_architecture
|
|
42
|
+
? (mapOcmArchToCpuArchitecture(ocmCluster.cpu_architecture) as CpuArchitecture)
|
|
43
|
+
: CpuArchitecture.x86,
|
|
44
|
+
ocmCluster.name,
|
|
45
|
+
pullSecret,
|
|
46
|
+
ocmCluster.openshift_version,
|
|
41
47
|
);
|
|
42
48
|
React.useEffect(() => {
|
|
43
49
|
if (!isVisible && day2Cluster) {
|
|
@@ -106,8 +112,6 @@ export const HostsClusterDetailTabContent = ({
|
|
|
106
112
|
ocmCluster,
|
|
107
113
|
pullSecret,
|
|
108
114
|
normalizedVersion,
|
|
109
|
-
cpuArchitecturesByVersionImage,
|
|
110
|
-
canSelectCpuArch,
|
|
111
115
|
);
|
|
112
116
|
const aiCluster = Day2ClusterService.completeAiClusterWithOcmCluster(
|
|
113
117
|
day2Cluster,
|
|
@@ -29,13 +29,18 @@ const disabledTabResult = (tooltipMessage: string) => ({
|
|
|
29
29
|
});
|
|
30
30
|
|
|
31
31
|
export const getAddHostTabDetails = ({ cluster }: { cluster: OcmClusterType }) => {
|
|
32
|
-
const isHiddenTab =
|
|
33
|
-
(cluster.state !== 'ready' && cluster.state !== 'installed') ||
|
|
34
|
-
cluster.product?.id !== 'OCP-AssistedInstall';
|
|
32
|
+
const isHiddenTab = cluster.state !== 'ready' && cluster.state !== 'installed';
|
|
35
33
|
if (isHiddenTab) {
|
|
36
34
|
return hiddenTabResult;
|
|
37
35
|
}
|
|
38
36
|
|
|
37
|
+
// Cluster’s product id is not 'OCP-AssistedInstall'. We show disabled tab with a message
|
|
38
|
+
if (cluster.product?.id !== 'OCP-AssistedInstall') {
|
|
39
|
+
return disabledTabResult(
|
|
40
|
+
'Only clusters installed with Assisted Installer can be scaled up using the web interface. You can still scale up clusters using the CLI.',
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
|
|
39
44
|
// Checking if the Day1 cluster has reported metrics, so it can be determined if it's an SNO / multi node and has required information
|
|
40
45
|
// If that's not the case, we will still show the tab, and the content will be an ErrorState with an explanation message
|
|
41
46
|
const day1ClusterHostCount = cluster.metrics?.nodes?.total || 0;
|
|
@@ -30,12 +30,12 @@ export const architectureData: Record<SupportedCpuArchitecture, CpuArchitectureI
|
|
|
30
30
|
[CpuArchitecture.ppc64le]: {
|
|
31
31
|
description: 'Some features may not be available',
|
|
32
32
|
featureSupportLevelId: 'PPC64LE_ARCHITECTURE',
|
|
33
|
-
label: '
|
|
33
|
+
label: 'IBM Power (ppc64le)',
|
|
34
34
|
},
|
|
35
35
|
[CpuArchitecture.s390x]: {
|
|
36
36
|
description: 'Some features may not be available',
|
|
37
37
|
featureSupportLevelId: 'S390X_ARCHITECTURE',
|
|
38
|
-
label: '
|
|
38
|
+
label: 'IBM zSystems (s390x)',
|
|
39
39
|
},
|
|
40
40
|
};
|
|
41
41
|
|
|
@@ -54,12 +54,14 @@ type CpuArchitectureDropdownProps = {
|
|
|
54
54
|
openshiftVersion: Cluster['openshiftVersion'];
|
|
55
55
|
day1CpuArchitecture?: SupportedCpuArchitecture;
|
|
56
56
|
cpuArchitectures: SupportedCpuArchitecture[];
|
|
57
|
+
onChange?: (value: string) => void;
|
|
57
58
|
};
|
|
58
59
|
|
|
59
60
|
const CpuArchitectureDropdown = ({
|
|
60
61
|
openshiftVersion,
|
|
61
62
|
day1CpuArchitecture,
|
|
62
63
|
cpuArchitectures,
|
|
64
|
+
onChange,
|
|
63
65
|
}: CpuArchitectureDropdownProps) => {
|
|
64
66
|
const [field, { value: selectedCpuArchitecture }, { setValue }] =
|
|
65
67
|
useField<SupportedCpuArchitecture>(INPUT_NAME);
|
|
@@ -93,8 +95,9 @@ const CpuArchitectureDropdown = ({
|
|
|
93
95
|
setValue(selectedCpuArch);
|
|
94
96
|
setOpen(false);
|
|
95
97
|
setCurrentCpuArch(architectureData[selectedCpuArch].label);
|
|
98
|
+
onChange && onChange(selectedCpuArch);
|
|
96
99
|
},
|
|
97
|
-
[setOpen, setValue],
|
|
100
|
+
[setOpen, setValue, onChange],
|
|
98
101
|
);
|
|
99
102
|
|
|
100
103
|
React.useEffect(() => {
|
|
@@ -12,6 +12,7 @@ import {
|
|
|
12
12
|
OcmDiscoveryImageFormValues,
|
|
13
13
|
} from './OcmDiscoveryImageConfigForm';
|
|
14
14
|
import { mapClusterCpuArchToInfraEnvCpuArch } from '../../services/CpuArchitectureService';
|
|
15
|
+
import { usePullSecret } from '../../hooks';
|
|
15
16
|
|
|
16
17
|
type DiscoveryImageFormProps = {
|
|
17
18
|
cluster: Cluster;
|
|
@@ -30,7 +31,14 @@ const DiscoveryImageForm = ({
|
|
|
30
31
|
onSuccessIpxe,
|
|
31
32
|
isIpxeSelected,
|
|
32
33
|
}: DiscoveryImageFormProps) => {
|
|
33
|
-
const
|
|
34
|
+
const pullSecret = usePullSecret();
|
|
35
|
+
const { infraEnv, error: infraEnvError } = useInfraEnv(
|
|
36
|
+
cluster.id,
|
|
37
|
+
cpuArchitecture,
|
|
38
|
+
cluster.name,
|
|
39
|
+
pullSecret,
|
|
40
|
+
cluster.openshiftVersion,
|
|
41
|
+
);
|
|
34
42
|
const cancelSourceRef = React.useRef<CancelTokenSource>();
|
|
35
43
|
const dispatch = useDispatch();
|
|
36
44
|
|
|
@@ -50,8 +50,8 @@ export type OcmDiscoveryImageFormValues = OcmImageCreateParams &
|
|
|
50
50
|
const validationSchema = Yup.lazy<OcmDiscoveryImageFormValues>((values) =>
|
|
51
51
|
Yup.object<OcmDiscoveryImageFormValues>().shape({
|
|
52
52
|
sshPublicKey: sshPublicKeyListValidationSchema,
|
|
53
|
-
httpProxy: httpProxyValidationSchema(values, 'httpProxy'),
|
|
54
|
-
httpsProxy: httpProxyValidationSchema(values, 'httpsProxy'), // share the schema, httpS is currently not supported
|
|
53
|
+
httpProxy: httpProxyValidationSchema({ values, pairValueName: 'httpProxy' }),
|
|
54
|
+
httpsProxy: httpProxyValidationSchema({ values, pairValueName: 'httpsProxy' }), // share the schema, httpS is currently not supported
|
|
55
55
|
noProxy: noProxyValidationSchema,
|
|
56
56
|
}),
|
|
57
57
|
);
|
|
@@ -131,7 +131,7 @@ export const OcmDiscoveryImageConfigForm = ({
|
|
|
131
131
|
validationSchema={validationSchema}
|
|
132
132
|
onSubmit={handleSubmit}
|
|
133
133
|
>
|
|
134
|
-
{({ submitForm, isSubmitting, status }) => {
|
|
134
|
+
{({ submitForm, isSubmitting, status, setStatus }) => {
|
|
135
135
|
return (
|
|
136
136
|
<>
|
|
137
137
|
<ModalBoxBody>
|
|
@@ -142,7 +142,6 @@ export const OcmDiscoveryImageConfigForm = ({
|
|
|
142
142
|
|
|
143
143
|
<StackItem>
|
|
144
144
|
<Form>
|
|
145
|
-
<AlertFormikError status={status as StatusErrorType} />
|
|
146
145
|
<DiscoveryImageTypeDropdown
|
|
147
146
|
name="imageType"
|
|
148
147
|
defaultValue={discoveryImageTypes[imageTypeValue]}
|
|
@@ -161,18 +160,28 @@ export const OcmDiscoveryImageConfigForm = ({
|
|
|
161
160
|
</Stack>
|
|
162
161
|
</ModalBoxBody>
|
|
163
162
|
<ModalBoxFooter>
|
|
164
|
-
<
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
163
|
+
<Stack hasGutter style={{ width: '100%' }}>
|
|
164
|
+
<StackItem>
|
|
165
|
+
<AlertFormikError
|
|
166
|
+
status={status as StatusErrorType}
|
|
167
|
+
onClose={() => setStatus(undefined)}
|
|
168
|
+
/>
|
|
169
|
+
</StackItem>
|
|
170
|
+
<StackItem>
|
|
171
|
+
<Button
|
|
172
|
+
onClick={() => {
|
|
173
|
+
void submitForm();
|
|
174
|
+
}}
|
|
175
|
+
isDisabled={isSubmitting}
|
|
176
|
+
isLoading={isSubmitting}
|
|
177
|
+
>
|
|
178
|
+
{isSubmitting ? t('ai:Generating') : buttonText}
|
|
179
|
+
</Button>
|
|
180
|
+
<Button key="cancel" variant="link" onClick={onCancel}>
|
|
181
|
+
{t('ai:Cancel')}
|
|
182
|
+
</Button>
|
|
183
|
+
</StackItem>
|
|
184
|
+
</Stack>
|
|
176
185
|
</ModalBoxFooter>
|
|
177
186
|
</>
|
|
178
187
|
);
|
package/lib/ocm/components/clusterConfiguration/networkConfiguration/AdvancedNetworkFields.tsx
CHANGED
|
@@ -21,11 +21,14 @@ const getNetworkLabelSuffix = (index: number, isDualStack: boolean) => {
|
|
|
21
21
|
return isDualStack ? ` (${index === 0 ? 'IPv4' : 'IPv6'})` : '';
|
|
22
22
|
};
|
|
23
23
|
|
|
24
|
-
const
|
|
25
|
-
'
|
|
24
|
+
const IPv4PrefixPopoverText =
|
|
25
|
+
'For example, if Cluster Network Host Prefix is set to 23, then each node is assigned a /23 subnet out of the given cidr (clusterNetworkCIDR), which allows for 510 (2^(32 - 23) - 2) pod IPs addresses.';
|
|
26
26
|
|
|
27
|
-
const
|
|
28
|
-
'
|
|
27
|
+
const IPv6PrefixPopoverText =
|
|
28
|
+
'For example, if Cluster Network Host Prefix is set to 116, then each node is assigned a /116 subnet out of the given cidr (clusterNetworkCIDR), which allows for 4,094 (2^(128 - 116) - 2) pod IPs addresses.';
|
|
29
|
+
|
|
30
|
+
const ClusterPrefixHelperText =
|
|
31
|
+
'Defines how big the subnets for each individual node are out of the given CIDR. Must enter a whole number.';
|
|
29
32
|
|
|
30
33
|
const clusterCidrHelperText =
|
|
31
34
|
'The block must not overlap with existing physical networks. To access the Pods from an external network, configure load balancers and routers to manage the traffic.';
|
|
@@ -45,8 +48,18 @@ const AdvancedNetworkFields = () => {
|
|
|
45
48
|
|
|
46
49
|
const isSubnetIPv6 = (index: number) => (isDualStack ? !!index : false);
|
|
47
50
|
|
|
48
|
-
const
|
|
49
|
-
|
|
51
|
+
const clusterNetworkHostPrefixPopoverText = (index: number) => (
|
|
52
|
+
<>
|
|
53
|
+
<p>
|
|
54
|
+
The subnet prefix length to assign to each individual node.{' '}
|
|
55
|
+
{isSubnetIPv6(index) ? IPv6PrefixPopoverText : IPv4PrefixPopoverText}
|
|
56
|
+
</p>
|
|
57
|
+
<p>
|
|
58
|
+
If you are required to provide access to nodes from an external network, configure load
|
|
59
|
+
balancers and routers to manage the traffic.
|
|
60
|
+
</p>
|
|
61
|
+
</>
|
|
62
|
+
);
|
|
50
63
|
|
|
51
64
|
return (
|
|
52
65
|
<Grid hasGutter className="pf-u-ml-lg">
|
|
@@ -76,7 +89,15 @@ const AdvancedNetworkFields = () => {
|
|
|
76
89
|
<StackItem className={'network-field-group pf-u-pb-md'}>
|
|
77
90
|
<OcmInputField
|
|
78
91
|
name={`clusterNetworks.${index}.hostPrefix`}
|
|
79
|
-
label={
|
|
92
|
+
label={
|
|
93
|
+
<>
|
|
94
|
+
<span>Cluster network host prefix{networkSuffix} </span>
|
|
95
|
+
<PopoverIcon
|
|
96
|
+
bodyContent={clusterNetworkHostPrefixPopoverText(index)}
|
|
97
|
+
minWidth="30rem"
|
|
98
|
+
/>
|
|
99
|
+
</>
|
|
100
|
+
}
|
|
80
101
|
type={TextInputTypes.number}
|
|
81
102
|
min={clusterNetworkCidrPrefix(index)}
|
|
82
103
|
max={
|
|
@@ -84,7 +105,7 @@ const AdvancedNetworkFields = () => {
|
|
|
84
105
|
? PREFIX_MAX_RESTRICTION.IPv6
|
|
85
106
|
: PREFIX_MAX_RESTRICTION.IPv4
|
|
86
107
|
}
|
|
87
|
-
helperText={
|
|
108
|
+
helperText={ClusterPrefixHelperText}
|
|
88
109
|
isRequired
|
|
89
110
|
/>
|
|
90
111
|
</StackItem>
|
package/lib/ocm/components/clusterConfiguration/networkConfiguration/NetworkConfigurationForm.tsx
CHANGED
|
@@ -38,7 +38,7 @@ import { captureException } from '../../../sentry';
|
|
|
38
38
|
import { ClustersService } from '../../../services';
|
|
39
39
|
import { setServerUpdateError, updateClusterBase } from '../../../reducers/clusters';
|
|
40
40
|
import { isUnknownServerError, getApiErrorMessage, handleApiError } from '../../../api';
|
|
41
|
-
import { useClusterSupportedPlatforms } from '../../../hooks';
|
|
41
|
+
import { useClusterSupportedPlatforms, usePullSecret } from '../../../hooks';
|
|
42
42
|
|
|
43
43
|
const NetworkConfigurationForm: React.FC<{
|
|
44
44
|
cluster: Cluster;
|
|
@@ -127,11 +127,18 @@ const NetworkConfigurationForm: React.FC<{
|
|
|
127
127
|
};
|
|
128
128
|
|
|
129
129
|
const NetworkConfigurationPage = ({ cluster }: { cluster: Cluster }) => {
|
|
130
|
+
const pullSecret = usePullSecret();
|
|
130
131
|
const {
|
|
131
132
|
infraEnv,
|
|
132
133
|
error: infraEnvError,
|
|
133
134
|
isLoading,
|
|
134
|
-
} = useInfraEnv(
|
|
135
|
+
} = useInfraEnv(
|
|
136
|
+
cluster.id,
|
|
137
|
+
cluster.cpuArchitecture ? (cluster.cpuArchitecture as CpuArchitecture) : CpuArchitecture.x86,
|
|
138
|
+
cluster.name,
|
|
139
|
+
pullSecret,
|
|
140
|
+
cluster.openshiftVersion,
|
|
141
|
+
);
|
|
135
142
|
const defaultNetworkValues = useDefaultConfiguration([
|
|
136
143
|
'clusterNetworksDualstack',
|
|
137
144
|
'clusterNetworksIpv4',
|
|
@@ -159,19 +159,12 @@ export const StackTypeControlGroup = ({
|
|
|
159
159
|
>
|
|
160
160
|
<Split>
|
|
161
161
|
<SplitItem>
|
|
162
|
-
<
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
<OcmRadioField
|
|
169
|
-
name={'stackType'}
|
|
170
|
-
value={IPV4_STACK}
|
|
171
|
-
isDisabled={!isDualStackSelectable}
|
|
172
|
-
label="IPv4 "
|
|
173
|
-
/>
|
|
174
|
-
</Tooltip>
|
|
162
|
+
<OcmRadioField
|
|
163
|
+
name={'stackType'}
|
|
164
|
+
value={IPV4_STACK}
|
|
165
|
+
isDisabled={!isDualStackSelectable}
|
|
166
|
+
label="IPv4 "
|
|
167
|
+
/>
|
|
175
168
|
</SplitItem>
|
|
176
169
|
<SplitItem>
|
|
177
170
|
<PopoverIcon
|