@openshift-assisted/ui-lib 2.51.0 → 2.51.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/@types/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/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 +7 -5
- 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/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 +19 -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 +10 -5
- 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/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 +39 -139
- 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
|
@@ -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[] = [
|
|
@@ -1,168 +1,68 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import {
|
|
3
3
|
ClusterWizardStep,
|
|
4
|
-
|
|
4
|
+
DeveloperPreview,
|
|
5
5
|
ExternalLink,
|
|
6
6
|
OCP_RELEASES_PAGE,
|
|
7
7
|
StaticTextField,
|
|
8
8
|
useTranslation,
|
|
9
9
|
} from '../../../../common';
|
|
10
|
-
import {
|
|
10
|
+
import { Split, SplitItem, 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
|
+
<Split>
|
|
38
|
+
<SplitItem>
|
|
39
|
+
<Content component="h2">Basic information</Content>
|
|
40
|
+
</SplitItem>
|
|
41
|
+
<SplitItem>
|
|
42
|
+
<DeveloperPreview />
|
|
43
|
+
</SplitItem>
|
|
44
|
+
</Split>
|
|
45
|
+
</GridItem>
|
|
46
|
+
<GridItem>
|
|
47
|
+
<InstallDisconnectedSwitch />
|
|
48
|
+
</GridItem>
|
|
49
|
+
<GridItem>
|
|
50
|
+
<Form id="wizard-cluster-basic-info__form">
|
|
51
|
+
<OcmOpenShiftVersion openshiftVersion="4.19" withPreviewText withMultiText>
|
|
134
52
|
<ExternalLink href={`${window.location.origin}/${OCP_RELEASES_PAGE}`}>
|
|
135
53
|
<span data-ouia-id="openshift-releases-link">
|
|
136
54
|
{t('ai:Learn more about OpenShift releases')}
|
|
137
55
|
</span>
|
|
138
56
|
</ExternalLink>
|
|
139
57
|
</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 />
|
|
58
|
+
<StaticTextField name="cpuArchitecture" label="CPU architecture" isRequired>
|
|
59
|
+
x86_64
|
|
60
|
+
</StaticTextField>
|
|
61
|
+
</Form>
|
|
62
|
+
</GridItem>
|
|
63
|
+
</Grid>
|
|
64
|
+
</WithErrorBoundary>
|
|
65
|
+
</ClusterWizardStep>
|
|
166
66
|
</Formik>
|
|
167
67
|
);
|
|
168
68
|
};
|
|
@@ -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
|
}
|
|
@@ -171,11 +171,5 @@ const ClustersService = {
|
|
|
171
171
|
this.getUpdateManifestParams(existingManifest, updatedManifest),
|
|
172
172
|
);
|
|
173
173
|
},
|
|
174
|
-
registerDisconnected(params: { name: string; openshiftVersion: string }) {
|
|
175
|
-
return ClustersAPI.registerDisconnected({
|
|
176
|
-
name: params.name,
|
|
177
|
-
openshiftVersion: params.openshiftVersion,
|
|
178
|
-
});
|
|
179
|
-
},
|
|
180
174
|
};
|
|
181
175
|
export default ClustersService;
|
|
@@ -21,10 +21,7 @@ const InfraEnvsService = {
|
|
|
21
21
|
const { data: infraEnvs } = await InfraEnvsAPI.list(
|
|
22
22
|
!isSingleClusterFeatureEnabled ? clusterId : '',
|
|
23
23
|
);
|
|
24
|
-
if (
|
|
25
|
-
return infraEnvs[0].id;
|
|
26
|
-
}
|
|
27
|
-
if (infraEnvs.length > 0 && clusterId) {
|
|
24
|
+
if (infraEnvs.length > 0) {
|
|
28
25
|
InfraEnvCache.updateInfraEnvs(clusterId, infraEnvs);
|
|
29
26
|
infraEnvId = InfraEnvCache.getInfraEnvId(clusterId, cpuArchitecture);
|
|
30
27
|
}
|
|
@@ -11,8 +11,9 @@ import {
|
|
|
11
11
|
getTotalHostCount,
|
|
12
12
|
HostsCount,
|
|
13
13
|
ResourceUIState,
|
|
14
|
+
type ClusterTableRows,
|
|
15
|
+
type HumanizedSortable,
|
|
14
16
|
} from '../../../../common';
|
|
15
|
-
import type { ClusterTableRows, HumanizedSortable } from '../../../../common';
|
|
16
17
|
import ClusterStatus, { getClusterStatusText } from '../../../components/clusters/ClusterStatus';
|
|
17
18
|
import { RootStateDay1 } from '../../store-day1';
|
|
18
19
|
import type { Cluster } from '@openshift-assisted/types/assisted-installer-service';
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"dependencies": {
|
|
3
|
-
"@openshift-assisted/locales": "2.51.
|
|
4
|
-
"@openshift-assisted/types": "2.51.
|
|
3
|
+
"@openshift-assisted/locales": "2.51.1",
|
|
4
|
+
"@openshift-assisted/types": "2.51.1",
|
|
5
5
|
"@openshift-console/dynamic-plugin-sdk": "1.0.0",
|
|
6
6
|
"@patternfly/patternfly": "6.4.0",
|
|
7
7
|
"@patternfly/react-code-editor": "6.4.0",
|
|
@@ -136,5 +136,5 @@
|
|
|
136
136
|
]
|
|
137
137
|
}
|
|
138
138
|
},
|
|
139
|
-
"version": "2.51.
|
|
139
|
+
"version": "2.51.1"
|
|
140
140
|
}
|
package/build/@types/ocm/components/clusterWizard/disconnected/DisconnectedStaticIp.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DisconnectedStaticIp.d.ts","sourceRoot":"","sources":["../../../../../../lib/ocm/components/clusterWizard/disconnected/DisconnectedStaticIp.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAsB1B,QAAA,MAAM,oBAAoB,EAAE,KAAK,CAAC,EAqDjC,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
|
package/build/@types/ocm/components/clusterWizard/disconnected/OptionalConfigurationsStep.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"OptionalConfigurationsStep.d.ts","sourceRoot":"","sources":["../../../../../../lib/ocm/components/clusterWizard/disconnected/OptionalConfigurationsStep.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AA0J/B,QAAA,MAAM,0BAA0B,yBA+M/B,CAAC;AAEF,eAAe,0BAA0B,CAAC"}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
|
-
const react_1 = tslib_1.__importDefault(require("react"));
|
|
5
|
-
const common_1 = require("../../../../common");
|
|
6
|
-
const ClusterWizardContext_1 = require("../ClusterWizardContext");
|
|
7
|
-
const ClusterWizardFooter_1 = tslib_1.__importDefault(require("../ClusterWizardFooter"));
|
|
8
|
-
const ClusterWizardNavigation_1 = tslib_1.__importDefault(require("../ClusterWizardNavigation"));
|
|
9
|
-
const StaticIpPage_1 = require("../../clusterConfiguration/staticIp/components/StaticIpPage");
|
|
10
|
-
const WithErrorBoundary_1 = require("../../../../common/components/ErrorHandling/WithErrorBoundary");
|
|
11
|
-
const apis_1 = require("../../../services/apis");
|
|
12
|
-
const getInitialFormStateProps = () => {
|
|
13
|
-
return {
|
|
14
|
-
isValid: true,
|
|
15
|
-
isSubmitting: false,
|
|
16
|
-
isAutoSaveRunning: false,
|
|
17
|
-
errors: {},
|
|
18
|
-
touched: {},
|
|
19
|
-
isEmpty: true,
|
|
20
|
-
};
|
|
21
|
-
};
|
|
22
|
-
const DisconnectedStaticIp = () => {
|
|
23
|
-
const { moveNext, moveBack, disconnectedInfraEnv, setDisconnectedInfraEnv } = (0, ClusterWizardContext_1.useClusterWizardContext)();
|
|
24
|
-
const { alerts } = (0, common_1.useAlerts)();
|
|
25
|
-
const [formState, setFormStateProps] = react_1.default.useState(getInitialFormStateProps());
|
|
26
|
-
const onFormStateChange = (formState) => {
|
|
27
|
-
setFormStateProps(formState);
|
|
28
|
-
};
|
|
29
|
-
const updateInfraEnv = (params) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
30
|
-
if (!(disconnectedInfraEnv === null || disconnectedInfraEnv === void 0 ? void 0 : disconnectedInfraEnv.id)) {
|
|
31
|
-
throw new Error('No disconnected infraEnv available');
|
|
32
|
-
}
|
|
33
|
-
const { data: updatedInfraEnv } = yield apis_1.InfraEnvsAPI.update(disconnectedInfraEnv.id, params);
|
|
34
|
-
setDisconnectedInfraEnv(updatedInfraEnv);
|
|
35
|
-
return updatedInfraEnv;
|
|
36
|
-
});
|
|
37
|
-
const isNextDisabled = formState.isAutoSaveRunning || !formState.isValid || !!alerts.length || formState.isSubmitting;
|
|
38
|
-
const errorFields = (0, common_1.getFormikErrorFields)(formState.errors, formState.touched);
|
|
39
|
-
const footer = (react_1.default.createElement(ClusterWizardFooter_1.default, { alertTitle: "Static IP configuration contains missing or invalid fields", alertContent: null, errorFields: errorFields, isSubmitting: formState.isSubmitting, onNext: () => moveNext(), onBack: () => moveBack(), isNextDisabled: isNextDisabled, isBackDisabled: formState.isSubmitting || formState.isAutoSaveRunning }));
|
|
40
|
-
if (!disconnectedInfraEnv) {
|
|
41
|
-
return null;
|
|
42
|
-
}
|
|
43
|
-
return (react_1.default.createElement(common_1.ClusterWizardStep, { navigation: react_1.default.createElement(ClusterWizardNavigation_1.default, null), footer: footer },
|
|
44
|
-
react_1.default.createElement(WithErrorBoundary_1.WithErrorBoundary, { title: "Failed to load Static IP step" },
|
|
45
|
-
react_1.default.createElement(StaticIpPage_1.StaticIpPage, { infraEnv: disconnectedInfraEnv, updateInfraEnv: updateInfraEnv, onFormStateChange: onFormStateChange }))));
|
|
46
|
-
};
|
|
47
|
-
exports.default = DisconnectedStaticIp;
|
|
48
|
-
//# sourceMappingURL=DisconnectedStaticIp.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DisconnectedStaticIp.js","sourceRoot":"","sources":["../../../../../../lib/ocm/components/clusterWizard/disconnected/DisconnectedStaticIp.tsx"],"names":[],"mappings":";;;AAAA,0DAA0B;AAC1B,+CAAwF;AACxF,kEAAkE;AAClE,yFAAyD;AACzD,iGAAiE;AAEjE,8FAA2F;AAC3F,qGAAkG;AAClG,iDAAsD;AAGtD,MAAM,wBAAwB,GAAG,GAAsB,EAAE;IACvD,OAAO;QACL,OAAO,EAAE,IAAI;QACb,YAAY,EAAE,KAAK;QACnB,iBAAiB,EAAE,KAAK;QACxB,MAAM,EAAE,EAAE;QACV,OAAO,EAAE,EAAE;QACX,OAAO,EAAE,IAAI;KACd,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,oBAAoB,GAAa,GAAG,EAAE;IAC1C,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,oBAAoB,EAAE,uBAAuB,EAAE,GACzE,IAAA,8CAAuB,GAAE,CAAC;IAC5B,MAAM,EAAE,MAAM,EAAE,GAAG,IAAA,kBAAS,GAAE,CAAC;IAC/B,MAAM,CAAC,SAAS,EAAE,iBAAiB,CAAC,GAAG,eAAK,CAAC,QAAQ,CACnD,wBAAwB,EAAE,CAC3B,CAAC;IAEF,MAAM,iBAAiB,GAAG,CAAC,SAA4B,EAAE,EAAE;QACzD,iBAAiB,CAAC,SAAS,CAAC,CAAC;IAC/B,CAAC,CAAC;IAEF,MAAM,cAAc,GAAG,CAAO,MAA4B,EAAE,EAAE;QAC5D,IAAI,CAAC,CAAA,oBAAoB,aAApB,oBAAoB,uBAApB,oBAAoB,CAAE,EAAE,CAAA,EAAE,CAAC;YAC9B,MAAM,IAAI,KAAK,CAAC,oCAAoC,CAAC,CAAC;QACxD,CAAC;QACD,MAAM,EAAE,IAAI,EAAE,eAAe,EAAE,GAAG,MAAM,mBAAY,CAAC,MAAM,CAAC,oBAAoB,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC;QAC7F,uBAAuB,CAAC,eAAe,CAAC,CAAC;QACzC,OAAO,eAAe,CAAC;IACzB,CAAC,CAAA,CAAC;IAEF,MAAM,cAAc,GAClB,SAAS,CAAC,iBAAiB,IAAI,CAAC,SAAS,CAAC,OAAO,IAAI,CAAC,CAAC,MAAM,CAAC,MAAM,IAAI,SAAS,CAAC,YAAY,CAAC;IACjG,MAAM,WAAW,GAAG,IAAA,6BAAoB,EAAS,SAAS,CAAC,MAAM,EAAE,SAAS,CAAC,OAAO,CAAC,CAAC;IAEtF,MAAM,MAAM,GAAG,CACb,8BAAC,6BAAmB,IAClB,UAAU,EAAC,4DAA4D,EACvE,YAAY,EAAE,IAAI,EAClB,WAAW,EAAE,WAAW,EACxB,YAAY,EAAE,SAAS,CAAC,YAAY,EACpC,MAAM,EAAE,GAAG,EAAE,CAAC,QAAQ,EAAE,EACxB,MAAM,EAAE,GAAG,EAAE,CAAC,QAAQ,EAAE,EACxB,cAAc,EAAE,cAAc,EAC9B,cAAc,EAAE,SAAS,CAAC,YAAY,IAAI,SAAS,CAAC,iBAAiB,GACrE,CACH,CAAC;IAEF,IAAI,CAAC,oBAAoB,EAAE,CAAC;QAC1B,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO,CACL,8BAAC,0BAAiB,IAAC,UAAU,EAAE,8BAAC,iCAAuB,OAAG,EAAE,MAAM,EAAE,MAAM;QACxE,8BAAC,qCAAiB,IAAC,KAAK,EAAC,+BAA+B;YACtD,8BAAC,2BAAY,IACX,QAAQ,EAAE,oBAAoB,EAC9B,cAAc,EAAE,cAAc,EAC9B,iBAAiB,EAAE,iBAAiB,GACpC,CACgB,CACF,CACrB,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,oBAAoB,CAAC"}
|