@openshift-assisted/ui-lib 2.47.5 → 2.48.0

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 (161) hide show
  1. package/build/@types/cim/components/ClusterDeployment/wizardTransition.d.ts +1 -1
  2. package/build/@types/cim/components/ClusterDeployment/wizardTransition.d.ts.map +1 -1
  3. package/build/@types/cim/components/InfraEnv/InfraEnvOpenShiftVersionDropdown.d.ts.map +1 -1
  4. package/build/@types/common/api/assisted-service/ClustersAPI.d.ts +4 -0
  5. package/build/@types/common/api/assisted-service/ClustersAPI.d.ts.map +1 -1
  6. package/build/@types/common/api/assisted-service/HostsAPI.d.ts +2 -1
  7. package/build/@types/common/api/assisted-service/HostsAPI.d.ts.map +1 -1
  8. package/build/@types/common/api/assisted-service/InfraEnvsAPI.d.ts +2 -1
  9. package/build/@types/common/api/assisted-service/InfraEnvsAPI.d.ts.map +1 -1
  10. package/build/@types/common/components/clusterWizard/ReviewValidations.d.ts.map +1 -1
  11. package/build/@types/common/components/operators/operatorDescriptions.d.ts +2 -0
  12. package/build/@types/common/components/operators/operatorDescriptions.d.ts.map +1 -1
  13. package/build/@types/common/components/operators/operatorSpecs.d.ts.map +1 -1
  14. package/build/@types/common/components/ui/formik/PullSecretField.d.ts.map +1 -1
  15. package/build/@types/common/config/constants.d.ts +8 -0
  16. package/build/@types/common/config/constants.d.ts.map +1 -1
  17. package/build/@types/common/config/docs_links.d.ts +2 -0
  18. package/build/@types/common/config/docs_links.d.ts.map +1 -1
  19. package/build/@types/common/reducers/alertsSlice.d.ts +1 -0
  20. package/build/@types/common/reducers/alertsSlice.d.ts.map +1 -1
  21. package/build/@types/ocm/components/Routes.d.ts.map +1 -1
  22. package/build/@types/ocm/components/clusterConfiguration/operators/utils.d.ts.map +1 -1
  23. package/build/@types/ocm/components/clusterWizard/ClusterDetails.d.ts.map +1 -1
  24. package/build/@types/ocm/components/clusterWizard/ClusterWizardContext.d.ts +3 -0
  25. package/build/@types/ocm/components/clusterWizard/ClusterWizardContext.d.ts.map +1 -1
  26. package/build/@types/ocm/components/clusterWizard/ClusterWizardContextProvider.d.ts.map +1 -1
  27. package/build/@types/ocm/components/clusterWizard/ClusterWizardFooter.d.ts +2 -1
  28. package/build/@types/ocm/components/clusterWizard/ClusterWizardFooter.d.ts.map +1 -1
  29. package/build/@types/ocm/components/clusterWizard/HostDiscovery.d.ts.map +1 -1
  30. package/build/@types/ocm/components/clusterWizard/NewClusterWizard.d.ts.map +1 -1
  31. package/build/@types/ocm/components/clusterWizard/constants.d.ts.map +1 -1
  32. package/build/@types/ocm/components/clusterWizard/disconnected/BasicStep.d.ts.map +1 -1
  33. package/build/@types/ocm/components/clusterWizard/disconnected/OptionalConfigurationsStep.d.ts +4 -0
  34. package/build/@types/ocm/components/clusterWizard/disconnected/OptionalConfigurationsStep.d.ts.map +1 -0
  35. package/build/@types/ocm/components/clusterWizard/disconnected/ReviewStep.d.ts.map +1 -1
  36. package/build/@types/ocm/components/clusterWizard/index.d.ts +1 -0
  37. package/build/@types/ocm/components/clusterWizard/index.d.ts.map +1 -1
  38. package/build/@types/ocm/components/clusterWizard/wizardTransition.d.ts +2 -2
  39. package/build/@types/ocm/components/clusterWizard/wizardTransition.d.ts.map +1 -1
  40. package/build/@types/ocm/components/hosts/HostsDiscoveryTable.d.ts +3 -2
  41. package/build/@types/ocm/components/hosts/HostsDiscoveryTable.d.ts.map +1 -1
  42. package/build/@types/ocm/hooks/index.d.ts +1 -0
  43. package/build/@types/ocm/hooks/index.d.ts.map +1 -1
  44. package/build/@types/ocm/hooks/useInfraEnvHosts.d.ts +9 -0
  45. package/build/@types/ocm/hooks/useInfraEnvHosts.d.ts.map +1 -0
  46. package/build/@types/ocm/hooks/useInfraEnvId.d.ts.map +1 -1
  47. package/build/@types/ocm/hooks/useLateBinding.d.ts +4 -0
  48. package/build/@types/ocm/hooks/useLateBinding.d.ts.map +1 -0
  49. package/build/@types/ocm/services/ClustersService.d.ts +5 -1
  50. package/build/@types/ocm/services/ClustersService.d.ts.map +1 -1
  51. package/build/@types/ocm/services/HostsService.d.ts +2 -1
  52. package/build/@types/ocm/services/HostsService.d.ts.map +1 -1
  53. package/build/@types/ocm/services/InfraEnvsService.d.ts +1 -1
  54. package/build/@types/ocm/services/InfraEnvsService.d.ts.map +1 -1
  55. package/build/cjs/cim/components/InfraEnv/InfraEnvOpenShiftVersionDropdown.js +3 -1
  56. package/build/cjs/cim/components/InfraEnv/InfraEnvOpenShiftVersionDropdown.js.map +1 -1
  57. package/build/cjs/common/api/assisted-service/ClustersAPI.js +3 -0
  58. package/build/cjs/common/api/assisted-service/ClustersAPI.js.map +1 -1
  59. package/build/cjs/common/api/assisted-service/HostsAPI.js +8 -0
  60. package/build/cjs/common/api/assisted-service/HostsAPI.js.map +1 -1
  61. package/build/cjs/common/api/assisted-service/InfraEnvsAPI.js +5 -0
  62. package/build/cjs/common/api/assisted-service/InfraEnvsAPI.js.map +1 -1
  63. package/build/cjs/common/components/clusterWizard/ReviewValidations.js +2 -1
  64. package/build/cjs/common/components/clusterWizard/ReviewValidations.js.map +1 -1
  65. package/build/cjs/common/components/operators/operatorDescriptions.js +3 -1
  66. package/build/cjs/common/components/operators/operatorDescriptions.js.map +1 -1
  67. package/build/cjs/common/components/operators/operatorSpecs.js +24 -1
  68. package/build/cjs/common/components/operators/operatorSpecs.js.map +1 -1
  69. package/build/cjs/common/components/ui/WizardFooter.js +1 -1
  70. package/build/cjs/common/components/ui/WizardFooter.js.map +1 -1
  71. package/build/cjs/common/components/ui/formik/PullSecretField.js.map +1 -1
  72. package/build/cjs/common/config/constants.js +14 -2
  73. package/build/cjs/common/config/constants.js.map +1 -1
  74. package/build/cjs/common/config/docs_links.js +5 -1
  75. package/build/cjs/common/config/docs_links.js.map +1 -1
  76. package/build/cjs/common/reducers/alertsSlice.js +1 -1
  77. package/build/cjs/common/reducers/alertsSlice.js.map +1 -1
  78. package/build/cjs/ocm/components/Routes.js +2 -1
  79. package/build/cjs/ocm/components/Routes.js.map +1 -1
  80. package/build/cjs/ocm/components/clusterConfiguration/HostInventory.js +1 -1
  81. package/build/cjs/ocm/components/clusterConfiguration/HostInventory.js.map +1 -1
  82. package/build/cjs/ocm/components/clusterConfiguration/networkConfiguration/NetworkConfigurationForm.js +1 -1
  83. package/build/cjs/ocm/components/clusterConfiguration/networkConfiguration/NetworkConfigurationForm.js.map +1 -1
  84. package/build/cjs/ocm/components/clusterConfiguration/operators/utils.js +7 -4
  85. package/build/cjs/ocm/components/clusterConfiguration/operators/utils.js.map +1 -1
  86. package/build/cjs/ocm/components/clusterWizard/ClusterDetails.js +12 -2
  87. package/build/cjs/ocm/components/clusterWizard/ClusterDetails.js.map +1 -1
  88. package/build/cjs/ocm/components/clusterWizard/ClusterWizardContext.js.map +1 -1
  89. package/build/cjs/ocm/components/clusterWizard/ClusterWizardContextProvider.js +4 -0
  90. package/build/cjs/ocm/components/clusterWizard/ClusterWizardContextProvider.js.map +1 -1
  91. package/build/cjs/ocm/components/clusterWizard/ClusterWizardFooter.js +21 -6
  92. package/build/cjs/ocm/components/clusterWizard/ClusterWizardFooter.js.map +1 -1
  93. package/build/cjs/ocm/components/clusterWizard/HostDiscovery.js +3 -0
  94. package/build/cjs/ocm/components/clusterWizard/HostDiscovery.js.map +1 -1
  95. package/build/cjs/ocm/components/clusterWizard/NewClusterWizard.js +3 -0
  96. package/build/cjs/ocm/components/clusterWizard/NewClusterWizard.js.map +1 -1
  97. package/build/cjs/ocm/components/clusterWizard/constants.js +1 -0
  98. package/build/cjs/ocm/components/clusterWizard/constants.js.map +1 -1
  99. package/build/cjs/ocm/components/clusterWizard/disconnected/BasicStep.js +45 -1
  100. package/build/cjs/ocm/components/clusterWizard/disconnected/BasicStep.js.map +1 -1
  101. package/build/cjs/ocm/components/clusterWizard/disconnected/OptionalConfigurationsStep.js +128 -0
  102. package/build/cjs/ocm/components/clusterWizard/disconnected/OptionalConfigurationsStep.js.map +1 -0
  103. package/build/cjs/ocm/components/clusterWizard/disconnected/ReviewStep.js +40 -5
  104. package/build/cjs/ocm/components/clusterWizard/disconnected/ReviewStep.js.map +1 -1
  105. package/build/cjs/ocm/components/clusterWizard/index.js +3 -1
  106. package/build/cjs/ocm/components/clusterWizard/index.js.map +1 -1
  107. package/build/cjs/ocm/components/clusterWizard/wizardTransition.js +3 -0
  108. package/build/cjs/ocm/components/clusterWizard/wizardTransition.js.map +1 -1
  109. package/build/cjs/ocm/components/hosts/HostsDiscoveryTable.js +1 -2
  110. package/build/cjs/ocm/components/hosts/HostsDiscoveryTable.js.map +1 -1
  111. package/build/cjs/ocm/hooks/index.js +3 -1
  112. package/build/cjs/ocm/hooks/index.js.map +1 -1
  113. package/build/cjs/ocm/hooks/useInfraEnvHosts.js +47 -0
  114. package/build/cjs/ocm/hooks/useInfraEnvHosts.js.map +1 -0
  115. package/build/cjs/ocm/hooks/useInfraEnvId.js +11 -2
  116. package/build/cjs/ocm/hooks/useInfraEnvId.js.map +1 -1
  117. package/build/cjs/ocm/hooks/useLateBinding.js +61 -0
  118. package/build/cjs/ocm/hooks/useLateBinding.js.map +1 -0
  119. package/build/cjs/ocm/services/ClustersService.js +10 -2
  120. package/build/cjs/ocm/services/ClustersService.js.map +1 -1
  121. package/build/cjs/ocm/services/HostsService.js +6 -0
  122. package/build/cjs/ocm/services/HostsService.js.map +1 -1
  123. package/build/cjs/ocm/services/InfraEnvsService.js +2 -2
  124. package/build/cjs/ocm/services/InfraEnvsService.js.map +1 -1
  125. package/lib/cim/components/InfraEnv/InfraEnvOpenShiftVersionDropdown.tsx +11 -9
  126. package/lib/common/api/assisted-service/ClustersAPI.ts +6 -0
  127. package/lib/common/api/assisted-service/HostsAPI.ts +13 -0
  128. package/lib/common/api/assisted-service/InfraEnvsAPI.ts +6 -0
  129. package/lib/common/components/clusterWizard/ReviewValidations.tsx +4 -1
  130. package/lib/common/components/operators/operatorDescriptions.tsx +6 -0
  131. package/lib/common/components/operators/operatorSpecs.tsx +34 -1
  132. package/lib/common/components/ui/WizardFooter.tsx +1 -1
  133. package/lib/common/components/ui/formik/PullSecretField.tsx +1 -0
  134. package/lib/common/config/constants.ts +12 -0
  135. package/lib/common/config/docs_links.ts +10 -0
  136. package/lib/common/reducers/alertsSlice.ts +2 -1
  137. package/lib/ocm/components/Routes.tsx +3 -1
  138. package/lib/ocm/components/clusterConfiguration/HostInventory.tsx +1 -1
  139. package/lib/ocm/components/clusterConfiguration/networkConfiguration/NetworkConfigurationForm.tsx +1 -1
  140. package/lib/ocm/components/clusterConfiguration/operators/utils.tsx +9 -5
  141. package/lib/ocm/components/clusterWizard/ClusterDetails.tsx +16 -2
  142. package/lib/ocm/components/clusterWizard/ClusterWizardContext.tsx +3 -0
  143. package/lib/ocm/components/clusterWizard/ClusterWizardContextProvider.tsx +6 -0
  144. package/lib/ocm/components/clusterWizard/ClusterWizardFooter.tsx +26 -5
  145. package/lib/ocm/components/clusterWizard/HostDiscovery.tsx +3 -0
  146. package/lib/ocm/components/clusterWizard/NewClusterWizard.tsx +3 -0
  147. package/lib/ocm/components/clusterWizard/constants.ts +1 -0
  148. package/lib/ocm/components/clusterWizard/disconnected/BasicStep.tsx +52 -1
  149. package/lib/ocm/components/clusterWizard/disconnected/OptionalConfigurationsStep.tsx +200 -0
  150. package/lib/ocm/components/clusterWizard/disconnected/ReviewStep.tsx +39 -7
  151. package/lib/ocm/components/clusterWizard/index.ts +1 -0
  152. package/lib/ocm/components/clusterWizard/wizardTransition.ts +5 -1
  153. package/lib/ocm/components/hosts/HostsDiscoveryTable.tsx +3 -2
  154. package/lib/ocm/hooks/index.ts +1 -0
  155. package/lib/ocm/hooks/useInfraEnvHosts.ts +60 -0
  156. package/lib/ocm/hooks/useInfraEnvId.ts +15 -2
  157. package/lib/ocm/hooks/useLateBinding.ts +71 -0
  158. package/lib/ocm/services/ClustersService.ts +14 -2
  159. package/lib/ocm/services/HostsService.ts +9 -0
  160. package/lib/ocm/services/InfraEnvsService.ts +4 -1
  161. package/package.json +3 -3
@@ -60,6 +60,12 @@ export const DESCRIPTION_LVM =
60
60
  export const DESCRIPTION_CLUSTER_OBSERVABILITY =
61
61
  'Provides observability and monitoring capabilities for your OpenShift cluster.';
62
62
 
63
+ export const DESCRIPTION_LOKI =
64
+ 'Provides a log aggregation system designed to store and query logs from all applications and infrastructure components.';
65
+
66
+ export const DESCRIPTION_OPENSHIFT_LOGGING =
67
+ 'Collects, stores, and visualizes logs from OpenShift Container Platform components and applications.';
68
+
63
69
  export const DESCRIPTION_NUMA_RESOURCES =
64
70
  'Provides NUMA-aware scheduling to improve workload performance on NUMA systems.';
65
71
 
@@ -24,6 +24,8 @@ import {
24
24
  OPERATOR_NAME_NODE_MAINTENANCE,
25
25
  OPERATOR_NAME_KUBE_DESCHEDULER,
26
26
  OPERATOR_NAME_CLUSTER_OBSERVABILITY,
27
+ OPERATOR_NAME_LOKI,
28
+ OPERATOR_NAME_OPENSHIFT_LOGGING,
27
29
  OPERATOR_NAME_NUMA_RESOURCES,
28
30
  OPERATOR_NAME_OADP,
29
31
  OPERATOR_NAME_METALLB,
@@ -36,6 +38,7 @@ import {
36
38
  getClusterObservabilityLink,
37
39
  getKmmDocsLink,
38
40
  getKubeDeschedulerLink,
41
+ getLokiLink,
39
42
  getLsoLink,
40
43
  getLvmsDocsLink,
41
44
  getMceDocsLink,
@@ -45,6 +48,7 @@ import {
45
48
  getNumaResourcesLink,
46
49
  getNvidiaGpuLink,
47
50
  getOadpLink,
51
+ getOpenShiftLoggingLink,
48
52
  MTV_LINK,
49
53
  NODE_HEALTHCHECK_LINK,
50
54
  NODE_MAINTENANCE_LINK,
@@ -83,6 +87,8 @@ import {
83
87
  DESCRIPTION_SERVICEMESH,
84
88
  DESCRIPTION_LVM,
85
89
  DESCRIPTION_CLUSTER_OBSERVABILITY,
90
+ DESCRIPTION_LOKI,
91
+ DESCRIPTION_OPENSHIFT_LOGGING,
86
92
  DESCRIPTION_NUMA_RESOURCES,
87
93
  DESCRIPTION_OADP,
88
94
  DESCRIPTION_METALLB,
@@ -473,9 +479,36 @@ export const getOperatorSpecs = (
473
479
  </ExternalLink>
474
480
  </>
475
481
  ),
476
- notStandalone: true,
477
482
  supportLevel: getFeatureSupportLevel('CLUSTER_OBSERVABILITY'),
478
483
  },
484
+ {
485
+ operatorKey: OPERATOR_NAME_LOKI,
486
+ title: 'Loki Operator',
487
+ featureId: 'CLUSTER_OBSERVABILITY',
488
+ descriptionText: DESCRIPTION_LOKI,
489
+ Description: ({ openshiftVersion, searchTerm }) => (
490
+ <>
491
+ <HighlightedText text={DESCRIPTION_LOKI} searchTerm={searchTerm} />{' '}
492
+ <ExternalLink href={getLokiLink(openshiftVersion)}>Learn more</ExternalLink>
493
+ </>
494
+ ),
495
+ notStandalone: true,
496
+ supportLevel: getFeatureSupportLevel('LOKI'),
497
+ },
498
+ {
499
+ operatorKey: OPERATOR_NAME_OPENSHIFT_LOGGING,
500
+ title: 'OpenShift Logging',
501
+ featureId: 'CLUSTER_OBSERVABILITY',
502
+ descriptionText: DESCRIPTION_OPENSHIFT_LOGGING,
503
+ Description: ({ openshiftVersion, searchTerm }) => (
504
+ <>
505
+ <HighlightedText text={DESCRIPTION_OPENSHIFT_LOGGING} searchTerm={searchTerm} />{' '}
506
+ <ExternalLink href={getOpenShiftLoggingLink(openshiftVersion)}>Learn more</ExternalLink>
507
+ </>
508
+ ),
509
+ notStandalone: true,
510
+ supportLevel: getFeatureSupportLevel('OPENSHIFT_LOGGING'),
511
+ },
479
512
  ],
480
513
  [categories[Category.SCHEDULING]]: [
481
514
  {
@@ -69,7 +69,7 @@ export const WizardFooter: React.FC<WizardFooterProps> = ({
69
69
  variant={ButtonVariant.primary}
70
70
  name="next"
71
71
  onClick={onNext}
72
- isDisabled={isNextDisabled}
72
+ isDisabled={isNextDisabled || isSubmitting}
73
73
  isLoading={isNextButtonLoading}
74
74
  >
75
75
  {nextButtonText || t('ai:Next')}
@@ -67,6 +67,7 @@ const GetPullSecretHelperText: React.FC<{ isOcm: boolean }> = ({ isOcm }) => {
67
67
 
68
68
  const PullSecretField: React.FC<{ isOcm: boolean }> = ({ isOcm }) => {
69
69
  const { t } = useTranslation();
70
+
70
71
  return (
71
72
  <TextAreaField
72
73
  name="pullSecret"
@@ -145,6 +145,8 @@ export const hostValidationLabels = (t: TFunction): { [key in HostValidationId]:
145
145
  'node-maintenance-requirements-satisfied': t('ai:Node Maintenance requirements'),
146
146
  'kube-descheduler-requirements-satisfied': t('ai:Kube Descheduler requirements'),
147
147
  'cluster-observability-requirements-satisfied': t('ai:Cluster Observability requirements'),
148
+ 'loki-requirements-satisfied': t('ai:Loki Operator requirements'),
149
+ 'openshift-logging-requirements-satisfied': t('ai:OpenShift Logging Operator requirements'),
148
150
  'numa-resources-requirements-satisfied': t('ai:NUMA Resources requirements'),
149
151
  'oadp-requirements-satisfied': t('ai:OADP requirements'),
150
152
  'metallb-requirements-satisfied': t('ai:MetalLB requirements'),
@@ -216,6 +218,8 @@ export const hostValidationFailureHints = (
216
218
  'node-maintenance-requirements-satisfied': '',
217
219
  'kube-descheduler-requirements-satisfied': '',
218
220
  'cluster-observability-requirements-satisfied': '',
221
+ 'loki-requirements-satisfied': '',
222
+ 'openshift-logging-requirements-satisfied': '',
219
223
  'numa-resources-requirements-satisfied': '',
220
224
  'oadp-requirements-satisfied': '',
221
225
  'metallb-requirements-satisfied': '',
@@ -247,8 +251,11 @@ export const clusterValidationLabels = (
247
251
  'lvm-requirements-satisfied': t('ai:Logical Volume Manager requirements'),
248
252
  'cnv-requirements-satisfied': t('ai:CNV requirements'),
249
253
  'mce-requirements-satisfied': t('ai:MCE requirements'),
254
+ 'openshift-ai-gpu-requirements-satisfied': t('ai:OpenShift AI GPU requirements'),
250
255
  'platform-requirements-satisfied': t('ai:Platform requirements'),
251
256
  'cluster-observability-requirements-satisfied': t('ai:Cluster Observability requirements'),
257
+ 'loki-requirements-satisfied': t('ai:Loki Operator requirements'),
258
+ 'openshift-logging-requirements-satisfied': t('ai:OpenShift Logging Operator requirements'),
252
259
  'numa-resources-requirements-satisfied': t('ai:NUMA Resources requirements'),
253
260
  'oadp-requirements-satisfied': t('ai:OADP requirements'),
254
261
  'metallb-requirements-satisfied': t('ai:MetalLB requirements'),
@@ -333,6 +340,8 @@ export const OPERATOR_NAME_FENCE_AGENTS_REMEDIATION = 'fence-agents-remediation'
333
340
  export const OPERATOR_NAME_NODE_MAINTENANCE = 'node-maintenance';
334
341
  export const OPERATOR_NAME_KUBE_DESCHEDULER = 'kube-descheduler';
335
342
  export const OPERATOR_NAME_CLUSTER_OBSERVABILITY = 'cluster-observability';
343
+ export const OPERATOR_NAME_LOKI = 'loki';
344
+ export const OPERATOR_NAME_OPENSHIFT_LOGGING = 'openshift-logging';
336
345
  export const OPERATOR_NAME_NUMA_RESOURCES = 'numaresources';
337
346
  export const OPERATOR_NAME_OADP = 'oadp';
338
347
  export const OPERATOR_NAME_METALLB = 'metallb';
@@ -345,6 +354,9 @@ export const singleClusterOperators = [
345
354
  OPERATOR_NAME_NODE_MAINTENANCE,
346
355
  OPERATOR_NAME_FENCE_AGENTS_REMEDIATION,
347
356
  OPERATOR_NAME_KUBE_DESCHEDULER,
357
+ OPERATOR_NAME_CLUSTER_OBSERVABILITY,
358
+ OPERATOR_NAME_LOKI,
359
+ OPERATOR_NAME_OPENSHIFT_LOGGING,
348
360
  ];
349
361
 
350
362
  export const singleClusterBundles = ['virtualization'];
@@ -220,6 +220,16 @@ export const getClusterObservabilityLink = (ocpVersion?: string) =>
220
220
  ocpVersion,
221
221
  )}/html/cluster_observability_operator/cluster-observability-operator-overview`;
222
222
 
223
+ export const getLokiLink = (ocpVersion?: string) =>
224
+ `https://docs.redhat.com/en/documentation/openshift_container_platform/${getDocsOpenshiftVersion(
225
+ ocpVersion,
226
+ )}/html/network_observability/network-observability-overview`;
227
+
228
+ export const getOpenShiftLoggingLink = (ocpVersion?: string) =>
229
+ `https://docs.redhat.com/en/documentation/openshift_container_platform/${getDocsOpenshiftVersion(
230
+ ocpVersion,
231
+ )}/html/logging`;
232
+
223
233
  export const getNumaResourcesLink = (ocpVersion?: string) =>
224
234
  `https://docs.redhat.com/en/documentation/openshift_container_platform/${getDocsOpenshiftVersion(
225
235
  ocpVersion,
@@ -6,6 +6,7 @@ export type AlertPayload = {
6
6
  title: string;
7
7
  message?: string;
8
8
  variant?: AlertVariant;
9
+ key?: string;
9
10
  };
10
11
 
11
12
  export type AlertProps = {
@@ -22,7 +23,7 @@ export const alertsSlice = createSlice({
22
23
  name: 'alerts',
23
24
  reducers: {
24
25
  addAlert: (state, action: PayloadAction<AlertPayload>) => [
25
- { key: uuidv4(), variant: AlertVariant.danger, ...action.payload },
26
+ { key: action.payload.key || uuidv4(), variant: AlertVariant.danger, ...action.payload },
26
27
  ...state,
27
28
  ],
28
29
  removeAlert: (state, action: PayloadAction<string>) =>
@@ -34,7 +34,9 @@ export const UILibRoutes = ({
34
34
  <>
35
35
  <Routes>
36
36
  <Route path="assisted-installer/clusters" element={<Outlet />}>
37
- <Route path="~new" element={<NewClusterPage />} />
37
+ <Route path="~new" element={<NewClusterPage />}>
38
+ <Route path=":clusterId" element={<NewClusterPage />} />
39
+ </Route>
38
40
  <Route path=":clusterId" element={<ClusterPage />} />
39
41
  <Route index element={<Clusters />} />
40
42
  </Route>
@@ -78,7 +78,7 @@ const HostInventory = ({ cluster }: { cluster: Cluster }) => {
78
78
  <Content component="h3">Host Inventory</Content>
79
79
  </StackItem>
80
80
  <StackItem data-testid="hosts-discovery-table-wrapper">
81
- <HostsDiscoveryTable cluster={cluster} />
81
+ <HostsDiscoveryTable cluster={cluster} hosts={cluster.hosts || []} />
82
82
  </StackItem>
83
83
  </Stack>
84
84
  );
@@ -92,7 +92,7 @@ const NetworkConfigurationForm: React.FC<{
92
92
  JSON.stringify(
93
93
  JSON.stringify({
94
94
  featureSet: 'CustomNoUpgrade',
95
- featureGates: ['NoRegistryClusterOperations=true'],
95
+ featureGates: ['NoRegistryClusterInstall=true'],
96
96
  }),
97
97
  ),
98
98
  );
@@ -40,13 +40,17 @@ export const getNewOperators = (
40
40
  }
41
41
 
42
42
  const newOperators = currentOperators.filter((op) => op !== operatorId);
43
- // uncheck unneeded not-standalone dependencies too
44
43
  const notStandaloneDeps = dependencies
45
44
  .filter((dep) => opSpecs[dep]?.notStandalone)
46
- .filter((dep) =>
47
- // some other operator may still depend on the not-standalone operator
48
- newOperators.every((op) => !getOperatorDependencies(op, preflightRequirements).includes(dep)),
49
- );
45
+ .filter((dep) => {
46
+ const hasDependency = newOperators.some((op) =>
47
+ getOperatorDependencies(op, preflightRequirements).includes(dep),
48
+ );
49
+ if (!hasDependency) {
50
+ newOperators.splice(newOperators.indexOf(dep), 1);
51
+ }
52
+ return !hasDependency;
53
+ });
50
54
 
51
55
  return currentOperators.filter((op) => op !== operatorId && !notStandaloneDeps.includes(op));
52
56
  };
@@ -25,6 +25,7 @@ import {
25
25
  } from '../../services';
26
26
  import { Cluster, InfraEnv } from '@openshift-assisted/types/assisted-installer-service';
27
27
  import BundleService from '../../services/BundleService';
28
+ import { useFeature } from '../../hooks/use-feature';
28
29
 
29
30
  type ClusterDetailsProps = {
30
31
  cluster?: Cluster;
@@ -45,6 +46,7 @@ const ClusterDetails = ({ cluster, infraEnv }: ClusterDetailsProps) => {
45
46
  latestVersions: versions,
46
47
  } = useOpenShiftVersionsContext();
47
48
  const location = useLocation();
49
+ const isSingleClusterFeatureEnabled = useFeature('ASSISTED_INSTALLER_SINGLE_CLUSTER_FEATURE');
48
50
 
49
51
  const handleClusterUpdate = React.useCallback(
50
52
  async (
@@ -94,7 +96,11 @@ const ClusterDetails = ({ cluster, infraEnv }: ClusterDetailsProps) => {
94
96
  ...(virtOperators ? virtOperators.map((op) => ({ name: op })) : []),
95
97
  ];
96
98
  }
97
- const cluster = await ClustersService.create(params, isAssistedMigration);
99
+ const cluster = await ClustersService.create(
100
+ params,
101
+ isAssistedMigration,
102
+ isSingleClusterFeatureEnabled,
103
+ );
98
104
  navigate(`../${cluster.id}`, { state: ClusterWizardFlowStateNew });
99
105
 
100
106
  const uiPatch: UISettingsValues = { addCustomManifests };
@@ -114,7 +120,15 @@ const ClusterDetails = ({ cluster, infraEnv }: ClusterDetailsProps) => {
114
120
  }
115
121
  }
116
122
  },
117
- [clearAlerts, location.search, navigate, clusterWizardContext, addAlert, dispatch],
123
+ [
124
+ clearAlerts,
125
+ location.search,
126
+ isSingleClusterFeatureEnabled,
127
+ navigate,
128
+ clusterWizardContext,
129
+ addAlert,
130
+ dispatch,
131
+ ],
118
132
  );
119
133
 
120
134
  const navigation = <ClusterWizardNavigation cluster={cluster} />;
@@ -3,6 +3,7 @@ import { HostsNetworkConfigurationType } from '../../services';
3
3
  import { StaticIpView } from '../clusterConfiguration/staticIp/data/dataTypes';
4
4
  import { ClusterWizardStepsType } from './wizardTransition';
5
5
  import { UISettingsValues } from '../../../common';
6
+ import { InfraEnv } from '@openshift-assisted/types/assisted-installer-service';
6
7
 
7
8
  export type ClusterWizardContextType = {
8
9
  currentStepId: ClusterWizardStepsType;
@@ -20,6 +21,8 @@ export type ClusterWizardContextType = {
20
21
  uiSettings?: UISettingsValues;
21
22
  installDisconnected: boolean;
22
23
  setInstallDisconnected: (enabled: boolean) => void;
24
+ disconnectedInfraEnv?: InfraEnv;
25
+ setDisconnectedInfraEnv: (infraEnv: InfraEnv | undefined) => void;
23
26
  };
24
27
 
25
28
  export const ClusterWizardContext = React.createContext<ClusterWizardContextType | null>(null);
@@ -92,6 +92,9 @@ const ClusterWizardContextProvider = ({
92
92
  const [wizardPerPage, setWizardPerPage] = React.useState(10);
93
93
  const [customManifestsStep, setCustomManifestsStep] = React.useState<boolean>(false);
94
94
  const [installDisconnected, setInstallDisconnected] = React.useState(false);
95
+ const [disconnectedInfraEnv, setDisconnectedInfraEnv] = React.useState<InfraEnv | undefined>(
96
+ infraEnv,
97
+ );
95
98
  const location = useLocation();
96
99
  const locationState = location.state as ClusterWizardFlowStateType | undefined;
97
100
  const {
@@ -259,6 +262,8 @@ const ClusterWizardContextProvider = ({
259
262
  connectedWizardStepIds?.length && onSetCurrentStepId(connectedWizardStepIds[0]);
260
263
  }
261
264
  },
265
+ disconnectedInfraEnv,
266
+ setDisconnectedInfraEnv,
262
267
  };
263
268
  }, [
264
269
  wizardStepIds,
@@ -273,6 +278,7 @@ const ClusterWizardContextProvider = ({
273
278
  installDisconnected,
274
279
  setInstallDisconnected,
275
280
  connectedWizardStepIds,
281
+ disconnectedInfraEnv,
276
282
  ]);
277
283
 
278
284
  if (!contextValue) {
@@ -17,6 +17,8 @@ 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';
20
22
 
21
23
  type ClusterValidationSectionProps = {
22
24
  cluster?: Cluster;
@@ -71,6 +73,7 @@ type ClusterWizardFooterProps = WizardFooterGenericProps & {
71
73
  errorFields?: string[];
72
74
  alertTitle?: string;
73
75
  alertContent?: string | null;
76
+ disconnectedClusterId?: string;
74
77
  };
75
78
 
76
79
  const ClusterWizardFooter = ({
@@ -80,19 +83,37 @@ const ClusterWizardFooter = ({
80
83
  alertTitle,
81
84
  alertContent,
82
85
  onCancel,
86
+ disconnectedClusterId,
83
87
  ...rest
84
88
  }: ClusterWizardFooterProps) => {
85
- const { alerts } = useAlerts();
89
+ const { alerts, addAlert } = useAlerts();
86
90
  const navigate = useNavigate();
87
91
  const isSingleClusterFeatureEnabled = useFeature('ASSISTED_INSTALLER_SINGLE_CLUSTER_FEATURE');
88
92
  const { currentStepId } = useClusterWizardContext();
89
93
  const { resetSingleClusterDialog } = useModalDialogsContext();
94
+ const { setDisconnectedInfraEnv } = useClusterWizardContext();
90
95
 
91
- const handleCancel = React.useCallback(() => navigate('/cluster-list'), [navigate]);
96
+ const handleCancel = React.useCallback(async () => {
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]);
92
112
 
93
- const handleReset = React.useCallback(() => {
94
- resetSingleClusterDialog.open({ cluster });
95
- }, [resetSingleClusterDialog, cluster]);
113
+ const handleReset = React.useCallback(
114
+ () => resetSingleClusterDialog.open({ cluster }),
115
+ [resetSingleClusterDialog, cluster],
116
+ );
96
117
 
97
118
  const alertsSection = alerts.length ? <Alerts /> : undefined;
98
119
 
@@ -22,6 +22,7 @@ import {
22
22
  Cluster,
23
23
  V2ClusterUpdateParams,
24
24
  } from '@openshift-assisted/types/assisted-installer-service';
25
+ import useLateBinding from '../../hooks/useLateBinding';
25
26
 
26
27
  const HostDiscoveryForm = ({ cluster }: { cluster: Cluster }) => {
27
28
  const { alerts } = useAlerts();
@@ -29,12 +30,14 @@ const HostDiscoveryForm = ({ cluster }: { cluster: Cluster }) => {
29
30
  const clusterWizardContext = useClusterWizardContext();
30
31
  const isAutoSaveRunning = useFormikAutoSave();
31
32
  const errorFields = getFormikErrorFields(errors, touched);
33
+ const isBinding = useLateBinding(cluster);
32
34
 
33
35
  const isNextDisabled =
34
36
  !isValid ||
35
37
  !!alerts.length ||
36
38
  isAutoSaveRunning ||
37
39
  isSubmitting ||
40
+ isBinding ||
38
41
  !canNextHostDiscovery({ cluster });
39
42
 
40
43
  const footer = (
@@ -4,6 +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';
7
8
  import { ClusterWizardStepsType } from './wizardTransition';
8
9
 
9
10
  const getCurrentStep = (currentStepId: ClusterWizardStepsType) => {
@@ -12,6 +13,8 @@ const getCurrentStep = (currentStepId: ClusterWizardStepsType) => {
12
13
  return <ReviewStep />;
13
14
  case 'disconnected-basic':
14
15
  return <BasicStep />;
16
+ case 'disconnected-optional-configurations':
17
+ return <OptionalConfigurationsStep />;
15
18
  default:
16
19
  return <ClusterDetails />;
17
20
  }
@@ -14,6 +14,7 @@ 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',
17
18
  };
18
19
 
19
20
  export const defaultWizardSteps: ClusterWizardStepsType[] = [
@@ -15,10 +15,53 @@ import ClusterWizardNavigation from '../ClusterWizardNavigation';
15
15
  import { WithErrorBoundary } from '../../../../common/components/ErrorHandling/WithErrorBoundary';
16
16
  import InstallDisconnectedSwitch from './InstallDisconnectedSwitch';
17
17
  import { Formik } from '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 } from 'react-router-dom-v5-compat';
24
+ import { AxiosResponse } from 'axios';
25
+ import { Cluster } from '@openshift-assisted/types//assisted-installer-service';
18
26
 
19
27
  const BasicStep = () => {
20
28
  const { t } = useTranslation();
21
29
  const { moveNext } = useClusterWizardContext();
30
+ const { addAlert } = useAlerts();
31
+ const [isSubmitting, setIsSubmitting] = React.useState(false);
32
+ const navigate = useNavigate();
33
+ const location = useLocation();
34
+ const currentPath = location.pathname;
35
+ let disconnectedClusterId: string | undefined;
36
+
37
+ const onNext = async () => {
38
+ try {
39
+ setIsSubmitting(true);
40
+ // Create cluster only - infraEnv will be created in OptionalConfigurationsStep
41
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
42
+ const { data: disconnectedCluster }: AxiosResponse<Cluster> =
43
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-call
44
+ await ClustersService.registerDisconnected({
45
+ name: 'disconnected-cluster',
46
+ openshiftVersion: '4.19',
47
+ });
48
+ disconnectedClusterId = disconnectedCluster.id;
49
+ navigate(`${currentPath}/${disconnectedClusterId}`, {
50
+ state: ClusterWizardFlowStateNew,
51
+ });
52
+ moveNext();
53
+ } catch (error: unknown) {
54
+ handleApiError(error, () => {
55
+ addAlert({
56
+ title: 'Failed to create disconnected cluster',
57
+ message: getApiErrorMessage(error),
58
+ variant: AlertVariant.danger,
59
+ });
60
+ });
61
+ } finally {
62
+ setIsSubmitting(false);
63
+ }
64
+ };
22
65
 
23
66
  return (
24
67
  <Formik
@@ -29,7 +72,15 @@ const BasicStep = () => {
29
72
  >
30
73
  <ClusterWizardStep
31
74
  navigation={<ClusterWizardNavigation />}
32
- footer={<ClusterWizardFooter onNext={moveNext} />}
75
+ footer={
76
+ <ClusterWizardFooter
77
+ onNext={() => {
78
+ void onNext();
79
+ }}
80
+ isSubmitting={isSubmitting}
81
+ disconnectedClusterId={disconnectedClusterId}
82
+ />
83
+ }
33
84
  >
34
85
  <WithErrorBoundary title="Failed to load Basic step">
35
86
  <Grid hasGutter>