@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.
Files changed (199) hide show
  1. package/build/@types/cim/components/ClusterDeployment/ACMClusterDeploymentDetailsStep.d.ts +2 -3
  2. package/build/@types/cim/components/ClusterDeployment/ACMClusterDeploymentDetailsStep.d.ts.map +1 -1
  3. package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentDetailsForm.d.ts +3 -0
  4. package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentDetailsForm.d.ts.map +1 -1
  5. package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentDetailsStep.d.ts.map +1 -1
  6. package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentHostDiscoveryTable.d.ts.map +1 -1
  7. package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentHostSelectionStep.d.ts.map +1 -1
  8. package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentHostsDiscovery.d.ts.map +1 -1
  9. package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentHostsDiscoveryStep.d.ts +1 -1
  10. package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentHostsDiscoveryStep.d.ts.map +1 -1
  11. package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentNetworkingStep.d.ts +15 -2
  12. package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentNetworkingStep.d.ts.map +1 -1
  13. package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentReviewStep.d.ts +1 -2
  14. package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentReviewStep.d.ts.map +1 -1
  15. package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentWizard.d.ts +1 -2
  16. package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentWizard.d.ts.map +1 -1
  17. package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentWizardContext.d.ts +8 -7
  18. package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentWizardContext.d.ts.map +1 -1
  19. package/build/@types/cim/components/ClusterDeployment/ClusterDetailsFormFields.d.ts.map +1 -1
  20. package/build/@types/cim/components/ClusterDeployment/components/ClusterDeploymentHostsSelectionAdvanced.d.ts +17 -0
  21. package/build/@types/cim/components/ClusterDeployment/components/ClusterDeploymentHostsSelectionAdvanced.d.ts.map +1 -0
  22. package/build/@types/cim/components/ClusterDeployment/components/ClusterScaleUpAutoHostsSelection.d.ts +8 -0
  23. package/build/@types/cim/components/ClusterDeployment/components/ClusterScaleUpAutoHostsSelection.d.ts.map +1 -0
  24. package/build/@types/cim/components/ClusterDeployment/components/ValidationSection.d.ts +16 -0
  25. package/build/@types/cim/components/ClusterDeployment/components/ValidationSection.d.ts.map +1 -0
  26. package/build/@types/cim/components/ClusterDeployment/constants.d.ts +2 -0
  27. package/build/@types/cim/components/ClusterDeployment/constants.d.ts.map +1 -1
  28. package/build/@types/cim/components/ClusterDeployment/index.d.ts +1 -2
  29. package/build/@types/cim/components/ClusterDeployment/index.d.ts.map +1 -1
  30. package/build/@types/cim/components/ClusterDeployment/networkConfigurationValidation.d.ts +1 -11
  31. package/build/@types/cim/components/ClusterDeployment/networkConfigurationValidation.d.ts.map +1 -1
  32. package/build/@types/cim/components/ClusterDeployment/types.d.ts +7 -9
  33. package/build/@types/cim/components/ClusterDeployment/types.d.ts.map +1 -1
  34. package/build/@types/cim/components/ClusterDeployment/use-networking-formik.d.ts +8 -2
  35. package/build/@types/cim/components/ClusterDeployment/use-networking-formik.d.ts.map +1 -1
  36. package/build/@types/cim/components/Hypershift/DetailsPage/HypershiftKubeconfigDownload.d.ts.map +1 -1
  37. package/build/@types/cim/components/Hypershift/types.d.ts +6 -3
  38. package/build/@types/cim/components/Hypershift/types.d.ts.map +1 -1
  39. package/build/@types/cim/components/InfraEnv/InfraEnvAgentTable.d.ts.map +1 -1
  40. package/build/@types/cim/components/common/constants.d.ts.map +1 -1
  41. package/build/@types/cim/components/helpers/agents.d.ts +3 -0
  42. package/build/@types/cim/components/helpers/agents.d.ts.map +1 -1
  43. package/build/@types/cim/components/helpers/toAssisted.d.ts.map +1 -1
  44. package/build/@types/cim/components/modals/AddHostModal.d.ts.map +1 -1
  45. package/build/@types/cim/components/modals/EditAgentModal.d.ts.map +1 -1
  46. package/build/@types/cim/components/modals/ScaleUpModal.d.ts +3 -0
  47. package/build/@types/cim/components/modals/ScaleUpModal.d.ts.map +1 -1
  48. package/build/@types/cim/types/k8s/infra-env-k8s-resource.d.ts +1 -0
  49. package/build/@types/cim/types/k8s/infra-env-k8s-resource.d.ts.map +1 -1
  50. package/build/@types/common/components/clusterConfiguration/ControlPlaneNodesDropdown.d.ts +7 -0
  51. package/build/@types/common/components/clusterConfiguration/ControlPlaneNodesDropdown.d.ts.map +1 -0
  52. package/build/@types/common/components/clusterConfiguration/DiscoveryImageConfigForm.d.ts.map +1 -1
  53. package/build/@types/common/components/clusterWizard/clusterDetailsValidation.d.ts.map +1 -1
  54. package/build/@types/common/components/clusterWizard/networkingSteps/AvailableSubnetsControl.d.ts.map +1 -1
  55. package/build/@types/common/components/clusterWizard/types.d.ts +1 -0
  56. package/build/@types/common/components/clusterWizard/types.d.ts.map +1 -1
  57. package/build/@types/common/components/hosts/EditHostForm.d.ts.map +1 -1
  58. package/build/@types/common/components/ui/formik/validationSchemas.d.ts.map +1 -1
  59. package/build/@types/ocm/store/slices/current-cluster/slice.d.ts +1 -0
  60. package/build/@types/ocm/store/slices/current-cluster/slice.d.ts.map +1 -1
  61. package/build/cjs/cim/components/ClusterDeployment/ACMClusterDeploymentDetailsStep.js +9 -7
  62. package/build/cjs/cim/components/ClusterDeployment/ACMClusterDeploymentDetailsStep.js.map +1 -1
  63. package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentDetailsForm.js +26 -1
  64. package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentDetailsForm.js.map +1 -1
  65. package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentDetailsStep.js +13 -29
  66. package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentDetailsStep.js.map +1 -1
  67. package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentHostDiscoveryTable.js +2 -12
  68. package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentHostDiscoveryTable.js.map +1 -1
  69. package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentHostSelectionStep.js +50 -26
  70. package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentHostSelectionStep.js.map +1 -1
  71. package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentHostsDiscovery.js +3 -3
  72. package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentHostsDiscovery.js.map +1 -1
  73. package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentHostsDiscoveryStep.js +39 -21
  74. package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentHostsDiscoveryStep.js.map +1 -1
  75. package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentNetworkingStep.js +58 -27
  76. package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentNetworkingStep.js.map +1 -1
  77. package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentReviewStep.js +24 -24
  78. package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentReviewStep.js.map +1 -1
  79. package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentWizard.js +26 -42
  80. package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentWizard.js.map +1 -1
  81. package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentWizardContext.js +12 -8
  82. package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentWizardContext.js.map +1 -1
  83. package/build/cjs/cim/components/ClusterDeployment/ClusterDetailsFormFields.js +4 -5
  84. package/build/cjs/cim/components/ClusterDeployment/ClusterDetailsFormFields.js.map +1 -1
  85. package/build/cjs/cim/components/ClusterDeployment/NetworkConfiguration.js +5 -5
  86. package/build/cjs/cim/components/ClusterDeployment/NetworkConfiguration.js.map +1 -1
  87. package/build/cjs/cim/components/ClusterDeployment/components/ClusterDeploymentHostsSelectionAdvanced.js +50 -0
  88. package/build/cjs/cim/components/ClusterDeployment/components/ClusterDeploymentHostsSelectionAdvanced.js.map +1 -0
  89. package/build/cjs/cim/components/ClusterDeployment/components/ClusterScaleUpAutoHostsSelection.js +24 -0
  90. package/build/cjs/cim/components/ClusterDeployment/components/ClusterScaleUpAutoHostsSelection.js.map +1 -0
  91. package/build/cjs/cim/components/ClusterDeployment/components/ValidationSection.js +17 -0
  92. package/build/cjs/cim/components/ClusterDeployment/components/ValidationSection.js.map +1 -0
  93. package/build/cjs/cim/components/ClusterDeployment/constants.js +2 -0
  94. package/build/cjs/cim/components/ClusterDeployment/constants.js.map +1 -1
  95. package/build/cjs/cim/components/ClusterDeployment/index.js +2 -5
  96. package/build/cjs/cim/components/ClusterDeployment/index.js.map +1 -1
  97. package/build/cjs/cim/components/ClusterDeployment/networkConfigurationValidation.js +1 -14
  98. package/build/cjs/cim/components/ClusterDeployment/networkConfigurationValidation.js.map +1 -1
  99. package/build/cjs/cim/components/ClusterDeployment/use-networking-formik.js +2 -2
  100. package/build/cjs/cim/components/ClusterDeployment/use-networking-formik.js.map +1 -1
  101. package/build/cjs/cim/components/Hypershift/DetailsPage/HypershiftKubeconfigDownload.js +6 -4
  102. package/build/cjs/cim/components/Hypershift/DetailsPage/HypershiftKubeconfigDownload.js.map +1 -1
  103. package/build/cjs/cim/components/InfraEnv/InfraEnvAgentTable.js +2 -12
  104. package/build/cjs/cim/components/InfraEnv/InfraEnvAgentTable.js.map +1 -1
  105. package/build/cjs/cim/components/InfraEnv/OpenshiftVersionDropdown.js +1 -1
  106. package/build/cjs/cim/components/InfraEnv/OpenshiftVersionDropdown.js.map +1 -1
  107. package/build/cjs/cim/components/common/constants.js +1 -1
  108. package/build/cjs/cim/components/common/constants.js.map +1 -1
  109. package/build/cjs/cim/components/helpers/agents.js +19 -1
  110. package/build/cjs/cim/components/helpers/agents.js.map +1 -1
  111. package/build/cjs/cim/components/helpers/toAssisted.js +25 -22
  112. package/build/cjs/cim/components/helpers/toAssisted.js.map +1 -1
  113. package/build/cjs/cim/components/modals/AddHostModal.js +4 -5
  114. package/build/cjs/cim/components/modals/AddHostModal.js.map +1 -1
  115. package/build/cjs/cim/components/modals/EditAgentModal.js +2 -2
  116. package/build/cjs/cim/components/modals/EditAgentModal.js.map +1 -1
  117. package/build/cjs/cim/components/modals/ScaleUpModal.js +3 -2
  118. package/build/cjs/cim/components/modals/ScaleUpModal.js.map +1 -1
  119. package/build/cjs/common/components/clusterConfiguration/ControlPlaneNodesDropdown.js +41 -0
  120. package/build/cjs/common/components/clusterConfiguration/ControlPlaneNodesDropdown.js.map +1 -0
  121. package/build/cjs/common/components/clusterConfiguration/DiscoveryImageConfigForm.js +4 -5
  122. package/build/cjs/common/components/clusterConfiguration/DiscoveryImageConfigForm.js.map +1 -1
  123. package/build/cjs/common/components/clusterConfiguration/DiscoveryImageTypeControlGroup.js +5 -5
  124. package/build/cjs/common/components/clusterConfiguration/DiscoveryImageTypeControlGroup.js.map +1 -1
  125. package/build/cjs/common/components/clusterWizard/clusterDetailsValidation.js +1 -0
  126. package/build/cjs/common/components/clusterWizard/clusterDetailsValidation.js.map +1 -1
  127. package/build/cjs/common/components/clusterWizard/networkingSteps/AvailableSubnetsControl.js +14 -18
  128. package/build/cjs/common/components/clusterWizard/networkingSteps/AvailableSubnetsControl.js.map +1 -1
  129. package/build/cjs/common/components/clusterWizard/networkingSteps/VirtualIPControlGroup.js +4 -4
  130. package/build/cjs/common/components/clusterWizard/networkingSteps/VirtualIPControlGroup.js.map +1 -1
  131. package/build/cjs/common/components/hosts/EditHostForm.js +3 -3
  132. package/build/cjs/common/components/hosts/EditHostForm.js.map +1 -1
  133. package/build/cjs/common/components/ui/formik/validationSchemas.js +18 -15
  134. package/build/cjs/common/components/ui/formik/validationSchemas.js.map +1 -1
  135. package/build/cjs/common/config/constants.js +1 -1
  136. package/build/cjs/common/config/constants.js.map +1 -1
  137. package/lib/cim/components/ClusterDeployment/ACMClusterDeploymentDetailsStep.tsx +11 -9
  138. package/lib/cim/components/ClusterDeployment/ClusterDeploymentDetailsForm.tsx +63 -3
  139. package/lib/cim/components/ClusterDeployment/ClusterDeploymentDetailsStep.tsx +25 -53
  140. package/lib/cim/components/ClusterDeployment/ClusterDeploymentHostDiscoveryTable.tsx +7 -16
  141. package/lib/cim/components/ClusterDeployment/ClusterDeploymentHostSelectionStep.tsx +102 -59
  142. package/lib/cim/components/ClusterDeployment/ClusterDeploymentHostsDiscovery.tsx +16 -10
  143. package/lib/cim/components/ClusterDeployment/ClusterDeploymentHostsDiscoveryStep.tsx +84 -48
  144. package/lib/cim/components/ClusterDeployment/ClusterDeploymentNetworkingStep.tsx +106 -54
  145. package/lib/cim/components/ClusterDeployment/ClusterDeploymentReviewStep.tsx +96 -85
  146. package/lib/cim/components/ClusterDeployment/ClusterDeploymentWizard.tsx +109 -119
  147. package/lib/cim/components/ClusterDeployment/ClusterDeploymentWizardContext.tsx +27 -14
  148. package/lib/cim/components/ClusterDeployment/ClusterDetailsFormFields.tsx +4 -6
  149. package/lib/cim/components/ClusterDeployment/NetworkConfiguration.tsx +5 -5
  150. package/lib/cim/components/ClusterDeployment/components/ClusterDeploymentHostsSelectionAdvanced.tsx +107 -0
  151. package/lib/cim/components/ClusterDeployment/components/ClusterScaleUpAutoHostsSelection.tsx +49 -0
  152. package/lib/cim/components/ClusterDeployment/components/ValidationSection.tsx +41 -0
  153. package/lib/cim/components/ClusterDeployment/constants.ts +3 -1
  154. package/lib/cim/components/ClusterDeployment/index.ts +1 -3
  155. package/lib/cim/components/ClusterDeployment/networkConfigurationValidation.ts +1 -26
  156. package/lib/cim/components/ClusterDeployment/types.ts +7 -10
  157. package/lib/cim/components/ClusterDeployment/use-networking-formik.ts +3 -3
  158. package/lib/cim/components/Hypershift/DetailsPage/HypershiftKubeconfigDownload.tsx +4 -2
  159. package/lib/cim/components/Hypershift/types.ts +6 -3
  160. package/lib/cim/components/InfraEnv/InfraEnvAgentTable.tsx +7 -16
  161. package/lib/cim/components/InfraEnv/OpenshiftVersionDropdown.tsx +1 -1
  162. package/lib/cim/components/common/constants.ts +1 -2
  163. package/lib/cim/components/helpers/agents.ts +30 -1
  164. package/lib/cim/components/helpers/toAssisted.ts +13 -8
  165. package/lib/cim/components/modals/AddHostModal.tsx +4 -5
  166. package/lib/cim/components/modals/EditAgentModal.tsx +2 -1
  167. package/lib/cim/components/modals/ScaleUpModal.tsx +12 -2
  168. package/lib/cim/types/k8s/infra-env-k8s-resource.ts +1 -0
  169. package/lib/common/components/clusterConfiguration/ControlPlaneNodesDropdown.tsx +93 -0
  170. package/lib/common/components/clusterConfiguration/DiscoveryImageConfigForm.tsx +10 -12
  171. package/lib/common/components/clusterConfiguration/DiscoveryImageTypeControlGroup.tsx +9 -9
  172. package/lib/common/components/clusterWizard/clusterDetailsValidation.ts +1 -0
  173. package/lib/common/components/clusterWizard/networkingSteps/AvailableSubnetsControl.tsx +50 -61
  174. package/lib/common/components/clusterWizard/networkingSteps/VirtualIPControlGroup.tsx +4 -4
  175. package/lib/common/components/clusterWizard/types.ts +1 -0
  176. package/lib/common/components/hosts/EditHostForm.tsx +16 -6
  177. package/lib/common/components/ui/formik/validationSchemas.ts +13 -10
  178. package/lib/common/config/constants.ts +1 -1
  179. package/package.json +4 -3
  180. package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentCreateProgress.d.ts +0 -10
  181. package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentCreateProgress.d.ts.map +0 -1
  182. package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentWizardFooter.d.ts +0 -13
  183. package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentWizardFooter.d.ts.map +0 -1
  184. package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentWizardNavigation.d.ts +0 -4
  185. package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentWizardNavigation.d.ts.map +0 -1
  186. package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentWizardStep.d.ts +0 -7
  187. package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentWizardStep.d.ts.map +0 -1
  188. package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentCreateProgress.js +0 -31
  189. package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentCreateProgress.js.map +0 -1
  190. package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentWizardFooter.js +0 -50
  191. package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentWizardFooter.js.map +0 -1
  192. package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentWizardNavigation.js +0 -35
  193. package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentWizardNavigation.js.map +0 -1
  194. package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentWizardStep.js +0 -9
  195. package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentWizardStep.js.map +0 -1
  196. package/lib/cim/components/ClusterDeployment/ClusterDeploymentCreateProgress.tsx +0 -79
  197. package/lib/cim/components/ClusterDeployment/ClusterDeploymentWizardFooter.tsx +0 -128
  198. package/lib/cim/components/ClusterDeployment/ClusterDeploymentWizardNavigation.tsx +0 -81
  199. package/lib/cim/components/ClusterDeployment/ClusterDeploymentWizardStep.tsx +0 -13
@@ -1,128 +0,0 @@
1
- import React from 'react';
2
- import { Alert, AlertGroup, AlertVariant } from '@patternfly/react-core';
3
- import {
4
- Alerts,
5
- WizardFooter,
6
- useAlerts,
7
- WizardFooterGenericProps,
8
- ClusterWizardStepValidationsAlert,
9
- } from '../../../common';
10
- import ClusterDeploymentWizardContext from './ClusterDeploymentWizardContext';
11
- import { ClusterWizardStepHostStatusDeterminationObject } from '../../../common/types/hosts';
12
- import { ValidationsInfo } from '../../../common/types/clusters';
13
- import { Cluster } from '@openshift-assisted/types/assisted-installer-service';
14
- import { ClusterWizardStepsType, wizardStepsValidationsMap } from './wizardTransition';
15
- import { AgentClusterInstallK8sResource } from '../../types/k8s/agent-cluster-install';
16
- import { AgentK8sResource } from '../../types/k8s/agent';
17
- import { useTranslation } from '../../../common/hooks/use-translation-wrapper';
18
- import ValidationsRunningAlert from '../common/ValidationsRunningAlert';
19
-
20
- type ValidationSectionProps = {
21
- requireProxy?: boolean;
22
- currentStepId: ClusterWizardStepsType;
23
- validationsInfo?: ValidationsInfo;
24
- clusterStatus?: Cluster['status'];
25
- hosts: ClusterWizardStepHostStatusDeterminationObject[];
26
- };
27
-
28
- const ValidationSection: React.FC<ValidationSectionProps> = ({
29
- currentStepId,
30
- clusterStatus,
31
- validationsInfo,
32
- hosts,
33
- children,
34
- }) => {
35
- return (
36
- <AlertGroup>
37
- {children}
38
- {clusterStatus && (
39
- <ClusterWizardStepValidationsAlert
40
- currentStepId={currentStepId}
41
- clusterStatus={clusterStatus}
42
- hosts={hosts}
43
- validationsInfo={validationsInfo}
44
- wizardStepsValidationsMap={wizardStepsValidationsMap}
45
- >
46
- <ValidationsRunningAlert />
47
- </ClusterWizardStepValidationsAlert>
48
- )}
49
- </AlertGroup>
50
- );
51
- };
52
-
53
- type ClusterDeploymentWizardFooterProps = React.ComponentProps<typeof WizardFooter> &
54
- WizardFooterGenericProps & {
55
- agentClusterInstall?: AgentClusterInstallK8sResource;
56
- agents?: AgentK8sResource[];
57
- showClusterErrors?: boolean;
58
- onSyncError?: VoidFunction;
59
- };
60
-
61
- const ClusterDeploymentWizardFooter: React.FC<ClusterDeploymentWizardFooterProps> = ({
62
- agentClusterInstall,
63
- agents,
64
- showClusterErrors,
65
- children,
66
- onSyncError,
67
- isNextDisabled,
68
- ...rest
69
- }) => {
70
- const { alerts } = useAlerts();
71
- const { currentStepId } = React.useContext(ClusterDeploymentWizardContext);
72
- const clusterStatus = showClusterErrors
73
- ? agentClusterInstall?.status?.debugInfo?.state
74
- : undefined;
75
- const validationsInfo = showClusterErrors
76
- ? agentClusterInstall?.status?.validationsInfo
77
- : undefined;
78
- const hosts = React.useMemo(
79
- () =>
80
- (agents || []).reduce<ClusterWizardStepHostStatusDeterminationObject[]>((result, agent) => {
81
- const status = agent.status?.debugInfo?.state;
82
- if (status) {
83
- result.push({ status, validationsInfo: agent.status?.validationsInfo });
84
- }
85
- return result;
86
- }, []),
87
- [agents],
88
- );
89
-
90
- const syncError = agentClusterInstall?.status?.conditions?.find(
91
- (c) => c.type === 'SpecSynced' && c.status === 'False',
92
- )?.message;
93
-
94
- const { t } = useTranslation();
95
- React.useEffect(() => {
96
- if (syncError && onSyncError) {
97
- onSyncError();
98
- }
99
- }, [syncError, onSyncError]);
100
-
101
- const alertsSection = alerts.length ? <Alerts /> : undefined;
102
- const errorsSection = (
103
- <ValidationSection
104
- currentStepId={currentStepId}
105
- clusterStatus={clusterStatus}
106
- validationsInfo={validationsInfo}
107
- hosts={hosts}
108
- >
109
- {syncError && (
110
- <Alert variant={AlertVariant.danger} title={t('ai:An error occured')} isInline>
111
- {syncError}
112
- </Alert>
113
- )}
114
- {children}
115
- </ValidationSection>
116
- );
117
-
118
- return (
119
- <WizardFooter
120
- alerts={alertsSection}
121
- errors={errorsSection}
122
- isNextDisabled={isNextDisabled || !!syncError}
123
- {...rest}
124
- />
125
- );
126
- };
127
-
128
- export default ClusterDeploymentWizardFooter;
@@ -1,81 +0,0 @@
1
- import React from 'react';
2
- import { WizardNav } from '@patternfly/react-core/deprecated';
3
- import { WizardNavItem } from '../../../common';
4
- import { wizardStepNames } from './constants';
5
- import ClusterDeploymentWizardContext from './ClusterDeploymentWizardContext';
6
- import { ClusterDeploymentWizardStepsType } from './types';
7
- import { isCIMFlow } from './helpers';
8
- import { useTranslation } from '../../../common/hooks/use-translation-wrapper';
9
-
10
- const wizardSteps = Object.keys(wizardStepNames) as ClusterDeploymentWizardStepsType[];
11
-
12
- const ClusterDeploymentWizardNavigation: React.FC<{
13
- // cluster?: Cluster
14
- }> = () => {
15
- const { currentStepId, setCurrentStepId, clusterDeployment } = React.useContext(
16
- ClusterDeploymentWizardContext,
17
- );
18
- const { t } = useTranslation();
19
- const stepNames = wizardStepNames(t);
20
- return (
21
- <WizardNav>
22
- <WizardNavItem
23
- key="installation-type"
24
- content={t('ai:Installation type')}
25
- step={0}
26
- isDisabled
27
- />
28
- <WizardNavItem
29
- key="cluster-details"
30
- content={stepNames['cluster-details']}
31
- isCurrent={currentStepId === 'cluster-details'}
32
- // isValid={ () => !cluster || canNextHostDiscovery({ cluster }) }
33
- isDisabled={false}
34
- step={1}
35
- onNavItemClick={() => setCurrentStepId('cluster-details')}
36
- />
37
- <WizardNavItem key="automation" content={t('ai:Automation')} step={2} isDisabled />
38
- {isCIMFlow(clusterDeployment) ? (
39
- <WizardNavItem
40
- key="hosts-selection"
41
- content={stepNames['hosts-selection']}
42
- isDisabled={!wizardSteps.slice(1).includes(currentStepId)}
43
- // isValid={ () => !cluster || canNextHostDiscovery({ cluster }) }
44
- isCurrent={currentStepId === 'hosts-selection'}
45
- step={2}
46
- onNavItemClick={() => setCurrentStepId('hosts-selection')}
47
- />
48
- ) : (
49
- <WizardNavItem
50
- key="hosts-discovery"
51
- content={stepNames['hosts-discovery']}
52
- isDisabled={!wizardSteps.slice(1).includes(currentStepId)}
53
- // isValid={ () => !cluster || canNextHostDiscovery({ cluster }) }
54
- isCurrent={currentStepId === 'hosts-discovery'}
55
- step={2}
56
- onNavItemClick={() => setCurrentStepId('hosts-discovery')}
57
- />
58
- )}
59
- <WizardNavItem
60
- key="networking"
61
- content={stepNames['networking']}
62
- isDisabled={!wizardSteps.slice(2).includes(currentStepId)}
63
- // isValid={ () => !cluster || canNextHostDiscovery({ cluster }) }
64
- isCurrent={currentStepId === 'networking'}
65
- step={3}
66
- onNavItemClick={() => setCurrentStepId('networking')}
67
- />
68
- <WizardNavItem
69
- key="review"
70
- content={stepNames['review']}
71
- isDisabled={!wizardSteps.slice(3).includes(currentStepId)}
72
- // isValid={ () => !cluster || canNextHostDiscovery({ cluster }) }
73
- isCurrent={currentStepId === 'review'}
74
- step={4}
75
- onNavItemClick={() => setCurrentStepId('review')}
76
- />
77
- </WizardNav>
78
- );
79
- };
80
-
81
- export default ClusterDeploymentWizardNavigation;
@@ -1,13 +0,0 @@
1
- import * as React from 'react';
2
- import { ClusterWizardStep } from '../../../common/components/clusterWizard';
3
- import ClusterDeploymentWizardNavigation from './ClusterDeploymentWizardNavigation';
4
-
5
- type ClusterDeploymentWizardStepProps = {
6
- footer: React.ReactNode;
7
- };
8
-
9
- const ClusterDeploymentWizardStep: React.FC<ClusterDeploymentWizardStepProps> = (props) => (
10
- <ClusterWizardStep navigation={<ClusterDeploymentWizardNavigation />} {...props} />
11
- );
12
-
13
- export default ClusterDeploymentWizardStep;