@openshift-assisted/ui-lib 2.51.0 → 2.51.2
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/common/api/assisted-service/ClustersAPI.d.ts +0 -4
- package/build/@types/common/api/assisted-service/ClustersAPI.d.ts.map +1 -1
- package/build/@types/common/components/clusterWizard/clusterDetailsValidation.d.ts.map +1 -1
- package/build/@types/common/components/clusterWizard/networkingSteps/StackTypeControlGroup.d.ts.map +1 -1
- package/build/@types/common/components/clusterWizard/networkingSteps/VirtualIPControlGroup.d.ts.map +1 -1
- package/build/@types/common/components/ui/OpenShiftVersionModal.d.ts.map +1 -1
- package/build/@types/common/components/ui/formik/PullSecretField.d.ts.map +1 -1
- package/build/@types/common/config/constants.d.ts +0 -7
- package/build/@types/common/config/constants.d.ts.map +1 -1
- package/build/@types/common/types/index.d.ts +1 -0
- package/build/@types/common/types/index.d.ts.map +1 -1
- package/build/@types/common/types/networkType.d.ts +12 -0
- package/build/@types/common/types/networkType.d.ts.map +1 -0
- package/build/@types/common/validationSchemas/addressValidation.d.ts.map +1 -1
- package/build/@types/common/validationSchemas/clusterDetailsValidation.d.ts +0 -5
- package/build/@types/common/validationSchemas/clusterDetailsValidation.d.ts.map +1 -1
- package/build/@types/ocm/components/Routes.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterConfiguration/DiscoveryImageTypeDropdown.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterConfiguration/OcmDiscoveryImageConfigForm.d.ts +2 -2
- package/build/@types/ocm/components/clusterConfiguration/OcmDiscoveryImageConfigForm.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterConfiguration/manifestsConfiguration/CustomManifestsPage.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterConfiguration/manifestsConfiguration/components/CustomManifestsArray.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterConfiguration/networkConfiguration/NetworkConfiguration.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterConfiguration/networkConfiguration/NetworkTypeDropdown.d.ts +1 -2
- package/build/@types/ocm/components/clusterConfiguration/networkConfiguration/NetworkTypeDropdown.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterConfiguration/review/ReviewStep.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterConfiguration/staticIp/commonValidationSchemas.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterConfiguration/staticIp/components/FormViewHosts/FormViewHostsFields.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterConfiguration/staticIp/components/FormViewNetworkWide/formViewNetworkWideValidationSchema.d.ts +0 -22
- package/build/@types/ocm/components/clusterConfiguration/staticIp/components/FormViewNetworkWide/formViewNetworkWideValidationSchema.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterWizard/ClusterDetails.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterWizard/ClusterDetailsForm.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterWizard/ClusterWizardContext.d.ts +0 -3
- package/build/@types/ocm/components/clusterWizard/ClusterWizardContext.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterWizard/ClusterWizardContextProvider.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterWizard/ClusterWizardFooter.d.ts +1 -2
- package/build/@types/ocm/components/clusterWizard/ClusterWizardFooter.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterWizard/NewClusterWizard.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterWizard/constants.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterWizard/disconnected/BasicStep.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterWizard/disconnected/ReviewStep.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterWizard/index.d.ts +0 -1
- package/build/@types/ocm/components/clusterWizard/index.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterWizard/wizardTransition.d.ts +1 -1
- package/build/@types/ocm/components/clusterWizard/wizardTransition.d.ts.map +1 -1
- package/build/@types/ocm/components/featureSupportLevels/featureStateUtils.d.ts.map +1 -1
- package/build/@types/ocm/components/utils.d.ts +0 -1
- package/build/@types/ocm/components/utils.d.ts.map +1 -1
- package/build/@types/ocm/services/ClustersService.d.ts +0 -4
- package/build/@types/ocm/services/ClustersService.d.ts.map +1 -1
- package/build/@types/ocm/services/InfraEnvsService.d.ts.map +1 -1
- package/build/@types/ocm/store/slices/clusters/selectors.d.ts +1 -2
- package/build/@types/ocm/store/slices/clusters/selectors.d.ts.map +1 -1
- package/build/cjs/cim/components/ClusterDeployment/networkConfigurationValidation.js +3 -3
- package/build/cjs/cim/components/ClusterDeployment/networkConfigurationValidation.js.map +1 -1
- package/build/cjs/common/api/assisted-service/ClustersAPI.js +0 -3
- package/build/cjs/common/api/assisted-service/ClustersAPI.js.map +1 -1
- package/build/cjs/common/components/clusterWizard/clusterDetailsValidation.js +8 -17
- package/build/cjs/common/components/clusterWizard/clusterDetailsValidation.js.map +1 -1
- package/build/cjs/common/components/clusterWizard/networkingSteps/NetworkTypeControlGroup.js +3 -3
- package/build/cjs/common/components/clusterWizard/networkingSteps/NetworkTypeControlGroup.js.map +1 -1
- package/build/cjs/common/components/clusterWizard/networkingSteps/StackTypeControlGroup.js +3 -2
- package/build/cjs/common/components/clusterWizard/networkingSteps/StackTypeControlGroup.js.map +1 -1
- package/build/cjs/common/components/clusterWizard/networkingSteps/VirtualIPControlGroup.js +2 -1
- package/build/cjs/common/components/clusterWizard/networkingSteps/VirtualIPControlGroup.js.map +1 -1
- package/build/cjs/common/components/ui/OpenShiftVersionModal.js +1 -3
- package/build/cjs/common/components/ui/OpenShiftVersionModal.js.map +1 -1
- package/build/cjs/common/components/ui/WizardFooter.js +1 -1
- package/build/cjs/common/components/ui/WizardFooter.js.map +1 -1
- package/build/cjs/common/components/ui/formik/PullSecretField.js.map +1 -1
- package/build/cjs/common/config/constants.js +2 -21
- package/build/cjs/common/config/constants.js.map +1 -1
- package/build/cjs/common/types/index.js +1 -0
- package/build/cjs/common/types/index.js.map +1 -1
- package/build/cjs/common/types/networkType.js +28 -0
- package/build/cjs/common/types/networkType.js.map +1 -0
- package/build/cjs/common/validationSchemas/addressValidation.js +1 -3
- package/build/cjs/common/validationSchemas/addressValidation.js.map +1 -1
- package/build/cjs/common/validationSchemas/clusterDetailsValidation.js +2 -31
- package/build/cjs/common/validationSchemas/clusterDetailsValidation.js.map +1 -1
- package/build/cjs/ocm/components/Routes.js +1 -2
- package/build/cjs/ocm/components/Routes.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/DiscoveryImageTypeDropdown.js +0 -1
- package/build/cjs/ocm/components/clusterConfiguration/DiscoveryImageTypeDropdown.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/OcmDiscoveryImageConfigForm.js +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/OcmDiscoveryImageConfigForm.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/manifestsConfiguration/CustomManifestsPage.js +11 -6
- package/build/cjs/ocm/components/clusterConfiguration/manifestsConfiguration/CustomManifestsPage.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/manifestsConfiguration/components/CustomManifestsArray.js +4 -1
- package/build/cjs/ocm/components/clusterConfiguration/manifestsConfiguration/components/CustomManifestsArray.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/networkConfiguration/NetworkConfiguration.js +1 -4
- package/build/cjs/ocm/components/clusterConfiguration/networkConfiguration/NetworkConfiguration.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/networkConfiguration/NetworkTypeDropdown.js +22 -29
- package/build/cjs/ocm/components/clusterConfiguration/networkConfiguration/NetworkTypeDropdown.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/review/ReviewStep.js +8 -14
- package/build/cjs/ocm/components/clusterConfiguration/review/ReviewStep.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/staticIp/commonValidationSchemas.js +2 -5
- package/build/cjs/ocm/components/clusterConfiguration/staticIp/commonValidationSchemas.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/staticIp/components/FormViewHosts/FormViewHostsFields.js +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/staticIp/components/FormViewHosts/FormViewHostsFields.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/staticIp/components/FormViewNetworkWide/FormViewNetworkWide.js +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/staticIp/components/FormViewNetworkWide/FormViewNetworkWide.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/staticIp/components/FormViewNetworkWide/formViewNetworkWideValidationSchema.js +3 -31
- package/build/cjs/ocm/components/clusterConfiguration/staticIp/components/FormViewNetworkWide/formViewNetworkWideValidationSchema.js.map +1 -1
- package/build/cjs/ocm/components/clusterWizard/ClusterDetails.js +1 -2
- package/build/cjs/ocm/components/clusterWizard/ClusterDetails.js.map +1 -1
- package/build/cjs/ocm/components/clusterWizard/ClusterDetailsForm.js +1 -2
- package/build/cjs/ocm/components/clusterWizard/ClusterDetailsForm.js.map +1 -1
- package/build/cjs/ocm/components/clusterWizard/ClusterWizardContext.js.map +1 -1
- package/build/cjs/ocm/components/clusterWizard/ClusterWizardContextProvider.js +9 -62
- package/build/cjs/ocm/components/clusterWizard/ClusterWizardContextProvider.js.map +1 -1
- package/build/cjs/ocm/components/clusterWizard/ClusterWizardFooter.js +6 -21
- package/build/cjs/ocm/components/clusterWizard/ClusterWizardFooter.js.map +1 -1
- package/build/cjs/ocm/components/clusterWizard/NewClusterWizard.js +1 -11
- package/build/cjs/ocm/components/clusterWizard/NewClusterWizard.js.map +1 -1
- package/build/cjs/ocm/components/clusterWizard/constants.js +0 -1
- package/build/cjs/ocm/components/clusterWizard/constants.js.map +1 -1
- package/build/cjs/ocm/components/clusterWizard/disconnected/BasicStep.js +18 -96
- package/build/cjs/ocm/components/clusterWizard/disconnected/BasicStep.js.map +1 -1
- package/build/cjs/ocm/components/clusterWizard/disconnected/ReviewStep.js +7 -11
- package/build/cjs/ocm/components/clusterWizard/disconnected/ReviewStep.js.map +1 -1
- package/build/cjs/ocm/components/clusterWizard/index.js +1 -3
- package/build/cjs/ocm/components/clusterWizard/index.js.map +1 -1
- package/build/cjs/ocm/components/clusterWizard/wizardTransition.js +0 -3
- package/build/cjs/ocm/components/clusterWizard/wizardTransition.js.map +1 -1
- package/build/cjs/ocm/components/featureSupportLevels/featureStateUtils.js +13 -4
- package/build/cjs/ocm/components/featureSupportLevels/featureStateUtils.js.map +1 -1
- package/build/cjs/ocm/components/utils.js +1 -4
- package/build/cjs/ocm/components/utils.js.map +1 -1
- package/build/cjs/ocm/hooks/useInfraEnvId.js +2 -2
- package/build/cjs/ocm/hooks/useInfraEnvId.js.map +1 -1
- package/build/cjs/ocm/services/ClustersService.js +0 -6
- package/build/cjs/ocm/services/ClustersService.js.map +1 -1
- package/build/cjs/ocm/services/InfraEnvsService.js +1 -4
- package/build/cjs/ocm/services/InfraEnvsService.js.map +1 -1
- package/build/cjs/ocm/store/slices/clusters/selectors.js.map +1 -1
- package/lib/cim/components/ClusterDeployment/networkConfigurationValidation.ts +1 -1
- package/lib/common/api/assisted-service/ClustersAPI.ts +0 -6
- package/lib/common/components/clusterWizard/clusterDetailsValidation.ts +9 -19
- package/lib/common/components/clusterWizard/networkingSteps/NetworkTypeControlGroup.tsx +1 -1
- package/lib/common/components/clusterWizard/networkingSteps/StackTypeControlGroup.tsx +5 -6
- package/lib/common/components/clusterWizard/networkingSteps/VirtualIPControlGroup.tsx +2 -2
- package/lib/common/components/ui/OpenShiftVersionModal.tsx +1 -3
- package/lib/common/components/ui/WizardFooter.tsx +1 -1
- package/lib/common/components/ui/formik/PullSecretField.tsx +0 -1
- package/lib/common/config/constants.ts +0 -21
- package/lib/common/types/index.ts +1 -0
- package/lib/common/types/networkType.ts +37 -0
- package/lib/common/validationSchemas/addressValidation.tsx +1 -4
- package/lib/common/validationSchemas/clusterDetailsValidation.tsx +15 -47
- package/lib/ocm/components/Routes.tsx +1 -3
- package/lib/ocm/components/clusterConfiguration/DiscoveryImageTypeDropdown.tsx +0 -1
- package/lib/ocm/components/clusterConfiguration/OcmDiscoveryImageConfigForm.tsx +3 -2
- package/lib/ocm/components/clusterConfiguration/manifestsConfiguration/CustomManifestsPage.tsx +14 -6
- package/lib/ocm/components/clusterConfiguration/manifestsConfiguration/components/CustomManifestsArray.tsx +5 -1
- package/lib/ocm/components/clusterConfiguration/networkConfiguration/NetworkConfiguration.tsx +0 -5
- package/lib/ocm/components/clusterConfiguration/networkConfiguration/NetworkTypeDropdown.tsx +32 -47
- package/lib/ocm/components/clusterConfiguration/review/ReviewStep.tsx +10 -12
- package/lib/ocm/components/clusterConfiguration/staticIp/commonValidationSchemas.tsx +2 -8
- package/lib/ocm/components/clusterConfiguration/staticIp/components/FormViewHosts/FormViewHostsFields.tsx +0 -1
- package/lib/ocm/components/clusterConfiguration/staticIp/components/FormViewNetworkWide/FormViewNetworkWide.tsx +2 -2
- package/lib/ocm/components/clusterConfiguration/staticIp/components/FormViewNetworkWide/formViewNetworkWideValidationSchema.tsx +24 -63
- package/lib/ocm/components/clusterWizard/ClusterDetails.tsx +1 -2
- package/lib/ocm/components/clusterWizard/ClusterDetailsForm.tsx +2 -1
- package/lib/ocm/components/clusterWizard/ClusterWizardContext.tsx +0 -3
- package/lib/ocm/components/clusterWizard/ClusterWizardContextProvider.tsx +27 -91
- package/lib/ocm/components/clusterWizard/ClusterWizardFooter.tsx +5 -26
- package/lib/ocm/components/clusterWizard/NewClusterWizard.tsx +3 -14
- package/lib/ocm/components/clusterWizard/constants.ts +0 -1
- package/lib/ocm/components/clusterWizard/disconnected/BasicStep.tsx +37 -138
- package/lib/ocm/components/clusterWizard/disconnected/ReviewStep.tsx +9 -19
- package/lib/ocm/components/clusterWizard/index.ts +0 -1
- package/lib/ocm/components/clusterWizard/wizardTransition.ts +1 -5
- package/lib/ocm/components/featureSupportLevels/featureStateUtils.ts +15 -4
- package/lib/ocm/components/utils.ts +0 -4
- package/lib/ocm/hooks/useInfraEnvId.ts +2 -2
- package/lib/ocm/services/ClustersService.ts +0 -6
- package/lib/ocm/services/InfraEnvsService.ts +1 -4
- package/lib/ocm/store/slices/clusters/selectors.tsx +2 -1
- package/package.json +3 -3
- package/build/@types/ocm/components/clusterWizard/disconnected/DisconnectedStaticIp.d.ts +0 -4
- package/build/@types/ocm/components/clusterWizard/disconnected/DisconnectedStaticIp.d.ts.map +0 -1
- package/build/@types/ocm/components/clusterWizard/disconnected/OptionalConfigurationsStep.d.ts +0 -4
- package/build/@types/ocm/components/clusterWizard/disconnected/OptionalConfigurationsStep.d.ts.map +0 -1
- package/build/cjs/ocm/components/clusterWizard/disconnected/DisconnectedStaticIp.js +0 -48
- package/build/cjs/ocm/components/clusterWizard/disconnected/DisconnectedStaticIp.js.map +0 -1
- package/build/cjs/ocm/components/clusterWizard/disconnected/OptionalConfigurationsStep.js +0 -182
- package/build/cjs/ocm/components/clusterWizard/disconnected/OptionalConfigurationsStep.js.map +0 -1
- package/lib/ocm/components/clusterWizard/disconnected/DisconnectedStaticIp.tsx +0 -78
- package/lib/ocm/components/clusterWizard/disconnected/OptionalConfigurationsStep.tsx +0 -364
|
@@ -13,13 +13,17 @@ import { HostsNetworkConfigurationType } from '../../services';
|
|
|
13
13
|
import { defaultWizardSteps, staticIpFormViewSubSteps } from './constants';
|
|
14
14
|
import { StaticIpView } from '../clusterConfiguration/staticIp/data/dataTypes';
|
|
15
15
|
import { getStaticIpInfo } from '../clusterConfiguration/staticIp/data/fromInfraEnv';
|
|
16
|
-
import {
|
|
16
|
+
import {
|
|
17
|
+
AssistedInstallerOCMPermissionTypesListType,
|
|
18
|
+
useAlerts,
|
|
19
|
+
isThirdPartyCNI,
|
|
20
|
+
} from '../../../common';
|
|
17
21
|
import useSetClusterPermissions from '../../hooks/useSetClusterPermissions';
|
|
18
22
|
import { Cluster, InfraEnv } from '@openshift-assisted/types/assisted-installer-service';
|
|
19
23
|
import { useUISettings } from '../../hooks';
|
|
20
24
|
import { AlertVariant } from '@patternfly/react-core';
|
|
21
25
|
import { useFeature } from '../../hooks/use-feature';
|
|
22
|
-
import { isOciPlatformType
|
|
26
|
+
import { isOciPlatformType } from '../utils';
|
|
23
27
|
|
|
24
28
|
const addStepToClusterWizard = (
|
|
25
29
|
wizardStepIds: ClusterWizardStepsType[],
|
|
@@ -72,33 +76,6 @@ const getWizardStepIds = (
|
|
|
72
76
|
return stepsCopy;
|
|
73
77
|
};
|
|
74
78
|
|
|
75
|
-
// Same logic as getWizardStepIds but for disconnected flow
|
|
76
|
-
// Adds static IP steps after 'disconnected-optional-configurations' instead of 'cluster-details'
|
|
77
|
-
const getDisconnectedWizardStepIds = (
|
|
78
|
-
wizardStepIds: ClusterWizardStepsType[] | undefined,
|
|
79
|
-
staticIpView?: StaticIpView | 'dhcp-selected',
|
|
80
|
-
): ClusterWizardStepsType[] => {
|
|
81
|
-
let stepsCopy = wizardStepIds ? [...wizardStepIds] : [...disconnectedSteps];
|
|
82
|
-
if (staticIpView === StaticIpView.YAML) {
|
|
83
|
-
stepsCopy = removeStepFromClusterWizard(stepsCopy, 'static-ip-network-wide-configurations', 2);
|
|
84
|
-
stepsCopy = addStepToClusterWizard(stepsCopy, 'disconnected-optional-configurations', [
|
|
85
|
-
'static-ip-yaml-view',
|
|
86
|
-
]);
|
|
87
|
-
} else if (staticIpView === StaticIpView.FORM) {
|
|
88
|
-
stepsCopy = removeStepFromClusterWizard(stepsCopy, 'static-ip-yaml-view', 1);
|
|
89
|
-
stepsCopy = addStepToClusterWizard(
|
|
90
|
-
stepsCopy,
|
|
91
|
-
'disconnected-optional-configurations',
|
|
92
|
-
staticIpFormViewSubSteps,
|
|
93
|
-
);
|
|
94
|
-
} else if (staticIpView === 'dhcp-selected') {
|
|
95
|
-
stepsCopy = removeStepFromClusterWizard(stepsCopy, 'static-ip-network-wide-configurations', 2);
|
|
96
|
-
stepsCopy = removeStepFromClusterWizard(stepsCopy, 'static-ip-yaml-view', 1);
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
return stepsCopy;
|
|
100
|
-
};
|
|
101
|
-
|
|
102
79
|
const ClusterWizardContextProvider = ({
|
|
103
80
|
children,
|
|
104
81
|
cluster,
|
|
@@ -112,13 +89,8 @@ const ClusterWizardContextProvider = ({
|
|
|
112
89
|
const isSingleClusterFeatureEnabled = useFeature('ASSISTED_INSTALLER_SINGLE_CLUSTER_FEATURE');
|
|
113
90
|
const [currentStepId, setCurrentStepId] = React.useState<ClusterWizardStepsType>();
|
|
114
91
|
const [connectedWizardStepIds, setWizardStepIds] = React.useState<ClusterWizardStepsType[]>();
|
|
115
|
-
const [disconnectedWizardStepIds, setDisconnectedWizardStepIds] =
|
|
116
|
-
React.useState<ClusterWizardStepsType[]>(disconnectedSteps);
|
|
117
92
|
const [wizardPerPage, setWizardPerPage] = React.useState(10);
|
|
118
93
|
const [installDisconnected, setInstallDisconnected] = React.useState(false);
|
|
119
|
-
const [disconnectedInfraEnv, setDisconnectedInfraEnv] = React.useState<InfraEnv | undefined>(
|
|
120
|
-
infraEnv,
|
|
121
|
-
);
|
|
122
94
|
const location = useLocation();
|
|
123
95
|
const locationState = location.state as ClusterWizardFlowStateType | undefined;
|
|
124
96
|
const {
|
|
@@ -130,7 +102,7 @@ const ClusterWizardContextProvider = ({
|
|
|
130
102
|
const { clearAlerts, addAlert, alerts } = useAlerts();
|
|
131
103
|
const setClusterPermissions = useSetClusterPermissions();
|
|
132
104
|
|
|
133
|
-
const wizardStepIds = installDisconnected ?
|
|
105
|
+
const wizardStepIds = installDisconnected ? disconnectedSteps : connectedWizardStepIds;
|
|
134
106
|
|
|
135
107
|
React.useEffect(() => {
|
|
136
108
|
if (!UISettingsLoading) {
|
|
@@ -190,29 +162,18 @@ const ClusterWizardContextProvider = ({
|
|
|
190
162
|
|
|
191
163
|
const handleMoveFromStaticIp = () => {
|
|
192
164
|
//if static ip view change wasn't persisted, moving from static ip step should change the wizard steps to match the view in the infra env
|
|
193
|
-
const
|
|
194
|
-
const staticIpInfo = currentInfraEnv ? getStaticIpInfo(currentInfraEnv) : undefined;
|
|
165
|
+
const staticIpInfo = infraEnv ? getStaticIpInfo(infraEnv) : undefined;
|
|
195
166
|
if (!staticIpInfo) {
|
|
196
167
|
throw `Wizard step is currently ${currentStepId}, but no static ip info is defined`;
|
|
197
168
|
}
|
|
198
169
|
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
disconnectedWizardStepIds,
|
|
203
|
-
staticIpInfo.view,
|
|
204
|
-
);
|
|
205
|
-
setDisconnectedWizardStepIds(newStepIds);
|
|
206
|
-
} else {
|
|
207
|
-
// For connected wizard, update wizard steps directly
|
|
208
|
-
const newStepIds = getWizardStepIds(
|
|
209
|
-
wizardStepIds,
|
|
210
|
-
staticIpInfo.view,
|
|
170
|
+
const newStepIds = getWizardStepIds(
|
|
171
|
+
wizardStepIds,
|
|
172
|
+
staticIpInfo.view,
|
|
211
173
|
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
}
|
|
174
|
+
isSingleClusterFeatureEnabled,
|
|
175
|
+
);
|
|
176
|
+
setWizardStepIds(newStepIds);
|
|
216
177
|
};
|
|
217
178
|
|
|
218
179
|
const onSetCurrentStepId = (stepId: ClusterWizardStepsType) => {
|
|
@@ -244,43 +205,22 @@ const ClusterWizardContextProvider = ({
|
|
|
244
205
|
} else {
|
|
245
206
|
setCurrentStepId('static-ip-network-wide-configurations');
|
|
246
207
|
}
|
|
247
|
-
|
|
248
|
-
// For disconnected wizard, update wizard steps (same pattern as connected)
|
|
249
|
-
setDisconnectedWizardStepIds(
|
|
250
|
-
getDisconnectedWizardStepIds(disconnectedWizardStepIds, view),
|
|
251
|
-
);
|
|
252
|
-
} else {
|
|
253
|
-
setWizardStepIds(getWizardStepIds(wizardStepIds, view, isSingleClusterFeatureEnabled));
|
|
254
|
-
}
|
|
208
|
+
setWizardStepIds(getWizardStepIds(wizardStepIds, view, isSingleClusterFeatureEnabled));
|
|
255
209
|
},
|
|
256
210
|
onUpdateHostNetworkConfigType(type: HostsNetworkConfigurationType): void {
|
|
257
|
-
if (
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
);
|
|
263
|
-
} else {
|
|
264
|
-
setDisconnectedWizardStepIds(
|
|
265
|
-
getDisconnectedWizardStepIds(disconnectedWizardStepIds, 'dhcp-selected'),
|
|
266
|
-
);
|
|
267
|
-
}
|
|
268
|
-
} else {
|
|
269
|
-
// For connected wizard, update wizard steps directly
|
|
270
|
-
if (type === HostsNetworkConfigurationType.STATIC) {
|
|
271
|
-
setWizardStepIds(
|
|
272
|
-
getWizardStepIds(
|
|
273
|
-
wizardStepIds,
|
|
274
|
-
StaticIpView.FORM,
|
|
211
|
+
if (type === HostsNetworkConfigurationType.STATIC) {
|
|
212
|
+
setWizardStepIds(
|
|
213
|
+
getWizardStepIds(
|
|
214
|
+
wizardStepIds,
|
|
215
|
+
StaticIpView.FORM,
|
|
275
216
|
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
}
|
|
217
|
+
isSingleClusterFeatureEnabled,
|
|
218
|
+
),
|
|
219
|
+
);
|
|
220
|
+
} else {
|
|
221
|
+
setWizardStepIds(
|
|
222
|
+
getWizardStepIds(wizardStepIds, 'dhcp-selected', isSingleClusterFeatureEnabled),
|
|
223
|
+
);
|
|
284
224
|
}
|
|
285
225
|
},
|
|
286
226
|
wizardStepIds: wizardStepIds,
|
|
@@ -299,8 +239,6 @@ const ClusterWizardContextProvider = ({
|
|
|
299
239
|
connectedWizardStepIds?.length && onSetCurrentStepId(connectedWizardStepIds[0]);
|
|
300
240
|
}
|
|
301
241
|
},
|
|
302
|
-
disconnectedInfraEnv,
|
|
303
|
-
setDisconnectedInfraEnv,
|
|
304
242
|
};
|
|
305
243
|
}, [
|
|
306
244
|
wizardStepIds,
|
|
@@ -313,8 +251,6 @@ const ClusterWizardContextProvider = ({
|
|
|
313
251
|
updateUISettings,
|
|
314
252
|
installDisconnected,
|
|
315
253
|
connectedWizardStepIds,
|
|
316
|
-
disconnectedWizardStepIds,
|
|
317
|
-
disconnectedInfraEnv,
|
|
318
254
|
]);
|
|
319
255
|
|
|
320
256
|
if (!contextValue) {
|
|
@@ -17,8 +17,6 @@ import { onFetchEvents } from '../fetching/fetchEvents';
|
|
|
17
17
|
import { Cluster } from '@openshift-assisted/types/assisted-installer-service';
|
|
18
18
|
import { useFeature } from '../../hooks/use-feature';
|
|
19
19
|
import { useModalDialogsContext } from '../hosts/ModalDialogsContext';
|
|
20
|
-
import ClustersService from '../../services/ClustersService';
|
|
21
|
-
import { handleApiError, getApiErrorMessage } from '../../../common/api';
|
|
22
20
|
|
|
23
21
|
type ClusterValidationSectionProps = {
|
|
24
22
|
cluster?: Cluster;
|
|
@@ -73,7 +71,6 @@ type ClusterWizardFooterProps = WizardFooterGenericProps & {
|
|
|
73
71
|
errorFields?: string[];
|
|
74
72
|
alertTitle?: string;
|
|
75
73
|
alertContent?: string | null;
|
|
76
|
-
disconnectedClusterId?: string;
|
|
77
74
|
};
|
|
78
75
|
|
|
79
76
|
const ClusterWizardFooter = ({
|
|
@@ -83,37 +80,19 @@ const ClusterWizardFooter = ({
|
|
|
83
80
|
alertTitle,
|
|
84
81
|
alertContent,
|
|
85
82
|
onCancel,
|
|
86
|
-
disconnectedClusterId,
|
|
87
83
|
...rest
|
|
88
84
|
}: ClusterWizardFooterProps) => {
|
|
89
|
-
const { alerts
|
|
85
|
+
const { alerts } = useAlerts();
|
|
90
86
|
const navigate = useNavigate();
|
|
91
87
|
const isSingleClusterFeatureEnabled = useFeature('ASSISTED_INSTALLER_SINGLE_CLUSTER_FEATURE');
|
|
92
88
|
const { currentStepId } = useClusterWizardContext();
|
|
93
89
|
const { resetSingleClusterDialog } = useModalDialogsContext();
|
|
94
|
-
const { setDisconnectedInfraEnv } = useClusterWizardContext();
|
|
95
90
|
|
|
96
|
-
const handleCancel = React.useCallback(
|
|
97
|
-
if (disconnectedClusterId) {
|
|
98
|
-
try {
|
|
99
|
-
await ClustersService.remove(disconnectedClusterId);
|
|
100
|
-
} catch (e) {
|
|
101
|
-
handleApiError(e, () =>
|
|
102
|
-
addAlert({
|
|
103
|
-
title: 'Failed to remove cluster',
|
|
104
|
-
message: getApiErrorMessage(e),
|
|
105
|
-
}),
|
|
106
|
-
);
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
setDisconnectedInfraEnv(undefined);
|
|
110
|
-
navigate('/cluster-list');
|
|
111
|
-
}, [navigate, setDisconnectedInfraEnv, addAlert, disconnectedClusterId]);
|
|
91
|
+
const handleCancel = React.useCallback(() => navigate('/cluster-list'), [navigate]);
|
|
112
92
|
|
|
113
|
-
const handleReset = React.useCallback(
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
);
|
|
93
|
+
const handleReset = React.useCallback(() => {
|
|
94
|
+
resetSingleClusterDialog.open({ cluster });
|
|
95
|
+
}, [resetSingleClusterDialog, cluster]);
|
|
117
96
|
|
|
118
97
|
const alertsSection = alerts.length ? <Alerts /> : undefined;
|
|
119
98
|
|
|
@@ -4,10 +4,7 @@ import ClusterDetails from './ClusterDetails';
|
|
|
4
4
|
import { useClusterWizardContext } from './ClusterWizardContext';
|
|
5
5
|
import ReviewStep from './disconnected/ReviewStep';
|
|
6
6
|
import BasicStep from './disconnected/BasicStep';
|
|
7
|
-
import OptionalConfigurationsStep from './disconnected/OptionalConfigurationsStep';
|
|
8
|
-
import DisconnectedStaticIp from './disconnected/DisconnectedStaticIp';
|
|
9
7
|
import { ClusterWizardStepsType } from './wizardTransition';
|
|
10
|
-
import { ModalDialogsContextProvider } from '../hosts/ModalDialogsContext';
|
|
11
8
|
|
|
12
9
|
const getCurrentStep = (currentStepId: ClusterWizardStepsType) => {
|
|
13
10
|
switch (currentStepId) {
|
|
@@ -15,12 +12,6 @@ const getCurrentStep = (currentStepId: ClusterWizardStepsType) => {
|
|
|
15
12
|
return <ReviewStep />;
|
|
16
13
|
case 'disconnected-basic':
|
|
17
14
|
return <BasicStep />;
|
|
18
|
-
case 'disconnected-optional-configurations':
|
|
19
|
-
return <OptionalConfigurationsStep />;
|
|
20
|
-
case 'static-ip-yaml-view':
|
|
21
|
-
case 'static-ip-network-wide-configurations':
|
|
22
|
-
case 'static-ip-host-configurations':
|
|
23
|
-
return <DisconnectedStaticIp />;
|
|
24
15
|
default:
|
|
25
16
|
return <ClusterDetails />;
|
|
26
17
|
}
|
|
@@ -29,11 +20,9 @@ const getCurrentStep = (currentStepId: ClusterWizardStepsType) => {
|
|
|
29
20
|
const NewClusterWizard: React.FC = () => {
|
|
30
21
|
const { currentStepId } = useClusterWizardContext();
|
|
31
22
|
return (
|
|
32
|
-
<
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
</div>
|
|
36
|
-
</ModalDialogsContextProvider>
|
|
23
|
+
<div className={classNames('pf-v6-c-wizard', 'cluster-wizard')}>
|
|
24
|
+
{getCurrentStep(currentStepId)}
|
|
25
|
+
</div>
|
|
37
26
|
);
|
|
38
27
|
};
|
|
39
28
|
|
|
@@ -14,7 +14,6 @@ export const wizardStepNames: { [key in ClusterWizardStepsType]: string } = {
|
|
|
14
14
|
'credentials-download': 'Download credentials',
|
|
15
15
|
'disconnected-review': 'Review and download ISO',
|
|
16
16
|
'disconnected-basic': 'Basic information',
|
|
17
|
-
'disconnected-optional-configurations': 'Optional configurations',
|
|
18
17
|
};
|
|
19
18
|
|
|
20
19
|
export const defaultWizardSteps: ClusterWizardStepsType[] = [
|
|
@@ -7,162 +7,61 @@ import {
|
|
|
7
7
|
StaticTextField,
|
|
8
8
|
useTranslation,
|
|
9
9
|
} from '../../../../common';
|
|
10
|
-
import { Flex, Grid, GridItem, Form, Content
|
|
10
|
+
import { Flex, Grid, GridItem, Form, Content } from '@patternfly/react-core';
|
|
11
11
|
import OcmOpenShiftVersion from '../../clusterConfiguration/OcmOpenShiftVersion';
|
|
12
12
|
import { useClusterWizardContext } from '../ClusterWizardContext';
|
|
13
13
|
import ClusterWizardFooter from '../ClusterWizardFooter';
|
|
14
14
|
import ClusterWizardNavigation from '../ClusterWizardNavigation';
|
|
15
15
|
import { WithErrorBoundary } from '../../../../common/components/ErrorHandling/WithErrorBoundary';
|
|
16
16
|
import InstallDisconnectedSwitch from './InstallDisconnectedSwitch';
|
|
17
|
-
import { Formik
|
|
18
|
-
import ClustersService from '../../../services/ClustersService';
|
|
19
|
-
import { handleApiError, getApiErrorMessage } from '../../../../common/api';
|
|
20
|
-
import { useAlerts } from '../../../../common/components/AlertsContextProvider';
|
|
21
|
-
import { AlertVariant } from '@patternfly/react-core';
|
|
22
|
-
import { ClusterWizardFlowStateNew } from '../wizardTransition';
|
|
23
|
-
import { useLocation, useNavigate, useParams } from 'react-router-dom-v5-compat';
|
|
24
|
-
import { AxiosResponse } from 'axios';
|
|
25
|
-
import { Cluster } from '@openshift-assisted/types/assisted-installer-service';
|
|
26
|
-
import OcmOpenShiftVersionSelect from '../../clusterConfiguration/OcmOpenShiftVersionSelect';
|
|
17
|
+
import { Formik } from 'formik';
|
|
27
18
|
|
|
28
|
-
|
|
29
|
-
openshiftVersion: string;
|
|
30
|
-
customOpenshiftSelect: string | null;
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
const BasicStepForm = () => {
|
|
34
|
-
const { clusterId } = useParams<{ clusterId: string }>();
|
|
35
|
-
const [isLoading, setIsLoading] = React.useState(true);
|
|
36
|
-
const [cluster, setCluster] = React.useState<Cluster>();
|
|
37
|
-
|
|
38
|
-
const { values } = useFormikContext<BasicStepFormikValues>();
|
|
19
|
+
const BasicStep = () => {
|
|
39
20
|
const { t } = useTranslation();
|
|
40
21
|
const { moveNext } = useClusterWizardContext();
|
|
41
|
-
const { addAlert } = useAlerts();
|
|
42
|
-
const [isSubmitting, setIsSubmitting] = React.useState(false);
|
|
43
|
-
const navigate = useNavigate();
|
|
44
|
-
const location = useLocation();
|
|
45
|
-
const currentPath = location.pathname;
|
|
46
|
-
|
|
47
|
-
React.useEffect(() => {
|
|
48
|
-
if (!clusterId) {
|
|
49
|
-
setIsLoading(false);
|
|
50
|
-
} else {
|
|
51
|
-
void (async () => {
|
|
52
|
-
setIsLoading(true);
|
|
53
|
-
try {
|
|
54
|
-
setCluster(await ClustersService.get(clusterId));
|
|
55
|
-
} catch (error) {
|
|
56
|
-
handleApiError(error, () => {
|
|
57
|
-
addAlert({
|
|
58
|
-
title: 'Failed to fetch disconnected cluster',
|
|
59
|
-
message: getApiErrorMessage(error),
|
|
60
|
-
variant: AlertVariant.danger,
|
|
61
|
-
});
|
|
62
|
-
});
|
|
63
|
-
} finally {
|
|
64
|
-
setIsLoading(false);
|
|
65
|
-
}
|
|
66
|
-
})();
|
|
67
|
-
}
|
|
68
|
-
}, [clusterId, addAlert]);
|
|
69
|
-
|
|
70
|
-
const createCluster = async () => {
|
|
71
|
-
try {
|
|
72
|
-
setIsSubmitting(true);
|
|
73
|
-
// Create cluster only - infraEnv will be created in OptionalConfigurationsStep
|
|
74
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
75
|
-
const { data: disconnectedCluster }: AxiosResponse<Cluster> =
|
|
76
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-call
|
|
77
|
-
await ClustersService.registerDisconnected({
|
|
78
|
-
name: 'disconnected-cluster',
|
|
79
|
-
openshiftVersion: values.openshiftVersion,
|
|
80
|
-
});
|
|
81
|
-
navigate(`${currentPath}/${disconnectedCluster.id}`, {
|
|
82
|
-
state: ClusterWizardFlowStateNew,
|
|
83
|
-
});
|
|
84
|
-
moveNext();
|
|
85
|
-
} catch (error: unknown) {
|
|
86
|
-
handleApiError(error, () => {
|
|
87
|
-
addAlert({
|
|
88
|
-
title: 'Failed to create disconnected cluster',
|
|
89
|
-
message: getApiErrorMessage(error),
|
|
90
|
-
variant: AlertVariant.danger,
|
|
91
|
-
});
|
|
92
|
-
});
|
|
93
|
-
} finally {
|
|
94
|
-
setIsSubmitting(false);
|
|
95
|
-
}
|
|
96
|
-
};
|
|
97
22
|
|
|
98
23
|
return (
|
|
99
|
-
<
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
clusterId ? moveNext() : void createCluster();
|
|
105
|
-
}}
|
|
106
|
-
isSubmitting={isSubmitting}
|
|
107
|
-
isNextDisabled={isLoading || (cluster ? false : !values.openshiftVersion)}
|
|
108
|
-
disconnectedClusterId={clusterId}
|
|
109
|
-
/>
|
|
110
|
-
}
|
|
24
|
+
<Formik
|
|
25
|
+
initialValues={{}}
|
|
26
|
+
onSubmit={() => {
|
|
27
|
+
// nothing to do
|
|
28
|
+
}}
|
|
111
29
|
>
|
|
112
|
-
<
|
|
113
|
-
<
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
<
|
|
118
|
-
<
|
|
119
|
-
<
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
>
|
|
30
|
+
<ClusterWizardStep
|
|
31
|
+
navigation={<ClusterWizardNavigation />}
|
|
32
|
+
footer={<ClusterWizardFooter onNext={moveNext} />}
|
|
33
|
+
>
|
|
34
|
+
<WithErrorBoundary title="Failed to load Basic step">
|
|
35
|
+
<Grid hasGutter>
|
|
36
|
+
<GridItem>
|
|
37
|
+
<Content component="h2">Basic information</Content>
|
|
38
|
+
</GridItem>
|
|
39
|
+
<GridItem>
|
|
40
|
+
<Flex alignItems={{ default: 'alignItemsCenter' }} gap={{ default: 'gapSm' }}>
|
|
41
|
+
<TechnologyPreview />
|
|
42
|
+
<InstallDisconnectedSwitch />
|
|
43
|
+
<span>
|
|
44
|
+
{t("ai:I'm installing on a disconnected/air-gapped/secured environment")}
|
|
45
|
+
</span>
|
|
46
|
+
</Flex>
|
|
47
|
+
</GridItem>
|
|
48
|
+
<GridItem>
|
|
49
|
+
<Form id="wizard-cluster-basic-info__form">
|
|
50
|
+
<OcmOpenShiftVersion openshiftVersion="4.20" withPreviewText withMultiText>
|
|
134
51
|
<ExternalLink href={`${window.location.origin}/${OCP_RELEASES_PAGE}`}>
|
|
135
52
|
<span data-ouia-id="openshift-releases-link">
|
|
136
53
|
{t('ai:Learn more about OpenShift releases')}
|
|
137
54
|
</span>
|
|
138
55
|
</ExternalLink>
|
|
139
56
|
</OcmOpenShiftVersion>
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
</Grid>
|
|
149
|
-
</WithErrorBoundary>
|
|
150
|
-
</ClusterWizardStep>
|
|
151
|
-
);
|
|
152
|
-
};
|
|
153
|
-
|
|
154
|
-
const BasicStep = () => {
|
|
155
|
-
return (
|
|
156
|
-
<Formik<BasicStepFormikValues>
|
|
157
|
-
initialValues={{
|
|
158
|
-
openshiftVersion: '',
|
|
159
|
-
customOpenshiftSelect: null,
|
|
160
|
-
}}
|
|
161
|
-
onSubmit={() => {
|
|
162
|
-
// nothing to do
|
|
163
|
-
}}
|
|
164
|
-
>
|
|
165
|
-
<BasicStepForm />
|
|
57
|
+
<StaticTextField name="cpuArchitecture" label="CPU architecture" isRequired>
|
|
58
|
+
x86_64
|
|
59
|
+
</StaticTextField>
|
|
60
|
+
</Form>
|
|
61
|
+
</GridItem>
|
|
62
|
+
</Grid>
|
|
63
|
+
</WithErrorBoundary>
|
|
64
|
+
</ClusterWizardStep>
|
|
166
65
|
</Formik>
|
|
167
66
|
);
|
|
168
67
|
};
|
|
@@ -25,13 +25,16 @@ import {
|
|
|
25
25
|
Content,
|
|
26
26
|
} from '@patternfly/react-core';
|
|
27
27
|
import { Formik } from 'formik';
|
|
28
|
-
import {
|
|
28
|
+
import { saveAs } from 'file-saver';
|
|
29
|
+
import { useNavigate } from 'react-router-dom-v5-compat';
|
|
29
30
|
|
|
30
31
|
import { getOperatorSpecs } from '../../../../common/components/operators/operatorSpecs';
|
|
31
32
|
|
|
33
|
+
const downloadUrl =
|
|
34
|
+
'https://mirror.openshift.com/pub/cgw/assisted-installer-disconnected/latest/agent-ove.x86_64.iso';
|
|
35
|
+
|
|
32
36
|
const ReviewStep = () => {
|
|
33
|
-
const { moveBack
|
|
34
|
-
const { clusterId } = useParams<{ clusterId: string }>();
|
|
37
|
+
const { moveBack } = useClusterWizardContext();
|
|
35
38
|
const opSpecs = getOperatorSpecs(() => undefined);
|
|
36
39
|
const navigate = useNavigate();
|
|
37
40
|
|
|
@@ -47,14 +50,11 @@ const ReviewStep = () => {
|
|
|
47
50
|
footer={
|
|
48
51
|
<ClusterWizardFooter
|
|
49
52
|
onNext={() => {
|
|
50
|
-
|
|
51
|
-
window.open(disconnectedInfraEnv.downloadUrl, '_blank');
|
|
52
|
-
}
|
|
53
|
+
downloadUrl && saveAs(downloadUrl);
|
|
53
54
|
navigate('/cluster-list');
|
|
54
55
|
}}
|
|
55
56
|
onBack={moveBack}
|
|
56
57
|
nextButtonText="Download ISO"
|
|
57
|
-
disconnectedClusterId={clusterId}
|
|
58
58
|
/>
|
|
59
59
|
}
|
|
60
60
|
>
|
|
@@ -96,19 +96,9 @@ const ReviewStep = () => {
|
|
|
96
96
|
</List>
|
|
97
97
|
</Alert>
|
|
98
98
|
<DescriptionList isHorizontal>
|
|
99
|
-
{disconnectedInfraEnv?.rendezvousIp && (
|
|
100
|
-
<DescriptionListGroup>
|
|
101
|
-
<DescriptionListTerm>Rendezvous IP</DescriptionListTerm>
|
|
102
|
-
<DescriptionListDescription>
|
|
103
|
-
{disconnectedInfraEnv?.rendezvousIp}
|
|
104
|
-
</DescriptionListDescription>
|
|
105
|
-
</DescriptionListGroup>
|
|
106
|
-
)}
|
|
107
99
|
<DescriptionListGroup>
|
|
108
100
|
<DescriptionListTerm>OpenShift version</DescriptionListTerm>
|
|
109
|
-
<DescriptionListDescription>
|
|
110
|
-
{disconnectedInfraEnv?.openshiftVersion || ''}
|
|
111
|
-
</DescriptionListDescription>
|
|
101
|
+
<DescriptionListDescription>4.20</DescriptionListDescription>
|
|
112
102
|
</DescriptionListGroup>
|
|
113
103
|
<DescriptionListGroup>
|
|
114
104
|
<DescriptionListTerm>CPU architecture</DescriptionListTerm>
|
|
@@ -116,7 +106,7 @@ const ReviewStep = () => {
|
|
|
116
106
|
</DescriptionListGroup>
|
|
117
107
|
<DescriptionListGroup>
|
|
118
108
|
<DescriptionListTerm>ISO size</DescriptionListTerm>
|
|
119
|
-
<DescriptionListDescription>approx.
|
|
109
|
+
<DescriptionListDescription>approx. 43.5GB</DescriptionListDescription>
|
|
120
110
|
</DescriptionListGroup>
|
|
121
111
|
</DescriptionList>
|
|
122
112
|
</Grid>
|
|
@@ -2,5 +2,4 @@ export { default as ClusterDetailsForm } from './ClusterDetailsForm';
|
|
|
2
2
|
export { default as NewClusterWizard } from './NewClusterWizard';
|
|
3
3
|
export { default as ClusterWizard } from './ClusterWizard';
|
|
4
4
|
export { default as ClusterWizardContextProvider } from './ClusterWizardContextProvider';
|
|
5
|
-
export { useClusterWizardContext } from './ClusterWizardContext';
|
|
6
5
|
export { OpenShiftVersionsContextProvider } from './OpenShiftVersionsContext';
|
|
@@ -31,8 +31,7 @@ export type ClusterWizardStepsType =
|
|
|
31
31
|
| 'custom-manifests'
|
|
32
32
|
| 'credentials-download'
|
|
33
33
|
| 'disconnected-basic'
|
|
34
|
-
| 'disconnected-review'
|
|
35
|
-
| 'disconnected-optional-configurations';
|
|
34
|
+
| 'disconnected-review';
|
|
36
35
|
|
|
37
36
|
const wizardStepsOrder: ClusterWizardStepsType[] = [
|
|
38
37
|
'cluster-details',
|
|
@@ -50,7 +49,6 @@ const wizardStepsOrder: ClusterWizardStepsType[] = [
|
|
|
50
49
|
|
|
51
50
|
export const disconnectedSteps: ClusterWizardStepsType[] = [
|
|
52
51
|
'disconnected-basic',
|
|
53
|
-
'disconnected-optional-configurations',
|
|
54
52
|
'disconnected-review',
|
|
55
53
|
];
|
|
56
54
|
|
|
@@ -270,7 +268,6 @@ const credentialsValidationMap = buildEmptyValidationsMap();
|
|
|
270
268
|
const customManifestsValidationsMap = buildEmptyValidationsMap();
|
|
271
269
|
const disconnectedReviewValidationsMap = buildEmptyValidationsMap();
|
|
272
270
|
const disconnectedBasicValidationsMap = buildEmptyValidationsMap();
|
|
273
|
-
const disconnectedOptionalConfigurationsValidationsMap = buildEmptyValidationsMap();
|
|
274
271
|
|
|
275
272
|
export const wizardStepsValidationsMap: WizardStepsValidationMap<ClusterWizardStepsType> = {
|
|
276
273
|
'cluster-details': clusterDetailsStepValidationsMap,
|
|
@@ -286,7 +283,6 @@ export const wizardStepsValidationsMap: WizardStepsValidationMap<ClusterWizardSt
|
|
|
286
283
|
'credentials-download': credentialsValidationMap,
|
|
287
284
|
'disconnected-review': disconnectedReviewValidationsMap,
|
|
288
285
|
'disconnected-basic': disconnectedBasicValidationsMap,
|
|
289
|
-
'disconnected-optional-configurations': disconnectedOptionalConfigurationsValidationsMap,
|
|
290
286
|
};
|
|
291
287
|
|
|
292
288
|
export const allClusterWizardSoftValidationIds =
|
|
@@ -3,6 +3,7 @@ import {
|
|
|
3
3
|
architectureData,
|
|
4
4
|
CpuArchitecture,
|
|
5
5
|
FeatureId,
|
|
6
|
+
isDualStack,
|
|
6
7
|
isSNO,
|
|
7
8
|
SupportedCpuArchitecture,
|
|
8
9
|
} from '../../../common';
|
|
@@ -143,6 +144,19 @@ const getOciDisabledReason = (cpuArchitecture: string | undefined, isSupported:
|
|
|
143
144
|
}
|
|
144
145
|
};
|
|
145
146
|
|
|
147
|
+
const getSDNDisabledReason = (cluster: Cluster | undefined, isSupported: boolean) => {
|
|
148
|
+
if (cluster && isSNO(cluster)) {
|
|
149
|
+
return 'SDN is not supported for single-node clusters.';
|
|
150
|
+
}
|
|
151
|
+
if (cluster && isDualStack(cluster)) {
|
|
152
|
+
return 'SDN is not supported for dual-stack clusters.';
|
|
153
|
+
}
|
|
154
|
+
if (!isSupported) {
|
|
155
|
+
return 'SDN is not supported for the selected configuration.';
|
|
156
|
+
}
|
|
157
|
+
return undefined;
|
|
158
|
+
};
|
|
159
|
+
|
|
146
160
|
export const getNewFeatureDisabledReason = (
|
|
147
161
|
featureId: FeatureId,
|
|
148
162
|
cluster: Cluster | undefined,
|
|
@@ -182,10 +196,7 @@ export const getNewFeatureDisabledReason = (
|
|
|
182
196
|
return getOscDisabledReason(cluster, activeFeatureConfiguration, isSupported);
|
|
183
197
|
}
|
|
184
198
|
case 'SDN_NETWORK_TYPE': {
|
|
185
|
-
|
|
186
|
-
return 'SDN is not available for the selected configuration.';
|
|
187
|
-
}
|
|
188
|
-
return undefined;
|
|
199
|
+
return getSDNDisabledReason(cluster, isSupported);
|
|
189
200
|
}
|
|
190
201
|
case 'NETWORK_TYPE_SELECTION': {
|
|
191
202
|
return getNetworkTypeSelectionDisabledReason(cluster);
|
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
import { Cluster } from '@openshift-assisted/types/./assisted-installer-service';
|
|
2
|
-
import { NETWORK_TYPE_OVN, NETWORK_TYPE_SDN } from '../../common/config';
|
|
3
2
|
|
|
4
3
|
export const isOciPlatformType = (cluster: Cluster): boolean => {
|
|
5
4
|
return (
|
|
6
5
|
cluster.platform?.type === 'external' && cluster.platform?.external?.platformName === 'oci'
|
|
7
6
|
);
|
|
8
7
|
};
|
|
9
|
-
|
|
10
|
-
export const isThirdPartyCNI = (networkType: Cluster['networkType']): boolean =>
|
|
11
|
-
!!networkType && networkType !== NETWORK_TYPE_OVN && networkType !== NETWORK_TYPE_SDN;
|
|
@@ -55,12 +55,12 @@ export default function useInfraEnvId(
|
|
|
55
55
|
]);
|
|
56
56
|
|
|
57
57
|
React.useEffect(() => {
|
|
58
|
-
if (!clusterId
|
|
58
|
+
if (!clusterId) {
|
|
59
59
|
setError('Missing clusterId to load infrastructure environment');
|
|
60
60
|
} else if (!infraEnvId) {
|
|
61
61
|
void findInfraEnvId();
|
|
62
62
|
}
|
|
63
|
-
}, [clusterId, findInfraEnvId, infraEnvId
|
|
63
|
+
}, [clusterId, findInfraEnvId, infraEnvId]);
|
|
64
64
|
|
|
65
65
|
return { infraEnvId, error };
|
|
66
66
|
}
|