@openshift-assisted/ui-lib 2.17.1-cim → 2.17.4-cim

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (381) hide show
  1. package/build/@types/cim/components/Agent/BMHStatusInfo.d.ts.map +1 -1
  2. package/build/@types/cim/components/Agent/MinimalHWRequirements.d.ts.map +1 -1
  3. package/build/@types/cim/components/ClusterDeployment/clusterDetails/ClusterDeploymentDetailsForm.d.ts.map +1 -1
  4. package/build/@types/cim/components/ClusterDeployment/clusterDetails/ClusterDetailsFormFields.d.ts +0 -1
  5. package/build/@types/cim/components/ClusterDeployment/clusterDetails/ClusterDetailsFormFields.d.ts.map +1 -1
  6. package/build/@types/cim/components/ClusterDeployment/hostSelection/ClusterDeploymentHostSelectionStep.d.ts.map +1 -1
  7. package/build/@types/cim/components/ClusterDeployment/use-networking-formik.d.ts.map +1 -1
  8. package/build/@types/cim/components/Hypershift/DetailsPage/ConditionsTable.d.ts.map +1 -1
  9. package/build/@types/cim/components/Hypershift/DetailsPage/HostedClusterProgress.d.ts.map +1 -1
  10. package/build/@types/cim/components/Hypershift/DetailsPage/NodePoolsProgress.d.ts.map +1 -1
  11. package/build/@types/cim/components/Hypershift/HostedClusterWizard/HostsStep/HostsStep.d.ts.map +1 -1
  12. package/build/@types/cim/components/Hypershift/utils/status.d.ts +2 -2
  13. package/build/@types/cim/components/Hypershift/utils/status.d.ts.map +1 -1
  14. package/build/@types/cim/components/InfraEnv/EnvironmentDetails.d.ts.map +1 -1
  15. package/build/@types/cim/components/InfraEnv/InfraEnvFormPage.d.ts.map +1 -1
  16. package/build/@types/cim/components/InfraEnv/InfraEnvHostsTabAgentsWarning.d.ts.map +1 -1
  17. package/build/@types/cim/components/helpers/agentStatus.d.ts +1 -1
  18. package/build/@types/cim/components/helpers/agentStatus.d.ts.map +1 -1
  19. package/build/@types/cim/components/helpers/versions.d.ts +1 -1
  20. package/build/@types/cim/components/helpers/versions.d.ts.map +1 -1
  21. package/build/@types/cim/components/modals/CimConfiguration/CimConfigurationFormFields.d.ts.map +1 -1
  22. package/build/@types/cim/components/modals/CimConfiguration/CimConfigurationModal.d.ts.map +1 -1
  23. package/build/@types/cim/components/modals/CimConfiguration/persist.d.ts.map +1 -1
  24. package/build/@types/cim/components/modals/CimConfiguration/types.d.ts +1 -1
  25. package/build/@types/cim/components/modals/EditProxyModal.d.ts.map +1 -1
  26. package/build/@types/cim/components/modals/EditSSHKeyModal.d.ts.map +1 -1
  27. package/build/@types/cim/components/modals/MassDeleteAgentModal.d.ts.map +1 -1
  28. package/build/@types/common/components/clusterConfiguration/DiscoveryImageConfigForm.d.ts.map +1 -1
  29. package/build/@types/common/components/clusterConfiguration/DiscoveryTroubleshootingModal.d.ts.map +1 -1
  30. package/build/@types/common/components/clusterDetail/FinalizingProgress.d.ts +1 -1
  31. package/build/@types/common/components/clusterDetail/FinalizingProgress.d.ts.map +1 -1
  32. package/build/@types/common/components/clusterDetail/OperatorsProgressItem.d.ts.map +1 -1
  33. package/build/@types/common/components/clusterDetail/ProgressBarTexts.d.ts.map +1 -1
  34. package/build/@types/common/components/clusterWizard/ReviewValidations.d.ts.map +1 -1
  35. package/build/@types/common/components/clusterWizard/clusterDetailsValidation.d.ts.map +1 -1
  36. package/build/@types/common/components/clusterWizard/networkingSteps/VirtualIPControlGroup.d.ts.map +1 -1
  37. package/build/@types/common/components/hosts/AdditionalNTPSourcesDialog.d.ts.map +1 -1
  38. package/build/@types/common/components/hosts/EditHostForm.d.ts.map +1 -1
  39. package/build/@types/common/components/hosts/HostPropertyValidationPopover.d.ts.map +1 -1
  40. package/build/@types/common/components/hosts/HostStatus.d.ts.map +1 -1
  41. package/build/@types/common/components/hosts/HostValidationGroups.d.ts.map +1 -1
  42. package/build/@types/common/components/hosts/Hostname.d.ts.map +1 -1
  43. package/build/@types/common/components/hosts/MassChangeHostnameModal.d.ts.map +1 -1
  44. package/build/@types/common/components/hosts/VMRebootConfigurationInfo.d.ts.map +1 -1
  45. package/build/@types/common/components/hosts/status.d.ts.map +1 -1
  46. package/build/@types/common/components/storage/DisksTable.d.ts.map +1 -1
  47. package/build/@types/common/components/storage/StorageUtils.d.ts +1 -1
  48. package/build/@types/common/components/storage/StorageUtils.d.ts.map +1 -1
  49. package/build/@types/common/components/ui/WizardNavItem.d.ts.map +1 -1
  50. package/build/@types/common/components/ui/formik/RemovableField.d.ts.map +1 -1
  51. package/build/@types/common/components/ui/formik/RichInputField.d.ts.map +1 -1
  52. package/build/@types/common/components/ui/formik/index.d.ts +0 -2
  53. package/build/@types/common/components/ui/formik/index.d.ts.map +1 -1
  54. package/build/@types/common/components/ui/index.d.ts +0 -1
  55. package/build/@types/common/components/ui/index.d.ts.map +1 -1
  56. package/build/@types/common/index.d.ts +1 -0
  57. package/build/@types/common/index.d.ts.map +1 -1
  58. package/build/@types/common/utils.d.ts +2 -2
  59. package/build/@types/common/utils.d.ts.map +1 -1
  60. package/build/@types/common/validationSchemas/addressValidation.d.ts +18 -0
  61. package/build/@types/common/validationSchemas/addressValidation.d.ts.map +1 -0
  62. package/build/@types/common/validationSchemas/clusterDetailsValidation.d.ts +8 -0
  63. package/build/@types/common/validationSchemas/clusterDetailsValidation.d.ts.map +1 -0
  64. package/build/@types/common/{components/ui/formik → validationSchemas}/constants.d.ts +1 -3
  65. package/build/@types/common/validationSchemas/constants.d.ts.map +1 -0
  66. package/build/@types/common/validationSchemas/hostnameValidation.d.ts +4 -0
  67. package/build/@types/common/validationSchemas/hostnameValidation.d.ts.map +1 -0
  68. package/build/@types/common/validationSchemas/index.d.ts +11 -0
  69. package/build/@types/common/validationSchemas/index.d.ts.map +1 -0
  70. package/build/@types/common/validationSchemas/networkingValidation.d.ts +18 -0
  71. package/build/@types/common/validationSchemas/networkingValidation.d.ts.map +1 -0
  72. package/build/@types/common/validationSchemas/ntpValidation.d.ts +4 -0
  73. package/build/@types/common/validationSchemas/ntpValidation.d.ts.map +1 -0
  74. package/build/@types/common/validationSchemas/proxyValidation.d.ts +11 -0
  75. package/build/@types/common/validationSchemas/proxyValidation.d.ts.map +1 -0
  76. package/build/@types/common/validationSchemas/pullSecretValidation.d.ts +4 -0
  77. package/build/@types/common/validationSchemas/pullSecretValidation.d.ts.map +1 -0
  78. package/build/@types/common/validationSchemas/regexes.d.ts +14 -0
  79. package/build/@types/common/validationSchemas/regexes.d.ts.map +1 -0
  80. package/build/@types/common/validationSchemas/sshValidation.d.ts +5 -0
  81. package/build/@types/common/validationSchemas/sshValidation.d.ts.map +1 -0
  82. package/build/@types/common/validationSchemas/utils.d.ts +7 -0
  83. package/build/@types/common/validationSchemas/utils.d.ts.map +1 -0
  84. package/build/@types/ocm/components/clusterConfiguration/OcmDiscoveryImageConfigForm.d.ts.map +1 -1
  85. package/build/@types/ocm/components/clusterConfiguration/OcmOperatorProgressItem.d.ts.map +1 -1
  86. package/build/@types/ocm/components/clusterConfiguration/OpenshiftVersionHelperText.d.ts.map +1 -1
  87. package/build/@types/ocm/components/clusterConfiguration/manifestsConfiguration/components/CustomManifests.d.ts.map +1 -1
  88. package/build/@types/ocm/components/clusterConfiguration/manifestsConfiguration/components/customManifestsValidationSchema.d.ts +2 -1
  89. package/build/@types/ocm/components/clusterConfiguration/manifestsConfiguration/components/customManifestsValidationSchema.d.ts.map +1 -1
  90. package/build/@types/ocm/components/clusterConfiguration/networkConfiguration/NetworkConfigurationForm.d.ts.map +1 -1
  91. package/build/@types/ocm/components/clusterConfiguration/networkConfiguration/networkConfigurationValidation.d.ts +2 -1
  92. package/build/@types/ocm/components/clusterConfiguration/networkConfiguration/networkConfigurationValidation.d.ts.map +1 -1
  93. package/build/@types/ocm/components/clusterConfiguration/platformIntegration/PlatformIntegrationNote.d.ts.map +1 -1
  94. package/build/@types/ocm/components/clusterConfiguration/review/ReviewPreflightChecks.d.ts.map +1 -1
  95. package/build/@types/ocm/components/clusterConfiguration/staticIp/components/FormViewHosts/FormViewHosts.d.ts.map +1 -1
  96. package/build/@types/ocm/components/clusterConfiguration/staticIp/components/FormViewHosts/formViewHostsValidationSchema.d.ts +2 -1
  97. package/build/@types/ocm/components/clusterConfiguration/staticIp/components/FormViewHosts/formViewHostsValidationSchema.d.ts.map +1 -1
  98. package/build/@types/ocm/components/clusterConfiguration/staticIp/components/YamlView/YamlView.d.ts.map +1 -1
  99. package/build/@types/ocm/components/clusterConfiguration/staticIp/components/YamlView/yamlViewValidationSchema.d.ts +2 -1
  100. package/build/@types/ocm/components/clusterConfiguration/staticIp/components/YamlView/yamlViewValidationSchema.d.ts.map +1 -1
  101. package/build/@types/ocm/components/clusterDetail/HostInventoryExpandable.d.ts +1 -1
  102. package/build/@types/ocm/components/clusterDetail/HostInventoryExpandable.d.ts.map +1 -1
  103. package/build/@types/ocm/components/clusterDetail/OpenShiftVersionDetail.d.ts.map +1 -1
  104. package/build/@types/ocm/components/clusterDetail/ResetClusterModal.d.ts.map +1 -1
  105. package/build/@types/ocm/components/clusterWizard/disconnected/OptionalConfigurationsStep.d.ts.map +1 -1
  106. package/build/@types/ocm/components/clusters/ClusterStatus.d.ts.map +1 -1
  107. package/build/@types/ocm/components/featureSupportLevels/ReviewClusterFeatureSupportLevels.d.ts.map +1 -1
  108. package/build/@types/ocm/components/hosts/UpdateDay2ApiVipForm.d.ts.map +1 -1
  109. package/build/@types/ocm/components/ui/InfoLinkWithModal.d.ts.map +1 -1
  110. package/build/cjs/cim/components/Agent/BMCForm.js +3 -3
  111. package/build/cjs/cim/components/Agent/BMCForm.js.map +1 -1
  112. package/build/cjs/cim/components/Agent/BMHStatusInfo.js +4 -4
  113. package/build/cjs/cim/components/Agent/BMHStatusInfo.js.map +1 -1
  114. package/build/cjs/cim/components/Agent/MinimalHWRequirements.js +2 -2
  115. package/build/cjs/cim/components/Agent/MinimalHWRequirements.js.map +1 -1
  116. package/build/cjs/cim/components/ClusterDeployment/clusterDetails/ClusterDeploymentDetailsForm.js +9 -15
  117. package/build/cjs/cim/components/ClusterDeployment/clusterDetails/ClusterDeploymentDetailsForm.js.map +1 -1
  118. package/build/cjs/cim/components/ClusterDeployment/clusterDetails/ClusterDetailsFormFields.js +8 -6
  119. package/build/cjs/cim/components/ClusterDeployment/clusterDetails/ClusterDetailsFormFields.js.map +1 -1
  120. package/build/cjs/cim/components/ClusterDeployment/hostSelection/ClusterDeploymentHostSelectionStep.js +1 -3
  121. package/build/cjs/cim/components/ClusterDeployment/hostSelection/ClusterDeploymentHostSelectionStep.js.map +1 -1
  122. package/build/cjs/cim/components/ClusterDeployment/use-networking-formik.js +16 -15
  123. package/build/cjs/cim/components/ClusterDeployment/use-networking-formik.js.map +1 -1
  124. package/build/cjs/cim/components/Hypershift/DetailsPage/ConditionsTable.js +7 -6
  125. package/build/cjs/cim/components/Hypershift/DetailsPage/ConditionsTable.js.map +1 -1
  126. package/build/cjs/cim/components/Hypershift/DetailsPage/HostedClusterProgress.js +3 -2
  127. package/build/cjs/cim/components/Hypershift/DetailsPage/HostedClusterProgress.js.map +1 -1
  128. package/build/cjs/cim/components/Hypershift/DetailsPage/NodePoolsProgress.js +2 -2
  129. package/build/cjs/cim/components/Hypershift/DetailsPage/NodePoolsProgress.js.map +1 -1
  130. package/build/cjs/cim/components/Hypershift/HostedClusterWizard/DetailsStep/DetailsStep.js +2 -2
  131. package/build/cjs/cim/components/Hypershift/HostedClusterWizard/DetailsStep/DetailsStep.js.map +1 -1
  132. package/build/cjs/cim/components/Hypershift/HostedClusterWizard/HostsStep/HostsStep.js +2 -11
  133. package/build/cjs/cim/components/Hypershift/HostedClusterWizard/HostsStep/HostsStep.js.map +1 -1
  134. package/build/cjs/cim/components/Hypershift/HostedClusterWizard/NetworkStep/NetworkStep.js +8 -8
  135. package/build/cjs/cim/components/Hypershift/HostedClusterWizard/NetworkStep/NetworkStep.js.map +1 -1
  136. package/build/cjs/cim/components/Hypershift/utils/status.js +8 -7
  137. package/build/cjs/cim/components/Hypershift/utils/status.js.map +1 -1
  138. package/build/cjs/cim/components/InfraEnv/EnvironmentDetails.js +4 -4
  139. package/build/cjs/cim/components/InfraEnv/EnvironmentDetails.js.map +1 -1
  140. package/build/cjs/cim/components/InfraEnv/InfraEnvFormPage.js +8 -6
  141. package/build/cjs/cim/components/InfraEnv/InfraEnvFormPage.js.map +1 -1
  142. package/build/cjs/cim/components/InfraEnv/InfraEnvHostsTabAgentsWarning.js +3 -3
  143. package/build/cjs/cim/components/InfraEnv/InfraEnvHostsTabAgentsWarning.js.map +1 -1
  144. package/build/cjs/cim/components/helpers/agentStatus.js +3 -2
  145. package/build/cjs/cim/components/helpers/agentStatus.js.map +1 -1
  146. package/build/cjs/cim/components/helpers/versions.js +42 -27
  147. package/build/cjs/cim/components/helpers/versions.js.map +1 -1
  148. package/build/cjs/cim/components/modals/CimConfiguration/CimConfigurationFormFields.js +7 -3
  149. package/build/cjs/cim/components/modals/CimConfiguration/CimConfigurationFormFields.js.map +1 -1
  150. package/build/cjs/cim/components/modals/CimConfiguration/CimConfigurationModal.js +13 -6
  151. package/build/cjs/cim/components/modals/CimConfiguration/CimConfigurationModal.js.map +1 -1
  152. package/build/cjs/cim/components/modals/CimConfiguration/persist.js +7 -0
  153. package/build/cjs/cim/components/modals/CimConfiguration/persist.js.map +1 -1
  154. package/build/cjs/cim/components/modals/EditProxyModal.js +5 -3
  155. package/build/cjs/cim/components/modals/EditProxyModal.js.map +1 -1
  156. package/build/cjs/cim/components/modals/EditPullSecretModal.js +1 -1
  157. package/build/cjs/cim/components/modals/EditPullSecretModal.js.map +1 -1
  158. package/build/cjs/cim/components/modals/EditSSHKeyModal.js +3 -3
  159. package/build/cjs/cim/components/modals/EditSSHKeyModal.js.map +1 -1
  160. package/build/cjs/cim/components/modals/MassDeleteAgentModal.js +2 -2
  161. package/build/cjs/cim/components/modals/MassDeleteAgentModal.js.map +1 -1
  162. package/build/cjs/common/components/clusterConfiguration/DiscoveryImageConfigForm.js +7 -6
  163. package/build/cjs/common/components/clusterConfiguration/DiscoveryImageConfigForm.js.map +1 -1
  164. package/build/cjs/common/components/clusterConfiguration/DiscoveryTroubleshootingModal.js +2 -1
  165. package/build/cjs/common/components/clusterConfiguration/DiscoveryTroubleshootingModal.js.map +1 -1
  166. package/build/cjs/common/components/clusterDetail/FinalizingProgress.js +8 -7
  167. package/build/cjs/common/components/clusterDetail/FinalizingProgress.js.map +1 -1
  168. package/build/cjs/common/components/clusterDetail/OperatorsProgressItem.js +4 -4
  169. package/build/cjs/common/components/clusterDetail/OperatorsProgressItem.js.map +1 -1
  170. package/build/cjs/common/components/clusterDetail/ProgressBarTexts.js +5 -4
  171. package/build/cjs/common/components/clusterDetail/ProgressBarTexts.js.map +1 -1
  172. package/build/cjs/common/components/clusterWizard/ReviewValidations.js +7 -6
  173. package/build/cjs/common/components/clusterWizard/ReviewValidations.js.map +1 -1
  174. package/build/cjs/common/components/clusterWizard/clusterDetailsValidation.js +8 -8
  175. package/build/cjs/common/components/clusterWizard/clusterDetailsValidation.js.map +1 -1
  176. package/build/cjs/common/components/clusterWizard/networkingSteps/VirtualIPControlGroup.js +2 -2
  177. package/build/cjs/common/components/clusterWizard/networkingSteps/VirtualIPControlGroup.js.map +1 -1
  178. package/build/cjs/common/components/hosts/AdditionalNTPSourcesDialog.js +2 -1
  179. package/build/cjs/common/components/hosts/AdditionalNTPSourcesDialog.js.map +1 -1
  180. package/build/cjs/common/components/hosts/EditHostForm.js +3 -2
  181. package/build/cjs/common/components/hosts/EditHostForm.js.map +1 -1
  182. package/build/cjs/common/components/hosts/HostPropertyValidationPopover.js +6 -6
  183. package/build/cjs/common/components/hosts/HostPropertyValidationPopover.js.map +1 -1
  184. package/build/cjs/common/components/hosts/HostStatus.js +2 -1
  185. package/build/cjs/common/components/hosts/HostStatus.js.map +1 -1
  186. package/build/cjs/common/components/hosts/HostValidationGroups.js +6 -6
  187. package/build/cjs/common/components/hosts/HostValidationGroups.js.map +1 -1
  188. package/build/cjs/common/components/hosts/Hostname.js +4 -3
  189. package/build/cjs/common/components/hosts/Hostname.js.map +1 -1
  190. package/build/cjs/common/components/hosts/MassChangeHostnameModal.js +8 -7
  191. package/build/cjs/common/components/hosts/MassChangeHostnameModal.js.map +1 -1
  192. package/build/cjs/common/components/hosts/VMRebootConfigurationInfo.js +2 -1
  193. package/build/cjs/common/components/hosts/VMRebootConfigurationInfo.js.map +1 -1
  194. package/build/cjs/common/components/hosts/status.js +19 -13
  195. package/build/cjs/common/components/hosts/status.js.map +1 -1
  196. package/build/cjs/common/components/storage/DisksTable.js +4 -2
  197. package/build/cjs/common/components/storage/DisksTable.js.map +1 -1
  198. package/build/cjs/common/components/storage/StorageUtils.js +3 -2
  199. package/build/cjs/common/components/storage/StorageUtils.js.map +1 -1
  200. package/build/cjs/common/components/ui/WizardNavItem.js +2 -2
  201. package/build/cjs/common/components/ui/WizardNavItem.js.map +1 -1
  202. package/build/cjs/common/components/ui/formik/RemovableField.js +3 -3
  203. package/build/cjs/common/components/ui/formik/RemovableField.js.map +1 -1
  204. package/build/cjs/common/components/ui/formik/RichInputField.js +4 -4
  205. package/build/cjs/common/components/ui/formik/RichInputField.js.map +1 -1
  206. package/build/cjs/common/components/ui/formik/index.js +0 -2
  207. package/build/cjs/common/components/ui/formik/index.js.map +1 -1
  208. package/build/cjs/common/components/ui/index.js +1 -3
  209. package/build/cjs/common/components/ui/index.js.map +1 -1
  210. package/build/cjs/common/config/docs_links.js +1 -1
  211. package/build/cjs/common/index.js +1 -0
  212. package/build/cjs/common/index.js.map +1 -1
  213. package/build/cjs/common/utils.js +5 -3
  214. package/build/cjs/common/utils.js.map +1 -1
  215. package/build/cjs/common/validationSchemas/addressValidation.js +258 -0
  216. package/build/cjs/common/validationSchemas/addressValidation.js.map +1 -0
  217. package/build/cjs/common/validationSchemas/clusterDetailsValidation.js +104 -0
  218. package/build/cjs/common/validationSchemas/clusterDetailsValidation.js.map +1 -0
  219. package/build/cjs/common/{components/ui/formik → validationSchemas}/constants.js +3 -5
  220. package/build/cjs/common/validationSchemas/constants.js.map +1 -0
  221. package/build/cjs/common/validationSchemas/hostnameValidation.js +36 -0
  222. package/build/cjs/common/validationSchemas/hostnameValidation.js.map +1 -0
  223. package/build/cjs/common/validationSchemas/index.js +17 -0
  224. package/build/cjs/common/validationSchemas/index.js.map +1 -0
  225. package/build/cjs/common/validationSchemas/networkingValidation.js +74 -0
  226. package/build/cjs/common/validationSchemas/networkingValidation.js.map +1 -0
  227. package/build/cjs/common/validationSchemas/ntpValidation.js +25 -0
  228. package/build/cjs/common/validationSchemas/ntpValidation.js.map +1 -0
  229. package/build/cjs/common/validationSchemas/proxyValidation.js +43 -0
  230. package/build/cjs/common/validationSchemas/proxyValidation.js.map +1 -0
  231. package/build/cjs/common/validationSchemas/pullSecretValidation.js +21 -0
  232. package/build/cjs/common/validationSchemas/pullSecretValidation.js.map +1 -0
  233. package/build/cjs/common/validationSchemas/regexes.js +17 -0
  234. package/build/cjs/common/validationSchemas/regexes.js.map +1 -0
  235. package/build/cjs/common/validationSchemas/sshValidation.js +32 -0
  236. package/build/cjs/common/validationSchemas/sshValidation.js.map +1 -0
  237. package/build/cjs/common/validationSchemas/utils.js +40 -0
  238. package/build/cjs/common/validationSchemas/utils.js.map +1 -0
  239. package/build/cjs/ocm/components/clusterConfiguration/OcmDiscoveryImageConfigForm.js +7 -6
  240. package/build/cjs/ocm/components/clusterConfiguration/OcmDiscoveryImageConfigForm.js.map +1 -1
  241. package/build/cjs/ocm/components/clusterConfiguration/OcmOperatorProgressItem.js +4 -4
  242. package/build/cjs/ocm/components/clusterConfiguration/OcmOperatorProgressItem.js.map +1 -1
  243. package/build/cjs/ocm/components/clusterConfiguration/OpenshiftVersionHelperText.js +5 -2
  244. package/build/cjs/ocm/components/clusterConfiguration/OpenshiftVersionHelperText.js.map +1 -1
  245. package/build/cjs/ocm/components/clusterConfiguration/manifestsConfiguration/components/CustomManifests.js +4 -2
  246. package/build/cjs/ocm/components/clusterConfiguration/manifestsConfiguration/components/CustomManifests.js.map +1 -1
  247. package/build/cjs/ocm/components/clusterConfiguration/manifestsConfiguration/components/customManifestsValidationSchema.js +7 -6
  248. package/build/cjs/ocm/components/clusterConfiguration/manifestsConfiguration/components/customManifestsValidationSchema.js.map +1 -1
  249. package/build/cjs/ocm/components/clusterConfiguration/networkConfiguration/NetworkConfigurationForm.js +7 -3
  250. package/build/cjs/ocm/components/clusterConfiguration/networkConfiguration/NetworkConfigurationForm.js.map +1 -1
  251. package/build/cjs/ocm/components/clusterConfiguration/networkConfiguration/networkConfigurationValidation.js +11 -11
  252. package/build/cjs/ocm/components/clusterConfiguration/networkConfiguration/networkConfigurationValidation.js.map +1 -1
  253. package/build/cjs/ocm/components/clusterConfiguration/platformIntegration/PlatformIntegrationNote.js +5 -3
  254. package/build/cjs/ocm/components/clusterConfiguration/platformIntegration/PlatformIntegrationNote.js.map +1 -1
  255. package/build/cjs/ocm/components/clusterConfiguration/review/ReviewPreflightChecks.js +11 -7
  256. package/build/cjs/ocm/components/clusterConfiguration/review/ReviewPreflightChecks.js.map +1 -1
  257. package/build/cjs/ocm/components/clusterConfiguration/staticIp/components/FormViewHosts/FormViewHosts.js +3 -1
  258. package/build/cjs/ocm/components/clusterConfiguration/staticIp/components/FormViewHosts/FormViewHosts.js.map +1 -1
  259. package/build/cjs/ocm/components/clusterConfiguration/staticIp/components/FormViewHosts/formViewHostsValidationSchema.js +6 -6
  260. package/build/cjs/ocm/components/clusterConfiguration/staticIp/components/FormViewHosts/formViewHostsValidationSchema.js.map +1 -1
  261. package/build/cjs/ocm/components/clusterConfiguration/staticIp/components/YamlView/YamlView.js +3 -1
  262. package/build/cjs/ocm/components/clusterConfiguration/staticIp/components/YamlView/YamlView.js.map +1 -1
  263. package/build/cjs/ocm/components/clusterConfiguration/staticIp/components/YamlView/yamlViewValidationSchema.js +12 -12
  264. package/build/cjs/ocm/components/clusterConfiguration/staticIp/components/YamlView/yamlViewValidationSchema.js.map +1 -1
  265. package/build/cjs/ocm/components/clusterDetail/HostInventoryExpandable.js +5 -4
  266. package/build/cjs/ocm/components/clusterDetail/HostInventoryExpandable.js.map +1 -1
  267. package/build/cjs/ocm/components/clusterDetail/OpenShiftVersionDetail.js +4 -3
  268. package/build/cjs/ocm/components/clusterDetail/OpenShiftVersionDetail.js.map +1 -1
  269. package/build/cjs/ocm/components/clusterDetail/ResetClusterModal.js +4 -2
  270. package/build/cjs/ocm/components/clusterDetail/ResetClusterModal.js.map +1 -1
  271. package/build/cjs/ocm/components/clusterWizard/disconnected/OptionalConfigurationsStep.js +4 -3
  272. package/build/cjs/ocm/components/clusterWizard/disconnected/OptionalConfigurationsStep.js.map +1 -1
  273. package/build/cjs/ocm/components/clusters/ClusterStatus.js +13 -7
  274. package/build/cjs/ocm/components/clusters/ClusterStatus.js.map +1 -1
  275. package/build/cjs/ocm/components/featureSupportLevels/ReviewClusterFeatureSupportLevels.js +7 -6
  276. package/build/cjs/ocm/components/featureSupportLevels/ReviewClusterFeatureSupportLevels.js.map +1 -1
  277. package/build/cjs/ocm/components/hosts/UpdateDay2ApiVipForm.js +2 -1
  278. package/build/cjs/ocm/components/hosts/UpdateDay2ApiVipForm.js.map +1 -1
  279. package/build/cjs/ocm/components/ui/InfoLinkWithModal.js +2 -2
  280. package/build/cjs/ocm/components/ui/InfoLinkWithModal.js.map +1 -1
  281. package/lib/cim/components/Agent/BMCForm.tsx +3 -3
  282. package/lib/cim/components/Agent/BMHStatusInfo.tsx +12 -4
  283. package/lib/cim/components/Agent/MinimalHWRequirements.tsx +4 -2
  284. package/lib/cim/components/ClusterDeployment/clusterDetails/ClusterDeploymentDetailsForm.tsx +8 -18
  285. package/lib/cim/components/ClusterDeployment/clusterDetails/ClusterDetailsFormFields.tsx +7 -10
  286. package/lib/cim/components/ClusterDeployment/hostSelection/ClusterDeploymentHostSelectionStep.tsx +1 -3
  287. package/lib/cim/components/ClusterDeployment/use-networking-formik.ts +19 -15
  288. package/lib/cim/components/Hypershift/DetailsPage/ConditionsTable.tsx +13 -7
  289. package/lib/cim/components/Hypershift/DetailsPage/HostedClusterProgress.tsx +8 -4
  290. package/lib/cim/components/Hypershift/DetailsPage/NodePoolsProgress.tsx +6 -2
  291. package/lib/cim/components/Hypershift/HostedClusterWizard/DetailsStep/DetailsStep.tsx +2 -2
  292. package/lib/cim/components/Hypershift/HostedClusterWizard/HostsStep/HostsStep.tsx +2 -13
  293. package/lib/cim/components/Hypershift/HostedClusterWizard/NetworkStep/NetworkStep.tsx +8 -8
  294. package/lib/cim/components/Hypershift/utils/status.tsx +20 -9
  295. package/lib/cim/components/InfraEnv/EnvironmentDetails.tsx +11 -4
  296. package/lib/cim/components/InfraEnv/InfraEnvFormPage.tsx +8 -6
  297. package/lib/cim/components/InfraEnv/InfraEnvHostsTabAgentsWarning.tsx +4 -6
  298. package/lib/cim/components/helpers/agentStatus.tsx +7 -3
  299. package/lib/cim/components/helpers/versions.ts +51 -34
  300. package/lib/cim/components/modals/CimConfiguration/CimConfigurationFormFields.tsx +7 -5
  301. package/lib/cim/components/modals/CimConfiguration/CimConfigurationModal.tsx +13 -6
  302. package/lib/cim/components/modals/CimConfiguration/persist.ts +11 -0
  303. package/lib/cim/components/modals/CimConfiguration/types.ts +1 -1
  304. package/lib/cim/components/modals/EditProxyModal.tsx +6 -3
  305. package/lib/cim/components/modals/EditPullSecretModal.tsx +1 -1
  306. package/lib/cim/components/modals/EditSSHKeyModal.tsx +8 -6
  307. package/lib/cim/components/modals/MassDeleteAgentModal.tsx +12 -5
  308. package/lib/common/components/clusterConfiguration/DiscoveryImageConfigForm.tsx +9 -8
  309. package/lib/common/components/clusterConfiguration/DiscoveryTroubleshootingModal.tsx +5 -2
  310. package/lib/common/components/clusterDetail/FinalizingProgress.tsx +21 -10
  311. package/lib/common/components/clusterDetail/OperatorsProgressItem.tsx +11 -5
  312. package/lib/common/components/clusterDetail/ProgressBarTexts.tsx +17 -5
  313. package/lib/common/components/clusterWizard/ReviewValidations.tsx +15 -6
  314. package/lib/common/components/clusterWizard/clusterDetailsValidation.ts +21 -11
  315. package/lib/common/components/clusterWizard/networkingSteps/VirtualIPControlGroup.tsx +0 -2
  316. package/lib/common/components/hosts/AdditionalNTPSourcesDialog.tsx +3 -6
  317. package/lib/common/components/hosts/EditHostForm.tsx +2 -8
  318. package/lib/common/components/hosts/HostPropertyValidationPopover.tsx +9 -5
  319. package/lib/common/components/hosts/HostStatus.tsx +14 -3
  320. package/lib/common/components/hosts/HostValidationGroups.tsx +9 -5
  321. package/lib/common/components/hosts/Hostname.tsx +7 -4
  322. package/lib/common/components/hosts/MassChangeHostnameModal.tsx +10 -8
  323. package/lib/common/components/hosts/VMRebootConfigurationInfo.tsx +12 -3
  324. package/lib/common/components/hosts/status.tsx +46 -13
  325. package/lib/common/components/storage/DisksTable.tsx +15 -4
  326. package/lib/common/components/storage/StorageUtils.tsx +6 -4
  327. package/lib/common/components/ui/WizardNavItem.tsx +4 -7
  328. package/lib/common/components/ui/formik/RemovableField.tsx +8 -4
  329. package/lib/common/components/ui/formik/RichInputField.tsx +10 -6
  330. package/lib/common/components/ui/formik/index.tsx +0 -2
  331. package/lib/common/components/ui/index.ts +0 -2
  332. package/lib/common/config/docs_links.ts +1 -1
  333. package/lib/common/index.ts +2 -0
  334. package/lib/common/utils.ts +5 -7
  335. package/lib/common/{components/ui/formik → validationSchemas}/_validationSchemas.test.ts +51 -39
  336. package/lib/common/validationSchemas/addressValidation.tsx +354 -0
  337. package/lib/common/validationSchemas/clusterDetailsValidation.tsx +168 -0
  338. package/lib/common/{components/ui/formik → validationSchemas}/constants.tsx +3 -6
  339. package/lib/common/validationSchemas/hostnameValidation.tsx +46 -0
  340. package/lib/common/validationSchemas/index.tsx +11 -0
  341. package/lib/common/validationSchemas/networkingValidation.tsx +113 -0
  342. package/lib/common/validationSchemas/ntpValidation.tsx +30 -0
  343. package/lib/common/validationSchemas/proxyValidation.tsx +67 -0
  344. package/lib/common/validationSchemas/pullSecretValidation.tsx +24 -0
  345. package/lib/common/validationSchemas/regexes.tsx +22 -0
  346. package/lib/common/validationSchemas/sshValidation.tsx +46 -0
  347. package/lib/common/validationSchemas/utils.tsx +36 -0
  348. package/lib/ocm/components/clusterConfiguration/OcmDiscoveryImageConfigForm.tsx +17 -15
  349. package/lib/ocm/components/clusterConfiguration/OcmOperatorProgressItem.tsx +11 -5
  350. package/lib/ocm/components/clusterConfiguration/OpenshiftVersionHelperText.tsx +8 -7
  351. package/lib/ocm/components/clusterConfiguration/manifestsConfiguration/components/CustomManifests.tsx +4 -2
  352. package/lib/ocm/components/clusterConfiguration/manifestsConfiguration/components/customManifestsValidationSchema.tsx +31 -31
  353. package/lib/ocm/components/clusterConfiguration/networkConfiguration/NetworkConfigurationForm.tsx +15 -5
  354. package/lib/ocm/components/clusterConfiguration/networkConfiguration/networkConfigurationValidation.ts +14 -16
  355. package/lib/ocm/components/clusterConfiguration/platformIntegration/PlatformIntegrationNote.tsx +6 -3
  356. package/lib/ocm/components/clusterConfiguration/review/ReviewPreflightChecks.tsx +28 -15
  357. package/lib/ocm/components/clusterConfiguration/staticIp/components/FormViewHosts/FormViewHosts.tsx +3 -1
  358. package/lib/ocm/components/clusterConfiguration/staticIp/components/FormViewHosts/formViewHostsValidationSchema.tsx +11 -6
  359. package/lib/ocm/components/clusterConfiguration/staticIp/components/YamlView/YamlView.tsx +5 -1
  360. package/lib/ocm/components/clusterConfiguration/staticIp/components/YamlView/yamlViewValidationSchema.tsx +33 -28
  361. package/lib/ocm/components/clusterDetail/HostInventoryExpandable.tsx +11 -5
  362. package/lib/ocm/components/clusterDetail/OpenShiftVersionDetail.tsx +8 -5
  363. package/lib/ocm/components/clusterDetail/ResetClusterModal.tsx +6 -3
  364. package/lib/ocm/components/clusterWizard/disconnected/OptionalConfigurationsStep.tsx +5 -3
  365. package/lib/ocm/components/clusters/ClusterStatus.tsx +30 -8
  366. package/lib/ocm/components/featureSupportLevels/ReviewClusterFeatureSupportLevels.tsx +12 -8
  367. package/lib/ocm/components/hosts/UpdateDay2ApiVipForm.tsx +3 -7
  368. package/lib/ocm/components/ui/InfoLinkWithModal.tsx +4 -2
  369. package/package.json +3 -3
  370. package/build/@types/common/components/ui/UiIcon.d.ts +0 -11
  371. package/build/@types/common/components/ui/UiIcon.d.ts.map +0 -1
  372. package/build/@types/common/components/ui/formik/constants.d.ts.map +0 -1
  373. package/build/@types/common/components/ui/formik/validationSchemas.d.ts +0 -50
  374. package/build/@types/common/components/ui/formik/validationSchemas.d.ts.map +0 -1
  375. package/build/cjs/common/components/ui/UiIcon.js +0 -11
  376. package/build/cjs/common/components/ui/UiIcon.js.map +0 -1
  377. package/build/cjs/common/components/ui/formik/constants.js.map +0 -1
  378. package/build/cjs/common/components/ui/formik/validationSchemas.js +0 -553
  379. package/build/cjs/common/components/ui/formik/validationSchemas.js.map +0 -1
  380. package/lib/common/components/ui/UiIcon.tsx +0 -21
  381. package/lib/common/components/ui/formik/validationSchemas.ts +0 -803
@@ -1,5 +1,12 @@
1
1
  import React from 'react';
2
- import { Content, ContentVariants, Popover, Alert, AlertVariant } from '@patternfly/react-core';
2
+ import {
3
+ Content,
4
+ ContentVariants,
5
+ Popover,
6
+ Alert,
7
+ AlertVariant,
8
+ Icon,
9
+ } from '@patternfly/react-core';
3
10
  import { TableVariant, Thead, Tbody, Table, Th, Tr, Td } from '@patternfly/react-table';
4
11
  import type { Disk, Host } from '@openshift-assisted/types/assisted-installer-service';
5
12
  import type { WithTestID } from '../../types/index';
@@ -12,7 +19,7 @@ import FormatDiskCheckbox, {
12
19
  isInDiskSkipFormattingList,
13
20
  } from '../hosts/FormatDiskCheckbox';
14
21
  import { fileSize } from '../../utils';
15
- import { PopoverIcon, UiIcon } from '../ui';
22
+ import { PopoverIcon } from '../ui';
16
23
  import { useTranslation } from '../../hooks/use-translation-wrapper';
17
24
  import { TFunction } from 'i18next';
18
25
 
@@ -100,7 +107,9 @@ const DiskName = ({
100
107
  {isIndented && <span style={{ width: '1rem', display: 'inline-block' }} />}
101
108
  {isInDiskSkipFormattingList(host, disk.id) && (
102
109
  <Popover bodyContent={<SkipFormattingDisk />} minWidth="20rem" maxWidth="30rem">
103
- <UiIcon size="sm" status="warning" icon={<ExclamationTriangleIcon />} />
110
+ <Icon size="sm" status="warning">
111
+ <ExclamationTriangleIcon />
112
+ </Icon>
104
113
  </Popover>
105
114
  )}
106
115
  {' '}
@@ -115,7 +124,9 @@ const DiskName = ({
115
124
  maxWidth="30rem"
116
125
  data-testid="disk-limitations-popover"
117
126
  >
118
- <UiIcon size="sm" status="warning" icon={<ExclamationTriangleIcon />} />
127
+ <Icon size="sm" status="warning">
128
+ <ExclamationTriangleIcon />
129
+ </Icon>
119
130
  </Popover>
120
131
  </>
121
132
  )}
@@ -1,10 +1,10 @@
1
1
  import * as React from 'react';
2
2
  import { TFunction } from 'i18next';
3
- import { getHostRole, getInventory, RoleCell, UiIcon } from '../../index';
4
- import { TableRow } from '../hosts/AITable';
5
- import { Popover, Content, ContentVariants } from '@patternfly/react-core';
3
+ import { Popover, Content, ContentVariants, Icon } from '@patternfly/react-core';
6
4
  import { ExclamationTriangleIcon } from '@patternfly/react-icons/dist/js/icons/exclamation-triangle-icon';
7
5
  import { Host } from '@openshift-assisted/types/assisted-installer-service';
6
+ import { getHostRole, getInventory, RoleCell } from '../../index';
7
+ import { TableRow } from '../hosts/AITable';
8
8
 
9
9
  const SkipFormattingDisks = () => (
10
10
  <Content component={ContentVariants.p}>Some bootable disks will skip formatting</Content>
@@ -49,7 +49,9 @@ export const numberOfDisksColumn: TableRow<Host> = {
49
49
  {' '}
50
50
  {host.skipFormattingDisks && (
51
51
  <Popover bodyContent={<SkipFormattingDisks />} minWidth="20rem" maxWidth="30rem">
52
- <UiIcon size="sm" status="warning" icon={<ExclamationTriangleIcon />} />
52
+ <Icon size="sm" status="warning">
53
+ <ExclamationTriangleIcon />
54
+ </Icon>
53
55
  </Popover>
54
56
  )}
55
57
  </>
@@ -1,7 +1,6 @@
1
1
  import React, { PropsWithChildren, ReactNode } from 'react';
2
- import { WizardNavItem, WizardNavItemProps } from '@patternfly/react-core';
2
+ import { Icon, WizardNavItem, WizardNavItemProps } from '@patternfly/react-core';
3
3
  import { ExclamationCircleIcon } from '@patternfly/react-icons/dist/js/icons/exclamation-circle-icon';
4
- import UiIcon from './UiIcon';
5
4
 
6
5
  const getNavItemContent = (
7
6
  content: ReactNode,
@@ -13,11 +12,9 @@ const getNavItemContent = (
13
12
  return (
14
13
  <>
15
14
  {content}
16
- <UiIcon
17
- status="danger"
18
- className="wizard-nav-item-warning-icon"
19
- icon={<ExclamationCircleIcon />}
20
- />
15
+ <Icon status="danger" className="wizard-nav-item-warning-icon">
16
+ <ExclamationCircleIcon />
17
+ </Icon>
21
18
  </>
22
19
  );
23
20
  }
@@ -1,9 +1,9 @@
1
1
  import React from 'react';
2
- import { Button, ButtonVariant, Tooltip, TooltipProps } from '@patternfly/react-core';
2
+ import { Button, ButtonVariant, Icon, Tooltip, TooltipProps } from '@patternfly/react-core';
3
3
  import { MinusCircleIcon } from '@patternfly/react-icons/dist/js/icons/minus-circle-icon';
4
- import './RemovableField.css';
5
4
  import classnames from 'classnames';
6
- import UiIcon from '../UiIcon';
5
+
6
+ import './RemovableField.css';
7
7
 
8
8
  interface RemovableFieldProps {
9
9
  onRemove: VoidFunction;
@@ -30,7 +30,11 @@ const RemovableField: React.FC<RemovableFieldProps & Omit<TooltipProps, 'content
30
30
  distance={0}
31
31
  content={
32
32
  <Button
33
- icon={<UiIcon size="sm" icon={<MinusCircleIcon />} />}
33
+ icon={
34
+ <Icon size="sm">
35
+ <MinusCircleIcon />
36
+ </Icon>
37
+ }
34
38
  variant={ButtonVariant.plain}
35
39
  onClick={onRemove}
36
40
  data-testid={removeButtonDataTestId}
@@ -15,15 +15,13 @@ import {
15
15
  FormHelperText,
16
16
  HelperText,
17
17
  ButtonVariant,
18
+ Icon,
18
19
  } from '@patternfly/react-core';
19
20
  import { CheckCircleIcon } from '@patternfly/react-icons/dist/js/icons/check-circle-icon';
20
21
  import { CheckIcon } from '@patternfly/react-icons/dist/js/icons/check-icon';
21
22
  import { ExclamationCircleIcon } from '@patternfly/react-icons/dist/js/icons/exclamation-circle-icon';
22
23
  import { InfoCircleIcon } from '@patternfly/react-icons/dist/js/icons/info-circle-icon';
23
24
  import { TimesIcon } from '@patternfly/react-icons/dist/js/icons/times-icon';
24
- import { t_global_color_status_success_default as okColor } from '@patternfly/react-tokens/dist/js/t_global_color_status_success_default';
25
- import { t_global_icon_color_status_danger_default as dangerColor } from '@patternfly/react-tokens/dist/js/t_global_icon_color_status_danger_default';
26
- import { t_global_icon_color_status_info_default as blueInfoColor } from '@patternfly/react-tokens/dist/js/t_global_icon_color_status_info_default';
27
25
 
28
26
  import { InputFieldProps as BaseInputProps } from './types';
29
27
  import { getFieldId } from './utils';
@@ -164,11 +162,17 @@ const RichInputField: React.FC<RichInputFieldPropsProps> = React.forwardRef(
164
162
  <Button
165
163
  icon={
166
164
  !isValid ? (
167
- <ExclamationCircleIcon color={dangerColor.value} />
165
+ <Icon status="danger">
166
+ <ExclamationCircleIcon />
167
+ </Icon>
168
168
  ) : value ? (
169
- <CheckCircleIcon color={okColor.value} />
169
+ <Icon status="success">
170
+ <CheckCircleIcon />
171
+ </Icon>
170
172
  ) : (
171
- <InfoCircleIcon color={blueInfoColor.value} />
173
+ <Icon status="info">
174
+ <InfoCircleIcon />
175
+ </Icon>
172
176
  )
173
177
  }
174
178
  variant={ButtonVariant.control}
@@ -21,6 +21,4 @@ export { default as SelectFieldWithSearch } from './SelectFieldWithSearch';
21
21
 
22
22
  export * from './utils';
23
23
  export * from './PullSecretField';
24
- export * from './validationSchemas';
25
24
  export * from './LabelField';
26
- export * from './constants';
@@ -28,5 +28,3 @@ export { default as ClusterEventsToolbar } from './ClusterEventsToolbar';
28
28
  export { default as ModalProgress } from './ModalProgress';
29
29
  export { default as ConfirmationModal } from './ConfirmationModal';
30
30
  export { default as NoPermissionsError } from './NoPermissionsError';
31
-
32
- export { default as UiIcon } from './UiIcon';
@@ -1,6 +1,6 @@
1
1
  import { isMajorMinorVersionEqualOrGreater } from '../utils';
2
2
 
3
- const LATEST_OPENSHIFT_DOCS_VERSION = '4.19';
3
+ const LATEST_OPENSHIFT_DOCS_VERSION = '4.21';
4
4
  const MIN_OPENSHIFT_DOCS_VERSION = '4.14';
5
5
 
6
6
  const getDocsOpenshiftVersion = (ocpVersion?: string): string => {
@@ -7,4 +7,6 @@ export * from './reducers';
7
7
  export * from './selectors';
8
8
  export * from './hooks';
9
9
  export * from './utils';
10
+ export * from './validationSchemas';
11
+
10
12
  export { ResourceUIState } from './types/resource-ui-state';
@@ -2,13 +2,12 @@ import filesize from 'filesize.js';
2
2
  import camelCase from 'lodash-es/camelCase.js';
3
3
  import isString from 'lodash-es/isString.js';
4
4
  import { loadAll } from 'js-yaml';
5
+ import { TFunction } from 'i18next';
5
6
  import { MAX_FILE_SIZE_BYTES, MAX_FILE_SIZE_OFFSET_FACTOR } from './configurations';
6
7
 
7
8
  export const FILENAME_REGEX = /^[^\/]*\.(json|ya?ml(\.patch_?[a-zA-Z0-9_]*)?)$/;
8
9
 
9
10
  export const FILE_TYPE_MESSAGE = 'Unsupported file type. Please provide a valid YAML file.';
10
- export const INCORRECT_TYPE_FILE_MESSAGE =
11
- 'File type is not supported. File type must be yaml, yml ,json , yaml.patch. or yml.patch.';
12
11
 
13
12
  export const getErrorMessage = (error: unknown): string => {
14
13
  if (error instanceof Error) {
@@ -60,11 +59,10 @@ export const fileSize: typeof filesize = (...args) =>
60
59
  .toUpperCase()
61
60
  .replace(/I/, 'i');
62
61
 
63
- export const getMaxFileSizeMessage = `File size is too big. The file size must be less than ${fileSize(
64
- MAX_FILE_SIZE_BYTES,
65
- 0,
66
- 'si',
67
- )}.`;
62
+ export const getMaxFileSizeMessage = (t: TFunction) =>
63
+ t('ai:File size is too big. The file size must be less than {{value}}.', {
64
+ value: fileSize(MAX_FILE_SIZE_BYTES, 0, 'si'),
65
+ });
68
66
 
69
67
  export const validateFileName = (fileName: string) => {
70
68
  return new RegExp(FILENAME_REGEX).test(fileName || '');
@@ -10,7 +10,7 @@ import {
10
10
  nameValidationSchema,
11
11
  noProxyValidationSchema,
12
12
  pullSecretValidationSchema,
13
- } from './validationSchemas';
13
+ } from './..';
14
14
  import { TFunction } from 'react-i18next';
15
15
  import { CLUSTER_NAME_MAX_LENGTH } from './constants';
16
16
 
@@ -32,7 +32,7 @@ describe('validationSchemas', () => {
32
32
 
33
33
  await Promise.all(
34
34
  valid.map((value) =>
35
- noProxyValidationSchema
35
+ noProxyValidationSchema(t)
36
36
  .validate(value)
37
37
  .catch(() => expect(value).toBe('was rejected but is valid')),
38
38
  ),
@@ -45,10 +45,12 @@ describe('validationSchemas', () => {
45
45
  let counter = 0;
46
46
  await Promise.all(
47
47
  invalid.map((value) =>
48
- noProxyValidationSchema.validate(value).then(
49
- () => expect(value).toBe('should be rejected since it is invalid'),
50
- () => counter++,
51
- ),
48
+ noProxyValidationSchema(t)
49
+ .validate(value)
50
+ .then(
51
+ () => expect(value).toBe('should be rejected since it is invalid'),
52
+ () => counter++,
53
+ ),
52
54
  ),
53
55
  );
54
56
 
@@ -106,7 +108,7 @@ describe('validationSchemas', () => {
106
108
 
107
109
  await Promise.all(
108
110
  valid.map((value) =>
109
- pullSecretValidationSchema
111
+ pullSecretValidationSchema(t)
110
112
  .validate(value)
111
113
  .catch((msg: string) => expect(value).toBe(`was rejected but is valid: ${msg}`)),
112
114
  ),
@@ -115,10 +117,12 @@ describe('validationSchemas', () => {
115
117
  let counter = 0;
116
118
  await Promise.all(
117
119
  invalid.map((value) =>
118
- pullSecretValidationSchema.validate(value).then(
119
- () => expect(value).toBe('should be rejected since it is invalid'),
120
- () => counter++,
121
- ),
120
+ pullSecretValidationSchema(t)
121
+ .validate(value)
122
+ .then(
123
+ () => expect(value).toBe('should be rejected since it is invalid'),
124
+ () => counter++,
125
+ ),
122
126
  ),
123
127
  );
124
128
 
@@ -147,7 +151,7 @@ describe('validationSchemas', () => {
147
151
 
148
152
  await Promise.all(
149
153
  valid.map((value) =>
150
- ipValidationSchema
154
+ ipValidationSchema(t)
151
155
  .validate(value)
152
156
  .catch((msg: string) => expect(value).toBe(`was rejected but is valid: ${msg}`)),
153
157
  ),
@@ -156,10 +160,12 @@ describe('validationSchemas', () => {
156
160
  let counter = 0;
157
161
  await Promise.all(
158
162
  invalid.map((value) =>
159
- ipValidationSchema.validate(value).then(
160
- () => expect(value).toBe('should be rejected since it is invalid'),
161
- () => counter++,
162
- ),
163
+ ipValidationSchema(t)
164
+ .validate(value)
165
+ .then(
166
+ () => expect(value).toBe('should be rejected since it is invalid'),
167
+ () => counter++,
168
+ ),
163
169
  ),
164
170
  );
165
171
 
@@ -182,7 +188,7 @@ describe('validationSchemas', () => {
182
188
 
183
189
  await Promise.all(
184
190
  valid.map((value) =>
185
- macAddressValidationSchema
191
+ macAddressValidationSchema(t)
186
192
  .validate(value)
187
193
  .catch((msg: string) => expect(value).toBe(`was rejected but is valid: ${msg}`)),
188
194
  ),
@@ -191,10 +197,12 @@ describe('validationSchemas', () => {
191
197
  let counter = 0;
192
198
  await Promise.all(
193
199
  invalid.map((value) =>
194
- macAddressValidationSchema.validate(value).then(
195
- () => expect(value).toBe('should be rejected since it is invalid'),
196
- () => counter++,
197
- ),
200
+ macAddressValidationSchema(t)
201
+ .validate(value)
202
+ .then(
203
+ () => expect(value).toBe('should be rejected since it is invalid'),
204
+ () => counter++,
205
+ ),
198
206
  ),
199
207
  );
200
208
 
@@ -211,7 +219,7 @@ describe('validationSchemas', () => {
211
219
  '192.0.0.0/8' /* Overlap */,
212
220
  ];
213
221
 
214
- const validationSchema = ipBlockValidationSchema(['192.168.1.0']);
222
+ const validationSchema = ipBlockValidationSchema(['192.168.1.0'], t);
215
223
  await Promise.all(
216
224
  valid.map((value) =>
217
225
  validationSchema
@@ -249,7 +257,7 @@ describe('validationSchemas', () => {
249
257
 
250
258
  await Promise.all(
251
259
  valid.map((value) =>
252
- dnsNameValidationSchema
260
+ dnsNameValidationSchema(t)
253
261
  .validate(value)
254
262
  .catch((msg: string) => expect(value).toBe(`was rejected but is valid: ${msg}`)),
255
263
  ),
@@ -258,10 +266,12 @@ describe('validationSchemas', () => {
258
266
  let counter = 0;
259
267
  await Promise.all(
260
268
  invalid.map((value) =>
261
- dnsNameValidationSchema.validate(value).then(
262
- () => expect(value).toBe('should be rejected since it is invalid'),
263
- () => counter++,
264
- ),
269
+ dnsNameValidationSchema(t)
270
+ .validate(value)
271
+ .then(
272
+ () => expect(value).toBe('should be rejected since it is invalid'),
273
+ () => counter++,
274
+ ),
265
275
  ),
266
276
  );
267
277
 
@@ -272,7 +282,7 @@ describe('validationSchemas', () => {
272
282
  const valid = [16, 25];
273
283
  const invalid = ['', 'a', 0, 1, 33, 15, 26];
274
284
 
275
- const validationSchema = hostPrefixValidationSchema('192.168.0.0/16');
285
+ const validationSchema = hostPrefixValidationSchema('192.168.0.0/16', t);
276
286
  await Promise.all(
277
287
  valid.map((value) =>
278
288
  validationSchema
@@ -298,7 +308,7 @@ describe('validationSchemas', () => {
298
308
  const valid = [8, 32, 128];
299
309
  const invalid = ['', 'a', 0, 1, 7, 129];
300
310
 
301
- const validationSchema = hostPrefixValidationSchema('2002::1234:abcd:ffff:c0a8:101/64');
311
+ const validationSchema = hostPrefixValidationSchema('2002::1234:abcd:ffff:c0a8:101/64', t);
302
312
  await Promise.all(
303
313
  valid.map((value) =>
304
314
  validationSchema
@@ -330,7 +340,7 @@ describe('validationSchemas', () => {
330
340
 
331
341
  await Promise.all(
332
342
  valid.map((value) =>
333
- baseDomainValidationSchema
343
+ baseDomainValidationSchema(t)
334
344
  .validate(value)
335
345
  .catch(() => expect(value).toBe(`was rejected but is valid`)),
336
346
  ),
@@ -339,10 +349,12 @@ describe('validationSchemas', () => {
339
349
  let counter = 0;
340
350
  await Promise.all(
341
351
  invalid.map((value) =>
342
- baseDomainValidationSchema.validate(value).then(
343
- () => expect(value).toBe('should be rejected since it is invalid'),
344
- () => counter++,
345
- ),
352
+ baseDomainValidationSchema(t)
353
+ .validate(value)
354
+ .then(
355
+ () => expect(value).toBe('should be rejected since it is invalid'),
356
+ () => counter++,
357
+ ),
346
358
  ),
347
359
  );
348
360
 
@@ -351,7 +363,7 @@ describe('validationSchemas', () => {
351
363
 
352
364
  describe('dualStackValidationSchema', () => {
353
365
  describe('OCP < 4.12 (legacy behavior)', () => {
354
- const schema = dualStackValidationSchema('machine networks', '4.11');
366
+ const schema = dualStackValidationSchema('machine networks', t, '4.11');
355
367
 
356
368
  test('validates IPv4 as primary and IPv6 as secondary', async () => {
357
369
  const validValues = [[{ cidr: '192.168.1.0/24' }, { cidr: '2001:db8::/64' }]];
@@ -373,7 +385,7 @@ describe('validationSchemas', () => {
373
385
  });
374
386
 
375
387
  describe('OCP >= 4.12 (new behavior)', () => {
376
- const schema = dualStackValidationSchema('machine networks', '4.12');
388
+ const schema = dualStackValidationSchema('machine networks', t, '4.12');
377
389
 
378
390
  test('validates IPv4 as primary and IPv6 as secondary', async () => {
379
391
  const validValues = [[{ cidr: '192.168.1.0/24' }, { cidr: '2001:db8::/64' }]];
@@ -393,7 +405,7 @@ describe('validationSchemas', () => {
393
405
  });
394
406
 
395
407
  describe('no version specified (defaults to legacy behavior)', () => {
396
- const schema = dualStackValidationSchema('machine networks');
408
+ const schema = dualStackValidationSchema('machine networks', t);
397
409
 
398
410
  test('validates IPv4 as primary and IPv6 as secondary', async () => {
399
411
  const validValues = [[{ cidr: '192.168.1.0/24' }, { cidr: '2001:db8::/64' }]];
@@ -416,7 +428,7 @@ describe('validationSchemas', () => {
416
428
 
417
429
  describe('edge cases', () => {
418
430
  test('validates maximum 2 networks', async () => {
419
- const schema = dualStackValidationSchema('machine networks', '4.12');
431
+ const schema = dualStackValidationSchema('machine networks', t, '4.12');
420
432
  const invalidValue = [
421
433
  { cidr: '192.168.1.0/24' },
422
434
  { cidr: '2001:db8::/64' },
@@ -424,7 +436,7 @@ describe('validationSchemas', () => {
424
436
  ];
425
437
 
426
438
  await expect(schema.validate(invalidValue)).rejects.toThrow(
427
- 'Maximum number of machine networks subnets in dual stack is 2',
439
+ 'ai:Maximum number of {{field}} subnets in dual stack is 2',
428
440
  );
429
441
  });
430
442
  });