@openshift-assisted/ui-lib 2.53.1 → 2.54.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 (178) hide show
  1. package/build/@types/cim/components/ClusterDeployment/clusterDetails/ACMClusterDeploymentDetailsStep.d.ts.map +1 -1
  2. package/build/@types/cim/components/ClusterDeployment/clusterDetails/ClusterDeploymentDetailsStep.d.ts +0 -17
  3. package/build/@types/cim/components/ClusterDeployment/clusterDetails/ClusterDeploymentDetailsStep.d.ts.map +1 -1
  4. package/build/@types/cim/components/ClusterDeployment/clusterDetails/ClusterDetailsFormFields.d.ts.map +1 -1
  5. package/build/@types/cim/components/ClusterDeployment/clusterDetails/useDetailsFormik.d.ts +19 -0
  6. package/build/@types/cim/components/ClusterDeployment/clusterDetails/useDetailsFormik.d.ts.map +1 -0
  7. package/build/@types/cim/components/ClusterDeployment/wizardTransition.d.ts +1 -1
  8. package/build/@types/cim/components/ClusterDeployment/wizardTransition.d.ts.map +1 -1
  9. package/build/@types/cim/components/common/CpuArchitectureDropdown.d.ts.map +1 -1
  10. package/build/@types/common/components/clusterConfiguration/DiskEncryptionFields/DiskEncryptionControlGroup.d.ts +2 -1
  11. package/build/@types/common/components/clusterConfiguration/DiskEncryptionFields/DiskEncryptionControlGroup.d.ts.map +1 -1
  12. package/build/@types/common/components/clusterConfiguration/ExternalPlatformsDropdown.d.ts.map +1 -1
  13. package/build/@types/common/components/clusterWizard/ReviewValidations.d.ts.map +1 -1
  14. package/build/@types/common/components/clusterWizard/validationsInfoUtils.d.ts +0 -1
  15. package/build/@types/common/components/clusterWizard/validationsInfoUtils.d.ts.map +1 -1
  16. package/build/@types/common/components/hosts/utils.d.ts.map +1 -1
  17. package/build/@types/common/config/constants.d.ts.map +1 -1
  18. package/build/@types/common/selectors/clusterSelectors.d.ts +1 -1
  19. package/build/@types/common/selectors/clusterSelectors.d.ts.map +1 -1
  20. package/build/@types/common/types/clusters.d.ts +2 -2
  21. package/build/@types/common/types/clusters.d.ts.map +1 -1
  22. package/build/@types/ocm/components/clusterConfiguration/DiscoveryImageForm.d.ts.map +1 -1
  23. package/build/@types/ocm/components/clusterConfiguration/DiscoveryImageModal.d.ts +0 -1
  24. package/build/@types/ocm/components/clusterConfiguration/DiscoveryImageModal.d.ts.map +1 -1
  25. package/build/@types/ocm/components/clusterConfiguration/OcmClusterDetailsFormFields.d.ts.map +1 -1
  26. package/build/@types/ocm/components/clusterConfiguration/manifestsConfiguration/CustomManifestsPage.d.ts.map +1 -1
  27. package/build/@types/ocm/components/clusterConfiguration/manifestsConfiguration/components/CustomManifestsForm.d.ts.map +1 -1
  28. package/build/@types/ocm/components/clusterConfiguration/manifestsConfiguration/components/utils.d.ts +4 -0
  29. package/build/@types/ocm/components/clusterConfiguration/manifestsConfiguration/components/utils.d.ts.map +1 -1
  30. package/build/@types/ocm/components/clusterConfiguration/operators/OperatorCheckbox.d.ts +3 -1
  31. package/build/@types/ocm/components/clusterConfiguration/operators/OperatorCheckbox.d.ts.map +1 -1
  32. package/build/@types/ocm/components/clusterConfiguration/operators/bundleSpecs.d.ts.map +1 -1
  33. package/build/@types/ocm/components/clusterConfiguration/operators/utils.d.ts +3 -6
  34. package/build/@types/ocm/components/clusterConfiguration/operators/utils.d.ts.map +1 -1
  35. package/build/@types/ocm/components/clusterConfiguration/review/ReviewOperatorsTable.d.ts.map +1 -1
  36. package/build/@types/ocm/components/clusterConfiguration/review/ReviewSummary.d.ts.map +1 -1
  37. package/build/@types/ocm/components/clusterConfiguration/review/TableSummaryExpandable.d.ts +1 -0
  38. package/build/@types/ocm/components/clusterConfiguration/review/TableSummaryExpandable.d.ts.map +1 -1
  39. package/build/@types/ocm/components/clusterConfiguration/staticIp/components/StaticIpForm.d.ts.map +1 -1
  40. package/build/@types/ocm/components/clusterConfiguration/staticIp/components/StaticIpPage.d.ts.map +1 -1
  41. package/build/@types/ocm/components/clusterWizard/ClusterDetails.d.ts.map +1 -1
  42. package/build/@types/ocm/components/clusterWizard/ClusterWizardContextProvider.d.ts.map +1 -1
  43. package/build/@types/ocm/components/clusterWizard/NewClusterWizard.d.ts.map +1 -1
  44. package/build/@types/ocm/components/clusterWizard/Operators.d.ts.map +1 -1
  45. package/build/@types/ocm/components/clusterWizard/OperatorsBundle.d.ts +3 -3
  46. package/build/@types/ocm/components/clusterWizard/OperatorsBundle.d.ts.map +1 -1
  47. package/build/@types/ocm/components/clusterWizard/OperatorsSelect.d.ts.map +1 -1
  48. package/build/@types/ocm/components/clusterWizard/OptionalOperatorsDropdown.d.ts +13 -0
  49. package/build/@types/ocm/components/clusterWizard/OptionalOperatorsDropdown.d.ts.map +1 -0
  50. package/build/@types/ocm/components/clusterWizard/wizardTransition.d.ts +3 -4
  51. package/build/@types/ocm/components/clusterWizard/wizardTransition.d.ts.map +1 -1
  52. package/build/@types/ocm/services/InfraEnvsService.d.ts.map +1 -1
  53. package/build/@types/ocm/store/slices/current-cluster/slice.d.ts +2 -0
  54. package/build/@types/ocm/store/slices/current-cluster/slice.d.ts.map +1 -1
  55. package/build/cjs/cim/components/ClusterDeployment/clusterDetails/ACMClusterDeploymentDetailsStep.js +4 -2
  56. package/build/cjs/cim/components/ClusterDeployment/clusterDetails/ACMClusterDeploymentDetailsStep.js.map +1 -1
  57. package/build/cjs/cim/components/ClusterDeployment/clusterDetails/ClusterDeploymentDetailsStep.js +5 -31
  58. package/build/cjs/cim/components/ClusterDeployment/clusterDetails/ClusterDeploymentDetailsStep.js.map +1 -1
  59. package/build/cjs/cim/components/ClusterDeployment/clusterDetails/ClusterDetailsFormFields.js +1 -11
  60. package/build/cjs/cim/components/ClusterDeployment/clusterDetails/ClusterDetailsFormFields.js.map +1 -1
  61. package/build/cjs/cim/components/ClusterDeployment/clusterDetails/useDetailsFormik.js +41 -0
  62. package/build/cjs/cim/components/ClusterDeployment/clusterDetails/useDetailsFormik.js.map +1 -0
  63. package/build/cjs/cim/components/common/CpuArchitectureDropdown.js +1 -1
  64. package/build/cjs/cim/components/common/CpuArchitectureDropdown.js.map +1 -1
  65. package/build/cjs/common/components/clusterConfiguration/DiskEncryptionFields/DiskEncryptionControlGroup.js +9 -3
  66. package/build/cjs/common/components/clusterConfiguration/DiskEncryptionFields/DiskEncryptionControlGroup.js.map +1 -1
  67. package/build/cjs/common/components/clusterConfiguration/ExternalPlatformsDropdown.js +1 -1
  68. package/build/cjs/common/components/clusterConfiguration/ExternalPlatformsDropdown.js.map +1 -1
  69. package/build/cjs/common/components/clusterWizard/ReviewValidations.js +16 -0
  70. package/build/cjs/common/components/clusterWizard/ReviewValidations.js.map +1 -1
  71. package/build/cjs/common/components/clusterWizard/validationsInfoUtils.js +1 -17
  72. package/build/cjs/common/components/clusterWizard/validationsInfoUtils.js.map +1 -1
  73. package/build/cjs/common/components/hosts/utils.js +6 -1
  74. package/build/cjs/common/components/hosts/utils.js.map +1 -1
  75. package/build/cjs/common/config/constants.js +4 -0
  76. package/build/cjs/common/config/constants.js.map +1 -1
  77. package/build/cjs/common/selectors/clusterSelectors.js +7 -8
  78. package/build/cjs/common/selectors/clusterSelectors.js.map +1 -1
  79. package/build/cjs/common/types/clusters.js.map +1 -1
  80. package/build/cjs/ocm/components/clusterConfiguration/DiscoveryImageForm.js +5 -2
  81. package/build/cjs/ocm/components/clusterConfiguration/DiscoveryImageForm.js.map +1 -1
  82. package/build/cjs/ocm/components/clusterConfiguration/DiscoveryImageModal.js +2 -2
  83. package/build/cjs/ocm/components/clusterConfiguration/DiscoveryImageModal.js.map +1 -1
  84. package/build/cjs/ocm/components/clusterConfiguration/OcmClusterDetailsFormFields.js +6 -2
  85. package/build/cjs/ocm/components/clusterConfiguration/OcmClusterDetailsFormFields.js.map +1 -1
  86. package/build/cjs/ocm/components/clusterConfiguration/OcmDiscoveryImageConfigForm.js +1 -1
  87. package/build/cjs/ocm/components/clusterConfiguration/OcmDiscoveryImageConfigForm.js.map +1 -1
  88. package/build/cjs/ocm/components/clusterConfiguration/manifestsConfiguration/CustomManifestsPage.js +3 -1
  89. package/build/cjs/ocm/components/clusterConfiguration/manifestsConfiguration/CustomManifestsPage.js.map +1 -1
  90. package/build/cjs/ocm/components/clusterConfiguration/manifestsConfiguration/components/CustomManifestsForm.js +3 -1
  91. package/build/cjs/ocm/components/clusterConfiguration/manifestsConfiguration/components/CustomManifestsForm.js.map +1 -1
  92. package/build/cjs/ocm/components/clusterConfiguration/manifestsConfiguration/components/utils.js +11 -8
  93. package/build/cjs/ocm/components/clusterConfiguration/manifestsConfiguration/components/utils.js.map +1 -1
  94. package/build/cjs/ocm/components/clusterConfiguration/operators/OperatorCheckbox.js +39 -21
  95. package/build/cjs/ocm/components/clusterConfiguration/operators/OperatorCheckbox.js.map +1 -1
  96. package/build/cjs/ocm/components/clusterConfiguration/operators/bundleSpecs.js +1 -2
  97. package/build/cjs/ocm/components/clusterConfiguration/operators/bundleSpecs.js.map +1 -1
  98. package/build/cjs/ocm/components/clusterConfiguration/operators/utils.js +7 -25
  99. package/build/cjs/ocm/components/clusterConfiguration/operators/utils.js.map +1 -1
  100. package/build/cjs/ocm/components/clusterConfiguration/review/ReviewOperatorsTable.js +75 -20
  101. package/build/cjs/ocm/components/clusterConfiguration/review/ReviewOperatorsTable.js.map +1 -1
  102. package/build/cjs/ocm/components/clusterConfiguration/review/ReviewSummary.js +2 -2
  103. package/build/cjs/ocm/components/clusterConfiguration/review/ReviewSummary.js.map +1 -1
  104. package/build/cjs/ocm/components/clusterConfiguration/review/TableSummaryExpandable.css +3 -0
  105. package/build/cjs/ocm/components/clusterConfiguration/review/TableSummaryExpandable.js +2 -3
  106. package/build/cjs/ocm/components/clusterConfiguration/review/TableSummaryExpandable.js.map +1 -1
  107. package/build/cjs/ocm/components/clusterConfiguration/staticIp/components/StaticIpForm.js +10 -1
  108. package/build/cjs/ocm/components/clusterConfiguration/staticIp/components/StaticIpForm.js.map +1 -1
  109. package/build/cjs/ocm/components/clusterConfiguration/staticIp/components/StaticIpPage.js +5 -5
  110. package/build/cjs/ocm/components/clusterConfiguration/staticIp/components/StaticIpPage.js.map +1 -1
  111. package/build/cjs/ocm/components/clusterWizard/ClusterDetails.js +2 -9
  112. package/build/cjs/ocm/components/clusterWizard/ClusterDetails.js.map +1 -1
  113. package/build/cjs/ocm/components/clusterWizard/ClusterWizardContextProvider.js +4 -4
  114. package/build/cjs/ocm/components/clusterWizard/ClusterWizardContextProvider.js.map +1 -1
  115. package/build/cjs/ocm/components/clusterWizard/NewClusterWizard.js +6 -3
  116. package/build/cjs/ocm/components/clusterWizard/NewClusterWizard.js.map +1 -1
  117. package/build/cjs/ocm/components/clusterWizard/Operators.js +36 -8
  118. package/build/cjs/ocm/components/clusterWizard/Operators.js.map +1 -1
  119. package/build/cjs/ocm/components/clusterWizard/OperatorsBundle.js +34 -15
  120. package/build/cjs/ocm/components/clusterWizard/OperatorsBundle.js.map +1 -1
  121. package/build/cjs/ocm/components/clusterWizard/OperatorsSelect.js +18 -4
  122. package/build/cjs/ocm/components/clusterWizard/OperatorsSelect.js.map +1 -1
  123. package/build/cjs/ocm/components/clusterWizard/OperatorsSelect.test.js +11 -5
  124. package/build/cjs/ocm/components/clusterWizard/OperatorsSelect.test.js.map +1 -1
  125. package/build/cjs/ocm/components/clusterWizard/OperatorsStep.js +1 -1
  126. package/build/cjs/ocm/components/clusterWizard/OperatorsStep.js.map +1 -1
  127. package/build/cjs/ocm/components/clusterWizard/OptionalOperatorsDropdown.js +34 -0
  128. package/build/cjs/ocm/components/clusterWizard/OptionalOperatorsDropdown.js.map +1 -0
  129. package/build/cjs/ocm/components/clusterWizard/wizardTransition.js +69 -29
  130. package/build/cjs/ocm/components/clusterWizard/wizardTransition.js.map +1 -1
  131. package/build/cjs/ocm/hooks/useInfraEnvId.js +2 -2
  132. package/build/cjs/ocm/hooks/useInfraEnvId.js.map +1 -1
  133. package/build/cjs/ocm/services/InfraEnvsService.js +4 -1
  134. package/build/cjs/ocm/services/InfraEnvsService.js.map +1 -1
  135. package/lib/cim/components/ClusterDeployment/clusterDetails/ACMClusterDeploymentDetailsStep.tsx +3 -1
  136. package/lib/cim/components/ClusterDeployment/clusterDetails/ClusterDeploymentDetailsStep.tsx +5 -86
  137. package/lib/cim/components/ClusterDeployment/clusterDetails/ClusterDetailsFormFields.tsx +1 -12
  138. package/lib/cim/components/ClusterDeployment/clusterDetails/useDetailsFormik.tsx +97 -0
  139. package/lib/cim/components/common/CpuArchitectureDropdown.tsx +2 -1
  140. package/lib/common/components/clusterConfiguration/DiskEncryptionFields/DiskEncryptionControlGroup.tsx +18 -8
  141. package/lib/common/components/clusterConfiguration/ExternalPlatformsDropdown.tsx +3 -1
  142. package/lib/common/components/clusterWizard/ReviewValidations.tsx +24 -0
  143. package/lib/common/components/clusterWizard/validationsInfoUtils.ts +0 -20
  144. package/lib/common/components/hosts/utils.ts +8 -1
  145. package/lib/common/config/constants.ts +4 -0
  146. package/lib/common/selectors/clusterSelectors.ts +9 -9
  147. package/lib/common/types/clusters.ts +3 -1
  148. package/lib/ocm/components/clusterConfiguration/DiscoveryImageForm.tsx +11 -2
  149. package/lib/ocm/components/clusterConfiguration/DiscoveryImageModal.tsx +13 -3
  150. package/lib/ocm/components/clusterConfiguration/OcmClusterDetailsFormFields.tsx +9 -1
  151. package/lib/ocm/components/clusterConfiguration/OcmDiscoveryImageConfigForm.tsx +1 -1
  152. package/lib/ocm/components/clusterConfiguration/manifestsConfiguration/CustomManifestsPage.tsx +8 -1
  153. package/lib/ocm/components/clusterConfiguration/manifestsConfiguration/components/CustomManifestsForm.tsx +3 -1
  154. package/lib/ocm/components/clusterConfiguration/manifestsConfiguration/components/utils.tsx +12 -6
  155. package/lib/ocm/components/clusterConfiguration/operators/OperatorCheckbox.tsx +48 -34
  156. package/lib/ocm/components/clusterConfiguration/operators/bundleSpecs.tsx +2 -3
  157. package/lib/ocm/components/clusterConfiguration/operators/utils.tsx +6 -37
  158. package/lib/ocm/components/clusterConfiguration/review/ReviewOperatorsTable.tsx +114 -24
  159. package/lib/ocm/components/clusterConfiguration/review/ReviewSummary.tsx +1 -4
  160. package/lib/ocm/components/clusterConfiguration/review/TableSummaryExpandable.css +3 -0
  161. package/lib/ocm/components/clusterConfiguration/review/TableSummaryExpandable.tsx +1 -1
  162. package/lib/ocm/components/clusterConfiguration/staticIp/components/StaticIpForm.tsx +10 -1
  163. package/lib/ocm/components/clusterConfiguration/staticIp/components/StaticIpPage.tsx +9 -6
  164. package/lib/ocm/components/clusterWizard/ClusterDetails.tsx +2 -14
  165. package/lib/ocm/components/clusterWizard/ClusterWizardContextProvider.tsx +5 -13
  166. package/lib/ocm/components/clusterWizard/NewClusterWizard.tsx +7 -3
  167. package/lib/ocm/components/clusterWizard/Operators.tsx +45 -10
  168. package/lib/ocm/components/clusterWizard/OperatorsBundle.tsx +72 -26
  169. package/lib/ocm/components/clusterWizard/OperatorsSelect.test.ts +11 -5
  170. package/lib/ocm/components/clusterWizard/OperatorsSelect.tsx +21 -4
  171. package/lib/ocm/components/clusterWizard/OperatorsStep.tsx +1 -1
  172. package/lib/ocm/components/clusterWizard/OptionalOperatorsDropdown.tsx +106 -0
  173. package/lib/ocm/components/clusterWizard/wizardTransition.ts +92 -37
  174. package/lib/ocm/hooks/useInfraEnvId.ts +2 -2
  175. package/lib/ocm/services/InfraEnvsService.ts +4 -1
  176. package/package.json +11 -11
  177. package/build/cjs/ocm/components/clusterConfiguration/DiscoveryImageModal.css +0 -3
  178. package/lib/ocm/components/clusterConfiguration/DiscoveryImageModal.css +0 -3
@@ -42,13 +42,13 @@ function useInfraEnvId(clusterId, cpuArchitecture, clusterName, pullSecret, open
42
42
  openshiftVersion,
43
43
  ]);
44
44
  react_1.default.useEffect(() => {
45
- if (!clusterId) {
45
+ if (!clusterId && !isSingleClusterFeatureEnabled) {
46
46
  setError('Missing clusterId to load infrastructure environment');
47
47
  }
48
48
  else if (!infraEnvId) {
49
49
  void findInfraEnvId();
50
50
  }
51
- }, [clusterId, findInfraEnvId, infraEnvId]);
51
+ }, [clusterId, findInfraEnvId, infraEnvId, isSingleClusterFeatureEnabled]);
52
52
  return { infraEnvId, error };
53
53
  }
54
54
  //# sourceMappingURL=useInfraEnvId.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useInfraEnvId.js","sourceRoot":"","sources":["../../../../lib/ocm/hooks/useInfraEnvId.ts"],"names":[],"mappings":";;AAWA,gCAsDC;;AAjED,0DAA0B;AAE1B,8CAAqD;AACrD,0CAA+C;AAM/C,+CAA2C;AAE3C,SAAwB,aAAa,CACnC,SAAwB,EACxB,eAAgC,EAChC,WAAoB,EACpB,UAAmB,EACnB,gBAAyB;IAEzB,MAAM,CAAC,UAAU,EAAE,WAAW,CAAC,GAAG,eAAK,CAAC,QAAQ,EAAkB,CAAC;IACnE,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,eAAK,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;IAC7C,MAAM,6BAA6B,GAAG,IAAA,wBAAU,EAAC,2CAA2C,CAAC,CAAC;IAE9F,MAAM,cAAc,GAAG,eAAK,CAAC,WAAW,CAAC,GAAS,EAAE;QAClD,IAAI,CAAC;YACH,MAAM,UAAU,GAAG,MAAM,2BAAgB,CAAC,aAAa,CACrD,SAAS,EACT,eAAe,EACf,6BAA6B,CAC9B,CAAC;YACF,IAAI,UAAU,IAAI,CAAC,CAAC,UAAU,YAAY,KAAK,CAAC,EAAE,CAAC;gBACjD,WAAW,CAAC,UAAU,CAAC,CAAC;YAC1B,CAAC;iBAAM,CAAC;gBACN,4CAA4C;gBAC5C,IAAI,UAAU,EAAE,CAAC;oBACf,MAAM,QAAQ,GAAG,MAAM,2BAAgB,CAAC,MAAM,CAAC;wBAC7C,IAAI,EAAE,2BAAgB,CAAC,gBAAgB,CAAC,eAAe,EAAE,WAAW,CAAC;wBACrE,UAAU;wBACV,SAAS;wBACT,gBAAgB;wBAChB,eAAe,EAAE,eAA0D;qBAC5E,CAAC,CAAC;oBACH,WAAW,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;gBAC3B,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anceof Error) {
12
12
  const { data: infraEnvs } = yield apis_1.InfraEnvsAPI.list(!isSingleClusterFeatureEnabled ? clusterId : '');
13
- if (infraEnvs.length > 0) {
13
+ if (isSingleClusterFeatureEnabled) {
14
+ return infraEnvs[0].id;
15
+ }
16
+ if (infraEnvs.length > 0 && clusterId) {
14
17
  InfraEnvIdsCacheService_1.default.updateInfraEnvs(clusterId, infraEnvs);
15
18
  infraEnvId = InfraEnvIdsCacheService_1.default.getInfraEnvId(clusterId, cpuArchitecture);
16
19
  }
@@ -1 +1 @@
1
- {"version":3,"file":"InfraEnvsService.js","sourceRoot":"","sources":["../../../../lib/ocm/services/InfraEnvsService.ts"],"names":[],"mappings":";;;AAEA,iCAAsC;AACtC,gGAAsD;AACtD,0FAAmG;AAQnG,MAAM,gBAAgB,GAAG;IACjB,aAAa,CACjB,SAAwB,EACxB,eAAgC,EAChC,6BAAuC;;YAEvC,IAAI,UAAU,GAAG,iCAAa,CAAC,aAAa,CAAC,SAAS,EAAE,eAAe,CAAC,CAAC;YACzE,IAAI,UAAU,YAAY,KAAK,EAAE,CAAC;gBAChC,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,MAAM,mBAAY,CAAC,IAAI,CACjD,CAAC,6BAA6B,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAChD,CAAC;gBACF,IAAI,SAAS,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;oBACzB,iCAAa,CAAC,eAAe,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;oBACpD,UAAU,GAAG,iCAAa,CAAC,aAAa,CAAC,SAAS,EAAE,eAAe,CAAC,CAAC;gBACvE,CAAC;gBACD,IAAI,CAAC,UAAU,EAAE,CAAC;oBAChB,iCAAa,CAAC,gBAAgB,CAAC,SAAS,EAAE,eAAe,CAAC,CAAC;gBAC7D,CAAC;YACH,CAAC;YACD,OAAO,UAAU,CAAC;QACpB,CAAC;KAAA;IAEK,WAAW,CAAC,SAAwB,E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AAC;QACtC,CAAC;KAAA;IAEK,8BAA8B,CAAC,UAA0B;;YAC7D,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,mBAAY,CAAC,MAAM,CAAC,UAAU,EAAE;gBACrD,mBAAmB,EAAE,IAAA,iCAAqB,GAAE;aAC7C,CAAC,CAAC;YACH,OAAO,IAAI,CAAC;QACd,CAAC;KAAA;IAEK,mBAAmB,CACvB,SAAwB,EACxB,iBAAiC,EACjC,mBAA8C;;YAE9C,8DAA8D;YAC9D,MAAM,EAAE,IAAI,EAAE,eAAe,EAAE,GAAG,MAAM,mBAAY,CAAC,MAAM,CAAC,iBAAiB,EAAE;gBAC7E,mBAAmB;aACpB,CAAC,CAAC;YAEH,MAAM,cAAc,GAAgD,EAAE,CAAC;YACvE,MAAM,WAAW,GAAG,MAAM,gBAAgB,CAAC,iBAAiB,CAAC,SAAS,CAAC,CAAC;YACxE,WAAW,CAAC,OAAO,CAAC,CAAC,UAAU,EAAE,EAAE;gBACjC,2EAA2E;gBAC3E,IAAI,UAAU,KAAK,iBAAiB,EAAE,CAAC;oBACrC,cAAc,CAAC,IAAI,CACjB,mBAAY,CAAC,MAAM,CAAC,UAAU,EAAE;wBAC9B,mBAAmB;qBACpB,CAAC,CACH,CAAC;gBACJ,CAAC;YACH,CAAC,CAAC,CAAC;YAEH,mGAAmG;YACnG,OAAO,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE;gBAC3C,OAAO,eAAe,CAAC;YACzB,CAAC,CAAC,CAAC;QACL,CAAC;KAAA;IAED,gBAAgB,CAAC,eAAuB,EAAE,IAAa;QACrD,OAAO,GAAG,IAAI,IAAI,EAAE,cAAc,eAAe,EAAE,CAAC;IACtD,CAAC;CACF,CAAC;AAEF,kBAAe,gBAAgB,CAAC"}
@@ -4,7 +4,7 @@ import { Stack } from '@patternfly/react-core';
4
4
  import noop from 'lodash-es/noop.js';
5
5
  import { ClusterDetailsValues, getRichTextValidation } from '../../../../common';
6
6
  import { ClusterImageSetK8sResource } from '../../../types/k8s/cluster-image-set';
7
- import { useDetailsFormik } from './ClusterDeploymentDetailsStep';
7
+ import { useDetailsFormik } from './useDetailsFormik';
8
8
  import { ClusterDetailsFormFieldsProps } from './ClusterDetailsFormFields';
9
9
  import { OsImage } from '../../../types';
10
10
  import { getOCPVersions } from '../../helpers';
@@ -58,9 +58,11 @@ export const ACMClusterDeploymentDetailsStep: React.FC<ACMClusterDeploymentDetai
58
58
  ...rest
59
59
  }) => {
60
60
  const ocpVersions = getOCPVersions(clusterImages, !!isNutanix, osImages);
61
+ const allOcpVersions = getOCPVersions(clusterImages, !!isNutanix, osImages, true);
61
62
 
62
63
  const [initialValues, validationSchema] = useDetailsFormik({
63
64
  ocpVersions,
65
+ allOcpVersions,
64
66
  usedClusterNames,
65
67
  });
66
68
 
@@ -1,101 +1,18 @@
1
1
  import React from 'react';
2
2
  import { Formik } from 'formik';
3
- import { Lazy } from 'yup';
4
3
  import { Grid, GridItem, useWizardContext } from '@patternfly/react-core';
5
4
 
6
- import {
7
- useAlerts,
8
- getClusterDetailsInitialValues,
9
- getClusterDetailsValidationSchema,
10
- ClusterWizardStepHeader,
11
- ClusterDetailsValues,
12
- getRichTextValidation,
13
- OpenshiftVersionOptionType,
14
- } from '../../../../common';
5
+ import { useAlerts, ClusterWizardStepHeader, getRichTextValidation } from '../../../../common';
15
6
 
16
7
  import { ClusterDeploymentDetailsStepProps, ClusterDeploymentDetailsValues } from '../types';
17
- import { getAICluster, getNetworkType, getOCPVersions } from '../../helpers';
18
- import {
19
- AgentClusterInstallK8sResource,
20
- AgentK8sResource,
21
- ClusterDeploymentK8sResource,
22
- InfraEnvK8sResource,
23
- } from '../../../types';
8
+ import { getOCPVersions } from '../../helpers';
24
9
  import {
25
10
  ClusterDeploymentDetailsForm,
26
11
  ClusterDeploymentDetailsFormWrapper,
27
12
  } from './ClusterDeploymentDetailsForm';
28
13
  import { getGridSpans } from '../helpers';
29
14
  import { useTranslation } from '../../../../common/hooks/use-translation-wrapper';
30
-
31
- type UseDetailsFormikArgs = {
32
- usedClusterNames: string[];
33
- ocpVersions: OpenshiftVersionOptionType[];
34
- clusterDeployment?: ClusterDeploymentK8sResource;
35
- agentClusterInstall?: AgentClusterInstallK8sResource;
36
- agents?: AgentK8sResource[];
37
- infraEnv?: InfraEnvK8sResource;
38
- };
39
-
40
- export const useDetailsFormik = ({
41
- clusterDeployment,
42
- agentClusterInstall,
43
- agents,
44
- usedClusterNames,
45
- infraEnv,
46
- ocpVersions,
47
- }: UseDetailsFormikArgs): [
48
- ClusterDetailsValues & { networkType: 'OpenShiftSDN' | 'OVNKubernetes' },
49
- Lazy<{ baseDnsDomain: string }>,
50
- ] => {
51
- const { t } = useTranslation();
52
- const isEdit = !!clusterDeployment || !!agentClusterInstall;
53
-
54
- const cluster = React.useMemo(
55
- () =>
56
- clusterDeployment && agentClusterInstall
57
- ? getAICluster({
58
- clusterDeployment,
59
- agentClusterInstall,
60
- agents,
61
- infraEnv,
62
- })
63
- : undefined,
64
- [agentClusterInstall, clusterDeployment, agents, infraEnv],
65
- );
66
-
67
- const initialValues = React.useMemo(
68
- () => {
69
- const initValues = getClusterDetailsInitialValues({
70
- managedDomains: [], // not supported
71
- cluster,
72
- ocpVersions,
73
- });
74
-
75
- const ocpVersion = ocpVersions.find(
76
- (ocpVersion) => ocpVersion.value === initValues.openshiftVersion,
77
- );
78
- return {
79
- ...initValues,
80
- networkType: getNetworkType(ocpVersion),
81
- };
82
- },
83
- [], // eslint-disable-line react-hooks/exhaustive-deps
84
- );
85
-
86
- const validationSchema = React.useMemo(
87
- () =>
88
- getClusterDetailsValidationSchema({
89
- usedClusterNames,
90
- pullSecretSet: isEdit,
91
- validateUniqueName: true,
92
- t,
93
- }),
94
- [usedClusterNames, isEdit, t],
95
- );
96
-
97
- return [initialValues, validationSchema];
98
- };
15
+ import { useDetailsFormik } from './useDetailsFormik';
99
16
 
100
17
  export const ClusterDeploymentDetailsStep: React.FC<ClusterDeploymentDetailsStepProps> = ({
101
18
  clusterImages,
@@ -113,11 +30,13 @@ export const ClusterDeploymentDetailsStep: React.FC<ClusterDeploymentDetailsStep
113
30
  const { goToNextStep } = useWizardContext();
114
31
 
115
32
  const ocpVersions = getOCPVersions(clusterImages, isNutanix);
33
+ const allOcpVersions = getOCPVersions(clusterImages, isNutanix, undefined, true);
116
34
  const gridSpans = getGridSpans(isPreviewOpen);
117
35
 
118
36
  const [initialValues, validationSchema] = useDetailsFormik({
119
37
  clusterDeployment,
120
38
  ocpVersions,
39
+ allOcpVersions,
121
40
  agentClusterInstall,
122
41
  agents,
123
42
  usedClusterNames,
@@ -17,7 +17,6 @@ import { ClusterDetailsValues } from '../../../../common/components/clusterWizar
17
17
  import { useTranslation } from '../../../../common/hooks/use-translation-wrapper';
18
18
  import CpuArchitectureDropdown from '../../common/CpuArchitectureDropdown';
19
19
  import ControlPlaneNodesDropdown from '../../../../common/components/clusterConfiguration/ControlPlaneNodesDropdown';
20
- import { getNetworkType } from '../../helpers';
21
20
 
22
21
  export type ClusterDetailsFormFieldsProps = {
23
22
  isEditFlow: boolean;
@@ -59,19 +58,9 @@ export const ClusterDetailsFormFields: React.FC<ClusterDetailsFormFieldsProps> =
59
58
  const { t } = useTranslation();
60
59
  const nameInputRef = React.useRef<HTMLInputElement>();
61
60
  const [openshiftVersionModalOpen, setOpenshiftVersionModalOpen] = React.useState(false);
62
- const { values, setFieldValue } = useFormikContext<ClusterDetailsValues>();
61
+ const { values } = useFormikContext<ClusterDetailsValues>();
63
62
  const { name, baseDnsDomain } = values;
64
63
 
65
- React.useEffect(() => {
66
- if (!versions.length && !values.openshiftVersion && !isEditFlow) {
67
- const fallbackOpenShiftVersion = allVersions.find((version) => version.default);
68
- setFieldValue('customOpenshiftSelect', fallbackOpenShiftVersion?.value);
69
- setFieldValue('openshiftVersion', fallbackOpenShiftVersion?.value);
70
- setFieldValue('networkType', getNetworkType(fallbackOpenShiftVersion));
71
- }
72
- // eslint-disable-next-line react-hooks/exhaustive-deps
73
- }, []);
74
-
75
64
  React.useEffect(() => {
76
65
  nameInputRef.current?.focus();
77
66
  }, []);
@@ -0,0 +1,97 @@
1
+ import React from 'react';
2
+ import { Lazy } from 'yup';
3
+ import {
4
+ ClusterDetailsValues,
5
+ getClusterDetailsInitialValues,
6
+ getClusterDetailsValidationSchema,
7
+ OpenshiftVersionOptionType,
8
+ useTranslation,
9
+ } from '../../../../common';
10
+ import {
11
+ AgentClusterInstallK8sResource,
12
+ AgentK8sResource,
13
+ ClusterDeploymentK8sResource,
14
+ InfraEnvK8sResource,
15
+ } from '../../../types';
16
+ import { getAICluster, getNetworkType } from '../../helpers';
17
+
18
+ type UseDetailsFormikArgs = {
19
+ usedClusterNames: string[];
20
+ ocpVersions: OpenshiftVersionOptionType[];
21
+ allOcpVersions: OpenshiftVersionOptionType[];
22
+ clusterDeployment?: ClusterDeploymentK8sResource;
23
+ agentClusterInstall?: AgentClusterInstallK8sResource;
24
+ agents?: AgentK8sResource[];
25
+ infraEnv?: InfraEnvK8sResource;
26
+ };
27
+
28
+ export const useDetailsFormik = ({
29
+ clusterDeployment,
30
+ agentClusterInstall,
31
+ agents,
32
+ usedClusterNames,
33
+ infraEnv,
34
+ ocpVersions,
35
+ allOcpVersions,
36
+ }: UseDetailsFormikArgs): [
37
+ ClusterDetailsValues & { networkType: 'OpenShiftSDN' | 'OVNKubernetes' },
38
+ Lazy<{ baseDnsDomain: string }>,
39
+ ] => {
40
+ const { t } = useTranslation();
41
+ const isEdit = !!clusterDeployment || !!agentClusterInstall;
42
+
43
+ const cluster = React.useMemo(
44
+ () =>
45
+ clusterDeployment && agentClusterInstall
46
+ ? getAICluster({
47
+ clusterDeployment,
48
+ agentClusterInstall,
49
+ agents,
50
+ infraEnv,
51
+ })
52
+ : undefined,
53
+ [agentClusterInstall, clusterDeployment, agents, infraEnv],
54
+ );
55
+
56
+ const initialValues = React.useMemo(
57
+ () => {
58
+ let initValues = getClusterDetailsInitialValues({
59
+ managedDomains: [], // not supported
60
+ cluster,
61
+ ocpVersions,
62
+ });
63
+
64
+ let ocpVersion = ocpVersions.find(
65
+ (ocpVersion) => ocpVersion.value === initValues.openshiftVersion,
66
+ );
67
+
68
+ if (!ocpVersion) {
69
+ ocpVersion = allOcpVersions.find((version) => version.default);
70
+ initValues = {
71
+ ...initValues,
72
+ openshiftVersion: ocpVersion?.value || '',
73
+ customOpenshiftSelect: ocpVersion?.value || '',
74
+ };
75
+ }
76
+
77
+ return {
78
+ ...initValues,
79
+ networkType: getNetworkType(ocpVersion),
80
+ };
81
+ },
82
+ [], // eslint-disable-line react-hooks/exhaustive-deps
83
+ );
84
+
85
+ const validationSchema = React.useMemo(
86
+ () =>
87
+ getClusterDetailsValidationSchema({
88
+ usedClusterNames,
89
+ pullSecretSet: isEdit,
90
+ validateUniqueName: true,
91
+ t,
92
+ }),
93
+ [usedClusterNames, isEdit, t],
94
+ );
95
+
96
+ return [initialValues, validationSchema];
97
+ };
@@ -86,7 +86,7 @@ const CpuArchitectureDropdown = ({
86
86
  id={fieldId}
87
87
  ref={toggleRef}
88
88
  onClick={() => setCpuArchOpen(!cpuArchOpen)}
89
- className="pf-v6-u-w-100"
89
+ isFullWidth
90
90
  >
91
91
  {value ? architectureData[value].label : t('ai:CPU architecture')}
92
92
  </MenuToggle>
@@ -94,6 +94,7 @@ const CpuArchitectureDropdown = ({
94
94
  isOpen={cpuArchOpen}
95
95
  onSelect={onCpuArchSelect}
96
96
  onOpenChange={() => setCpuArchOpen(!cpuArchOpen)}
97
+ shouldFocusToggleOnSelect
97
98
  >
98
99
  {dropdownItems}
99
100
  </Dropdown>
@@ -29,6 +29,7 @@ const hasFilledTangServers = (tangServers: TangServer[]): boolean => {
29
29
  export interface DiskEncryptionControlGroupProps {
30
30
  values: DiskEncryptionValues;
31
31
  isSNO: boolean;
32
+ isArbiterEncryptionAvailable?: boolean;
32
33
  isDisabled?: boolean;
33
34
  docVersion?: string;
34
35
  }
@@ -36,6 +37,7 @@ export interface DiskEncryptionControlGroupProps {
36
37
  const DiskEncryptionControlGroup = ({
37
38
  values,
38
39
  isSNO = false,
40
+ isArbiterEncryptionAvailable = true,
39
41
  isDisabled = false,
40
42
  docVersion,
41
43
  }: DiskEncryptionControlGroupProps) => {
@@ -77,6 +79,12 @@ const DiskEncryptionControlGroup = ({
77
79
  setFieldValue('enableDiskEncryptionOnWorkers', false);
78
80
  }
79
81
  }, [isSNO, setFieldValue]);
82
+
83
+ React.useEffect(() => {
84
+ if (!isArbiterEncryptionAvailable) {
85
+ setFieldValue('enableDiskEncryptionOnArbiters', false);
86
+ }
87
+ }, [isArbiterEncryptionAvailable, setFieldValue]);
80
88
  const { t } = useTranslation();
81
89
  const disableMessage = t('ai:This option is not editable after the draft cluster is created');
82
90
  const tooltipProps = {
@@ -105,14 +113,16 @@ const DiskEncryptionControlGroup = ({
105
113
  />
106
114
  </StackItem>
107
115
  </RenderIf>
108
- <StackItem>
109
- <SwitchField
110
- tooltipProps={tooltipProps}
111
- name="enableDiskEncryptionOnArbiters"
112
- label={t('ai:Arbiter')}
113
- isDisabled={isDisabled}
114
- />
115
- </StackItem>
116
+ <RenderIf condition={isArbiterEncryptionAvailable}>
117
+ <StackItem>
118
+ <SwitchField
119
+ tooltipProps={tooltipProps}
120
+ name="enableDiskEncryptionOnArbiters"
121
+ label={t('ai:Arbiter')}
122
+ isDisabled={isDisabled}
123
+ />
124
+ </StackItem>
125
+ </RenderIf>
116
126
  <RenderIf
117
127
  condition={
118
128
  enableDiskEncryptionOnMasters ||
@@ -75,11 +75,13 @@ export const ExternalPlatformsDropdown = ({ isDisabled }: { isDisabled: boolean
75
75
  <Dropdown
76
76
  isOpen={isOpen}
77
77
  toggle={(toggleRef) => (
78
- <MenuToggle ref={toggleRef} className="pf-v5-u-w-100" onClick={() => setIsOpen(!isOpen)}>
78
+ <MenuToggle ref={toggleRef} onClick={() => setIsOpen(!isOpen)} isFullWidth>
79
79
  {value ? platforms[value] : t('ai:Integrate with external partner platforms')}
80
80
  </MenuToggle>
81
81
  )}
82
82
  onSelect={onSelect}
83
+ onOpenChange={() => setIsOpen(!isOpen)}
84
+ shouldFocusToggleOnSelect
83
85
  >
84
86
  {options}
85
87
  </Dropdown>
@@ -47,6 +47,20 @@ const PendingValidations = ({ id, count }: { id: string; count: number }) => {
47
47
  return <div id={id}>{t('ai:There is still {{count}} pending check', { count: count })}</div>;
48
48
  };
49
49
 
50
+ const InformationalValidation = ({ validation }: { validation: ClusterValidation }) => {
51
+ const { t } = useTranslation();
52
+ const label = clusterValidationLabels(t)[validation.id] || validation.id || '';
53
+
54
+ return (
55
+ <div id={`info-validation-${validation.id}`}>
56
+ <Icon status="success">
57
+ <CheckCircleIcon />
58
+ </Icon>{' '}
59
+ {label}. {validation.message}
60
+ </div>
61
+ );
62
+ };
63
+
50
64
  const ValidationActionLink = <S extends string>({
51
65
  step,
52
66
  setCurrentStepId,
@@ -173,6 +187,16 @@ export const ClusterValidations = <S extends string>({
173
187
  />,
174
188
  );
175
189
  }
190
+
191
+ if (
192
+ validation.status === 'success' &&
193
+ validation.id === 'openshift-ai-gpu-requirements-satisfied' &&
194
+ validation.message
195
+ ) {
196
+ failingValidations.push(
197
+ <InformationalValidation key={`info-${validation.id}`} validation={validation} />,
198
+ );
199
+ }
176
200
  };
177
201
 
178
202
  validationsInfo[group]?.forEach(addFailingValidation);
@@ -282,23 +282,3 @@ export const areOnlySoftValidationsOfWizardStepFailing = <ClusterWizardStepsType
282
282
  }
283
283
  return true;
284
284
  };
285
-
286
- export const findValidationStep = <ClusterWizardStepsType extends string>(
287
- validationId: ClusterValidationId | HostValidationId,
288
- wizardStepsValidationsMap: WizardStepsValidationMap<ClusterWizardStepsType>,
289
- minimumStep: ClusterWizardStepsType,
290
- ): ClusterWizardStepsType | undefined => {
291
- const wizardStepsIds = lodashKeys(wizardStepsValidationsMap) as ClusterWizardStepsType[];
292
- let isBeforeMinimumStep = true;
293
- return wizardStepsIds.find((wizardStepId) => {
294
- if (wizardStepId === minimumStep) {
295
- isBeforeMinimumStep = false;
296
- }
297
- if (isBeforeMinimumStep) {
298
- return false;
299
- }
300
- // find first matching validation-map name, ignoring steps before minimumStep
301
- const { host: hostValidationMap } = wizardStepsValidationsMap[wizardStepId];
302
- return hostValidationMap.validationIds.includes(validationId as HostValidationId);
303
- });
304
- };
@@ -263,7 +263,14 @@ export const areOnlySoftValidationsFailing = (validationsInfo: HostValidationsIn
263
263
  );
264
264
  if (!failingValidationIds.length) return false;
265
265
  for (const id of failingValidationIds) {
266
- if (!['ntp-synced', 'container-images-available', 'mtu-valid'].includes(id)) {
266
+ if (
267
+ ![
268
+ 'ntp-synced',
269
+ 'container-images-available',
270
+ 'mtu-valid',
271
+ 'inventory-not-partially-truncated',
272
+ ].includes(id)
273
+ ) {
267
274
  return false;
268
275
  }
269
276
  }
@@ -92,6 +92,8 @@ export const hostValidationLabels = (t: TFunction): { [key in HostValidationId]:
92
92
  'sufficient-network-latency-requirement-for-role': t('ai:Network latency'),
93
93
  'sufficient-packet-loss-requirement-for-role': t('ai:Packet loss'),
94
94
  'has-inventory': t('ai:Hardware information'),
95
+ 'inventory-not-partially-truncated': t('ai:Inventory partially truncated'),
96
+ 'inventory-not-fully-truncated': t('ai:Inventory fully truncated'),
95
97
  'has-min-cpu-cores': t('ai:Minimum CPU cores'),
96
98
  'has-min-memory': t('ai:Minimum Memory'),
97
99
  'has-min-valid-disks': t('ai:Minimum disks of required size'),
@@ -163,6 +165,8 @@ export const hostValidationFailureHints = (
163
165
  'sufficient-network-latency-requirement-for-role': '',
164
166
  'sufficient-packet-loss-requirement-for-role': '',
165
167
  'has-inventory': '',
168
+ 'inventory-not-partially-truncated': '',
169
+ 'inventory-not-fully-truncated': '',
166
170
  'has-min-cpu-cores': '',
167
171
  'has-min-memory': '',
168
172
  'has-min-valid-disks': '',
@@ -39,7 +39,15 @@ export const selectMonitoredOperators = (monitoredOperators: Cluster['monitoredO
39
39
 
40
40
  export const selectOlmOperators = (cluster?: Pick<Cluster, 'monitoredOperators'>) => {
41
41
  return selectMonitoredOperators(cluster?.monitoredOperators).filter(
42
- (operator) => operator.operatorType === 'olm',
42
+ (operator) =>
43
+ operator.operatorType === 'olm' && !!operator.name && operator.dependencyOnly !== true,
44
+ );
45
+ };
46
+
47
+ // Includes dependency-only operators
48
+ export const selectAllOlmOperators = (cluster?: Pick<Cluster, 'monitoredOperators'>) => {
49
+ return selectMonitoredOperators(cluster?.monitoredOperators).filter(
50
+ (operator) => operator.operatorType === 'olm' && !!operator.name,
43
51
  );
44
52
  };
45
53
 
@@ -120,11 +128,3 @@ export const isClusterPlatformTypeVM = ({ platform }: Pick<Cluster, 'platform'>)
120
128
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
121
129
  // @ts-ignore
122
130
  SupportedPlatformIntegrations.includes(platform?.type ?? 'none');
123
-
124
- export const numberOfEnabledOperators = (monitoredOperators: Cluster['monitoredOperators']) => {
125
- return monitoredOperators
126
- ? selectMonitoredOperators(
127
- monitoredOperators.filter((operator) => operator.operatorType === 'olm'),
128
- ).length
129
- : 0;
130
- };
@@ -1,5 +1,6 @@
1
1
  import { IRow } from '@patternfly/react-table';
2
2
  import {
3
+ BundleCreateParams,
3
4
  Cluster,
4
5
  V2ClusterUpdateParams,
5
6
  ClusterValidationId,
@@ -57,8 +58,9 @@ export type HostDiscoveryValues = V2ClusterUpdateParams & {
57
58
  export type StorageValues = V2ClusterUpdateParams & {
58
59
  nodeLabeling: string;
59
60
  };
61
+
60
62
  export type OperatorsValues = {
61
- selectedBundles: string[];
63
+ selectedBundles: BundleCreateParams[];
62
64
  selectedOperators: string[];
63
65
  };
64
66
 
@@ -19,6 +19,7 @@ import { mapClusterCpuArchToInfraEnvCpuArch } from '../../services/CpuArchitectu
19
19
  import { usePullSecret } from '../../hooks';
20
20
  import { Cluster } from '@openshift-assisted/types/assisted-installer-service';
21
21
  import { isOciPlatformType } from '../utils';
22
+ import { ModalBody } from '@patternfly/react-core';
22
23
 
23
24
  type DiscoveryImageFormProps = {
24
25
  cluster: Cluster;
@@ -93,10 +94,18 @@ const DiscoveryImageForm = ({
93
94
  };
94
95
 
95
96
  if (infraEnvError) {
96
- return <ErrorState />;
97
+ return (
98
+ <ModalBody style={{ height: '696px' }}>
99
+ <ErrorState />
100
+ </ModalBody>
101
+ );
97
102
  }
98
103
  if (!infraEnv) {
99
- return <LoadingState />;
104
+ return (
105
+ <ModalBody style={{ height: '696px' }}>
106
+ <LoadingState />
107
+ </ModalBody>
108
+ );
100
109
  }
101
110
  return (
102
111
  <OcmDiscoveryImageConfigForm
@@ -1,5 +1,12 @@
1
1
  import React from 'react';
2
- import { Button, ButtonVariant, Modal, ModalHeader, ModalVariant } from '@patternfly/react-core';
2
+ import {
3
+ Button,
4
+ ButtonVariant,
5
+ Modal,
6
+ ModalBody,
7
+ ModalHeader,
8
+ ModalVariant,
9
+ } from '@patternfly/react-core';
3
10
  import { pluralize } from 'humanize-plus';
4
11
  import {
5
12
  AI_CISCO_INTERSIGHT_TAG,
@@ -14,7 +21,6 @@ import { useModalDialogsContext } from '../hosts/ModalDialogsContext';
14
21
  import useInfraEnvImageUrl from '../../hooks/useInfraEnvImageUrl';
15
22
  import useInfraEnvIpxeImageUrl from '../../hooks/useInfraEnvIpxeImageUrl';
16
23
  import DownloadIpxeScript from '../../../common/components/clusterConfiguration/DownloadIpxeScript';
17
- import './DiscoveryImageModal.css';
18
24
  import { Cluster } from '@openshift-assisted/types/assisted-installer-service';
19
25
  import { ClustersService } from '../../services';
20
26
  import { useDispatch } from 'react-redux';
@@ -115,7 +121,11 @@ export const DiscoveryImageModal = () => {
115
121
  data-testid="discovery-modal-title"
116
122
  title={`Add ${pluralize(+isSNOCluster, 'host')}`}
117
123
  />
118
- {(isoDownloadError || ipxeDownloadError) && <ErrorState />}
124
+ {(isoDownloadError || ipxeDownloadError) && (
125
+ <ModalBody>
126
+ <ErrorState />
127
+ </ModalBody>
128
+ )}
119
129
  {isoDownloadUrl ? (
120
130
  <DownloadIso
121
131
  fileName={`discovery_image_${cluster.name || ''}.iso`}
@@ -1,4 +1,3 @@
1
- /* eslint-disable no-console */
2
1
  import * as React from 'react';
3
2
  import { Form } from '@patternfly/react-core';
4
3
  import { useFormikContext } from 'formik';
@@ -40,6 +39,7 @@ import ControlPlaneNodesDropdown, {
40
39
  DEFAULT_VALUE_CPN,
41
40
  isCPNDropdownItemEnabled,
42
41
  } from './ControlPlaneNodesDropdown';
42
+ import { isFeatureSupportedAndAvailable } from '../featureSupportLevels/featureStateUtils';
43
43
 
44
44
  export type OcmClusterDetailsFormFieldsProps = {
45
45
  cluster?: Cluster;
@@ -79,6 +79,13 @@ export const OcmClusterDetailsFormFields = ({
79
79
  architectureData[values.cpuArchitecture as SupportedCpuArchitecture].label;
80
80
 
81
81
  const featureSupportLevelContext = useNewFeatureSupportLevel();
82
+ const tnaSupport = featureSupportLevelContext.getFeatureSupportLevel(
83
+ 'TNA',
84
+ featureSupportLevelData ?? undefined,
85
+ );
86
+ const isArbiterEncryptionAvailable = isSingleClusterFeatureEnabled
87
+ ? false
88
+ : isFeatureSupportedAndAvailable(tnaSupport);
82
89
 
83
90
  React.useEffect(() => {
84
91
  nameInputRef.current?.focus();
@@ -223,6 +230,7 @@ export const OcmClusterDetailsFormFields = ({
223
230
  values={values}
224
231
  isDisabled={cluster?.pullSecretSet}
225
232
  isSNO={values.controlPlaneCount === 1}
233
+ isArbiterEncryptionAvailable={isArbiterEncryptionAvailable}
226
234
  docVersion={openshiftVersion}
227
235
  />
228
236
  </Form>