@openshift-assisted/ui-lib 2.14.0-cim → 2.14.2-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/build/@types/cim/components/ClusterDeployment/ACMClusterDeploymentDetailsStep.d.ts +2 -3
- package/build/@types/cim/components/ClusterDeployment/ACMClusterDeploymentDetailsStep.d.ts.map +1 -1
- package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentDetailsForm.d.ts +3 -0
- package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentDetailsForm.d.ts.map +1 -1
- package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentDetailsStep.d.ts.map +1 -1
- package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentHostDiscoveryTable.d.ts.map +1 -1
- package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentHostSelectionStep.d.ts.map +1 -1
- package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentHostsDiscovery.d.ts.map +1 -1
- package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentHostsDiscoveryStep.d.ts +1 -1
- package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentHostsDiscoveryStep.d.ts.map +1 -1
- package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentNetworkingStep.d.ts +15 -2
- package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentNetworkingStep.d.ts.map +1 -1
- package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentReviewStep.d.ts +1 -2
- package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentReviewStep.d.ts.map +1 -1
- package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentWizard.d.ts +1 -2
- package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentWizard.d.ts.map +1 -1
- package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentWizardContext.d.ts +8 -7
- package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentWizardContext.d.ts.map +1 -1
- package/build/@types/cim/components/ClusterDeployment/ClusterDetailsFormFields.d.ts.map +1 -1
- package/build/@types/cim/components/ClusterDeployment/components/ClusterDeploymentHostsSelectionAdvanced.d.ts +17 -0
- package/build/@types/cim/components/ClusterDeployment/components/ClusterDeploymentHostsSelectionAdvanced.d.ts.map +1 -0
- package/build/@types/cim/components/ClusterDeployment/components/ClusterScaleUpAutoHostsSelection.d.ts +8 -0
- package/build/@types/cim/components/ClusterDeployment/components/ClusterScaleUpAutoHostsSelection.d.ts.map +1 -0
- package/build/@types/cim/components/ClusterDeployment/components/ValidationSection.d.ts +16 -0
- package/build/@types/cim/components/ClusterDeployment/components/ValidationSection.d.ts.map +1 -0
- package/build/@types/cim/components/ClusterDeployment/constants.d.ts +2 -0
- package/build/@types/cim/components/ClusterDeployment/constants.d.ts.map +1 -1
- package/build/@types/cim/components/ClusterDeployment/index.d.ts +1 -2
- package/build/@types/cim/components/ClusterDeployment/index.d.ts.map +1 -1
- package/build/@types/cim/components/ClusterDeployment/networkConfigurationValidation.d.ts +1 -11
- package/build/@types/cim/components/ClusterDeployment/networkConfigurationValidation.d.ts.map +1 -1
- package/build/@types/cim/components/ClusterDeployment/types.d.ts +7 -9
- package/build/@types/cim/components/ClusterDeployment/types.d.ts.map +1 -1
- package/build/@types/cim/components/ClusterDeployment/use-networking-formik.d.ts +8 -2
- package/build/@types/cim/components/ClusterDeployment/use-networking-formik.d.ts.map +1 -1
- package/build/@types/cim/components/Hypershift/DetailsPage/HypershiftKubeconfigDownload.d.ts.map +1 -1
- package/build/@types/cim/components/Hypershift/types.d.ts +6 -3
- package/build/@types/cim/components/Hypershift/types.d.ts.map +1 -1
- package/build/@types/cim/components/InfraEnv/InfraEnvAgentTable.d.ts.map +1 -1
- package/build/@types/cim/components/common/constants.d.ts.map +1 -1
- package/build/@types/cim/components/helpers/agents.d.ts +3 -0
- package/build/@types/cim/components/helpers/agents.d.ts.map +1 -1
- package/build/@types/cim/components/helpers/toAssisted.d.ts.map +1 -1
- package/build/@types/cim/components/modals/AddHostModal.d.ts.map +1 -1
- package/build/@types/cim/components/modals/EditAgentModal.d.ts.map +1 -1
- package/build/@types/cim/components/modals/ScaleUpModal.d.ts +3 -0
- package/build/@types/cim/components/modals/ScaleUpModal.d.ts.map +1 -1
- package/build/@types/cim/types/k8s/infra-env-k8s-resource.d.ts +1 -0
- package/build/@types/cim/types/k8s/infra-env-k8s-resource.d.ts.map +1 -1
- package/build/@types/common/components/clusterConfiguration/ControlPlaneNodesDropdown.d.ts +7 -0
- package/build/@types/common/components/clusterConfiguration/ControlPlaneNodesDropdown.d.ts.map +1 -0
- package/build/@types/common/components/clusterConfiguration/DiscoveryImageConfigForm.d.ts.map +1 -1
- package/build/@types/common/components/clusterWizard/clusterDetailsValidation.d.ts.map +1 -1
- package/build/@types/common/components/clusterWizard/networkingSteps/AvailableSubnetsControl.d.ts.map +1 -1
- package/build/@types/common/components/clusterWizard/types.d.ts +1 -0
- package/build/@types/common/components/clusterWizard/types.d.ts.map +1 -1
- package/build/@types/common/components/hosts/EditHostForm.d.ts.map +1 -1
- package/build/@types/common/components/ui/formik/validationSchemas.d.ts.map +1 -1
- package/build/@types/ocm/store/slices/current-cluster/slice.d.ts +1 -0
- package/build/@types/ocm/store/slices/current-cluster/slice.d.ts.map +1 -1
- package/build/cjs/cim/components/ClusterDeployment/ACMClusterDeploymentDetailsStep.js +9 -7
- package/build/cjs/cim/components/ClusterDeployment/ACMClusterDeploymentDetailsStep.js.map +1 -1
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentDetailsForm.js +26 -1
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentDetailsForm.js.map +1 -1
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentDetailsStep.js +13 -29
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentDetailsStep.js.map +1 -1
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentHostDiscoveryTable.js +2 -12
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentHostDiscoveryTable.js.map +1 -1
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentHostSelectionStep.js +50 -26
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentHostSelectionStep.js.map +1 -1
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentHostsDiscovery.js +3 -3
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentHostsDiscovery.js.map +1 -1
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentHostsDiscoveryStep.js +39 -21
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentHostsDiscoveryStep.js.map +1 -1
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentNetworkingStep.js +58 -27
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentNetworkingStep.js.map +1 -1
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentReviewStep.js +24 -24
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentReviewStep.js.map +1 -1
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentWizard.js +26 -42
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentWizard.js.map +1 -1
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentWizardContext.js +12 -8
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentWizardContext.js.map +1 -1
- package/build/cjs/cim/components/ClusterDeployment/ClusterDetailsFormFields.js +4 -5
- package/build/cjs/cim/components/ClusterDeployment/ClusterDetailsFormFields.js.map +1 -1
- package/build/cjs/cim/components/ClusterDeployment/NetworkConfiguration.js +5 -5
- package/build/cjs/cim/components/ClusterDeployment/NetworkConfiguration.js.map +1 -1
- package/build/cjs/cim/components/ClusterDeployment/components/ClusterDeploymentHostsSelectionAdvanced.js +50 -0
- package/build/cjs/cim/components/ClusterDeployment/components/ClusterDeploymentHostsSelectionAdvanced.js.map +1 -0
- package/build/cjs/cim/components/ClusterDeployment/components/ClusterScaleUpAutoHostsSelection.js +24 -0
- package/build/cjs/cim/components/ClusterDeployment/components/ClusterScaleUpAutoHostsSelection.js.map +1 -0
- package/build/cjs/cim/components/ClusterDeployment/components/ValidationSection.js +17 -0
- package/build/cjs/cim/components/ClusterDeployment/components/ValidationSection.js.map +1 -0
- package/build/cjs/cim/components/ClusterDeployment/constants.js +2 -0
- package/build/cjs/cim/components/ClusterDeployment/constants.js.map +1 -1
- package/build/cjs/cim/components/ClusterDeployment/index.js +2 -5
- package/build/cjs/cim/components/ClusterDeployment/index.js.map +1 -1
- package/build/cjs/cim/components/ClusterDeployment/networkConfigurationValidation.js +1 -14
- package/build/cjs/cim/components/ClusterDeployment/networkConfigurationValidation.js.map +1 -1
- package/build/cjs/cim/components/ClusterDeployment/use-networking-formik.js +2 -2
- package/build/cjs/cim/components/ClusterDeployment/use-networking-formik.js.map +1 -1
- package/build/cjs/cim/components/Hypershift/DetailsPage/HypershiftKubeconfigDownload.js +6 -4
- package/build/cjs/cim/components/Hypershift/DetailsPage/HypershiftKubeconfigDownload.js.map +1 -1
- package/build/cjs/cim/components/InfraEnv/InfraEnvAgentTable.js +2 -12
- package/build/cjs/cim/components/InfraEnv/InfraEnvAgentTable.js.map +1 -1
- package/build/cjs/cim/components/InfraEnv/OpenshiftVersionDropdown.js +1 -1
- package/build/cjs/cim/components/InfraEnv/OpenshiftVersionDropdown.js.map +1 -1
- package/build/cjs/cim/components/common/constants.js +1 -1
- package/build/cjs/cim/components/common/constants.js.map +1 -1
- package/build/cjs/cim/components/helpers/agents.js +19 -1
- package/build/cjs/cim/components/helpers/agents.js.map +1 -1
- package/build/cjs/cim/components/helpers/toAssisted.js +25 -22
- package/build/cjs/cim/components/helpers/toAssisted.js.map +1 -1
- package/build/cjs/cim/components/modals/AddHostModal.js +4 -5
- package/build/cjs/cim/components/modals/AddHostModal.js.map +1 -1
- package/build/cjs/cim/components/modals/EditAgentModal.js +2 -2
- package/build/cjs/cim/components/modals/EditAgentModal.js.map +1 -1
- package/build/cjs/cim/components/modals/ScaleUpModal.js +3 -2
- package/build/cjs/cim/components/modals/ScaleUpModal.js.map +1 -1
- package/build/cjs/common/components/clusterConfiguration/ControlPlaneNodesDropdown.js +41 -0
- package/build/cjs/common/components/clusterConfiguration/ControlPlaneNodesDropdown.js.map +1 -0
- package/build/cjs/common/components/clusterConfiguration/DiscoveryImageConfigForm.js +4 -5
- package/build/cjs/common/components/clusterConfiguration/DiscoveryImageConfigForm.js.map +1 -1
- package/build/cjs/common/components/clusterConfiguration/DiscoveryImageTypeControlGroup.js +5 -5
- package/build/cjs/common/components/clusterConfiguration/DiscoveryImageTypeControlGroup.js.map +1 -1
- package/build/cjs/common/components/clusterWizard/clusterDetailsValidation.js +1 -0
- package/build/cjs/common/components/clusterWizard/clusterDetailsValidation.js.map +1 -1
- package/build/cjs/common/components/clusterWizard/networkingSteps/AvailableSubnetsControl.js +14 -18
- package/build/cjs/common/components/clusterWizard/networkingSteps/AvailableSubnetsControl.js.map +1 -1
- package/build/cjs/common/components/clusterWizard/networkingSteps/VirtualIPControlGroup.js +4 -4
- package/build/cjs/common/components/clusterWizard/networkingSteps/VirtualIPControlGroup.js.map +1 -1
- package/build/cjs/common/components/hosts/EditHostForm.js +3 -3
- package/build/cjs/common/components/hosts/EditHostForm.js.map +1 -1
- package/build/cjs/common/components/ui/formik/validationSchemas.js +18 -15
- package/build/cjs/common/components/ui/formik/validationSchemas.js.map +1 -1
- package/build/cjs/common/config/constants.js +1 -1
- package/build/cjs/common/config/constants.js.map +1 -1
- package/lib/cim/components/ClusterDeployment/ACMClusterDeploymentDetailsStep.tsx +11 -9
- package/lib/cim/components/ClusterDeployment/ClusterDeploymentDetailsForm.tsx +63 -3
- package/lib/cim/components/ClusterDeployment/ClusterDeploymentDetailsStep.tsx +25 -53
- package/lib/cim/components/ClusterDeployment/ClusterDeploymentHostDiscoveryTable.tsx +7 -16
- package/lib/cim/components/ClusterDeployment/ClusterDeploymentHostSelectionStep.tsx +102 -59
- package/lib/cim/components/ClusterDeployment/ClusterDeploymentHostsDiscovery.tsx +16 -10
- package/lib/cim/components/ClusterDeployment/ClusterDeploymentHostsDiscoveryStep.tsx +84 -48
- package/lib/cim/components/ClusterDeployment/ClusterDeploymentNetworkingStep.tsx +106 -54
- package/lib/cim/components/ClusterDeployment/ClusterDeploymentReviewStep.tsx +96 -85
- package/lib/cim/components/ClusterDeployment/ClusterDeploymentWizard.tsx +109 -119
- package/lib/cim/components/ClusterDeployment/ClusterDeploymentWizardContext.tsx +27 -14
- package/lib/cim/components/ClusterDeployment/ClusterDetailsFormFields.tsx +4 -6
- package/lib/cim/components/ClusterDeployment/NetworkConfiguration.tsx +5 -5
- package/lib/cim/components/ClusterDeployment/components/ClusterDeploymentHostsSelectionAdvanced.tsx +107 -0
- package/lib/cim/components/ClusterDeployment/components/ClusterScaleUpAutoHostsSelection.tsx +49 -0
- package/lib/cim/components/ClusterDeployment/components/ValidationSection.tsx +41 -0
- package/lib/cim/components/ClusterDeployment/constants.ts +3 -1
- package/lib/cim/components/ClusterDeployment/index.ts +1 -3
- package/lib/cim/components/ClusterDeployment/networkConfigurationValidation.ts +1 -26
- package/lib/cim/components/ClusterDeployment/types.ts +7 -10
- package/lib/cim/components/ClusterDeployment/use-networking-formik.ts +3 -3
- package/lib/cim/components/Hypershift/DetailsPage/HypershiftKubeconfigDownload.tsx +4 -2
- package/lib/cim/components/Hypershift/types.ts +6 -3
- package/lib/cim/components/InfraEnv/InfraEnvAgentTable.tsx +7 -16
- package/lib/cim/components/InfraEnv/OpenshiftVersionDropdown.tsx +1 -1
- package/lib/cim/components/common/constants.ts +1 -2
- package/lib/cim/components/helpers/agents.ts +30 -1
- package/lib/cim/components/helpers/toAssisted.ts +13 -8
- package/lib/cim/components/modals/AddHostModal.tsx +4 -5
- package/lib/cim/components/modals/EditAgentModal.tsx +2 -1
- package/lib/cim/components/modals/ScaleUpModal.tsx +12 -2
- package/lib/cim/types/k8s/infra-env-k8s-resource.ts +1 -0
- package/lib/common/components/clusterConfiguration/ControlPlaneNodesDropdown.tsx +93 -0
- package/lib/common/components/clusterConfiguration/DiscoveryImageConfigForm.tsx +10 -12
- package/lib/common/components/clusterConfiguration/DiscoveryImageTypeControlGroup.tsx +9 -9
- package/lib/common/components/clusterWizard/clusterDetailsValidation.ts +1 -0
- package/lib/common/components/clusterWizard/networkingSteps/AvailableSubnetsControl.tsx +50 -61
- package/lib/common/components/clusterWizard/networkingSteps/VirtualIPControlGroup.tsx +4 -4
- package/lib/common/components/clusterWizard/types.ts +1 -0
- package/lib/common/components/hosts/EditHostForm.tsx +16 -6
- package/lib/common/components/ui/formik/validationSchemas.ts +13 -10
- package/lib/common/config/constants.ts +1 -1
- package/package.json +4 -3
- package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentCreateProgress.d.ts +0 -10
- package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentCreateProgress.d.ts.map +0 -1
- package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentWizardFooter.d.ts +0 -13
- package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentWizardFooter.d.ts.map +0 -1
- package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentWizardNavigation.d.ts +0 -4
- package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentWizardNavigation.d.ts.map +0 -1
- package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentWizardStep.d.ts +0 -7
- package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentWizardStep.d.ts.map +0 -1
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentCreateProgress.js +0 -31
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentCreateProgress.js.map +0 -1
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentWizardFooter.js +0 -50
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentWizardFooter.js.map +0 -1
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentWizardNavigation.js +0 -35
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentWizardNavigation.js.map +0 -1
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentWizardStep.js +0 -9
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentWizardStep.js.map +0 -1
- package/lib/cim/components/ClusterDeployment/ClusterDeploymentCreateProgress.tsx +0 -79
- package/lib/cim/components/ClusterDeployment/ClusterDeploymentWizardFooter.tsx +0 -128
- package/lib/cim/components/ClusterDeployment/ClusterDeploymentWizardNavigation.tsx +0 -81
- package/lib/cim/components/ClusterDeployment/ClusterDeploymentWizardStep.tsx +0 -13
|
@@ -22,7 +22,7 @@ const DiscoveryInstructions = () => {
|
|
|
22
22
|
react_1.default.createElement(react_core_1.TextListItem, null, t('ai:Booted hosts should appear in the host inventory table. This may take a few minutes.')))));
|
|
23
23
|
};
|
|
24
24
|
const ClusterDeploymentHostsDiscovery = (_a) => {
|
|
25
|
-
var { agentClusterInstall, agents, bareMetalHosts, aiConfigMap, infraEnv, infraNMStates, usedHostnames,
|
|
25
|
+
var { agentClusterInstall, agents, bareMetalHosts, aiConfigMap, infraEnv, infraNMStates, usedHostnames, onChangeHostname, onEditRole, onSetInstallationDiskId, onSaveBMH, fetchSecret, onChangeBMHHostname, onApproveAgent, onDeleteHost } = _a, rest = tslib_1.__rest(_a, ["agentClusterInstall", "agents", "bareMetalHosts", "aiConfigMap", "infraEnv", "infraNMStates", "usedHostnames", "onChangeHostname", "onEditRole", "onSetInstallationDiskId", "onSaveBMH", "fetchSecret", "onChangeBMHHostname", "onApproveAgent", "onDeleteHost"]);
|
|
26
26
|
const [isDiscoveryHintModalOpen, setDiscoveryHintModalOpen] = react_1.default.useState(false);
|
|
27
27
|
const [editBMH, setEditBMH] = react_1.default.useState();
|
|
28
28
|
const [editAgent, setEditAgent] = react_1.default.useState();
|
|
@@ -48,10 +48,10 @@ const ClusterDeploymentHostsDiscovery = (_a) => {
|
|
|
48
48
|
react_1.default.createElement(react_measure_1.default, { bounds: true }, ({ measureRef, contentRect }) => {
|
|
49
49
|
var _a;
|
|
50
50
|
return (react_1.default.createElement("div", { ref: measureRef },
|
|
51
|
-
react_1.default.createElement(ClusterDeploymentHostDiscoveryTable_1.default, { agents: agents, bareMetalHosts: bareMetalHosts, infraEnv: infraEnv, onEditHost: setEditAgent, onEditRole: onEditRole, onSetInstallationDiskId: onSetInstallationDiskId, onEditBMH: setEditBMH, onChangeHostname:
|
|
51
|
+
react_1.default.createElement(ClusterDeploymentHostDiscoveryTable_1.default, { agents: agents, bareMetalHosts: bareMetalHosts, infraEnv: infraEnv, onEditHost: setEditAgent, onEditRole: onEditRole, onSetInstallationDiskId: onSetInstallationDiskId, onEditBMH: setEditBMH, onChangeHostname: onChangeHostname, onChangeBMHHostname: onChangeBMHHostname, onApprove: onApproveAgent, width: (_a = contentRect.bounds) === null || _a === void 0 ? void 0 : _a.width, onDeleteHost: onDeleteHost })));
|
|
52
52
|
}),
|
|
53
53
|
react_1.default.createElement(modals_1.EditBMHModal, { infraEnv: infraEnv, bmh: editBMH, nmStates: infraNMStates, isOpen: !!editBMH, onClose: () => setEditBMH(undefined), onEdit: onSaveBMH, fetchSecret: fetchSecret, usedHostnames: usedHostnames || [] }),
|
|
54
|
-
react_1.default.createElement(modals_1.EditAgentModal, {
|
|
54
|
+
editAgent && (react_1.default.createElement(modals_1.EditAgentModal, { onClose: () => setEditAgent(undefined), usedHostnames: usedHostnames, agent: editAgent, onSave: (0, helpers_1.onAgentChangeHostname)(agents, bareMetalHosts, onChangeHostname, onChangeBMHHostname) }))),
|
|
55
55
|
react_1.default.createElement(common_1.DiscoveryTroubleshootingModal, { isOpen: isDiscoveryHintModalOpen, setDiscoveryHintModalOpen: setDiscoveryHintModalOpen })));
|
|
56
56
|
};
|
|
57
57
|
exports.default = ClusterDeploymentHostsDiscovery;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ClusterDeploymentHostsDiscovery.js","sourceRoot":"","sources":["../../../../../lib/cim/components/ClusterDeployment/ClusterDeploymentHostsDiscovery.tsx"],"names":[],"mappings":";;;AAAA,0DAA0B;AAC1B,uDAQgC;AAChC,0EAAoC;AACpC,4CAKyB;AACzB,
|
|
1
|
+
{"version":3,"file":"ClusterDeploymentHostsDiscovery.js","sourceRoot":"","sources":["../../../../../lib/cim/components/ClusterDeployment/ClusterDeploymentHostsDiscovery.tsx"],"names":[],"mappings":";;;AAAA,0DAA0B;AAC1B,uDAQgC;AAChC,0EAAoC;AACpC,4CAKyB;AACzB,wCAAoE;AACpE,mGAAmE;AAEnE,sCAAyD;AAEzD,wHAAwF;AACxF,2FAA+E;AAC/E,0FAA0D;AAE1D,MAAM,qBAAqB,GAAG,GAAG,EAAE;IACjC,MAAM,EAAE,CAAC,EAAE,GAAG,IAAA,wCAAc,GAAE,CAAC;IAC/B,OAAO,CACL,8BAAC,wBAAW;QACV,8BAAC,iBAAI,IAAC,SAAS,EAAC,IAAI,IAAE,CAAC,CAAC,8BAA8B,CAAC,CAAQ;QAC/D,8BAAC,qBAAQ,IAAC,SAAS,EAAC,IAAI,EAAC,IAAI,EAAE,sBAAS,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE,UAAU,EAAE,CAAC,EAAE;YACvE,8BAAC,yBAAY,QAAE,CAAC,CAAC,gCAAgC,CAAC,CAAgB;YAClE,8BAAC,yBAAY,QACV,CAAC,CAAC,iFAAiF,CAAC,CACxE;YACf,8BAAC,yBAAY,QACV,CAAC,CACA,mHAAmH,CACpH,CACY;YACf,8BAAC,yBAAY,QACV,CAAC,CACA,yFAAyF,CAC1F,CACY,CACN,CACC,CACf,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,+BAA+B,GAAmD,CAAC,EAiBxF,EAAE,EAAE;QAjBoF,EACvF,mBAAmB,EACnB,MAAM,EACN,cAAc,EACd,WAAW,EACX,QAAQ,EACR,aAAa,EACb,aAAa,EACb,gBAAgB,EAChB,UAAU,EACV,uBAAuB,EACvB,SAAS,EACT,WAAW,EACX,mBAAmB,EACnB,cAAc,EACd,YAAY,OAEb,EADI,IAAI,sBAhBgF,kQAiBxF,CADQ;IA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 = tslib_1.__importDefault(require("lodash-es/uniq.js"));
|
|
6
6
|
const react_core_1 = require("@patternfly/react-core");
|
|
7
7
|
const common_1 = require("../../../common");
|
|
8
|
-
const ClusterDeploymentWizardContext_1 = tslib_1.__importDefault(require("./ClusterDeploymentWizardContext"));
|
|
9
|
-
const ClusterDeploymentWizardFooter_1 = tslib_1.__importDefault(require("./ClusterDeploymentWizardFooter"));
|
|
10
|
-
const ClusterDeploymentWizardStep_1 = tslib_1.__importDefault(require("./ClusterDeploymentWizardStep"));
|
|
11
8
|
const ClusterDeploymentHostsDiscovery_1 = tslib_1.__importDefault(require("./ClusterDeploymentHostsDiscovery"));
|
|
12
9
|
const helpers_1 = require("./helpers");
|
|
13
10
|
const helpers_2 = require("../helpers");
|
|
14
11
|
const wizardTransition_1 = require("./wizardTransition");
|
|
15
12
|
const use_translation_wrapper_1 = require("../../../common/hooks/use-translation-wrapper");
|
|
13
|
+
const ValidationSection_1 = require("./components/ValidationSection");
|
|
14
|
+
const ClusterDeploymentWizardContext_1 = require("./ClusterDeploymentWizardContext");
|
|
16
15
|
const ClusterDeploymentHostsDiscoveryStep = (_a) => {
|
|
17
|
-
var { agentClusterInstall, agents: allAgents, infraEnv, onSaveHostsDiscovery
|
|
16
|
+
var { agentClusterInstall, agents: allAgents, infraEnv, onSaveHostsDiscovery } = _a, rest = tslib_1.__rest(_a, ["agentClusterInstall", "agents", "infraEnv", "onSaveHostsDiscovery"]);
|
|
18
17
|
const { t } = (0, use_translation_wrapper_1.useTranslation)();
|
|
19
|
-
const {
|
|
18
|
+
const { syncError } = react_1.default.useContext(ClusterDeploymentWizardContext_1.ClusterDeploymentWizardContext);
|
|
19
|
+
const { activeStep, goToNextStep, goToPrevStep, close } = (0, react_core_1.useWizardContext)();
|
|
20
20
|
const [showClusterErrors, setShowClusterErrors] = react_1.default.useState(false);
|
|
21
21
|
const [nextRequested, setNextRequested] = react_1.default.useState(false);
|
|
22
22
|
const [showFormErrors, setShowFormErrors] = react_1.default.useState(false);
|
|
@@ -45,7 +45,7 @@ const ClusterDeploymentHostsDiscoveryStep = (_a) => {
|
|
|
45
45
|
if (agentsNotHealthy) {
|
|
46
46
|
errors.push(t('ai:Some hosts are not ready.'));
|
|
47
47
|
}
|
|
48
|
-
const onNext = () => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
48
|
+
const onNext = react_1.default.useCallback(() => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
49
49
|
if (!showFormErrors) {
|
|
50
50
|
setShowFormErrors(true);
|
|
51
51
|
if (errors.length) {
|
|
@@ -54,7 +54,7 @@ const ClusterDeploymentHostsDiscoveryStep = (_a) => {
|
|
|
54
54
|
}
|
|
55
55
|
yield onSaveHostsDiscovery();
|
|
56
56
|
setNextRequested(true);
|
|
57
|
-
});
|
|
57
|
+
}), [errors.length, onSaveHostsDiscovery, showFormErrors]);
|
|
58
58
|
react_1.default.useEffect(() => {
|
|
59
59
|
setNextRequested(false);
|
|
60
60
|
setShowClusterErrors(false);
|
|
@@ -69,23 +69,41 @@ const ClusterDeploymentHostsDiscoveryStep = (_a) => {
|
|
|
69
69
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
70
70
|
// @ts-ignore
|
|
71
71
|
if ((0, wizardTransition_1.canNextFromHostDiscoveryStep)(agentClusterInstall, infraEnvAgents)) {
|
|
72
|
-
|
|
72
|
+
void goToNextStep();
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
|
-
}, [nextRequested, infraEnvAgents, agentClusterInstall,
|
|
77
|
-
const submittingText = nextRequested && !showClusterErrors ? t('ai:Saving changes...') : undefined;
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
76
|
+
}, [nextRequested, infraEnvAgents, agentClusterInstall, agentsNotHealthy, goToNextStep]);
|
|
77
|
+
const submittingText = react_1.default.useMemo(() => (nextRequested && !showClusterErrors ? t('ai:Saving changes...') : undefined), [nextRequested, showClusterErrors, t]);
|
|
78
|
+
react_1.default.useEffect(() => {
|
|
79
|
+
if (syncError) {
|
|
80
|
+
setNextRequested(false);
|
|
81
|
+
}
|
|
82
|
+
}, [syncError]);
|
|
83
|
+
const footer = react_1.default.useMemo(() => (react_1.default.createElement(react_core_1.WizardFooter, { activeStep: activeStep, onNext: onNext, isNextDisabled: nextRequested || (showFormErrors ? !!errors.length : false), nextButtonText: submittingText || t('ai:Next'), nextButtonProps: { isLoading: !!submittingText }, onBack: goToPrevStep, onClose: close })), [
|
|
84
|
+
activeStep,
|
|
85
|
+
close,
|
|
86
|
+
errors.length,
|
|
87
|
+
goToPrevStep,
|
|
88
|
+
nextRequested,
|
|
89
|
+
onNext,
|
|
90
|
+
showFormErrors,
|
|
91
|
+
submittingText,
|
|
92
|
+
t,
|
|
93
|
+
]);
|
|
94
|
+
(0, react_core_1.useWizardFooter)(footer);
|
|
95
|
+
return (react_1.default.createElement(react_core_1.Grid, { hasGutter: true },
|
|
96
|
+
react_1.default.createElement(react_core_1.GridItem, null,
|
|
97
|
+
react_1.default.createElement(common_1.ClusterWizardStepHeader, null, t('ai:Cluster hosts'))),
|
|
98
|
+
react_1.default.createElement(react_core_1.GridItem, null,
|
|
99
|
+
react_1.default.createElement(ClusterDeploymentHostsDiscovery_1.default, Object.assign({ agentClusterInstall: agentClusterInstall, agents: infraEnvAgents, infraEnv: infraEnv, usedHostnames: usedHostnames }, rest))),
|
|
100
|
+
showClusterErrors && !!errors.length && (react_1.default.createElement(react_core_1.GridItem, null,
|
|
101
|
+
react_1.default.createElement(common_1.Alerts, null))),
|
|
102
|
+
showFormErrors && !!errors.length && (react_1.default.createElement(react_core_1.Alert, { variant: react_core_1.AlertVariant.danger, title: t('ai:Provided cluster configuration is not valid'), isInline: true },
|
|
103
|
+
react_1.default.createElement(react_core_1.List, null, errors.map((error) => (react_1.default.createElement(react_core_1.ListItem, { key: error }, error)))))),
|
|
104
|
+
!!syncError && (react_1.default.createElement(react_core_1.GridItem, null,
|
|
105
|
+
react_1.default.createElement(ValidationSection_1.ValidationSection, { currentStepId: 'hosts-selection', hosts: [] },
|
|
106
|
+
react_1.default.createElement(react_core_1.Alert, { variant: react_core_1.AlertVariant.danger, title: t('ai:An error occured'), isInline: true }, syncError))))));
|
|
89
107
|
};
|
|
90
108
|
exports.default = ClusterDeploymentHostsDiscoveryStep;
|
|
91
109
|
//# sourceMappingURL=ClusterDeploymentHostsDiscoveryStep.js.map
|
package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentHostsDiscoveryStep.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ClusterDeploymentHostsDiscoveryStep.js","sourceRoot":"","sources":["../../../../../lib/cim/components/ClusterDeployment/ClusterDeploymentHostsDiscoveryStep.tsx"],"names":[],"mappings":";;;AAAA,0DAA0B;AAC1B,wEAAqC;AACrC,
|
|
1
|
+
{"version":3,"file":"ClusterDeploymentHostsDiscoveryStep.js","sourceRoot":"","sources":["../../../../../lib/cim/components/ClusterDeployment/ClusterDeploymentHostsDiscoveryStep.tsx"],"names":[],"mappings":";;;AAAA,0DAA0B;AAC1B,wEAAqC;AACrC,uDAUgC;AAEhC,4CAAkE;AAElE,gHAAgF;AAChF,uCAAmE;AACnE,wCAAuE;AACvE,yDAAkE;AAClE,2FAA+E;AAC/E,sEAAmE;AACnE,qFAAkF;AAElF,MAAM,mCAAmC,GAAG,CAAC,EAMF,EAAE,EAAE;QANF,EAC3C,mBAAmB,EACnB,MAAM,EAAE,SAAS,EACjB,QAAQ,EACR,oBAAoB,OAEqB,EADtC,IAAI,sBALoC,qEAM5C,CADQ;IAEP,MAAM,EAAE,CAAC,EAAE,GAAG,IAAA,wCAAc,GAAE,CAAC;IAC/B,MAAM,EAAE,SAAS,EAAE,GAAG,eAAK,CAAC,UAAU,CAAC,+DAA8B,CAAC,CAAC;IACvE,MAAM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E,QAAQ,UAC3E,SAAS,CACJ,CACU,CACX,CACZ,CACI,CACR,CAAC;AACJ,CAAC,CAAC;AACF,kBAAe,mCAAmC,CAAC"}
|
|
@@ -1,19 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NetworkingForm = void 0;
|
|
3
4
|
const tslib_1 = require("tslib");
|
|
4
5
|
const react_1 = tslib_1.__importDefault(require("react"));
|
|
5
6
|
const formik_1 = require("formik");
|
|
6
7
|
const react_core_1 = require("@patternfly/react-core");
|
|
7
8
|
const common_1 = require("../../../common");
|
|
8
|
-
const ClusterDeploymentWizardFooter_1 = tslib_1.__importDefault(require("./ClusterDeploymentWizardFooter"));
|
|
9
|
-
const ClusterDeploymentWizardStep_1 = tslib_1.__importDefault(require("./ClusterDeploymentWizardStep"));
|
|
10
|
-
const ClusterDeploymentWizardContext_1 = tslib_1.__importDefault(require("./ClusterDeploymentWizardContext"));
|
|
11
9
|
const ClusterDeploymentNetworkingForm_1 = tslib_1.__importDefault(require("./ClusterDeploymentNetworkingForm"));
|
|
12
10
|
const helpers_1 = require("./helpers");
|
|
13
11
|
const use_networking_formik_1 = require("./use-networking-formik");
|
|
14
12
|
const wizardTransition_1 = require("./wizardTransition");
|
|
15
13
|
const use_translation_wrapper_1 = require("../../../common/hooks/use-translation-wrapper");
|
|
16
|
-
const
|
|
14
|
+
const ValidationSection_1 = require("./components/ValidationSection");
|
|
15
|
+
const ClusterDeploymentWizardContext_1 = require("./ClusterDeploymentWizardContext");
|
|
16
|
+
const NetworkingForm = ({ clusterDeployment, agentClusterInstall, agents, fetchInfraEnv, onEditHost, onEditRole, isPreviewOpen, onSetInstallationDiskId, isNutanix, }) => {
|
|
17
|
+
const { t } = (0, use_translation_wrapper_1.useTranslation)();
|
|
18
|
+
const { activeStep, goToPrevStep, goToNextStep, close } = (0, react_core_1.useWizardContext)();
|
|
19
|
+
const { syncError } = react_1.default.useContext(ClusterDeploymentWizardContext_1.ClusterDeploymentWizardContext);
|
|
20
|
+
const { alerts } = (0, common_1.useAlerts)();
|
|
17
21
|
const [showFormErrors, setShowFormErrors] = react_1.default.useState(false);
|
|
18
22
|
const [showClusterErrors, setShowClusterErrors] = react_1.default.useState(false);
|
|
19
23
|
const [nextRequested, setNextRequested] = react_1.default.useState(false);
|
|
@@ -22,12 +26,8 @@ const NetworkingForm = ({ clusterDeployment, agentClusterInstall, agents, onClos
|
|
|
22
26
|
agents,
|
|
23
27
|
});
|
|
24
28
|
const { isValid, isValidating, isSubmitting, validateForm, setTouched, errors, touched, values } = (0, formik_1.useFormikContext)();
|
|
25
|
-
const
|
|
26
|
-
const
|
|
27
|
-
const onBack = () => (0, helpers_1.isCIMFlow)(clusterDeployment)
|
|
28
|
-
? setCurrentStepId('hosts-selection')
|
|
29
|
-
: setCurrentStepId('hosts-discovery');
|
|
30
|
-
const onNext = () => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
29
|
+
const canContinue = react_1.default.useMemo(() => (0, wizardTransition_1.canNextFromNetworkingStep)(agentClusterInstall, agents), [agentClusterInstall, agents]);
|
|
30
|
+
const onNext = react_1.default.useCallback(() => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
31
31
|
if (!showFormErrors) {
|
|
32
32
|
const errors = yield validateForm();
|
|
33
33
|
setTouched(Object.keys(errors).reduce((acc, curr) => {
|
|
@@ -40,38 +40,69 @@ const NetworkingForm = ({ clusterDeployment, agentClusterInstall, agents, onClos
|
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
setNextRequested(true);
|
|
43
|
-
});
|
|
43
|
+
}), [setTouched, showFormErrors, validateForm]);
|
|
44
44
|
react_1.default.useEffect(() => {
|
|
45
45
|
setNextRequested(false);
|
|
46
46
|
setShowClusterErrors(false);
|
|
47
|
-
}, [values.
|
|
47
|
+
}, [values.apiVips, values.ingressVips]);
|
|
48
48
|
react_1.default.useEffect(() => {
|
|
49
49
|
if (nextRequested) {
|
|
50
50
|
setShowClusterErrors(true);
|
|
51
51
|
if (canContinue) {
|
|
52
|
-
|
|
52
|
+
void goToNextStep();
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
|
-
}, [nextRequested, canContinue,
|
|
56
|
-
|
|
55
|
+
}, [nextRequested, canContinue, goToNextStep]);
|
|
56
|
+
react_1.default.useEffect(() => {
|
|
57
|
+
if (syncError) {
|
|
58
|
+
setNextRequested(false);
|
|
59
|
+
}
|
|
60
|
+
}, [syncError]);
|
|
57
61
|
const errorFields = (0, common_1.getFormikErrorFields)(errors, touched);
|
|
58
|
-
const
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
62
|
+
const submittingText = react_1.default.useMemo(() => {
|
|
63
|
+
if (isSubmitting) {
|
|
64
|
+
return t('ai:Saving changes...');
|
|
65
|
+
}
|
|
66
|
+
else if (isValidating || nextRequested) {
|
|
67
|
+
return t('ai:Validating...');
|
|
68
|
+
}
|
|
69
|
+
return undefined;
|
|
70
|
+
}, [isSubmitting, isValidating, nextRequested, t]);
|
|
71
|
+
const footer = react_1.default.useMemo(() => (react_1.default.createElement(react_core_1.WizardFooter, { activeStep: activeStep, onNext: onNext, isNextDisabled: nextRequested || isSubmitting || (showFormErrors ? !isValid || isValidating : false), nextButtonProps: { isLoading: !!submittingText }, nextButtonText: submittingText || t('ai:Next'), onBack: goToPrevStep, onClose: close })), [
|
|
72
|
+
activeStep,
|
|
73
|
+
onNext,
|
|
74
|
+
nextRequested,
|
|
75
|
+
isSubmitting,
|
|
76
|
+
showFormErrors,
|
|
77
|
+
isValid,
|
|
78
|
+
isValidating,
|
|
79
|
+
submittingText,
|
|
80
|
+
goToPrevStep,
|
|
81
|
+
close,
|
|
82
|
+
t,
|
|
83
|
+
]);
|
|
84
|
+
(0, react_core_1.useWizardFooter)(footer);
|
|
85
|
+
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
68
86
|
react_1.default.createElement(react_core_1.Grid, { hasGutter: true },
|
|
69
87
|
react_1.default.createElement(react_core_1.GridItem, null,
|
|
70
88
|
react_1.default.createElement(common_1.ClusterWizardStepHeader, null, t('ai:Networking'))),
|
|
71
89
|
react_1.default.createElement(react_core_1.GridItem, null,
|
|
72
|
-
react_1.default.createElement(ClusterDeploymentNetworkingForm_1.default, { clusterDeployment: clusterDeployment, agentClusterInstall: agentClusterInstall, agents: agents, sameProxies: sameProxies, infraEnvsError: infraEnvsError, infraEnvWithProxy: infraEnvWithProxy, infraEnvsLoading: infraEnvsLoading, onEditHost: onEditHost, onEditRole: onEditRole, isPreviewOpen: isPreviewOpen, onSetInstallationDiskId: onSetInstallationDiskId, isNutanix: isNutanix }))
|
|
90
|
+
react_1.default.createElement(ClusterDeploymentNetworkingForm_1.default, { clusterDeployment: clusterDeployment, agentClusterInstall: agentClusterInstall, agents: agents, sameProxies: sameProxies, infraEnvsError: infraEnvsError, infraEnvWithProxy: infraEnvWithProxy, infraEnvsLoading: infraEnvsLoading, onEditHost: onEditHost, onEditRole: onEditRole, isPreviewOpen: isPreviewOpen, onSetInstallationDiskId: onSetInstallationDiskId, isNutanix: isNutanix })),
|
|
91
|
+
showFormErrors && !!errorFields.length && (react_1.default.createElement(react_core_1.GridItem, null,
|
|
92
|
+
react_1.default.createElement(react_core_1.Alert, { variant: react_core_1.AlertVariant.danger, title: t('ai:Provided cluster configuration is not valid'), isInline: true },
|
|
93
|
+
t('ai:The following fields are invalid or missing'),
|
|
94
|
+
":",
|
|
95
|
+
' ',
|
|
96
|
+
errorFields.map((field) => (0, common_1.clusterFieldLabels)(t)[field] || field).join(', '),
|
|
97
|
+
"."))),
|
|
98
|
+
(showClusterErrors || showFormErrors) && !!alerts.length && (react_1.default.createElement(react_core_1.GridItem, null,
|
|
99
|
+
react_1.default.createElement(common_1.Alerts, null))),
|
|
100
|
+
syncError && (react_1.default.createElement(react_core_1.GridItem, null,
|
|
101
|
+
react_1.default.createElement(ValidationSection_1.ValidationSection, { currentStepId: 'networking', hosts: [] },
|
|
102
|
+
react_1.default.createElement(react_core_1.Alert, { variant: react_core_1.AlertVariant.danger, title: t('ai:An error occured'), isInline: true }, syncError))))),
|
|
73
103
|
react_1.default.createElement(common_1.FormikAutoSave, null)));
|
|
74
104
|
};
|
|
105
|
+
exports.NetworkingForm = NetworkingForm;
|
|
75
106
|
const ClusterDeploymentNetworkingStep = (_a) => {
|
|
76
107
|
var _b, _c;
|
|
77
108
|
var { clusterDeployment, agentClusterInstall, agents, onSaveNetworking } = _a, rest = tslib_1.__rest(_a, ["clusterDeployment", "agentClusterInstall", "agents", "onSaveNetworking"]);
|
|
@@ -97,7 +128,7 @@ const ClusterDeploymentNetworkingStep = (_a) => {
|
|
|
97
128
|
}
|
|
98
129
|
});
|
|
99
130
|
return (react_1.default.createElement(formik_1.Formik, { initialValues: initialValues, validationSchema: validationSchema, onSubmit: handleSubmit },
|
|
100
|
-
react_1.default.createElement(NetworkingForm, Object.assign({}, rest, { agents: clusterAgents, clusterDeployment: clusterDeployment, agentClusterInstall: agentClusterInstall }))));
|
|
131
|
+
react_1.default.createElement(exports.NetworkingForm, Object.assign({}, rest, { agents: clusterAgents, clusterDeployment: clusterDeployment, agentClusterInstall: agentClusterInstall }))));
|
|
101
132
|
};
|
|
102
133
|
exports.default = ClusterDeploymentNetworkingStep;
|
|
103
134
|
//# sourceMappingURL=ClusterDeploymentNetworkingStep.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ClusterDeploymentNetworkingStep.js","sourceRoot":"","sources":["../../../../../lib/cim/components/ClusterDeployment/ClusterDeploymentNetworkingStep.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ClusterDeploymentNetworkingStep.js","sourceRoot":"","sources":["../../../../../lib/cim/components/ClusterDeployment/ClusterDeploymentNetworkingStep.tsx"],"names":[],"mappings":";;;;AAAA,0DAA0B;AAC1B,mCAAkD;AA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AS;aAC5D,CAAC,CAAC;SACJ;IACH,CAAC,CAAA,CAAC;IAEF,OAAO,CACL,8BAAC,eAAM,IACL,aAAa,EAAE,aAAa,EAC5B,gBAAgB,EAAE,gBAAgB,EAClC,QAAQ,EAAE,YAAY;QAEtB,8BAAC,sBAAc,oBACT,IAAI,IACR,MAAM,EAAE,aAAa,EACrB,iBAAiB,EAAE,iBAAiB,EACpC,mBAAmB,EAAE,mBAAmB,IACxC,CACK,CACV,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,+BAA+B,CAAC"}
|
|
@@ -5,20 +5,19 @@ const react_core_1 = require("@patternfly/react-core");
|
|
|
5
5
|
const React = tslib_1.__importStar(require("react"));
|
|
6
6
|
const wizardTransition_1 = require("./wizardTransition");
|
|
7
7
|
const common_1 = require("../../../common");
|
|
8
|
-
const ClusterDeploymentWizardContext_1 = tslib_1.__importDefault(require("./ClusterDeploymentWizardContext"));
|
|
9
|
-
const ClusterDeploymentWizardFooter_1 = tslib_1.__importDefault(require("./ClusterDeploymentWizardFooter"));
|
|
10
|
-
const ClusterDeploymentWizardStep_1 = tslib_1.__importDefault(require("./ClusterDeploymentWizardStep"));
|
|
11
8
|
const helpers_1 = require("../helpers");
|
|
12
9
|
const helpers_2 = require("./helpers");
|
|
13
10
|
const constants_1 = require("./constants");
|
|
14
11
|
const wizardTransition_2 = require("./wizardTransition");
|
|
15
12
|
const use_translation_wrapper_1 = require("../../../common/hooks/use-translation-wrapper");
|
|
16
|
-
const
|
|
17
|
-
|
|
13
|
+
const ClusterDeploymentWizardContext_1 = require("./ClusterDeploymentWizardContext");
|
|
14
|
+
const ValidationSection_1 = require("./components/ValidationSection");
|
|
15
|
+
const ClusterDeploymentReviewStep = ({ agentClusterInstall, agents, onFinish, clusterDeployment, clusterImages, infraEnv, }) => {
|
|
16
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
18
17
|
const { addAlert, clearAlerts } = (0, common_1.useAlerts)();
|
|
19
|
-
const {
|
|
18
|
+
const { activeStep, goToPrevStep, goToStepByName, close } = (0, react_core_1.useWizardContext)();
|
|
19
|
+
const { syncError } = React.useContext(ClusterDeploymentWizardContext_1.ClusterDeploymentWizardContext);
|
|
20
20
|
const [isSubmitting, setSubmitting] = React.useState(false);
|
|
21
|
-
const onBack = () => setCurrentStepId('networking');
|
|
22
21
|
const cdName = (_a = clusterDeployment.metadata) === null || _a === void 0 ? void 0 : _a.name;
|
|
23
22
|
const cdNamespace = (_b = clusterDeployment.metadata) === null || _b === void 0 ? void 0 : _b.namespace;
|
|
24
23
|
const cpuArchitecture = (0, helpers_1.getClusterDeploymentCpuArchitecture)(clusterDeployment, infraEnv);
|
|
@@ -39,25 +38,26 @@ const ClusterDeploymentReviewStep = ({ agentClusterInstall, agents, onClose, onF
|
|
|
39
38
|
setSubmitting(false);
|
|
40
39
|
}
|
|
41
40
|
});
|
|
42
|
-
const footer = (React.createElement(
|
|
43
|
-
|
|
44
|
-
onNext: onNext, onCancel: onClose, nextButtonText: t('ai:Install cluster') }));
|
|
41
|
+
const footer = (React.createElement(react_core_1.WizardFooter, { activeStep: activeStep, onNext: onNext, isNextDisabled: isSubmitting || !canContinue || !!syncError, nextButtonText: t('ai:Install cluster'), nextButtonProps: { isLoading: isSubmitting }, onBack: goToPrevStep, onClose: close }));
|
|
42
|
+
(0, react_core_1.useWizardFooter)(footer);
|
|
45
43
|
const openShiftVersion = (0, helpers_1.getSelectedVersion)(clusterImages, agentClusterInstall);
|
|
46
44
|
const cluster = React.useMemo(() => (0, helpers_1.getAICluster)({ clusterDeployment, agentClusterInstall, agents: clusterAgents }), [clusterDeployment, agentClusterInstall, clusterAgents]);
|
|
47
|
-
return (React.createElement(
|
|
48
|
-
React.createElement(react_core_1.
|
|
49
|
-
React.createElement(
|
|
50
|
-
|
|
51
|
-
React.createElement(
|
|
52
|
-
React.createElement(common_1.
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
45
|
+
return (React.createElement(react_core_1.Grid, { hasGutter: true },
|
|
46
|
+
React.createElement(react_core_1.GridItem, null,
|
|
47
|
+
React.createElement(common_1.ClusterWizardStepHeader, null, "Review and create")),
|
|
48
|
+
React.createElement(react_core_1.GridItem, null,
|
|
49
|
+
React.createElement(common_1.DetailList, null,
|
|
50
|
+
React.createElement(common_1.DetailItem, { title: t('ai:Cluster address'), value: `${((_c = clusterDeployment.metadata) === null || _c === void 0 ? void 0 : _c.name) || ''}.${((_d = clusterDeployment.spec) === null || _d === void 0 ? void 0 : _d.baseDomain) || ''}`, testId: "cluster-address" }),
|
|
51
|
+
React.createElement(common_1.DetailItem, { title: t('ai:OpenShift version'), value: openShiftVersion, testId: "openshift-version" }),
|
|
52
|
+
React.createElement(common_1.DetailItem, { title: t('ai:CPU architecture'), value: cpuArchitecture, testId: "cpu-architecture" }),
|
|
53
|
+
React.createElement(common_1.DetailItem, { title: t('ai:API IP'), value: ((_e = agentClusterInstall === null || agentClusterInstall === void 0 ? void 0 : agentClusterInstall.status) === null || _e === void 0 ? void 0 : _e.apiVIP) || ((_f = agentClusterInstall === null || agentClusterInstall === void 0 ? void 0 : agentClusterInstall.spec) === null || _f === void 0 ? void 0 : _f.apiVIP), testId: "api-vip" }),
|
|
54
|
+
React.createElement(common_1.DetailItem, { title: t('ai:Ingress IP'), value: ((_g = agentClusterInstall === null || agentClusterInstall === void 0 ? void 0 : agentClusterInstall.status) === null || _g === void 0 ? void 0 : _g.ingressVIP) || ((_h = agentClusterInstall === null || agentClusterInstall === void 0 ? void 0 : agentClusterInstall.spec) === null || _h === void 0 ? void 0 : _h.ingressVIP), testId: "ingress-vip" }),
|
|
55
|
+
React.createElement(common_1.DetailItem, { title: t('ai:Cluster summary'), testId: "cluster-summary", value: React.createElement(common_1.ReviewHostsInventory, { hosts: cluster.hosts }) }),
|
|
56
|
+
React.createElement(common_1.DetailItem, { title: t('ai:Cluster validations'), value: React.createElement(common_1.ClusterValidations, { validationsInfo: cluster.validationsInfo, setCurrentStepId: goToStepByName, wizardStepNames: (0, constants_1.wizardStepNames)(t), wizardStepsValidationsMap: wizardTransition_2.wizardStepsValidationsMap }), testId: "cluster-validations" }),
|
|
57
|
+
React.createElement(common_1.DetailItem, { title: t('ai:Host validations'), value: React.createElement(common_1.HostsValidations, { hosts: cluster.hosts, setCurrentStepId: goToStepByName, wizardStepNames: (0, constants_1.wizardStepNames)(t), allClusterWizardSoftValidationIds: wizardTransition_2.allClusterWizardSoftValidationIds, wizardStepsValidationsMap: wizardTransition_2.wizardStepsValidationsMap }), testId: "host-validations" }))),
|
|
58
|
+
syncError && (React.createElement(react_core_1.GridItem, null,
|
|
59
|
+
React.createElement(ValidationSection_1.ValidationSection, { currentStepId: 'review', hosts: [] },
|
|
60
|
+
React.createElement(react_core_1.Alert, { variant: react_core_1.AlertVariant.danger, title: t('ai:An error occured'), isInline: true }, syncError))))));
|
|
61
61
|
};
|
|
62
62
|
exports.default = ClusterDeploymentReviewStep;
|
|
63
63
|
//# sourceMappingURL=ClusterDeploymentReviewStep.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ClusterDeploymentReviewStep.js","sourceRoot":"","sources":["../../../../../lib/cim/components/ClusterDeployment/ClusterDeploymentReviewStep.tsx"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"ClusterDeploymentReviewStep.js","sourceRoot":"","sources":["../../../../../lib/cim/components/ClusterDeployment/ClusterDeploymentReviewStep.tsx"],"names":[],"mappings":";;;AAAA,uDAQgC;AAChC,qDAA+B;AAC/B,yDAA2D;AAQ3D,4CAQyB;AACzB,wCAAmG;AACnG,uCAA6C;AAC7C,2CAA8C;AAC9C,yDAI4B;AAC5B,2FAA+E;AAC/E,qFAAkF;AAClF,sEAAmE;AAYnE,MAAM,2BAA2B,GAAG,CAAC,EACnC,mBAAmB,EACnB,MAAM,EACN,QAAQ,EACR,iBAAiB,EACjB,aAAa,EACb,QA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C,CAAC,qBAAqB,CAAC,EAC/B,KAAK,EACH,oBAAC,yBAAgB,IACf,KAAK,EAAE,OAAO,CAAC,KAAK,EACpB,gBAAgB,EAAE,cAAc,EAChC,eAAe,EAAE,IAAA,2BAAe,EAAC,CAAC,CAAC,EACnC,iCAAiC,EAAE,oDAAiC,EACpE,yBAAyB,EAAE,4CAAyB,GACpD,EAEJ,MAAM,EAAC,kBAAkB,GACzB,CACS,CACJ;QACV,SAAS,IAAI,CACZ,oBAAC,qBAAQ;YACP,oBAAC,qCAAiB,IAAC,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE;gBACnD,oBAAC,kBAAK,IAAC,OAAO,EAAE,yBAAY,CAAC,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC,qBAAqB,CAAC,EAAE,QAAQ,UAC3E,SAAS,CACJ,CACU,CACX,CACZ,CACI,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,2BAA2B,CAAC"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ClusterDeploymentWizard = void 0;
|
|
3
4
|
const tslib_1 = require("tslib");
|
|
4
5
|
const React = tslib_1.__importStar(require("react"));
|
|
5
|
-
const
|
|
6
|
+
const use_translation_wrapper_1 = require("../../../common/hooks/use-translation-wrapper");
|
|
6
7
|
const react_core_1 = require("@patternfly/react-core");
|
|
7
8
|
const common_1 = require("../../../common");
|
|
8
|
-
const ClusterDeploymentWizardContext_1 = tslib_1.__importDefault(require("./ClusterDeploymentWizardContext"));
|
|
9
9
|
const ClusterDeploymentDetailsStep_1 = tslib_1.__importDefault(require("./ClusterDeploymentDetailsStep"));
|
|
10
10
|
const ClusterDeploymentNetworkingStep_1 = tslib_1.__importDefault(require("./ClusterDeploymentNetworkingStep"));
|
|
11
11
|
const ClusterDeploymentHostSelectionStep_1 = tslib_1.__importDefault(require("./ClusterDeploymentHostSelectionStep"));
|
|
@@ -13,11 +13,13 @@ const ClusterDeploymentHostsDiscoveryStep_1 = tslib_1.__importDefault(require(".
|
|
|
13
13
|
const featureSupportLevels_1 = require("../featureSupportLevels");
|
|
14
14
|
const ClusterDeploymentReviewStep_1 = tslib_1.__importDefault(require("./ClusterDeploymentReviewStep"));
|
|
15
15
|
const YamlPreview_1 = require("../YamlPreview");
|
|
16
|
+
const constants_1 = require("./constants");
|
|
17
|
+
const ClusterDeploymentWizardContext_1 = require("./ClusterDeploymentWizardContext");
|
|
18
|
+
const helpers_1 = require("./helpers");
|
|
16
19
|
const ClusterDeploymentWizard = (_a) => {
|
|
17
|
-
var _b;
|
|
18
|
-
var { className, onSaveDetails, onSaveNetworking, onSaveHostsSelection, onClose, onFinish, hostActions, usedClusterNames, fetchSecret, clusterDeployment, agentClusterInstall, agents, clusterImages, aiConfigMap, infraEnv, fetchInfraEnv, initialStep, isPreviewOpen, setPreviewOpen, fetchManagedClusters, fetchKlusterletAddonConfig, onSaveISOParams, onCreateBMH, isNutanix } = _a, rest = tslib_1.__rest(_a, ["className", "onSaveDetails", "onSaveNetworking", "onSaveHostsSelection", "onClose", "onFinish", "hostActions", "usedClusterNames", "fetchSecret", "clusterDeployment", "agentClusterInstall", "agents", "clusterImages", "aiConfigMap", "infraEnv", "fetchInfraEnv", "initialStep", "isPreviewOpen", "setPreviewOpen", "fetchManagedClusters", "fetchKlusterletAddonConfig", "onSaveISOParams", "onCreateBMH", "isNutanix"]);
|
|
19
|
-
const
|
|
20
|
-
const isAIFlow = infraEnv;
|
|
20
|
+
var _b, _c;
|
|
21
|
+
var { className, onSaveDetails, onSaveNetworking, onSaveHostsSelection, onClose, onFinish, hostActions, usedClusterNames, fetchSecret, clusterDeployment, agentClusterInstall, agents, bareMetalHosts, clusterImages, aiConfigMap, infraEnv, fetchInfraEnv, initialStep, isPreviewOpen, setPreviewOpen, fetchManagedClusters, fetchKlusterletAddonConfig, onSaveISOParams, onCreateBMH, isNutanix, onChangeBMHHostname } = _a, rest = tslib_1.__rest(_a, ["className", "onSaveDetails", "onSaveNetworking", "onSaveHostsSelection", "onClose", "onFinish", "hostActions", "usedClusterNames", "fetchSecret", "clusterDeployment", "agentClusterInstall", "agents", "bareMetalHosts", "clusterImages", "aiConfigMap", "infraEnv", "fetchInfraEnv", "initialStep", "isPreviewOpen", "setPreviewOpen", "fetchManagedClusters", "fetchKlusterletAddonConfig", "onSaveISOParams", "onCreateBMH", "isNutanix", "onChangeBMHHostname"]);
|
|
22
|
+
const { t } = (0, use_translation_wrapper_1.useTranslation)();
|
|
21
23
|
const { code, loadingResources } = (0, YamlPreview_1.useYamlPreview)({
|
|
22
24
|
agentClusterInstall,
|
|
23
25
|
clusterDeployment,
|
|
@@ -25,46 +27,28 @@ const ClusterDeploymentWizard = (_a) => {
|
|
|
25
27
|
fetchManagedClusters,
|
|
26
28
|
fetchKlusterletAddonConfig,
|
|
27
29
|
});
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
switch (stepId) {
|
|
34
|
-
case 'hosts-selection':
|
|
35
|
-
if ((_a = agentClusterInstall === null || agentClusterInstall === void 0 ? void 0 : agentClusterInstall.metadata) === null || _a === void 0 ? void 0 : _a.name) {
|
|
36
|
-
return (React.createElement(ClusterDeploymentHostSelectionStep_1.default, { clusterDeployment: clusterDeployment, agentClusterInstall: agentClusterInstall, onClose: onClose, onSaveHostsSelection: onSaveHostsSelection, agents: agents, aiConfigMap: aiConfigMap, onEditRole: hostActions.onEditRole, onSetInstallationDiskId: hostActions.onSetInstallationDiskId, isNutanix: isNutanix }));
|
|
37
|
-
}
|
|
38
|
-
return React.createElement(common_1.LoadingState, null);
|
|
39
|
-
case 'hosts-discovery':
|
|
40
|
-
if (isAIFlow) {
|
|
41
|
-
return onSaveISOParams && onCreateBMH ? (React.createElement(ClusterDeploymentHostsDiscoveryStep_1.default, Object.assign({ clusterDeployment: clusterDeployment, agentClusterInstall: agentClusterInstall, agents: agents, bareMetalHosts: [] /* TODO(mlibra) */, aiConfigMap: aiConfigMap, infraEnv: infraEnv, fetchSecret: fetchSecret, onClose: onClose, onChangeBMHHostname: (bmh, _hostname) => {
|
|
42
|
-
// console.log('onChangeBMHHostname is not implemented: ', hostname);
|
|
43
|
-
return Promise.resolve(bmh);
|
|
44
|
-
}, onEditRole: hostActions.onEditRole, onSetInstallationDiskId: hostActions.onSetInstallationDiskId, onDeleteHost: hostActions.onDeleteHost, onSaveISOParams: onSaveISOParams, onCreateBMH: onCreateBMH }, rest))) : (React.createElement(common_1.LoadingState, null));
|
|
45
|
-
}
|
|
46
|
-
return React.createElement(common_1.LoadingState, null);
|
|
47
|
-
case 'networking':
|
|
48
|
-
return (React.createElement(ClusterDeploymentNetworkingStep_1.default, { clusterDeployment: clusterDeployment, agentClusterInstall: agentClusterInstall, agents: agents, onSaveNetworking: onSaveNetworking, onClose: onClose, onEditHost: hostActions.onEditHost, onEditRole: hostActions.onEditRole, fetchInfraEnv: fetchInfraEnv, isPreviewOpen: isPreviewOpen, onSetInstallationDiskId: hostActions.onSetInstallationDiskId, isNutanix: isNutanix }));
|
|
49
|
-
case 'review':
|
|
50
|
-
return (React.createElement(ClusterDeploymentReviewStep_1.default, { onFinish: onFinish, clusterDeployment: clusterDeployment, agentClusterInstall: agentClusterInstall, agents: agents, onClose: onClose, clusterImages: clusterImages, infraEnv: infraEnv }));
|
|
51
|
-
case 'cluster-details':
|
|
52
|
-
default:
|
|
53
|
-
return (React.createElement(ClusterDeploymentDetailsStep_1.default, { clusterImages: clusterImages, usedClusterNames: usedClusterNames, clusterDeployment: clusterDeployment, agentClusterInstall: agentClusterInstall, agents: agents, onSaveDetails: onSaveDetails, onClose: onClose, isPreviewOpen: isPreviewOpen, infraEnv: infraEnv, isNutanix: isNutanix }));
|
|
54
|
-
}
|
|
55
|
-
};
|
|
30
|
+
// if initialStep is set, it is either 'host-selection' or 'host-discovery', both at index 4
|
|
31
|
+
// if initialStep is not set, start at 'cluster-details' which is at index 2
|
|
32
|
+
const startIndex = initialStep ? 4 : 2;
|
|
33
|
+
const stepNames = (0, constants_1.wizardStepNames)(t);
|
|
34
|
+
const isAIFlow = !!infraEnv;
|
|
56
35
|
return (React.createElement(react_core_1.Grid, { style: { height: '100%' } },
|
|
57
36
|
React.createElement(react_core_1.GridItem, { span: isPreviewOpen ? 7 : 12 },
|
|
58
37
|
React.createElement(common_1.AlertsContextProvider, null,
|
|
59
38
|
React.createElement(featureSupportLevels_1.ACMFeatureSupportLevelProvider, { clusterImages: clusterImages, isEditClusterFlow: true },
|
|
60
|
-
React.createElement(ClusterDeploymentWizardContext_1.
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
39
|
+
React.createElement(ClusterDeploymentWizardContext_1.ClusterDeploymentWizardContextProvider, { agentClusterInstall: agentClusterInstall },
|
|
40
|
+
React.createElement(react_core_1.Wizard, { isVisitRequired: true, startIndex: startIndex, className: className, onClose: onClose },
|
|
41
|
+
React.createElement(react_core_1.WizardStep, { name: stepNames['installation-type'], id: 'installation-type', isDisabled: true }),
|
|
42
|
+
React.createElement(react_core_1.WizardStep, { name: stepNames['cluster-details'], id: 'cluster-details' },
|
|
43
|
+
React.createElement(ClusterDeploymentDetailsStep_1.default, { clusterImages: clusterImages, usedClusterNames: usedClusterNames, clusterDeployment: clusterDeployment, agentClusterInstall: agentClusterInstall, agents: agents, onSaveDetails: onSaveDetails, isPreviewOpen: isPreviewOpen, infraEnv: infraEnv, isNutanix: isNutanix })),
|
|
44
|
+
React.createElement(react_core_1.WizardStep, { name: stepNames['automation'], id: 'automation', isDisabled: true }),
|
|
45
|
+
(0, helpers_1.isCIMFlow)(clusterDeployment) ? (React.createElement(react_core_1.WizardStep, { name: stepNames['hosts-selection'], id: 'host-selection' }, ((_b = agentClusterInstall === null || agentClusterInstall === void 0 ? void 0 : agentClusterInstall.metadata) === null || _b === void 0 ? void 0 : _b.name) ? (React.createElement(ClusterDeploymentHostSelectionStep_1.default, { clusterDeployment: clusterDeployment, agentClusterInstall: agentClusterInstall, onSaveHostsSelection: onSaveHostsSelection, agents: agents, aiConfigMap: aiConfigMap, onEditRole: hostActions.onEditRole, onSetInstallationDiskId: hostActions.onSetInstallationDiskId, isNutanix: isNutanix })) : (React.createElement(common_1.LoadingState, null)))) : (React.createElement(react_core_1.WizardStep, { name: stepNames['hosts-discovery'], id: 'host-discovery' }, isAIFlow && onSaveISOParams && onCreateBMH ? (React.createElement(ClusterDeploymentHostsDiscoveryStep_1.default, Object.assign({ clusterDeployment: clusterDeployment, agentClusterInstall: agentClusterInstall, agents: agents, bareMetalHosts: bareMetalHosts, aiConfigMap: aiConfigMap, infraEnv: infraEnv, fetchSecret: fetchSecret, onChangeBMHHostname: onChangeBMHHostname, onEditRole: hostActions.onEditRole, onSetInstallationDiskId: hostActions.onSetInstallationDiskId, onDeleteHost: hostActions.onDeleteHost, onSaveISOParams: onSaveISOParams, onCreateBMH: onCreateBMH }, rest))) : (React.createElement(common_1.LoadingState, null)))),
|
|
46
|
+
React.createElement(react_core_1.WizardStep, { name: stepNames['networking'], id: 'networking' },
|
|
47
|
+
React.createElement(ClusterDeploymentNetworkingStep_1.default, { clusterDeployment: clusterDeployment, agentClusterInstall: agentClusterInstall, agents: agents, onSaveNetworking: onSaveNetworking, onEditHost: hostActions.onEditHost, onEditRole: hostActions.onEditRole, fetchInfraEnv: fetchInfraEnv, isPreviewOpen: isPreviewOpen, onSetInstallationDiskId: hostActions.onSetInstallationDiskId, isNutanix: isNutanix })),
|
|
48
|
+
React.createElement(react_core_1.WizardStep, { name: stepNames['review'], id: 'review' },
|
|
49
|
+
React.createElement(ClusterDeploymentReviewStep_1.default, { onFinish: onFinish, clusterDeployment: clusterDeployment, agentClusterInstall: agentClusterInstall, agents: agents, clusterImages: clusterImages, infraEnv: infraEnv }))))))),
|
|
66
50
|
isPreviewOpen && (React.createElement(react_core_1.GridItem, { span: 5 },
|
|
67
|
-
React.createElement(YamlPreview_1.YamlPreview, { code: code, setPreviewOpen: setPreviewOpen, loading: loadingResources }, `${((
|
|
51
|
+
React.createElement(YamlPreview_1.YamlPreview, { code: code, setPreviewOpen: setPreviewOpen, loading: loadingResources }, `${((_c = clusterDeployment.metadata) === null || _c === void 0 ? void 0 : _c.name) || ''} cluster`)))));
|
|
68
52
|
};
|
|
69
|
-
exports.
|
|
53
|
+
exports.ClusterDeploymentWizard = ClusterDeploymentWizard;
|
|
70
54
|
//# sourceMappingURL=ClusterDeploymentWizard.js.map
|