@openshift-assisted/ui-lib 2.41.2 → 2.42.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (217) hide show
  1. package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentDetailsForm.d.ts.map +1 -1
  2. package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentHostsDiscovery.d.ts.map +1 -1
  3. package/build/@types/cim/components/ClusterDeployment/LabelsSelector.d.ts.map +1 -1
  4. package/build/@types/cim/components/ClusterDeployment/ScaleUpForm.d.ts +1 -0
  5. package/build/@types/cim/components/ClusterDeployment/ScaleUpForm.d.ts.map +1 -1
  6. package/build/@types/cim/components/InfraEnv/AddHostDropdown.d.ts.map +1 -1
  7. package/build/@types/cim/components/InfraEnv/EnvironmentDetails.d.ts.map +1 -1
  8. package/build/@types/cim/components/InfraEnv/InfraEnvOpenShiftVersionDropdown.d.ts.map +1 -1
  9. package/build/@types/cim/components/common/CpuArchitectureDropdown.d.ts.map +1 -1
  10. package/build/@types/cim/components/helpers/versions.d.ts.map +1 -1
  11. package/build/@types/cim/components/modals/ScaleUpModal.d.ts +1 -0
  12. package/build/@types/cim/components/modals/ScaleUpModal.d.ts.map +1 -1
  13. package/build/@types/common/components/clusterConfiguration/ControlPlaneNodesDropdown.d.ts.map +1 -1
  14. package/build/@types/common/components/clusterConfiguration/DiskEncryptionFields/DiskEncryptionControlGroup.d.ts.map +1 -1
  15. package/build/@types/common/components/clusterConfiguration/DiskEncryptionFields/DiskEncryptionValues.d.ts +1 -0
  16. package/build/@types/common/components/clusterConfiguration/DiskEncryptionFields/DiskEncryptionValues.d.ts.map +1 -1
  17. package/build/@types/common/components/clusterWizard/clusterDetailsValidation.d.ts.map +1 -1
  18. package/build/@types/common/components/clusterWizard/types.d.ts +1 -0
  19. package/build/@types/common/components/clusterWizard/types.d.ts.map +1 -1
  20. package/build/@types/common/components/hosts/DiskRole.d.ts.map +1 -1
  21. package/build/@types/common/components/hosts/TableToolbar.d.ts.map +1 -1
  22. package/build/@types/common/components/newFeatureSupportLevels/types.d.ts +1 -1
  23. package/build/@types/common/components/newFeatureSupportLevels/types.d.ts.map +1 -1
  24. package/build/@types/common/components/operators/operatorDescriptions.d.ts +23 -0
  25. package/build/@types/common/components/operators/operatorDescriptions.d.ts.map +1 -0
  26. package/build/@types/common/components/operators/operatorSpecs.d.ts +25 -4
  27. package/build/@types/common/components/operators/operatorSpecs.d.ts.map +1 -1
  28. package/build/@types/common/components/ui/ClusterEventsToolbar.d.ts.map +1 -1
  29. package/build/@types/common/components/ui/OpenShiftVersionDropdown.d.ts +0 -1
  30. package/build/@types/common/components/ui/OpenShiftVersionDropdown.d.ts.map +1 -1
  31. package/build/@types/common/components/ui/SimpleDropdown.d.ts +2 -2
  32. package/build/@types/common/components/ui/SimpleDropdown.d.ts.map +1 -1
  33. package/build/@types/common/config/constants.d.ts.map +1 -1
  34. package/build/@types/common/config/docs_links.d.ts +1 -2
  35. package/build/@types/common/config/docs_links.d.ts.map +1 -1
  36. package/build/@types/common/index.d.ts +1 -0
  37. package/build/@types/common/index.d.ts.map +1 -1
  38. package/build/@types/common/types/ui-settings.d.ts +1 -0
  39. package/build/@types/common/types/ui-settings.d.ts.map +1 -1
  40. package/build/@types/common/utils.d.ts +8 -0
  41. package/build/@types/common/utils.d.ts.map +1 -1
  42. package/build/@types/ocm/components/clusterConfiguration/ControlPlaneNodesDropdown.d.ts +2 -0
  43. package/build/@types/ocm/components/clusterConfiguration/ControlPlaneNodesDropdown.d.ts.map +1 -1
  44. package/build/@types/ocm/components/clusterConfiguration/CpuArchitectureDropdown.d.ts.map +1 -1
  45. package/build/@types/ocm/components/clusterConfiguration/DiscoveryImageTypeDropdown.d.ts.map +1 -1
  46. package/build/@types/ocm/components/clusterConfiguration/OcmBaseDomainField.d.ts.map +1 -1
  47. package/build/@types/ocm/components/clusterConfiguration/OcmClusterDetailsFormFields.d.ts.map +1 -1
  48. package/build/@types/ocm/components/clusterConfiguration/OcmTNADisclaimer.d.ts +4 -0
  49. package/build/@types/ocm/components/clusterConfiguration/OcmTNADisclaimer.d.ts.map +1 -0
  50. package/build/@types/ocm/components/clusterConfiguration/manifestsConfiguration/components/FolderDropdown.d.ts.map +1 -1
  51. package/build/@types/ocm/components/clusterConfiguration/networkConfiguration/SubnetsDropdown.d.ts.map +1 -1
  52. package/build/@types/ocm/components/clusterConfiguration/operators/utils.d.ts.map +1 -1
  53. package/build/@types/ocm/components/clusterConfiguration/platformIntegration/ExternalPlatformDropdown.d.ts.map +1 -1
  54. package/build/@types/ocm/components/clusterConfiguration/review/ReviewOperatorsTable.d.ts.map +1 -1
  55. package/build/@types/ocm/components/clusterConfiguration/staticIp/commonValidationSchemas.d.ts.map +1 -1
  56. package/build/@types/ocm/components/clusterWizard/ClusterDetails.d.ts.map +1 -1
  57. package/build/@types/ocm/components/clusterWizard/OperatorsBundle.d.ts.map +1 -1
  58. package/build/@types/ocm/components/clusterWizard/OperatorsSelect.d.ts.map +1 -1
  59. package/build/@types/ocm/components/featureSupportLevels/featureStateUtils.d.ts.map +1 -1
  60. package/build/@types/ocm/components/hosts/use-hosts-table.d.ts.map +1 -1
  61. package/build/@types/ocm/services/DiskEncryptionService.d.ts +1 -1
  62. package/build/@types/ocm/services/DiskEncryptionService.d.ts.map +1 -1
  63. package/build/@types/ocm/store/slices/current-cluster/slice.d.ts +1 -1
  64. package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentDetailsForm.js +2 -2
  65. package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentDetailsForm.js.map +1 -1
  66. package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentHostsDiscovery.js +2 -1
  67. package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentHostsDiscovery.js.map +1 -1
  68. package/build/cjs/cim/components/ClusterDeployment/LabelsSelector.js +5 -5
  69. package/build/cjs/cim/components/ClusterDeployment/LabelsSelector.js.map +1 -1
  70. package/build/cjs/cim/components/ClusterDeployment/ScaleUpForm.js +2 -2
  71. package/build/cjs/cim/components/ClusterDeployment/ScaleUpForm.js.map +1 -1
  72. package/build/cjs/cim/components/InfraEnv/AddHostDropdown.js +29 -28
  73. package/build/cjs/cim/components/InfraEnv/AddHostDropdown.js.map +1 -1
  74. package/build/cjs/cim/components/InfraEnv/EnvironmentDetails.js +16 -14
  75. package/build/cjs/cim/components/InfraEnv/EnvironmentDetails.js.map +1 -1
  76. package/build/cjs/cim/components/InfraEnv/InfraEnvAgentTable.js +2 -2
  77. package/build/cjs/cim/components/InfraEnv/InfraEnvAgentTable.js.map +1 -1
  78. package/build/cjs/cim/components/InfraEnv/InfraEnvOpenShiftVersionDropdown.js +4 -8
  79. package/build/cjs/cim/components/InfraEnv/InfraEnvOpenShiftVersionDropdown.js.map +1 -1
  80. package/build/cjs/cim/components/common/CpuArchitectureDropdown.js +3 -3
  81. package/build/cjs/cim/components/common/CpuArchitectureDropdown.js.map +1 -1
  82. package/build/cjs/cim/components/helpers/versions.js +1 -1
  83. package/build/cjs/cim/components/helpers/versions.js.map +1 -1
  84. package/build/cjs/cim/components/modals/MassApproveAction.js +2 -2
  85. package/build/cjs/cim/components/modals/MassApproveAction.js.map +1 -1
  86. package/build/cjs/cim/components/modals/ScaleUpModal.js +3 -3
  87. package/build/cjs/cim/components/modals/ScaleUpModal.js.map +1 -1
  88. package/build/cjs/common/components/clusterConfiguration/ControlPlaneNodesDropdown.js +5 -6
  89. package/build/cjs/common/components/clusterConfiguration/ControlPlaneNodesDropdown.js.map +1 -1
  90. package/build/cjs/common/components/clusterConfiguration/DiskEncryptionFields/DiskEncryptionControlGroup.js +11 -6
  91. package/build/cjs/common/components/clusterConfiguration/DiskEncryptionFields/DiskEncryptionControlGroup.js.map +1 -1
  92. package/build/cjs/common/components/clusterDetail/OperatorsProgressItem.js +1 -1
  93. package/build/cjs/common/components/clusterDetail/OperatorsProgressItem.js.map +1 -1
  94. package/build/cjs/common/components/clusterWizard/clusterDetailsValidation.js +2 -1
  95. package/build/cjs/common/components/clusterWizard/clusterDetailsValidation.js.map +1 -1
  96. package/build/cjs/common/components/hosts/DiskRole.js +5 -5
  97. package/build/cjs/common/components/hosts/DiskRole.js.map +1 -1
  98. package/build/cjs/common/components/hosts/HostToolbarActions.js +3 -3
  99. package/build/cjs/common/components/hosts/HostToolbarActions.js.map +1 -1
  100. package/build/cjs/common/components/hosts/TableToolbar.js +15 -15
  101. package/build/cjs/common/components/hosts/TableToolbar.js.map +1 -1
  102. package/build/cjs/common/components/operators/operatorDescriptions.js +26 -0
  103. package/build/cjs/common/components/operators/operatorDescriptions.js.map +1 -0
  104. package/build/cjs/common/components/operators/operatorSpecs.js +332 -189
  105. package/build/cjs/common/components/operators/operatorSpecs.js.map +1 -1
  106. package/build/cjs/common/components/ui/ClusterEventsToolbar.js +1 -1
  107. package/build/cjs/common/components/ui/ClusterEventsToolbar.js.map +1 -1
  108. package/build/cjs/common/components/ui/OpenShiftVersionDropdown.js +13 -16
  109. package/build/cjs/common/components/ui/OpenShiftVersionDropdown.js.map +1 -1
  110. package/build/cjs/common/components/ui/SimpleDropdown.js +4 -5
  111. package/build/cjs/common/components/ui/SimpleDropdown.js.map +1 -1
  112. package/build/cjs/common/config/constants.js +10 -0
  113. package/build/cjs/common/config/constants.js.map +1 -1
  114. package/build/cjs/common/config/docs_links.js +41 -25
  115. package/build/cjs/common/config/docs_links.js.map +1 -1
  116. package/build/cjs/common/index.js +1 -0
  117. package/build/cjs/common/index.js.map +1 -1
  118. package/build/cjs/common/utils.js +27 -1
  119. package/build/cjs/common/utils.js.map +1 -1
  120. package/build/cjs/ocm/components/clusterConfiguration/ControlPlaneNodesDropdown.js +23 -13
  121. package/build/cjs/ocm/components/clusterConfiguration/ControlPlaneNodesDropdown.js.map +1 -1
  122. package/build/cjs/ocm/components/clusterConfiguration/CpuArchitectureDropdown.js +3 -5
  123. package/build/cjs/ocm/components/clusterConfiguration/CpuArchitectureDropdown.js.map +1 -1
  124. package/build/cjs/ocm/components/clusterConfiguration/DiscoveryImageTypeDropdown.js +15 -17
  125. package/build/cjs/ocm/components/clusterConfiguration/DiscoveryImageTypeDropdown.js.map +1 -1
  126. package/build/cjs/ocm/components/clusterConfiguration/OcmBaseDomainField.js +5 -7
  127. package/build/cjs/ocm/components/clusterConfiguration/OcmBaseDomainField.js.map +1 -1
  128. package/build/cjs/ocm/components/clusterConfiguration/OcmClusterDetailsFormFields.js +16 -0
  129. package/build/cjs/ocm/components/clusterConfiguration/OcmClusterDetailsFormFields.js.map +1 -1
  130. package/build/cjs/ocm/components/clusterConfiguration/OcmOperatorProgressItem.js +1 -1
  131. package/build/cjs/ocm/components/clusterConfiguration/OcmOperatorProgressItem.js.map +1 -1
  132. package/build/cjs/ocm/components/clusterConfiguration/OcmTNADisclaimer.js +14 -0
  133. package/build/cjs/ocm/components/clusterConfiguration/OcmTNADisclaimer.js.map +1 -0
  134. package/build/cjs/ocm/components/clusterConfiguration/manifestsConfiguration/components/FolderDropdown.js +6 -8
  135. package/build/cjs/ocm/components/clusterConfiguration/manifestsConfiguration/components/FolderDropdown.js.map +1 -1
  136. package/build/cjs/ocm/components/clusterConfiguration/networkConfiguration/SubnetsDropdown.js +7 -10
  137. package/build/cjs/ocm/components/clusterConfiguration/networkConfiguration/SubnetsDropdown.js.map +1 -1
  138. package/build/cjs/ocm/components/clusterConfiguration/operators/OperatorCheckbox.js +1 -1
  139. package/build/cjs/ocm/components/clusterConfiguration/operators/OperatorCheckbox.js.map +1 -1
  140. package/build/cjs/ocm/components/clusterConfiguration/operators/utils.js +2 -1
  141. package/build/cjs/ocm/components/clusterConfiguration/operators/utils.js.map +1 -1
  142. package/build/cjs/ocm/components/clusterConfiguration/platformIntegration/ExternalPlatformDropdown.js +11 -13
  143. package/build/cjs/ocm/components/clusterConfiguration/platformIntegration/ExternalPlatformDropdown.js.map +1 -1
  144. package/build/cjs/ocm/components/clusterConfiguration/review/ReviewOperatorsTable.js +1 -1
  145. package/build/cjs/ocm/components/clusterConfiguration/review/ReviewOperatorsTable.js.map +1 -1
  146. package/build/cjs/ocm/components/clusterConfiguration/staticIp/commonValidationSchemas.js +4 -0
  147. package/build/cjs/ocm/components/clusterConfiguration/staticIp/commonValidationSchemas.js.map +1 -1
  148. package/build/cjs/ocm/components/clusterDetail/ProgressBarAlerts.js +1 -1
  149. package/build/cjs/ocm/components/clusterDetail/ProgressBarAlerts.js.map +1 -1
  150. package/build/cjs/ocm/components/clusterWizard/ClusterDetails.js +7 -4
  151. package/build/cjs/ocm/components/clusterWizard/ClusterDetails.js.map +1 -1
  152. package/build/cjs/ocm/components/clusterWizard/OperatorsBundle.js +14 -10
  153. package/build/cjs/ocm/components/clusterWizard/OperatorsBundle.js.map +1 -1
  154. package/build/cjs/ocm/components/clusterWizard/OperatorsSelect.js +13 -15
  155. package/build/cjs/ocm/components/clusterWizard/OperatorsSelect.js.map +1 -1
  156. package/build/cjs/ocm/components/featureSupportLevels/featureStateUtils.js +5 -15
  157. package/build/cjs/ocm/components/featureSupportLevels/featureStateUtils.js.map +1 -1
  158. package/build/cjs/ocm/components/hosts/use-hosts-table.js +9 -2
  159. package/build/cjs/ocm/components/hosts/use-hosts-table.js.map +1 -1
  160. package/build/cjs/ocm/services/DiskEncryptionService.js +11 -3
  161. package/build/cjs/ocm/services/DiskEncryptionService.js.map +1 -1
  162. package/lib/cim/components/ClusterDeployment/ClusterDeploymentDetailsForm.tsx +4 -2
  163. package/lib/cim/components/ClusterDeployment/ClusterDeploymentHostsDiscovery.tsx +8 -6
  164. package/lib/cim/components/ClusterDeployment/LabelsSelector.tsx +27 -14
  165. package/lib/cim/components/ClusterDeployment/ScaleUpForm.tsx +3 -0
  166. package/lib/cim/components/InfraEnv/AddHostDropdown.tsx +60 -47
  167. package/lib/cim/components/InfraEnv/EnvironmentDetails.tsx +7 -10
  168. package/lib/cim/components/InfraEnv/InfraEnvAgentTable.tsx +1 -1
  169. package/lib/cim/components/InfraEnv/InfraEnvOpenShiftVersionDropdown.tsx +34 -22
  170. package/lib/cim/components/common/CpuArchitectureDropdown.tsx +6 -3
  171. package/lib/cim/components/helpers/versions.ts +2 -2
  172. package/lib/cim/components/modals/MassApproveAction.tsx +1 -1
  173. package/lib/cim/components/modals/ScaleUpModal.tsx +5 -2
  174. package/lib/common/components/clusterConfiguration/ControlPlaneNodesDropdown.tsx +30 -17
  175. package/lib/common/components/clusterConfiguration/DiskEncryptionFields/DiskEncryptionControlGroup.tsx +20 -5
  176. package/lib/common/components/clusterConfiguration/DiskEncryptionFields/DiskEncryptionValues.ts +1 -0
  177. package/lib/common/components/clusterDetail/OperatorsProgressItem.tsx +1 -1
  178. package/lib/common/components/clusterWizard/clusterDetailsValidation.ts +3 -0
  179. package/lib/common/components/clusterWizard/types.ts +1 -0
  180. package/lib/common/components/hosts/DiskRole.tsx +23 -17
  181. package/lib/common/components/hosts/HostToolbarActions.tsx +1 -1
  182. package/lib/common/components/hosts/TableToolbar.tsx +54 -48
  183. package/lib/common/components/newFeatureSupportLevels/types.ts +1 -0
  184. package/lib/common/components/operators/operatorDescriptions.tsx +58 -0
  185. package/lib/common/components/operators/operatorSpecs.tsx +425 -257
  186. package/lib/common/components/ui/ClusterEventsToolbar.tsx +1 -0
  187. package/lib/common/components/ui/OpenShiftVersionDropdown.tsx +38 -44
  188. package/lib/common/components/ui/SimpleDropdown.tsx +23 -22
  189. package/lib/common/config/constants.ts +11 -0
  190. package/lib/common/config/docs_links.ts +44 -30
  191. package/lib/common/index.ts +1 -0
  192. package/lib/common/types/ui-settings.ts +1 -0
  193. package/lib/common/utils.ts +30 -0
  194. package/lib/ocm/components/clusterConfiguration/ControlPlaneNodesDropdown.tsx +46 -15
  195. package/lib/ocm/components/clusterConfiguration/CpuArchitectureDropdown.tsx +26 -20
  196. package/lib/ocm/components/clusterConfiguration/DiscoveryImageTypeDropdown.tsx +47 -46
  197. package/lib/ocm/components/clusterConfiguration/OcmBaseDomainField.tsx +16 -13
  198. package/lib/ocm/components/clusterConfiguration/OcmClusterDetailsFormFields.tsx +33 -1
  199. package/lib/ocm/components/clusterConfiguration/OcmOperatorProgressItem.tsx +1 -1
  200. package/lib/ocm/components/clusterConfiguration/OcmTNADisclaimer.tsx +23 -0
  201. package/lib/ocm/components/clusterConfiguration/manifestsConfiguration/components/FolderDropdown.tsx +26 -26
  202. package/lib/ocm/components/clusterConfiguration/networkConfiguration/SubnetsDropdown.tsx +26 -30
  203. package/lib/ocm/components/clusterConfiguration/operators/OperatorCheckbox.tsx +1 -1
  204. package/lib/ocm/components/clusterConfiguration/operators/utils.tsx +2 -1
  205. package/lib/ocm/components/clusterConfiguration/platformIntegration/ExternalPlatformDropdown.tsx +34 -33
  206. package/lib/ocm/components/clusterConfiguration/review/ReviewOperatorsTable.tsx +2 -1
  207. package/lib/ocm/components/clusterConfiguration/staticIp/commonValidationSchemas.tsx +4 -0
  208. package/lib/ocm/components/clusterDetail/ProgressBarAlerts.tsx +1 -1
  209. package/lib/ocm/components/clusterWizard/ClusterDetails.tsx +15 -5
  210. package/lib/ocm/components/clusterWizard/OperatorsBundle.tsx +15 -17
  211. package/lib/ocm/components/clusterWizard/OperatorsSelect.tsx +33 -27
  212. package/lib/ocm/components/featureSupportLevels/featureStateUtils.ts +7 -18
  213. package/lib/ocm/components/hosts/use-hosts-table.tsx +9 -3
  214. package/lib/ocm/services/DiskEncryptionService.ts +7 -1
  215. package/package.json +3 -3
  216. package/build/cjs/common/components/ui/OpenShiftVersionDropdown.css +0 -9
  217. package/lib/common/components/ui/OpenShiftVersionDropdown.css +0 -9
@@ -1,7 +1,13 @@
1
1
  import React from 'react';
2
2
  import { useLocation, useNavigate } from 'react-router-dom-v5-compat';
3
3
  import { useDispatch } from 'react-redux';
4
- import { useAlerts, LoadingState, ClusterWizardStep, ErrorState } from '../../../common';
4
+ import {
5
+ useAlerts,
6
+ LoadingState,
7
+ ClusterWizardStep,
8
+ ErrorState,
9
+ UISettingsValues,
10
+ } from '../../../common';
5
11
  import { usePullSecret } from '../../hooks';
6
12
  import { getApiErrorMessage, handleApiError, isUnknownServerError } from '../../../common/api';
7
13
  import { setServerUpdateError, updateCluster } from '../../store/slices/current-cluster/slice';
@@ -81,11 +87,15 @@ const ClusterDetails = ({ cluster, infraEnv }: ClusterDetailsProps) => {
81
87
  }
82
88
  const cluster = await ClustersService.create(params, isAssistedMigration);
83
89
  navigate(`../${cluster.id}`, { state: ClusterWizardFlowStateNew });
84
- await UISettingService.update(cluster.id, { addCustomManifests });
85
- //For Assisted Migration we need to enable virtualization bundle
90
+
91
+ const uiPatch: UISettingsValues = { addCustomManifests };
86
92
  if (isAssistedMigration) {
87
- await UISettingService.update(cluster.id, { bundlesSelected: ['virtualization'] });
93
+ //For Assisted Migration we need to enable virtualization bundle
94
+ uiPatch.bundlesSelected = ['virtualization'];
95
+ uiPatch.isAssistedMigration = true;
88
96
  }
97
+ await UISettingService.update(cluster.id, uiPatch);
98
+ await clusterWizardContext.updateUISettings(uiPatch); // keeps local state current
89
99
  } catch (e) {
90
100
  handleApiError(e, () =>
91
101
  addAlert({ title: 'Failed to create new cluster', message: getApiErrorMessage(e) }),
@@ -95,7 +105,7 @@ const ClusterDetails = ({ cluster, infraEnv }: ClusterDetailsProps) => {
95
105
  }
96
106
  }
97
107
  },
98
- [clearAlerts, location.search, navigate, addAlert, dispatch],
108
+ [clearAlerts, location.search, navigate, clusterWizardContext, addAlert, dispatch],
99
109
  );
100
110
 
101
111
  const navigation = <ClusterWizardNavigation cluster={cluster} />;
@@ -24,21 +24,18 @@ import NewFeatureSupportLevelBadge, {
24
24
  } from '../../../common/components/newFeatureSupportLevels/NewFeatureSupportLevelBadge';
25
25
  import { ExternalLink, OperatorsValues, PopoverIcon, singleClusterBundles } from '../../../common';
26
26
  import { useFormikContext } from 'formik';
27
- import {
28
- GetFeatureSupportLevel,
29
- useNewFeatureSupportLevel,
30
- } from '../../../common/components/newFeatureSupportLevels';
27
+ import { useNewFeatureSupportLevel } from '../../../common/components/newFeatureSupportLevels';
31
28
  import { useFeature } from '../../hooks/use-feature';
32
29
  import { useSelector } from 'react-redux';
33
30
  import { selectIsCurrentClusterSNO } from '../../store/slices/current-cluster/selectors';
34
31
  import { getNewBundleOperators } from '../clusterConfiguration/operators/utils';
35
32
  import { bundleSpecs } from '../clusterConfiguration/operators/bundleSpecs';
36
- import { useOperatorSpecs } from '../../../common/components/operators/operatorSpecs';
37
-
33
+ import { OperatorSpec, useOperatorSpecs } from '../../../common/components/operators/operatorSpecs';
34
+ import { useClusterWizardContext } from './ClusterWizardContext';
38
35
  import './OperatorsBundle.css';
39
36
 
40
37
  const BundleLabel = ({ bundle }: { bundle: Bundle }) => {
41
- const opSpecs = useOperatorSpecs();
38
+ const { byKey: opSpecs } = useOperatorSpecs();
42
39
  const bundleSpec = bundleSpecs[bundle.id || ''];
43
40
 
44
41
  return (
@@ -80,19 +77,17 @@ const BundleLabel = ({ bundle }: { bundle: Bundle }) => {
80
77
 
81
78
  const getBundleSupportLevel = (
82
79
  bundle: Bundle,
83
- opSpecs: ReturnType<typeof useOperatorSpecs>,
84
- getFeatureSupportLevel: GetFeatureSupportLevel,
80
+ opSpecsByKey: Record<string, OperatorSpec>,
85
81
  ): NewSupportLevelBadgeProps['supportLevel'] => {
86
82
  let supportLevel: NewSupportLevelBadgeProps['supportLevel'] = undefined;
87
83
  if (bundle.operators) {
88
84
  for (const op of bundle.operators) {
89
- const operatorSpec = opSpecs[op];
85
+ const operatorSpec = opSpecsByKey[op];
90
86
  if (operatorSpec) {
91
- const opSupportLevel = getFeatureSupportLevel(operatorSpec.featureId);
92
- if (opSupportLevel === 'dev-preview') {
87
+ if (operatorSpec.supportLevel === 'dev-preview') {
93
88
  supportLevel = 'dev-preview';
94
89
  break;
95
- } else if (opSupportLevel === 'tech-preview') {
90
+ } else if (operatorSpec.supportLevel === 'tech-preview') {
96
91
  supportLevel = 'tech-preview';
97
92
  }
98
93
  }
@@ -112,10 +107,11 @@ const BundleCard = ({
112
107
  }) => {
113
108
  const { values, setFieldValue } = useFormikContext<OperatorsValues>();
114
109
  const isSNO = useSelector(selectIsCurrentClusterSNO);
115
- const { isFeatureSupported, getFeatureSupportLevel } = useNewFeatureSupportLevel();
116
- const opSpecs = useOperatorSpecs();
110
+ const { isFeatureSupported } = useNewFeatureSupportLevel();
111
+ const { byKey: opSpecs } = useOperatorSpecs();
112
+ const { uiSettings } = useClusterWizardContext();
117
113
 
118
- const supportLevel = getBundleSupportLevel(bundle, opSpecs, getFeatureSupportLevel);
114
+ const supportLevel = getBundleSupportLevel(bundle, opSpecs);
119
115
 
120
116
  const hasUnsupportedOperators = !!bundle.operators?.some((op) => {
121
117
  const operatorSpec = opSpecs[op];
@@ -130,7 +126,7 @@ const BundleCard = ({
130
126
  const incompatibleBundle = bundleSpec?.incompatibleBundles?.find((b) =>
131
127
  values.selectedBundles.includes(b),
132
128
  );
133
-
129
+ const isAssistedMigration = uiSettings?.isAssistedMigration;
134
130
  const disabledReason = hasUnsupportedOperators
135
131
  ? 'Some operators in this bundle are not supported with the current configuration.'
136
132
  : isSNO && bundleSpec?.noSNO
@@ -139,6 +135,8 @@ const BundleCard = ({
139
135
  ? `Bundle cannot be installed together with ${
140
136
  bundles.find(({ id }) => id === incompatibleBundle)?.title || incompatibleBundle
141
137
  }`
138
+ : isAssistedMigration
139
+ ? 'This bundle needs to be selected for clusters created from Migration Assessment'
142
140
  : undefined;
143
141
 
144
142
  const onSelect = (checked: boolean) => {
@@ -53,51 +53,57 @@ const OperatorsSelect = ({
53
53
  void fetchSupportedOperators();
54
54
  }, [addAlert, setSupportedOperators, setIsLoading]);
55
55
 
56
- const opSpecs = useOperatorSpecs();
56
+ const { byCategory, byKey: opSpecs } = useOperatorSpecs();
57
57
 
58
58
  const operators = React.useMemo(() => {
59
- return supportedOperators
60
- .sort((a, b) => {
61
- const aTitle = opSpecs[a]?.title || a;
62
- const bTitle = opSpecs[b]?.title || b;
63
- return aTitle.localeCompare(bTitle);
64
- })
65
- .filter((op) => {
66
- if (!isSingleClusterFeatureEnabled) {
67
- return true;
68
- }
69
- return singleClusterOperators.includes(op);
70
- });
71
- }, [isSingleClusterFeatureEnabled, supportedOperators, opSpecs]);
59
+ return supportedOperators.filter((op) => {
60
+ if (!isSingleClusterFeatureEnabled) {
61
+ return true;
62
+ }
63
+ return singleClusterOperators.includes(op);
64
+ });
65
+ }, [isSingleClusterFeatureEnabled, supportedOperators]);
72
66
 
73
67
  if (isLoading) {
74
68
  return <LoadingState />;
75
69
  }
76
70
 
71
+ const selectedOperators = values.selectedOperators.filter(
72
+ (opKey) => operators.includes(opKey) && !!opSpecs[opKey],
73
+ );
74
+
77
75
  return (
78
76
  <ExpandableSection
79
- toggleText={`Single Operators (${operators.length} | ${values.selectedOperators.length} selected)`}
77
+ toggleText={`Single Operators (${operators.length} | ${selectedOperators.length} selected)`}
80
78
  onToggle={() => setIsExpanded(!isExpanded)}
81
79
  isExpanded={isExpanded}
82
80
  data-testid="single-operators-section"
83
81
  >
84
82
  <Stack hasGutter data-testid={'operators-form'}>
85
- {operators.map((operatorKey) => {
86
- if (!opSpecs[operatorKey]) {
83
+ {Object.entries(byCategory).map(([categoryName, specs]) => {
84
+ const categoryOperators = specs.filter((spec) => operators.includes(spec.operatorKey));
85
+ if (categoryOperators.length === 0) {
87
86
  return null;
88
87
  }
89
88
 
90
89
  return (
91
- <StackItem key={operatorKey}>
92
- <OperatorCheckbox
93
- bundles={bundles}
94
- operatorId={operatorKey}
95
- cluster={cluster}
96
- openshiftVersion={cluster.openshiftVersion}
97
- preflightRequirements={preflightRequirements}
98
- {...opSpecs[operatorKey]}
99
- />
100
- </StackItem>
90
+ <React.Fragment key={categoryName}>
91
+ <StackItem>
92
+ <strong>{categoryName}</strong>
93
+ </StackItem>
94
+ {categoryOperators.map((spec) => (
95
+ <StackItem key={spec.operatorKey}>
96
+ <OperatorCheckbox
97
+ bundles={bundles}
98
+ operatorId={spec.operatorKey}
99
+ cluster={cluster}
100
+ openshiftVersion={cluster.openshiftVersion}
101
+ preflightRequirements={preflightRequirements}
102
+ {...spec}
103
+ />
104
+ </StackItem>
105
+ ))}
106
+ </React.Fragment>
101
107
  );
102
108
  })}
103
109
  </Stack>
@@ -4,11 +4,6 @@ import {
4
4
  CpuArchitecture,
5
5
  FeatureId,
6
6
  isSNO,
7
- OPERATOR_NAME_CNV,
8
- OPERATOR_NAME_LVM,
9
- OPERATOR_NAME_ODF,
10
- OPERATOR_NAME_OPENSHIFT_AI,
11
- OPERATOR_NAME_OSC,
12
7
  SupportedCpuArchitecture,
13
8
  } from '../../../common';
14
9
  import {
@@ -17,7 +12,7 @@ import {
17
12
  SupportLevel,
18
13
  } from '@openshift-assisted/types/assisted-installer-service';
19
14
  import { ExternalPlatformLabels } from '../clusterConfiguration/platformIntegration/constants';
20
- import { getOperatorSpecs } from '../../../common/components/operators/operatorSpecs';
15
+ import { getOperatorTitleByFeatureId } from '../../../common/components/operators/operatorSpecs';
21
16
 
22
17
  export const clusterExistsReason = 'This option is not editable after the draft cluster is created';
23
18
 
@@ -46,10 +41,7 @@ const getOdfDisabledReason = (
46
41
  return undefined;
47
42
  }
48
43
 
49
- const opSpecs = getOperatorSpecs();
50
-
51
- const operatorTitle = opSpecs[OPERATOR_NAME_ODF]?.title || '';
52
-
44
+ const operatorTitle = getOperatorTitleByFeatureId('ODF') || '';
53
45
  const isArm = activeFeatureConfiguration?.underlyingCpuArchitecture === CpuArchitecture.ARM;
54
46
  if (isArm && isSNO(cluster)) {
55
47
  return `${operatorTitle} is not available when using Single Node OpenShift or ARM CPU architecture.`;
@@ -75,8 +67,8 @@ const getCnvDisabledReason = (
75
67
  return undefined;
76
68
  }
77
69
 
78
- const opSpecs = getOperatorSpecs();
79
- const operatorTitle = opSpecs[OPERATOR_NAME_CNV]?.title || '';
70
+ const operatorTitle = getOperatorTitleByFeatureId('CNV') || '';
71
+
80
72
  if (platformType === 'nutanix') {
81
73
  return `${operatorTitle} is not available when Nutanix platform type is selected.`;
82
74
  }
@@ -105,8 +97,7 @@ const getLvmDisabledReason = (
105
97
  return undefined;
106
98
  }
107
99
 
108
- const opSpecs = getOperatorSpecs();
109
- const operatorTitle = opSpecs[OPERATOR_NAME_LVM]?.title;
100
+ const operatorTitle = getOperatorTitleByFeatureId('LVM') || '';
110
101
  if (platformType === 'nutanix') {
111
102
  return `${operatorTitle} is not supported when Nutanix platform type is selected.`;
112
103
  }
@@ -125,8 +116,7 @@ const getOscDisabledReason = (
125
116
  return undefined;
126
117
  }
127
118
 
128
- const opSpecs = getOperatorSpecs();
129
- const operatorTitle = opSpecs[OPERATOR_NAME_OSC]?.title || '';
119
+ const operatorTitle = getOperatorTitleByFeatureId('OSC') || '';
130
120
  if (!isSupported) {
131
121
  return `${operatorTitle} is not supported in this OpenShift version.`;
132
122
  }
@@ -299,8 +289,7 @@ const getOpenShiftAIDisabledReason = (
299
289
  return undefined;
300
290
  }
301
291
 
302
- const opSpecs = getOperatorSpecs();
303
- const operatorTitle = opSpecs[OPERATOR_NAME_OPENSHIFT_AI]?.title || '';
292
+ const operatorTitle = getOperatorTitleByFeatureId('OPENSHIFT_AI') || '';
304
293
  const isArm = activeFeatureConfiguration?.underlyingCpuArchitecture === CpuArchitecture.ARM;
305
294
  if (isArm) {
306
295
  return `${operatorTitle} is not available when ARM CPU architecture is selected.`;
@@ -60,8 +60,10 @@ import {
60
60
  selectCurrentClusterPermissionsState,
61
61
  selectCurrentClusterState,
62
62
  } from '../../store/slices/current-cluster/selectors';
63
+ import { useFeature } from '../../hooks/use-feature';
63
64
 
64
65
  export const useHostsTable = (cluster: Cluster) => {
66
+ const isSingleClusterFeatureEnabled = useFeature('ASSISTED_INSTALLER_SINGLE_CLUSTER_FEATURE');
65
67
  const { addAlert } = useAlerts();
66
68
  const {
67
69
  eventsDialog,
@@ -248,8 +250,12 @@ export const useHostsTable = (cluster: Cluster) => {
248
250
 
249
251
  const actionChecks = React.useMemo(
250
252
  () => ({
251
- canEditRole: (host: Host) =>
252
- !isViewerMode && canEditRoleUtil(cluster.status, host.status, isSNO(cluster)),
253
+ canEditRole: (host: Host) => {
254
+ if (isSingleClusterFeatureEnabled && host.bootstrap) {
255
+ return false;
256
+ }
257
+ return !isViewerMode && canEditRoleUtil(cluster.status, host.status, isSNO(cluster));
258
+ },
253
259
  canInstallHost: (host: Host) => !isViewerMode && canInstallHostUtil(cluster, host.status),
254
260
  canEditDisks: (host: Host) => !isViewerMode && canEditDisksUtil(cluster.status, host.status),
255
261
  canEnable: (host: Host) => !isViewerMode && canEnableUtil(cluster.status, host.status),
@@ -259,7 +265,7 @@ export const useHostsTable = (cluster: Cluster) => {
259
265
  canReset: (host: Host) => !isViewerMode && canResetUtil(cluster.status, host.status),
260
266
  canEditHostname: () => !isViewerMode && canEditHostnameUtil(cluster.status),
261
267
  }),
262
- [cluster, isViewerMode],
268
+ [cluster, isViewerMode, isSingleClusterFeatureEnabled],
263
269
  );
264
270
 
265
271
  const onReset = React.useCallback(() => {
@@ -8,9 +8,14 @@ const DiskEncryptionService = {
8
8
  diskEncryptionEnableOn(
9
9
  isEnableOnMasters: boolean,
10
10
  isEnableOnWorkers: boolean,
11
+ isEnableOnArbiters: boolean,
11
12
  ): DiskEncryption['enableOn'] {
12
13
  let enableOnParam: DiskEncryption['enableOn'];
13
- if (isEnableOnMasters && isEnableOnWorkers) enableOnParam = 'all';
14
+ if (isEnableOnMasters && isEnableOnWorkers && isEnableOnArbiters) enableOnParam = 'all';
15
+ else if (isEnableOnMasters && isEnableOnWorkers) enableOnParam = 'masters,workers';
16
+ else if (isEnableOnMasters && isEnableOnArbiters) enableOnParam = 'masters,arbiters';
17
+ else if (isEnableOnWorkers && isEnableOnArbiters) enableOnParam = 'arbiters,workers';
18
+ else if (isEnableOnArbiters) enableOnParam = 'arbiters';
14
19
  else if (isEnableOnWorkers) enableOnParam = 'workers';
15
20
  else if (isEnableOnMasters) enableOnParam = 'masters';
16
21
  else enableOnParam = 'none';
@@ -28,6 +33,7 @@ const DiskEncryptionService = {
28
33
  : DiskEncryptionService.diskEncryptionEnableOn(
29
34
  values.enableDiskEncryptionOnMasters,
30
35
  values.enableDiskEncryptionOnWorkers,
36
+ values.enableDiskEncryptionOnArbiters,
31
37
  ),
32
38
  tangServers:
33
39
  values.diskEncryptionMode === 'tang'
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "dependencies": {
3
- "@openshift-assisted/locales": "2.41.2",
4
- "@openshift-assisted/types": "2.41.2",
3
+ "@openshift-assisted/locales": "2.42.1",
4
+ "@openshift-assisted/types": "2.42.1",
5
5
  "@openshift-console/dynamic-plugin-sdk": "0.0.3",
6
6
  "@patternfly/patternfly": "5.2.0",
7
7
  "@patternfly/react-code-editor": "5.2.0",
@@ -140,5 +140,5 @@
140
140
  ]
141
141
  }
142
142
  },
143
- "version": "2.41.2"
143
+ "version": "2.42.1"
144
144
  }
@@ -1,9 +0,0 @@
1
- #form-input-openshiftVersion-field .pf-v5-c-dropdown__menu {
2
- max-height: 22vh;
3
- overflow: auto;
4
- }
5
-
6
- #form-input-openshiftVersion-field .pf-v5-c-dropdown__menu ul {
7
- list-style: none;
8
- padding-left: 0;
9
- }
@@ -1,9 +0,0 @@
1
- #form-input-openshiftVersion-field .pf-v5-c-dropdown__menu {
2
- max-height: 22vh;
3
- overflow: auto;
4
- }
5
-
6
- #form-input-openshiftVersion-field .pf-v5-c-dropdown__menu ul {
7
- list-style: none;
8
- padding-left: 0;
9
- }