@openshift-assisted/ui-lib 2.37.2 → 2.38.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 (244) hide show
  1. package/build/@types/cim/components/ClusterDeployment/ClusterDetailsFormFields.d.ts.map +1 -1
  2. package/build/@types/cim/components/ClusterDeployment/wizardTransition.d.ts +1 -1
  3. package/build/@types/cim/components/ClusterDeployment/wizardTransition.d.ts.map +1 -1
  4. package/build/@types/cim/components/common/constants.d.ts.map +1 -1
  5. package/build/@types/cim/components/helpers/toAssisted.d.ts.map +1 -1
  6. package/build/@types/cim/components/modals/AddHostModal.d.ts.map +1 -1
  7. package/build/@types/cim/types/k8s/infra-env-k8s-resource.d.ts +1 -0
  8. package/build/@types/cim/types/k8s/infra-env-k8s-resource.d.ts.map +1 -1
  9. package/build/@types/common/api/assisted-service/BundleAPI.d.ts +8 -0
  10. package/build/@types/common/api/assisted-service/BundleAPI.d.ts.map +1 -0
  11. package/build/@types/common/api/assisted-service/OperatorsAPI.d.ts +6 -0
  12. package/build/@types/common/api/assisted-service/OperatorsAPI.d.ts.map +1 -0
  13. package/build/@types/common/components/clusterConfiguration/ControlPlaneNodesDropdown.d.ts +7 -0
  14. package/build/@types/common/components/clusterConfiguration/ControlPlaneNodesDropdown.d.ts.map +1 -0
  15. package/build/@types/common/components/clusterConfiguration/DiscoveryImageConfigForm.d.ts.map +1 -1
  16. package/build/@types/common/components/clusterConfiguration/DownloadIso.d.ts +2 -1
  17. package/build/@types/common/components/clusterConfiguration/DownloadIso.d.ts.map +1 -1
  18. package/build/@types/common/components/clusterWizard/types.d.ts +3 -1
  19. package/build/@types/common/components/clusterWizard/types.d.ts.map +1 -1
  20. package/build/@types/common/components/hosts/HostRowDetail.d.ts.map +1 -1
  21. package/build/@types/common/components/storage/DisksTable.d.ts.map +1 -1
  22. package/build/@types/common/config/constants.d.ts +6 -0
  23. package/build/@types/common/config/constants.d.ts.map +1 -1
  24. package/build/@types/common/config/docs_links.d.ts +1 -1
  25. package/build/@types/common/config/docs_links.d.ts.map +1 -1
  26. package/build/@types/common/selectors/clusterSelectors.d.ts +1 -0
  27. package/build/@types/common/selectors/clusterSelectors.d.ts.map +1 -1
  28. package/build/@types/common/types/clusters.d.ts +8 -0
  29. package/build/@types/common/types/clusters.d.ts.map +1 -1
  30. package/build/@types/common/types/ui-settings.d.ts +1 -0
  31. package/build/@types/common/types/ui-settings.d.ts.map +1 -1
  32. package/build/@types/ocm/components/SentryErrorMonitorContextProvider.d.ts.map +1 -1
  33. package/build/@types/ocm/components/clusterConfiguration/ControlPlaneNodesDropdown.d.ts.map +1 -1
  34. package/build/@types/ocm/components/clusterConfiguration/DiscoveryImageModal.d.ts.map +1 -1
  35. package/build/@types/ocm/components/clusterConfiguration/operators/AuthorinoCheckbox.d.ts +8 -0
  36. package/build/@types/ocm/components/clusterConfiguration/operators/AuthorinoCheckbox.d.ts.map +1 -0
  37. package/build/@types/ocm/components/clusterConfiguration/operators/CnvCheckbox.d.ts +4 -1
  38. package/build/@types/ocm/components/clusterConfiguration/operators/CnvCheckbox.d.ts.map +1 -1
  39. package/build/@types/ocm/components/clusterConfiguration/operators/LsoCheckbox.d.ts +8 -0
  40. package/build/@types/ocm/components/clusterConfiguration/operators/LsoCheckbox.d.ts.map +1 -0
  41. package/build/@types/ocm/components/clusterConfiguration/operators/LvmCheckbox.d.ts +4 -1
  42. package/build/@types/ocm/components/clusterConfiguration/operators/LvmCheckbox.d.ts.map +1 -1
  43. package/build/@types/ocm/components/clusterConfiguration/operators/MceCheckbox.d.ts +4 -1
  44. package/build/@types/ocm/components/clusterConfiguration/operators/MceCheckbox.d.ts.map +1 -1
  45. package/build/@types/ocm/components/clusterConfiguration/operators/MtvOperatorCheckbox.d.ts +4 -1
  46. package/build/@types/ocm/components/clusterConfiguration/operators/MtvOperatorCheckbox.d.ts.map +1 -1
  47. package/build/@types/ocm/components/clusterConfiguration/operators/NmstateCheckbox.d.ts +10 -0
  48. package/build/@types/ocm/components/clusterConfiguration/operators/NmstateCheckbox.d.ts.map +1 -0
  49. package/build/@types/ocm/components/clusterConfiguration/operators/NmstateRequirements.d.ts +7 -0
  50. package/build/@types/ocm/components/clusterConfiguration/operators/NmstateRequirements.d.ts.map +1 -0
  51. package/build/@types/ocm/components/clusterConfiguration/operators/NodeFeatureDiscoveryCheckbox.d.ts +8 -0
  52. package/build/@types/ocm/components/clusterConfiguration/operators/NodeFeatureDiscoveryCheckbox.d.ts.map +1 -0
  53. package/build/@types/ocm/components/clusterConfiguration/operators/NvidiaGpuCheckbox.d.ts +8 -0
  54. package/build/@types/ocm/components/clusterConfiguration/operators/NvidiaGpuCheckbox.d.ts.map +1 -0
  55. package/build/@types/ocm/components/clusterConfiguration/operators/OdfCheckbox.d.ts +5 -1
  56. package/build/@types/ocm/components/clusterConfiguration/operators/OdfCheckbox.d.ts.map +1 -1
  57. package/build/@types/ocm/components/clusterConfiguration/operators/OpenShiftAICheckbox.d.ts +5 -1
  58. package/build/@types/ocm/components/clusterConfiguration/operators/OpenShiftAICheckbox.d.ts.map +1 -1
  59. package/build/@types/ocm/components/clusterConfiguration/operators/OscCheckbox.d.ts +5 -1
  60. package/build/@types/ocm/components/clusterConfiguration/operators/OscCheckbox.d.ts.map +1 -1
  61. package/build/@types/ocm/components/clusterConfiguration/operators/PipelinesChekbox.d.ts +8 -0
  62. package/build/@types/ocm/components/clusterConfiguration/operators/PipelinesChekbox.d.ts.map +1 -0
  63. package/build/@types/ocm/components/clusterConfiguration/operators/ServerlessCheckbox.d.ts +8 -0
  64. package/build/@types/ocm/components/clusterConfiguration/operators/ServerlessCheckbox.d.ts.map +1 -0
  65. package/build/@types/ocm/components/clusterConfiguration/operators/ServicemeshCheckbox.d.ts +8 -0
  66. package/build/@types/ocm/components/clusterConfiguration/operators/ServicemeshCheckbox.d.ts.map +1 -0
  67. package/build/@types/ocm/components/clusterConfiguration/operators/SupportedOperators.d.ts +24 -0
  68. package/build/@types/ocm/components/clusterConfiguration/operators/SupportedOperators.d.ts.map +1 -0
  69. package/build/@types/ocm/components/clusterWizard/ClusterDetails.d.ts.map +1 -1
  70. package/build/@types/ocm/components/clusterWizard/Operators.d.ts.map +1 -1
  71. package/build/@types/ocm/components/clusterWizard/OperatorsStep.d.ts.map +1 -1
  72. package/build/@types/ocm/components/clusterWizard/wizardTransition.d.ts +1 -1
  73. package/build/@types/ocm/components/clusterWizard/wizardTransition.d.ts.map +1 -1
  74. package/build/@types/ocm/components/featureSupportLevels/featureStateUtils.d.ts.map +1 -1
  75. package/build/@types/ocm/config/constants.d.ts +2 -0
  76. package/build/@types/ocm/config/constants.d.ts.map +1 -1
  77. package/build/@types/ocm/sentry.d.ts +2 -2
  78. package/build/@types/ocm/sentry.d.ts.map +1 -1
  79. package/build/@types/ocm/services/BundleService.d.ts +6 -0
  80. package/build/@types/ocm/services/BundleService.d.ts.map +1 -0
  81. package/build/@types/ocm/services/ClustersService.d.ts +1 -0
  82. package/build/@types/ocm/services/ClustersService.d.ts.map +1 -1
  83. package/build/@types/ocm/services/OperatorsService.d.ts +1 -0
  84. package/build/@types/ocm/services/OperatorsService.d.ts.map +1 -1
  85. package/build/@types/ocm/store/slices/current-cluster/slice.d.ts +1 -0
  86. package/build/@types/ocm/store/slices/current-cluster/slice.d.ts.map +1 -1
  87. package/build/cjs/cim/components/ClusterDeployment/ClusterDetailsFormFields.js +4 -5
  88. package/build/cjs/cim/components/ClusterDeployment/ClusterDetailsFormFields.js.map +1 -1
  89. package/build/cjs/cim/components/InfraEnv/OpenshiftVersionDropdown.js +1 -1
  90. package/build/cjs/cim/components/InfraEnv/OpenshiftVersionDropdown.js.map +1 -1
  91. package/build/cjs/cim/components/common/constants.js +1 -1
  92. package/build/cjs/cim/components/common/constants.js.map +1 -1
  93. package/build/cjs/cim/components/helpers/toAssisted.js +2 -1
  94. package/build/cjs/cim/components/helpers/toAssisted.js.map +1 -1
  95. package/build/cjs/cim/components/modals/AddHostModal.js +4 -5
  96. package/build/cjs/cim/components/modals/AddHostModal.js.map +1 -1
  97. package/build/cjs/common/api/assisted-service/BundleAPI.js +16 -0
  98. package/build/cjs/common/api/assisted-service/BundleAPI.js.map +1 -0
  99. package/build/cjs/common/api/assisted-service/OperatorsAPI.js +13 -0
  100. package/build/cjs/common/api/assisted-service/OperatorsAPI.js.map +1 -0
  101. package/build/cjs/common/components/clusterConfiguration/ControlPlaneNodesDropdown.js +41 -0
  102. package/build/cjs/common/components/clusterConfiguration/ControlPlaneNodesDropdown.js.map +1 -0
  103. package/build/cjs/common/components/clusterConfiguration/DiscoveryImageConfigForm.js +4 -5
  104. package/build/cjs/common/components/clusterConfiguration/DiscoveryImageConfigForm.js.map +1 -1
  105. package/build/cjs/common/components/clusterConfiguration/DiscoveryImageTypeControlGroup.js +5 -5
  106. package/build/cjs/common/components/clusterConfiguration/DiscoveryImageTypeControlGroup.js.map +1 -1
  107. package/build/cjs/common/components/clusterConfiguration/DownloadIso.js +6 -2
  108. package/build/cjs/common/components/clusterConfiguration/DownloadIso.js.map +1 -1
  109. package/build/cjs/common/components/clusterWizard/clusterDetailsValidation.js +2 -2
  110. package/build/cjs/common/components/clusterWizard/clusterDetailsValidation.js.map +1 -1
  111. package/build/cjs/common/components/hosts/AITableMemo.js +16 -13
  112. package/build/cjs/common/components/hosts/AITableMemo.js.map +1 -1
  113. package/build/cjs/common/components/hosts/HostRowDetail.js +35 -1
  114. package/build/cjs/common/components/hosts/HostRowDetail.js.map +1 -1
  115. package/build/cjs/common/components/storage/DisksTable.js +16 -10
  116. package/build/cjs/common/components/storage/DisksTable.js.map +1 -1
  117. package/build/cjs/common/config/constants.js +12 -1
  118. package/build/cjs/common/config/constants.js.map +1 -1
  119. package/build/cjs/common/config/docs_links.js +1 -1
  120. package/build/cjs/common/config/docs_links.js.map +1 -1
  121. package/build/cjs/common/selectors/clusterSelectors.js +7 -1
  122. package/build/cjs/common/selectors/clusterSelectors.js.map +1 -1
  123. package/build/cjs/common/types/clusters.js.map +1 -1
  124. package/build/cjs/ocm/components/SentryErrorMonitorContextProvider.js.map +1 -1
  125. package/build/cjs/ocm/components/clusterConfiguration/ControlPlaneNodesDropdown.js +10 -9
  126. package/build/cjs/ocm/components/clusterConfiguration/ControlPlaneNodesDropdown.js.map +1 -1
  127. package/build/cjs/ocm/components/clusterConfiguration/DiscoveryImageModal.js +14 -1
  128. package/build/cjs/ocm/components/clusterConfiguration/DiscoveryImageModal.js.map +1 -1
  129. package/build/cjs/ocm/components/clusterConfiguration/OcmClusterDetailsFormFields.js +2 -2
  130. package/build/cjs/ocm/components/clusterConfiguration/OcmClusterDetailsFormFields.js.map +1 -1
  131. package/build/cjs/ocm/components/clusterConfiguration/operators/AuthorinoCheckbox.js +29 -0
  132. package/build/cjs/ocm/components/clusterConfiguration/operators/AuthorinoCheckbox.js.map +1 -0
  133. package/build/cjs/ocm/components/clusterConfiguration/operators/CnvCheckbox.js +3 -20
  134. package/build/cjs/ocm/components/clusterConfiguration/operators/CnvCheckbox.js.map +1 -1
  135. package/build/cjs/ocm/components/clusterConfiguration/operators/LsoCheckbox.js +29 -0
  136. package/build/cjs/ocm/components/clusterConfiguration/operators/LsoCheckbox.js.map +1 -0
  137. package/build/cjs/ocm/components/clusterConfiguration/operators/LvmCheckbox.js +5 -21
  138. package/build/cjs/ocm/components/clusterConfiguration/operators/LvmCheckbox.js.map +1 -1
  139. package/build/cjs/ocm/components/clusterConfiguration/operators/MceCheckbox.js +6 -7
  140. package/build/cjs/ocm/components/clusterConfiguration/operators/MceCheckbox.js.map +1 -1
  141. package/build/cjs/ocm/components/clusterConfiguration/operators/MtvOperatorCheckbox.js +8 -13
  142. package/build/cjs/ocm/components/clusterConfiguration/operators/MtvOperatorCheckbox.js.map +1 -1
  143. package/build/cjs/ocm/components/clusterConfiguration/operators/NmstateCheckbox.js +30 -0
  144. package/build/cjs/ocm/components/clusterConfiguration/operators/NmstateCheckbox.js.map +1 -0
  145. package/build/cjs/ocm/components/clusterConfiguration/operators/NmstateRequirements.js +48 -0
  146. package/build/cjs/ocm/components/clusterConfiguration/operators/NmstateRequirements.js.map +1 -0
  147. package/build/cjs/ocm/components/clusterConfiguration/operators/NodeFeatureDiscoveryCheckbox.js +29 -0
  148. package/build/cjs/ocm/components/clusterConfiguration/operators/NodeFeatureDiscoveryCheckbox.js.map +1 -0
  149. package/build/cjs/ocm/components/clusterConfiguration/operators/NvidiaGpuCheckbox.js +29 -0
  150. package/build/cjs/ocm/components/clusterConfiguration/operators/NvidiaGpuCheckbox.js.map +1 -0
  151. package/build/cjs/ocm/components/clusterConfiguration/operators/OdfCheckbox.js +7 -18
  152. package/build/cjs/ocm/components/clusterConfiguration/operators/OdfCheckbox.js.map +1 -1
  153. package/build/cjs/ocm/components/clusterConfiguration/operators/OpenShiftAICheckbox.js +4 -17
  154. package/build/cjs/ocm/components/clusterConfiguration/operators/OpenShiftAICheckbox.js.map +1 -1
  155. package/build/cjs/ocm/components/clusterConfiguration/operators/OscCheckbox.js +3 -12
  156. package/build/cjs/ocm/components/clusterConfiguration/operators/OscCheckbox.js.map +1 -1
  157. package/build/cjs/ocm/components/clusterConfiguration/operators/PipelinesChekbox.js +29 -0
  158. package/build/cjs/ocm/components/clusterConfiguration/operators/PipelinesChekbox.js.map +1 -0
  159. package/build/cjs/ocm/components/clusterConfiguration/operators/ServerlessCheckbox.js +29 -0
  160. package/build/cjs/ocm/components/clusterConfiguration/operators/ServerlessCheckbox.js.map +1 -0
  161. package/build/cjs/ocm/components/clusterConfiguration/operators/ServicemeshCheckbox.js +29 -0
  162. package/build/cjs/ocm/components/clusterConfiguration/operators/ServicemeshCheckbox.js.map +1 -0
  163. package/build/cjs/ocm/components/clusterConfiguration/operators/SupportedOperators.js +73 -0
  164. package/build/cjs/ocm/components/clusterConfiguration/operators/SupportedOperators.js.map +1 -0
  165. package/build/cjs/ocm/components/clusterConfiguration/staticIp/components/FormViewHosts/FormViewHostsFields.js +1 -1
  166. package/build/cjs/ocm/components/clusterConfiguration/staticIp/components/FormViewHosts/FormViewHostsFields.js.map +1 -1
  167. package/build/cjs/ocm/components/clusterDetail/AssistedInstallerDetailCard.js +1 -1
  168. package/build/cjs/ocm/components/clusterDetail/AssistedInstallerDetailCard.js.map +1 -1
  169. package/build/cjs/ocm/components/clusterWizard/ClusterDetails.js +4 -0
  170. package/build/cjs/ocm/components/clusterWizard/ClusterDetails.js.map +1 -1
  171. package/build/cjs/ocm/components/clusterWizard/Operators.js +9 -1
  172. package/build/cjs/ocm/components/clusterWizard/Operators.js.map +1 -1
  173. package/build/cjs/ocm/components/clusterWizard/OperatorsStep.js +209 -22
  174. package/build/cjs/ocm/components/clusterWizard/OperatorsStep.js.map +1 -1
  175. package/build/cjs/ocm/components/clusterWizard/wizardTransition.js +1 -1
  176. package/build/cjs/ocm/components/clusterWizard/wizardTransition.js.map +1 -1
  177. package/build/cjs/ocm/components/featureSupportLevels/featureStateUtils.js +40 -0
  178. package/build/cjs/ocm/components/featureSupportLevels/featureStateUtils.js.map +1 -1
  179. package/build/cjs/ocm/config/constants.js +155 -1
  180. package/build/cjs/ocm/config/constants.js.map +1 -1
  181. package/build/cjs/ocm/sentry.js +1 -1
  182. package/build/cjs/ocm/sentry.js.map +1 -1
  183. package/build/cjs/ocm/services/BundleService.js +20 -0
  184. package/build/cjs/ocm/services/BundleService.js.map +1 -0
  185. package/build/cjs/ocm/services/ClustersService.js +33 -1
  186. package/build/cjs/ocm/services/ClustersService.js.map +1 -1
  187. package/build/cjs/ocm/services/OperatorsService.js +16 -8
  188. package/build/cjs/ocm/services/OperatorsService.js.map +1 -1
  189. package/lib/cim/components/ClusterDeployment/ClusterDetailsFormFields.tsx +4 -6
  190. package/lib/cim/components/InfraEnv/OpenshiftVersionDropdown.tsx +1 -1
  191. package/lib/cim/components/common/constants.ts +1 -2
  192. package/lib/cim/components/helpers/toAssisted.ts +1 -0
  193. package/lib/cim/components/modals/AddHostModal.tsx +4 -5
  194. package/lib/cim/types/k8s/infra-env-k8s-resource.ts +1 -0
  195. package/lib/common/api/assisted-service/BundleAPI.ts +18 -0
  196. package/lib/common/api/assisted-service/OperatorsAPI.ts +13 -0
  197. package/lib/common/components/clusterConfiguration/ControlPlaneNodesDropdown.tsx +93 -0
  198. package/lib/common/components/clusterConfiguration/DiscoveryImageConfigForm.tsx +10 -12
  199. package/lib/common/components/clusterConfiguration/DiscoveryImageTypeControlGroup.tsx +9 -9
  200. package/lib/common/components/clusterConfiguration/DownloadIso.tsx +9 -1
  201. package/lib/common/components/clusterWizard/clusterDetailsValidation.ts +1 -1
  202. package/lib/common/components/clusterWizard/types.ts +4 -2
  203. package/lib/common/components/hosts/AITableMemo.tsx +1 -1
  204. package/lib/common/components/hosts/HostRowDetail.tsx +71 -1
  205. package/lib/common/components/storage/DisksTable.tsx +25 -18
  206. package/lib/common/config/constants.ts +12 -0
  207. package/lib/common/config/docs_links.ts +1 -1
  208. package/lib/common/selectors/clusterSelectors.ts +8 -0
  209. package/lib/common/types/clusters.ts +8 -0
  210. package/lib/common/types/ui-settings.ts +1 -0
  211. package/lib/ocm/components/SentryErrorMonitorContextProvider.tsx +1 -2
  212. package/lib/ocm/components/clusterConfiguration/ControlPlaneNodesDropdown.tsx +13 -12
  213. package/lib/ocm/components/clusterConfiguration/DiscoveryImageModal.tsx +24 -1
  214. package/lib/ocm/components/clusterConfiguration/OcmClusterDetailsFormFields.tsx +2 -2
  215. package/lib/ocm/components/clusterConfiguration/operators/AuthorinoCheckbox.tsx +63 -0
  216. package/lib/ocm/components/clusterConfiguration/operators/CnvCheckbox.tsx +7 -31
  217. package/lib/ocm/components/clusterConfiguration/operators/LsoCheckbox.tsx +63 -0
  218. package/lib/ocm/components/clusterConfiguration/operators/LvmCheckbox.tsx +8 -26
  219. package/lib/ocm/components/clusterConfiguration/operators/MceCheckbox.tsx +10 -3
  220. package/lib/ocm/components/clusterConfiguration/operators/MtvOperatorCheckbox.tsx +23 -12
  221. package/lib/ocm/components/clusterConfiguration/operators/NmstateCheckbox.tsx +76 -0
  222. package/lib/ocm/components/clusterConfiguration/operators/NmstateRequirements.tsx +53 -0
  223. package/lib/ocm/components/clusterConfiguration/operators/NodeFeatureDiscoveryCheckbox.tsx +66 -0
  224. package/lib/ocm/components/clusterConfiguration/operators/NvidiaGpuCheckbox.tsx +63 -0
  225. package/lib/ocm/components/clusterConfiguration/operators/OdfCheckbox.tsx +20 -25
  226. package/lib/ocm/components/clusterConfiguration/operators/OpenShiftAICheckbox.tsx +11 -24
  227. package/lib/ocm/components/clusterConfiguration/operators/OscCheckbox.tsx +10 -25
  228. package/lib/ocm/components/clusterConfiguration/operators/PipelinesChekbox.tsx +64 -0
  229. package/lib/ocm/components/clusterConfiguration/operators/ServerlessCheckbox.tsx +63 -0
  230. package/lib/ocm/components/clusterConfiguration/operators/ServicemeshCheckbox.tsx +63 -0
  231. package/lib/ocm/components/clusterConfiguration/operators/SupportedOperators.tsx +105 -0
  232. package/lib/ocm/components/clusterConfiguration/staticIp/components/FormViewHosts/FormViewHostsFields.tsx +1 -1
  233. package/lib/ocm/components/clusterDetail/AssistedInstallerDetailCard.tsx +1 -1
  234. package/lib/ocm/components/clusterWizard/ClusterDetails.tsx +4 -0
  235. package/lib/ocm/components/clusterWizard/Operators.tsx +21 -1
  236. package/lib/ocm/components/clusterWizard/OperatorsStep.tsx +374 -38
  237. package/lib/ocm/components/clusterWizard/wizardTransition.ts +1 -1
  238. package/lib/ocm/components/featureSupportLevels/featureStateUtils.ts +40 -0
  239. package/lib/ocm/config/constants.ts +156 -0
  240. package/lib/ocm/sentry.ts +2 -1
  241. package/lib/ocm/services/BundleService.ts +14 -0
  242. package/lib/ocm/services/ClustersService.ts +39 -2
  243. package/lib/ocm/services/OperatorsService.tsx +21 -10
  244. package/package.json +3 -3
@@ -1,16 +1,59 @@
1
- import React from 'react';
1
+ import React, { useEffect, useState } from 'react';
2
2
  import { useSelector } from 'react-redux';
3
- import { Stack, StackItem } from '@patternfly/react-core';
4
- import { ClusterOperatorProps, ClusterWizardStepHeader } from '../../../common';
5
- import CnvCheckbox from '../clusterConfiguration/operators/CnvCheckbox';
6
- import OdfCheckbox from '../clusterConfiguration/operators/OdfCheckbox';
7
- import LvmCheckbox from '../clusterConfiguration/operators/LvmCheckbox';
8
- import MceCheckbox from '../clusterConfiguration/operators/MceCheckbox';
3
+ import {
4
+ Card,
5
+ CardBody,
6
+ CardTitle,
7
+ Checkbox,
8
+ ExpandableSection,
9
+ Flex,
10
+ FlexItem,
11
+ Gallery,
12
+ GalleryItem,
13
+ Stack,
14
+ StackItem,
15
+ TextInput,
16
+ Title,
17
+ Tooltip,
18
+ } from '@patternfly/react-core';
19
+ import {
20
+ ClusterOperatorProps,
21
+ ClusterWizardStepHeader,
22
+ numberOfEnabledOperators,
23
+ OperatorsValues,
24
+ PopoverIcon,
25
+ } from '../../../common';
9
26
  import { selectIsCurrentClusterSNO } from '../../store/slices/current-cluster/selectors';
10
27
  import { isOCPVersionEqualsOrMajor } from '../utils';
11
- import MtvOperatorCheckbox from '../clusterConfiguration/operators/MtvOperatorCheckbox';
12
- import OpenShiftAICheckbox from '../clusterConfiguration/operators/OpenShiftAICheckbox';
13
- import OscCheckbox from '../clusterConfiguration/operators/OscCheckbox';
28
+ import BundleService from '../../services/BundleService';
29
+ import { Bundle } from '@openshift-assisted/types/./assisted-installer-service';
30
+ import { OperatorsService } from '../../services';
31
+ import {
32
+ mapOperatorIdToFeatureId,
33
+ mapOperatorsToFieldIds,
34
+ operatorComponentMap,
35
+ } from '../clusterConfiguration/operators/SupportedOperators';
36
+ import { useClusterWizardContext } from './ClusterWizardContext';
37
+ import { useFormikContext } from 'formik';
38
+ import NewFeatureSupportLevelBadge from '../../../common/components/newFeatureSupportLevels/NewFeatureSupportLevelBadge';
39
+ import { useNewFeatureSupportLevel } from '../../../common/components/newFeatureSupportLevels';
40
+ import {
41
+ getCnvDisabledWithMtvReason,
42
+ getCnvIncompatibleWithLvmReason,
43
+ getLvmIncompatibleWithCnvReason,
44
+ getLvmsIncompatibleWithOdfReason,
45
+ getOdfIncompatibleWithLvmsReason,
46
+ getOpenShiftAIIncompatibleWithLvmsReason,
47
+ } from '../featureSupportLevels/featureStateUtils';
48
+
49
+ const operatorsThatCanNotBeInstalledAlone = [
50
+ 'nvdia-gpu',
51
+ 'pipelines',
52
+ 'servicemesh',
53
+ 'serverless',
54
+ 'authorino',
55
+ 'lso',
56
+ ];
14
57
 
15
58
  export const OperatorsStep = (props: ClusterOperatorProps) => {
16
59
  const isSNO = useSelector(selectIsCurrentClusterSNO);
@@ -18,39 +61,332 @@ export const OperatorsStep = (props: ClusterOperatorProps) => {
18
61
  props.openshiftVersion || '',
19
62
  '4.15',
20
63
  );
64
+
65
+ const [bundles, setBundles] = useState<Bundle[]>([]);
66
+ const [isExpanded, setIsExpanded] = useState(true);
67
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
68
+ const [supportedOperators, setSupportedOperators] = useState<string[]>([]);
69
+ const [searchTerm, setSearchTerm] = useState('');
70
+ const [selectedOperators, setSelectedOperators] = useState<string[]>([]);
71
+ const [selectedBundles, setSelectedBundles] = useState<{ [key: string]: boolean }>({});
72
+ const [bundleOperators, setBundleOperators] = useState<string[]>([]);
73
+ const { updateUISettings, uiSettings } = useClusterWizardContext();
74
+ const { values, setFieldValue } = useFormikContext<OperatorsValues>();
75
+ const featureSupportLevelData = useNewFeatureSupportLevel();
76
+
77
+ useEffect(() => {
78
+ const fetchBundles = async () => {
79
+ try {
80
+ const fetchedBundles = await BundleService.listBundles();
81
+
82
+ setBundles(fetchedBundles);
83
+ } catch (error) {
84
+ // eslint-disable-next-line no-console
85
+ console.error('Error al obtener los bundles:', error);
86
+ }
87
+ };
88
+
89
+ void fetchBundles();
90
+ }, []);
91
+
92
+ useEffect(() => {
93
+ const fetchSupportedOperators = async () => {
94
+ try {
95
+ const fetchedOperators = await OperatorsService.getSupportedOperators();
96
+ const sortedOperators = fetchedOperators.sort((a, b) => a.localeCompare(b));
97
+
98
+ setSupportedOperators(sortedOperators);
99
+ } catch (error) {
100
+ // eslint-disable-next-line no-console
101
+ console.error('Error al obtener los operators:', error);
102
+ }
103
+ };
104
+
105
+ void fetchSupportedOperators();
106
+ }, []);
107
+
108
+ const filteredBundles = bundles.filter(
109
+ (bundle) =>
110
+ bundle.title?.toLowerCase().includes(searchTerm.toLowerCase()) ||
111
+ bundle.description?.toLowerCase().includes(searchTerm.toLowerCase()),
112
+ );
113
+
114
+ useEffect(() => {
115
+ if (uiSettings?.bundlesSelected) {
116
+ setSelectedBundles(
117
+ uiSettings.bundlesSelected.reduce((acc, id) => ({ ...acc, [id]: true }), {}),
118
+ );
119
+
120
+ setBundleOperators(() => {
121
+ const newSelection: string[] = [];
122
+ bundles
123
+ .filter((bundle) => uiSettings?.bundlesSelected?.includes(bundle.id ?? ''))
124
+ .forEach((bundle) => {
125
+ bundle.operators?.forEach((op) => {
126
+ newSelection.push(op);
127
+ });
128
+ });
129
+
130
+ return newSelection;
131
+ });
132
+ }
133
+ }, [bundles, uiSettings?.bundlesSelected]);
134
+
135
+ useEffect(() => {
136
+ const newSelection: string[] = [];
137
+
138
+ props.monitoredOperators?.forEach((operator) => {
139
+ if (operator.operatorType === 'olm') {
140
+ newSelection.push(operator.name ?? '');
141
+ }
142
+ });
143
+
144
+ setSelectedOperators(newSelection);
145
+ }, [props.monitoredOperators]);
146
+
147
+ const handleBundleSelection = async (bundleId: string, operators: string[], checked: boolean) => {
148
+ let bundlesSelected = uiSettings?.bundlesSelected ? [...uiSettings.bundlesSelected] : [];
149
+ let newBundleOperators = [...bundleOperators];
150
+
151
+ if (checked) {
152
+ // Agregar el bundle si se marca
153
+ bundlesSelected.push(bundleId);
154
+ operators.forEach((op) => {
155
+ if (!newBundleOperators.includes(op)) {
156
+ newBundleOperators.push(op);
157
+ const fieldId = mapOperatorsToFieldIds[op]; // Obtener el ID del campo correspondiente
158
+ setFieldValue(fieldId, checked);
159
+ }
160
+ });
161
+ } else {
162
+ // Eliminar el bundle si se desmarca
163
+ bundlesSelected = bundlesSelected.filter((id) => id !== bundleId);
164
+ newBundleOperators = newBundleOperators.filter((op) => !operators.includes(op));
165
+ operators.forEach((op) => {
166
+ const fieldId = mapOperatorsToFieldIds[op]; // Obtener el ID del campo correspondiente
167
+ setFieldValue(fieldId, checked);
168
+ });
169
+ }
170
+
171
+ await updateUISettings({ bundlesSelected });
172
+
173
+ setSelectedBundles((prev) => ({
174
+ ...prev,
175
+ [bundleId]: checked,
176
+ }));
177
+
178
+ setBundleOperators(newBundleOperators);
179
+ };
180
+
181
+ const getBundleLabel = (title: string | undefined, operators: string[] | undefined) => {
182
+ return (
183
+ <>
184
+ <span>{title} </span>
185
+ <PopoverIcon
186
+ component={'a'}
187
+ bodyContent={
188
+ <>
189
+ <h3>{'Bundle operators'}</h3>
190
+ {operators && operators.length > 0 ? (
191
+ <ul>
192
+ {operators.map((operator, index) => (
193
+ <li key={index}>{operator}</li>
194
+ ))}
195
+ </ul>
196
+ ) : (
197
+ <p>No operators available</p>
198
+ )}
199
+ </>
200
+ }
201
+ />
202
+ </>
203
+ );
204
+ };
205
+ const bundleHasOperatorsNotSupported = (operators: string[] | undefined) => {
206
+ return (
207
+ operators?.some(
208
+ (operator) =>
209
+ !featureSupportLevelData.isFeatureSupported(mapOperatorIdToFeatureId[operator]),
210
+ ) ?? false
211
+ );
212
+ };
213
+
214
+ const getDisabledReasonForOperator = (operatorKey: string, values: OperatorsValues) => {
215
+ let disabledReason = featureSupportLevelData.getFeatureDisabledReason(
216
+ mapOperatorIdToFeatureId[operatorKey],
217
+ );
218
+ if (operatorKey === 'cnv') {
219
+ if (!disabledReason) {
220
+ const lvmSupport = featureSupportLevelData.getFeatureSupportLevel('LVM');
221
+ disabledReason = getCnvIncompatibleWithLvmReason(values, lvmSupport);
222
+ }
223
+ if (!disabledReason) {
224
+ disabledReason = getCnvDisabledWithMtvReason(values);
225
+ }
226
+ }
227
+ if (operatorKey === 'lvm') {
228
+ if (!disabledReason) {
229
+ const lvmSupport = featureSupportLevelData.getFeatureSupportLevel('LVM');
230
+ disabledReason = getLvmIncompatibleWithCnvReason(values, lvmSupport);
231
+ if (!disabledReason) {
232
+ disabledReason = getLvmsIncompatibleWithOdfReason(values);
233
+ }
234
+ }
235
+ }
236
+ if (operatorKey === 'odf') {
237
+ if (!disabledReason) {
238
+ disabledReason = getOdfIncompatibleWithLvmsReason(values);
239
+ }
240
+ }
241
+ if (operatorKey === 'openshift-ai') {
242
+ if (!disabledReason) {
243
+ disabledReason = getOpenShiftAIIncompatibleWithLvmsReason(values);
244
+ }
245
+ }
246
+ return disabledReason;
247
+ };
248
+
21
249
  return (
22
- <Stack hasGutter data-testid={'operators-form'}>
23
- <StackItem>
24
- <ClusterWizardStepHeader>Operators</ClusterWizardStepHeader>
25
- </StackItem>
26
- <StackItem>
27
- <CnvCheckbox {...props} isVersionEqualsOrMajorThan4_15={isVersionEqualsOrMajorThan4_15} />
28
- </StackItem>
250
+ <Stack hasGutter data-testid={'operators-page'}>
29
251
  <StackItem>
30
- <MtvOperatorCheckbox clusterId={props.clusterId} />
252
+ <Flex
253
+ justifyContent={{ default: 'justifyContentSpaceBetween' }}
254
+ alignItems={{ default: 'alignItemsCenter' }}
255
+ >
256
+ <FlexItem>
257
+ <ClusterWizardStepHeader>Operators</ClusterWizardStepHeader>
258
+ </FlexItem>
259
+ <FlexItem hidden>
260
+ <TextInput
261
+ value={searchTerm}
262
+ type="text"
263
+ onChange={(_event, value) => setSearchTerm(value)}
264
+ placeholder="Search"
265
+ style={{ width: '400px' }}
266
+ />
267
+ </FlexItem>
268
+ </Flex>
31
269
  </StackItem>
32
270
  <StackItem>
33
- <MceCheckbox
34
- clusterId={props.clusterId}
35
- isVersionEqualsOrMajorThan4_15={isVersionEqualsOrMajorThan4_15}
36
- openshiftVersion={props.openshiftVersion}
37
- />
271
+ <Title headingLevel="h2" size="lg">
272
+ Bundles
273
+ </Title>
38
274
  </StackItem>
39
- {isVersionEqualsOrMajorThan4_15 ? (
40
- <>
41
- <StackItem>
42
- <LvmCheckbox {...props} />
43
- </StackItem>
44
- <StackItem>
45
- <OdfCheckbox />
46
- </StackItem>
47
- </>
48
- ) : (
49
- <StackItem>{isSNO ? <LvmCheckbox {...props} /> : <OdfCheckbox />}</StackItem>
50
- )}
51
-
52
- <OpenShiftAICheckbox />
53
- <OscCheckbox />
275
+ {/* Mostrar bundles como tarjetas */}
276
+ <Gallery hasGutter minWidths={{ default: '350px' }} maxWidths={{ default: '2fr' }}>
277
+ {filteredBundles.map((bundle) => (
278
+ <GalleryItem key={bundle.id}>
279
+ <Tooltip
280
+ content={
281
+ bundleHasOperatorsNotSupported(bundle.operators)
282
+ ? 'Some operators in this bundle are not supported with the current configuration.'
283
+ : isSNO && bundle.id === 'openshift-ai-nvidia'
284
+ ? 'This bundle is not available when deploying a Single Node OpenShift.'
285
+ : ''
286
+ }
287
+ hidden={
288
+ !bundleHasOperatorsNotSupported(bundle.operators) &&
289
+ !(isSNO && bundle.id === 'openshift-ai-nvidia')
290
+ }
291
+ >
292
+ <Card
293
+ style={
294
+ bundle.id && selectedBundles[bundle.id]
295
+ ? { border: '1px solid #004080', height: '200px' }
296
+ : { height: '200px' }
297
+ }
298
+ isDisabled={
299
+ bundleHasOperatorsNotSupported(bundle.operators) ||
300
+ (isSNO && bundle.id === 'openshift-ai-nvidia')
301
+ }
302
+ >
303
+ <CardTitle
304
+ style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center' }}
305
+ >
306
+ <div style={{ display: 'flex', alignItems: 'center', gap: '8px' }}>
307
+ {getBundleLabel(bundle.title, bundle.operators)}
308
+ </div>
309
+ <Checkbox
310
+ id={`bundle-${bundle.id || ''}`}
311
+ isChecked={bundle.id ? selectedBundles[bundle.id] : false}
312
+ onChange={(_event, checked) =>
313
+ void handleBundleSelection(bundle.id || '', bundle.operators || [], checked)
314
+ }
315
+ isDisabled={
316
+ bundleHasOperatorsNotSupported(bundle.operators) ||
317
+ (isSNO && bundle.id === 'openshift-ai-nvidia')
318
+ }
319
+ />
320
+ </CardTitle>
321
+ <CardBody
322
+ style={{
323
+ display: 'flex',
324
+ flexDirection: 'column',
325
+ justifyContent: 'space-between',
326
+ height: '100%',
327
+ }}
328
+ >
329
+ <div>{bundle.description}</div>
330
+
331
+ {/* Badge aligned to the bottom-left */}
332
+
333
+ <div style={{ marginTop: '10px', alignSelf: 'flex-end', height: '25px' }}>
334
+ {bundle.id === 'openshift-ai-nvidia' && (
335
+ <NewFeatureSupportLevelBadge
336
+ featureId="OPENSHIFT_AI"
337
+ supportLevel="dev-preview"
338
+ />
339
+ )}
340
+ </div>
341
+ </CardBody>
342
+ </Card>
343
+ </Tooltip>
344
+ </GalleryItem>
345
+ ))}
346
+ </Gallery>
347
+ <ExpandableSection
348
+ toggleText={`Single Operators (${supportedOperators.length} | ${
349
+ props.monitoredOperators
350
+ ? numberOfEnabledOperators(props.monitoredOperators)
351
+ : selectedOperators.length
352
+ } selected)`}
353
+ onToggle={() => setIsExpanded(!isExpanded)}
354
+ isExpanded={isExpanded}
355
+ >
356
+ <Stack hasGutter data-testid={'operators-form'}>
357
+ {supportedOperators.map((operatorKey) => {
358
+ const isOperatorSelected = bundleOperators.includes(operatorKey);
359
+ const isOperatorPartOfAIBundle =
360
+ operatorsThatCanNotBeInstalledAlone.includes(operatorKey);
361
+ const disabledReason = getDisabledReasonForOperator(operatorKey, values);
362
+ const featureSupportLevel = featureSupportLevelData.getFeatureSupportLevel(
363
+ mapOperatorIdToFeatureId[operatorKey],
364
+ );
365
+ const OperatorComponent = operatorComponentMap[operatorKey];
366
+ if (!OperatorComponent) {
367
+ return null;
368
+ }
369
+ return (
370
+ <StackItem key={operatorKey}>
371
+ <OperatorComponent
372
+ clusterId={props.clusterId}
373
+ openshiftVersion={props.openshiftVersion}
374
+ isVersionEqualsOrMajorThan4_15={isVersionEqualsOrMajorThan4_15}
375
+ isSNO={isSNO}
376
+ disabledReason={
377
+ isOperatorSelected
378
+ ? 'This operator is part of a bundle and cannot be deselected.'
379
+ : isOperatorPartOfAIBundle
380
+ ? 'This operator cannot be installed as a standalone'
381
+ : disabledReason
382
+ }
383
+ supportLevel={featureSupportLevel}
384
+ />
385
+ </StackItem>
386
+ );
387
+ })}
388
+ </Stack>
389
+ </ExpandableSection>
54
390
  </Stack>
55
391
  );
56
392
  };
@@ -191,7 +191,7 @@ const hostDiscoveryStepValidationsMap: WizardStepValidationMap = {
191
191
  'osc-requirements-satisfied',
192
192
  ],
193
193
  },
194
- softValidationIds: ['no-skip-installation-disk', 'no-skip-missing-disk'],
194
+ softValidationIds: ['no-skip-installation-disk', 'no-skip-missing-disk', 'compatible-agent'],
195
195
  };
196
196
 
197
197
  const storageStepValidationsMap: WizardStepValidationMap = {
@@ -249,6 +249,46 @@ export const getNewFeatureDisabledReason = (
249
249
  return 'Migration Toolkit for Virtualization is not supported in this OpenShift version';
250
250
  }
251
251
  }
252
+ case 'AUTHORINO': {
253
+ if (!isSupported) {
254
+ return `Authorino is not available with the selected CPU architecture.`;
255
+ }
256
+ }
257
+ case 'LSO': {
258
+ if (!isSupported) {
259
+ return `Lso is not available with the selected CPU architecture.`;
260
+ }
261
+ }
262
+ case 'NMSTATE': {
263
+ if (!isSupported) {
264
+ return `Nmstate is not available with the selected CPU architecture.`;
265
+ }
266
+ }
267
+ case 'NODE_FEATURE_DISCOVERY': {
268
+ if (!isSupported) {
269
+ return `Node Feature Discovery is not available with the selected CPU architecture.`;
270
+ }
271
+ }
272
+ case 'NVIDIA_GPU': {
273
+ if (!isSupported) {
274
+ return `NVIDIA GPU is not available with the selected CPU architecture.`;
275
+ }
276
+ }
277
+ case 'PIPELINES': {
278
+ if (!isSupported) {
279
+ return `Pipelines is not available with the selected CPU architecture.`;
280
+ }
281
+ }
282
+ case 'SERVERLESS': {
283
+ if (!isSupported) {
284
+ return `Serverless is not available with the selected CPU architecture.`;
285
+ }
286
+ }
287
+ case 'SERVICEMESH': {
288
+ if (!isSupported) {
289
+ return `Service mesh is not available with the selected CPU architecture.`;
290
+ }
291
+ }
252
292
  default: {
253
293
  return undefined;
254
294
  }
@@ -39,3 +39,159 @@ export const ocmPermissionsToAIPermissions = (
39
39
  }
40
40
  return permissions;
41
41
  };
42
+
43
+ //TO-DO: Assisted-Migration. Provisional code. Needs to be removed when MTV integration be finished
44
+ export const yamlContentAssistedMigration1 = `apiVersion: v1
45
+ kind: Namespace
46
+ metadata:
47
+ name: openshift-gitops-operator
48
+ ---
49
+ apiVersion: operators.coreos.com/v1
50
+ kind: OperatorGroup
51
+ metadata:
52
+ name: openshift-gitops-operator
53
+ namespace: openshift-gitops-operator
54
+ spec:
55
+ upgradeStrategy: Default
56
+ ---
57
+ apiVersion: operators.coreos.com/v1alpha1
58
+ kind: Subscription
59
+ metadata:
60
+ name: openshift-gitops-operator
61
+ namespace: openshift-gitops-operator
62
+ spec:
63
+ channel: latest
64
+ installPlanApproval: Automatic
65
+ name: openshift-gitops-operator
66
+ source: redhat-operators
67
+ sourceNamespace: openshift-marketplace
68
+ `;
69
+
70
+ export const yamlContentAssistedMigration2 = `apiVersion: rbac.authorization.k8s.io/v1
71
+ kind: ClusterRole
72
+ metadata:
73
+ name: namespace-manager
74
+ rules:
75
+ - apiGroups: [""]
76
+ resources: ["namespaces"]
77
+ verbs: ["get", "create", "update", "delete"]
78
+ ---
79
+ apiVersion: rbac.authorization.k8s.io/v1
80
+ kind: ClusterRoleBinding
81
+ metadata:
82
+ name: namespace-manager-binding
83
+ subjects:
84
+ - kind: ServiceAccount
85
+ name: openshift-gitops-argocd-application-controller
86
+ namespace: openshift-gitops
87
+ roleRef:
88
+ kind: ClusterRole
89
+ name: namespace-manager
90
+ apiGroup: rbac.authorization.k8s.io
91
+ ---
92
+ apiVersion: rbac.authorization.k8s.io/v1
93
+ kind: Role
94
+ metadata:
95
+ name: persistentvolumeclaim-manager
96
+ namespace: openshift-image-registry
97
+ rules:
98
+ - apiGroups: [""]
99
+ resources: ["persistentvolumeclaims"]
100
+ verbs: ["get", "create", "update", "delete"]
101
+ ---
102
+ apiVersion: rbac.authorization.k8s.io/v1
103
+ kind: RoleBinding
104
+ metadata:
105
+ name: persistentvolumeclaim-manager-binding
106
+ namespace: openshift-image-registry
107
+ subjects:
108
+ - kind: ServiceAccount
109
+ name: openshift-gitops-argocd-application-controller
110
+ namespace: openshift-gitops
111
+ roleRef:
112
+ kind: Role
113
+ name: persistentvolumeclaim-manager
114
+ apiGroup: rbac.authorization.k8s.io
115
+ ---
116
+ apiVersion: rbac.authorization.k8s.io/v1
117
+ kind: ClusterRole
118
+ metadata:
119
+ name: job-manager
120
+ rules:
121
+ - apiGroups: ["batch"]
122
+ resources: ["jobs"]
123
+ verbs: ["get", "create", "update", "delete"]
124
+ ---
125
+ apiVersion: rbac.authorization.k8s.io/v1
126
+ kind: ClusterRoleBinding
127
+ metadata:
128
+ name: job-manager-binding
129
+ subjects:
130
+ - kind: ServiceAccount
131
+ name: openshift-gitops-argocd-application-controller
132
+ namespace: openshift-gitops
133
+ roleRef:
134
+ kind: ClusterRole
135
+ name: job-manager
136
+ apiGroup: rbac.authorization.k8s.io
137
+ ---
138
+ apiVersion: rbac.authorization.k8s.io/v1
139
+ kind: ClusterRole
140
+ metadata:
141
+ name: argocd-application-controller
142
+ rules:
143
+ - apiGroups: [""]
144
+ resources: ["serviceaccounts", "services", "secrets"]
145
+ verbs: ["create", "get", "list", "update", "delete", "patch"]
146
+ - apiGroups: ["apps"]
147
+ resources: ["deployments"]
148
+ verbs: ["create", "get", "list", "update", "delete", "patch"]
149
+ - apiGroups: ["route.openshift.io"]
150
+ resources: ["routes"]
151
+ verbs: ["create", "get", "list", "update", "delete", "patch"]
152
+ - apiGroups: ["image.openshift.io"]
153
+ resources: ["imagestreams"]
154
+ verbs: ["create", "get", "list", "update", "delete", "patch"]
155
+ - apiGroups: ["build.openshift.io"]
156
+ resources: ["buildconfigs"]
157
+ verbs: ["create", "get", "list", "update", "delete", "patch"]
158
+
159
+ ---
160
+ apiVersion: rbac.authorization.k8s.io/v1
161
+ kind: ClusterRoleBinding
162
+ metadata:
163
+ name: argocd-application-controller-binding
164
+ subjects:
165
+ - kind: ServiceAccount
166
+ name: openshift-gitops-argocd-application-controller
167
+ namespace: openshift-gitops
168
+ roleRef:
169
+ kind: ClusterRole
170
+ name: argocd-application-controller
171
+ apiGroup: rbac.authorization.k8s.io
172
+ ---
173
+ apiVersion: rbac.authorization.k8s.io/v1
174
+ kind: Role
175
+ metadata:
176
+ name: argocd-secrets-role
177
+ namespace: openshift-mtv
178
+ rules:
179
+ - apiGroups: [""]
180
+ resources: ["secrets"]
181
+ verbs: ["create", "get", "list", "update", "delete", "patch"]
182
+
183
+ ---
184
+ apiVersion: rbac.authorization.k8s.io/v1
185
+ kind: RoleBinding
186
+ metadata:
187
+ name: argocd-secrets-rolebinding
188
+ namespace: openshift-mtv
189
+ subjects:
190
+ - kind: ServiceAccount
191
+ name: openshift-gitops-argocd-application-controller
192
+ namespace: openshift-gitops
193
+ roleRef:
194
+ kind: Role
195
+ name: argocd-secrets-role
196
+ apiGroup: rbac.authorization.k8s.io
197
+ `;
package/lib/ocm/sentry.ts CHANGED
@@ -1,11 +1,12 @@
1
1
  import * as Sentry from '@sentry/browser';
2
+ import { SeverityLevel } from '@sentry/types';
2
3
  import { isInOcm } from '../common/api/axiosClient';
3
4
 
4
5
  export const captureException = (
5
6
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
6
7
  error: any,
7
8
  message?: string,
8
- severity: Sentry.Severity = Sentry.Severity.Error,
9
+ severity: SeverityLevel = 'error',
9
10
  ) => {
10
11
  if (isInOcm) {
11
12
  message && Sentry.captureMessage(message, severity);
@@ -0,0 +1,14 @@
1
+ import BundleAPI from '../../common/api/assisted-service/BundleAPI';
2
+
3
+ const BundleService = {
4
+ async listBundles() {
5
+ const { data: bundles } = await BundleAPI.list();
6
+ return bundles;
7
+ },
8
+ async listOperatorsByBundle(bundleName: string) {
9
+ const { data } = await BundleAPI.listOperatorsForBundle(bundleName);
10
+ return data;
11
+ },
12
+ };
13
+
14
+ export default BundleService;