@openshift-assisted/ui-lib 2.8.2-cim → 2.9.0-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 (205) hide show
  1. package/@types/cim/components/ClusterDeployment/ClusterDeploymentHostSelectionStep.d.ts.map +1 -1
  2. package/@types/cim/components/ClusterDeployment/ClusterDeploymentHostsDiscoveryStep.d.ts.map +1 -1
  3. package/@types/cim/components/ClusterDeployment/ClusterDeploymentHostsSelectionBasic.d.ts.map +1 -1
  4. package/@types/cim/components/ClusterDeployment/validationSchemas.d.ts.map +1 -1
  5. package/@types/cim/components/Hypershift/HostedClusterWizard/NetworkStep/types.d.ts +0 -1
  6. package/@types/cim/components/Hypershift/HostedClusterWizard/NetworkStep/types.d.ts.map +1 -1
  7. package/@types/cim/components/InfraEnv/InfraEnvFormPage.d.ts.map +1 -1
  8. package/@types/cim/components/modals/AddHostModal.d.ts.map +1 -1
  9. package/@types/cim/components/modals/EditProxyModal.d.ts.map +1 -1
  10. package/@types/common/components/clusterConfiguration/DiscoveryImageConfigForm.d.ts +1 -0
  11. package/@types/common/components/clusterConfiguration/DiscoveryImageConfigForm.d.ts.map +1 -1
  12. package/@types/common/components/clusterWizard/ClusterWizardStep.d.ts +1 -1
  13. package/@types/common/components/clusterWizard/ClusterWizardStep.d.ts.map +1 -1
  14. package/@types/common/components/clusterWizard/networkingSteps/ManagedNetworkingControlGroup.d.ts.map +1 -1
  15. package/@types/common/components/fetching/EventListFetch.d.ts.map +1 -1
  16. package/@types/common/components/ui/ClusterEventsToolbar.d.ts.map +1 -1
  17. package/@types/common/components/ui/StaticTextField.d.ts +1 -1
  18. package/@types/common/components/ui/StaticTextField.d.ts.map +1 -1
  19. package/@types/common/components/ui/eventsModal.d.ts.map +1 -1
  20. package/@types/common/components/ui/formik/validationSchemas.d.ts +5 -1
  21. package/@types/common/components/ui/formik/validationSchemas.d.ts.map +1 -1
  22. package/@types/common/config/constants.d.ts +1 -0
  23. package/@types/common/config/constants.d.ts.map +1 -1
  24. package/@types/common/types/events.d.ts +1 -0
  25. package/@types/common/types/events.d.ts.map +1 -1
  26. package/@types/ocm/components/AddHosts/day2Wizard/Day2ClusterDetails.d.ts.map +1 -1
  27. package/@types/ocm/components/AddHosts/day2Wizard/Day2StaticIP.d.ts.map +1 -1
  28. package/@types/ocm/components/AddHosts/day2Wizard/Day2Wizard.d.ts.map +1 -1
  29. package/@types/ocm/components/HostsClusterDetailTab/HostsClusterDetailTabContent.d.ts.map +1 -1
  30. package/@types/ocm/components/HostsClusterDetailTab/utils.d.ts.map +1 -1
  31. package/@types/ocm/components/clusterConfiguration/CpuArchitectureDropdown.d.ts +2 -1
  32. package/@types/ocm/components/clusterConfiguration/CpuArchitectureDropdown.d.ts.map +1 -1
  33. package/@types/ocm/components/clusterConfiguration/DiscoveryImageForm.d.ts.map +1 -1
  34. package/@types/ocm/components/clusterConfiguration/OcmDiscoveryImageConfigForm.d.ts.map +1 -1
  35. package/@types/ocm/components/clusterConfiguration/networkConfiguration/AdvancedNetworkFields.d.ts.map +1 -1
  36. package/@types/ocm/components/clusterConfiguration/networkConfiguration/NetworkConfigurationForm.d.ts.map +1 -1
  37. package/@types/ocm/components/clusterConfiguration/networkConfiguration/StackTypeControl.d.ts.map +1 -1
  38. package/@types/ocm/components/clusterConfiguration/networkConfiguration/VirtualIPControlGroup.d.ts.map +1 -1
  39. package/@types/ocm/components/clusterDetail/AssistedInstallerDetailCard.d.ts.map +1 -1
  40. package/@types/ocm/components/clusterDetail/AssistedInstallerExtraDetailCard.d.ts.map +1 -1
  41. package/@types/ocm/components/clusters/ClusterPage.d.ts.map +1 -1
  42. package/@types/ocm/components/featureSupportLevels/FeatureSupportLevelProvider.d.ts.map +1 -1
  43. package/@types/ocm/components/fetching/fetchEvents.d.ts.map +1 -1
  44. package/@types/ocm/components/newFeatureSupportLevels/NewFeatureSupportLevelProvider.d.ts.map +1 -1
  45. package/@types/ocm/hooks/useInfraEnv.d.ts +1 -1
  46. package/@types/ocm/hooks/useInfraEnv.d.ts.map +1 -1
  47. package/@types/ocm/hooks/useInfraEnvId.d.ts +1 -1
  48. package/@types/ocm/hooks/useInfraEnvId.d.ts.map +1 -1
  49. package/@types/ocm/services/Day2ClusterService.d.ts +3 -3
  50. package/@types/ocm/services/Day2ClusterService.d.ts.map +1 -1
  51. package/@types/ocm/services/InfraEnvIdsCacheService.d.ts +1 -1
  52. package/@types/ocm/services/InfraEnvIdsCacheService.d.ts.map +1 -1
  53. package/@types/ocm/services/InfraEnvsService.d.ts +4 -3
  54. package/@types/ocm/services/InfraEnvsService.d.ts.map +1 -1
  55. package/@types/ocm/services/apis/EventsAPI.d.ts +1 -0
  56. package/@types/ocm/services/apis/EventsAPI.d.ts.map +1 -1
  57. package/build/build.json +1 -1
  58. package/build/cim/components/Agent/BMCForm.js +1 -1
  59. package/build/cim/components/Agent/BMCForm.js.map +1 -1
  60. package/build/cim/components/ClusterDeployment/ClusterDeploymentHostSelectionStep.js +1 -9
  61. package/build/cim/components/ClusterDeployment/ClusterDeploymentHostSelectionStep.js.map +1 -1
  62. package/build/cim/components/ClusterDeployment/ClusterDeploymentHostsDiscoveryStep.js +1 -2
  63. package/build/cim/components/ClusterDeployment/ClusterDeploymentHostsDiscoveryStep.js.map +1 -1
  64. package/build/cim/components/ClusterDeployment/ClusterDeploymentHostsSelectionBasic.js +3 -10
  65. package/build/cim/components/ClusterDeployment/ClusterDeploymentHostsSelectionBasic.js.map +1 -1
  66. package/build/cim/components/ClusterDeployment/use-networking-formik.js +2 -2
  67. package/build/cim/components/ClusterDeployment/use-networking-formik.js.map +1 -1
  68. package/build/cim/components/ClusterDeployment/validationSchemas.js +0 -1
  69. package/build/cim/components/ClusterDeployment/validationSchemas.js.map +1 -1
  70. package/build/cim/components/Hypershift/HostedClusterWizard/NetworkStep/NetworkStep.js +2 -2
  71. package/build/cim/components/Hypershift/HostedClusterWizard/NetworkStep/NetworkStep.js.map +1 -1
  72. package/build/cim/components/InfraEnv/InfraEnvFormPage.js +10 -2
  73. package/build/cim/components/InfraEnv/InfraEnvFormPage.js.map +1 -1
  74. package/build/cim/components/modals/AddHostModal.js +1 -1
  75. package/build/cim/components/modals/AddHostModal.js.map +1 -1
  76. package/build/cim/components/modals/EditProxyModal.js +18 -7
  77. package/build/cim/components/modals/EditProxyModal.js.map +1 -1
  78. package/build/common/components/clusterConfiguration/DiscoveryImageConfigForm.js +5 -5
  79. package/build/common/components/clusterConfiguration/DiscoveryImageConfigForm.js.map +1 -1
  80. package/build/common/components/clusterWizard/ClusterWizardStep.js +1 -1
  81. package/build/common/components/clusterWizard/ClusterWizardStep.js.map +1 -1
  82. package/build/common/components/clusterWizard/networkingSteps/ManagedNetworkingControlGroup.js +5 -2
  83. package/build/common/components/clusterWizard/networkingSteps/ManagedNetworkingControlGroup.js.map +1 -1
  84. package/build/common/components/clusterWizard/networkingSteps/NetworkTypeControlGroup.js +1 -1
  85. package/build/common/components/clusterWizard/networkingSteps/NetworkTypeControlGroup.js.map +1 -1
  86. package/build/common/components/fetching/EventListFetch.js +6 -5
  87. package/build/common/components/fetching/EventListFetch.js.map +1 -1
  88. package/build/common/components/hosts/status.js +1 -1
  89. package/build/common/components/hosts/status.js.map +1 -1
  90. package/build/common/components/ui/ClusterEventsToolbar.js +1 -1
  91. package/build/common/components/ui/ClusterEventsToolbar.js.map +1 -1
  92. package/build/common/components/ui/eventsModal.js +8 -3
  93. package/build/common/components/ui/eventsModal.js.map +1 -1
  94. package/build/common/components/ui/formik/validationSchemas.js +19 -12
  95. package/build/common/components/ui/formik/validationSchemas.js.map +1 -1
  96. package/build/common/config/constants.js +2 -0
  97. package/build/common/config/constants.js.map +1 -1
  98. package/build/ocm/components/AddHosts/day2Wizard/Day2ClusterDetails.js +94 -20
  99. package/build/ocm/components/AddHosts/day2Wizard/Day2ClusterDetails.js.map +1 -1
  100. package/build/ocm/components/AddHosts/day2Wizard/Day2DownloadISO.js +1 -1
  101. package/build/ocm/components/AddHosts/day2Wizard/Day2DownloadISO.js.map +1 -1
  102. package/build/ocm/components/AddHosts/day2Wizard/Day2StaticIP.js +16 -9
  103. package/build/ocm/components/AddHosts/day2Wizard/Day2StaticIP.js.map +1 -1
  104. package/build/ocm/components/AddHosts/day2Wizard/Day2Wizard.js +1 -1
  105. package/build/ocm/components/AddHosts/day2Wizard/Day2Wizard.js.map +1 -1
  106. package/build/ocm/components/HostsClusterDetailTab/HostsClusterDetailTabContent.js +5 -2
  107. package/build/ocm/components/HostsClusterDetailTab/HostsClusterDetailTabContent.js.map +1 -1
  108. package/build/ocm/components/HostsClusterDetailTab/utils.js +5 -2
  109. package/build/ocm/components/HostsClusterDetailTab/utils.js.map +1 -1
  110. package/build/ocm/components/clusterConfiguration/CpuArchitectureDropdown.js +5 -4
  111. package/build/ocm/components/clusterConfiguration/CpuArchitectureDropdown.js.map +1 -1
  112. package/build/ocm/components/clusterConfiguration/DiscoveryImageForm.js +3 -1
  113. package/build/ocm/components/clusterConfiguration/DiscoveryImageForm.js.map +1 -1
  114. package/build/ocm/components/clusterConfiguration/OcmDiscoveryImageConfigForm.js +11 -8
  115. package/build/ocm/components/clusterConfiguration/OcmDiscoveryImageConfigForm.js.map +1 -1
  116. package/build/ocm/components/clusterConfiguration/networkConfiguration/AdvancedNetworkFields.js +16 -5
  117. package/build/ocm/components/clusterConfiguration/networkConfiguration/AdvancedNetworkFields.js.map +1 -1
  118. package/build/ocm/components/clusterConfiguration/networkConfiguration/NetworkConfigurationForm.js +3 -2
  119. package/build/ocm/components/clusterConfiguration/networkConfiguration/NetworkConfigurationForm.js.map +1 -1
  120. package/build/ocm/components/clusterConfiguration/networkConfiguration/StackTypeControl.js +1 -2
  121. package/build/ocm/components/clusterConfiguration/networkConfiguration/StackTypeControl.js.map +1 -1
  122. package/build/ocm/components/clusterConfiguration/networkConfiguration/VirtualIPControlGroup.js +27 -16
  123. package/build/ocm/components/clusterConfiguration/networkConfiguration/VirtualIPControlGroup.js.map +1 -1
  124. package/build/ocm/components/clusterConfiguration/platformIntegration/PlatformIntegration.js +1 -1
  125. package/build/ocm/components/clusterConfiguration/platformIntegration/PlatformIntegration.js.map +1 -1
  126. package/build/ocm/components/clusterDetail/AssistedInstallerDetailCard.js +5 -2
  127. package/build/ocm/components/clusterDetail/AssistedInstallerDetailCard.js.map +1 -1
  128. package/build/ocm/components/clusterDetail/AssistedInstallerExtraDetailCard.js +5 -2
  129. package/build/ocm/components/clusterDetail/AssistedInstallerExtraDetailCard.js.map +1 -1
  130. package/build/ocm/components/clusters/ClusterPage.js +8 -4
  131. package/build/ocm/components/clusters/ClusterPage.js.map +1 -1
  132. package/build/ocm/components/featureSupportLevels/FeatureSupportLevelProvider.js +3 -2
  133. package/build/ocm/components/featureSupportLevels/FeatureSupportLevelProvider.js.map +1 -1
  134. package/build/ocm/components/fetching/fetchEvents.js +7 -3
  135. package/build/ocm/components/fetching/fetchEvents.js.map +1 -1
  136. package/build/ocm/components/newFeatureSupportLevels/NewFeatureSupportLevelProvider.js +3 -2
  137. package/build/ocm/components/newFeatureSupportLevels/NewFeatureSupportLevelProvider.js.map +1 -1
  138. package/build/ocm/hooks/useInfraEnv.js +2 -2
  139. package/build/ocm/hooks/useInfraEnv.js.map +1 -1
  140. package/build/ocm/hooks/useInfraEnvId.js +18 -3
  141. package/build/ocm/hooks/useInfraEnvId.js.map +1 -1
  142. package/build/ocm/hooks/useInfraEnvImageUrl.js +1 -1
  143. package/build/ocm/hooks/useInfraEnvImageUrl.js.map +1 -1
  144. package/build/ocm/hooks/useInfraEnvIpxeImageUrl.js +1 -1
  145. package/build/ocm/hooks/useInfraEnvIpxeImageUrl.js.map +1 -1
  146. package/build/ocm/services/Day2ClusterService.js +11 -20
  147. package/build/ocm/services/Day2ClusterService.js.map +1 -1
  148. package/build/ocm/services/InfraEnvIdsCacheService.js +5 -4
  149. package/build/ocm/services/InfraEnvIdsCacheService.js.map +1 -1
  150. package/build/ocm/services/InfraEnvsService.js +7 -4
  151. package/build/ocm/services/InfraEnvsService.js.map +1 -1
  152. package/build/ocm/services/apis/EventsAPI.js +13 -1
  153. package/build/ocm/services/apis/EventsAPI.js.map +1 -1
  154. package/lib/cim/components/Agent/BMCForm.tsx +1 -1
  155. package/lib/cim/components/ClusterDeployment/ClusterDeploymentHostSelectionStep.tsx +1 -12
  156. package/lib/cim/components/ClusterDeployment/ClusterDeploymentHostsDiscoveryStep.tsx +1 -2
  157. package/lib/cim/components/ClusterDeployment/ClusterDeploymentHostsSelectionBasic.tsx +2 -10
  158. package/lib/cim/components/ClusterDeployment/use-networking-formik.ts +2 -2
  159. package/lib/cim/components/ClusterDeployment/validationSchemas.ts +0 -1
  160. package/lib/cim/components/Hypershift/HostedClusterWizard/NetworkStep/NetworkStep.tsx +2 -2
  161. package/lib/cim/components/Hypershift/HostedClusterWizard/NetworkStep/types.ts +0 -1
  162. package/lib/cim/components/InfraEnv/InfraEnvFormPage.tsx +10 -2
  163. package/lib/cim/components/modals/AddHostModal.tsx +1 -0
  164. package/lib/cim/components/modals/EditProxyModal.tsx +15 -3
  165. package/lib/common/components/clusterConfiguration/DiscoveryImageConfigForm.tsx +12 -9
  166. package/lib/common/components/clusterWizard/ClusterWizardStep.tsx +5 -1
  167. package/lib/common/components/clusterWizard/networkingSteps/ManagedNetworkingControlGroup.tsx +11 -2
  168. package/lib/common/components/clusterWizard/networkingSteps/NetworkTypeControlGroup.tsx +1 -1
  169. package/lib/common/components/fetching/EventListFetch.tsx +6 -5
  170. package/lib/common/components/hosts/status.tsx +1 -1
  171. package/lib/common/components/ui/ClusterEventsToolbar.tsx +3 -0
  172. package/lib/common/components/ui/StaticTextField.tsx +1 -1
  173. package/lib/common/components/ui/eventsModal.tsx +18 -2
  174. package/lib/common/components/ui/formik/validationSchemas.ts +32 -14
  175. package/lib/common/config/constants.ts +4 -0
  176. package/lib/common/types/events.ts +1 -0
  177. package/lib/ocm/components/AddHosts/day2Wizard/Day2ClusterDetails.tsx +129 -21
  178. package/lib/ocm/components/AddHosts/day2Wizard/Day2DownloadISO.tsx +1 -1
  179. package/lib/ocm/components/AddHosts/day2Wizard/Day2StaticIP.tsx +15 -10
  180. package/lib/ocm/components/AddHosts/day2Wizard/Day2Wizard.tsx +1 -0
  181. package/lib/ocm/components/HostsClusterDetailTab/HostsClusterDetailTabContent.tsx +7 -3
  182. package/lib/ocm/components/HostsClusterDetailTab/utils.ts +8 -3
  183. package/lib/ocm/components/clusterConfiguration/CpuArchitectureDropdown.tsx +6 -3
  184. package/lib/ocm/components/clusterConfiguration/DiscoveryImageForm.tsx +9 -1
  185. package/lib/ocm/components/clusterConfiguration/OcmDiscoveryImageConfigForm.tsx +25 -16
  186. package/lib/ocm/components/clusterConfiguration/networkConfiguration/AdvancedNetworkFields.tsx +29 -8
  187. package/lib/ocm/components/clusterConfiguration/networkConfiguration/NetworkConfigurationForm.tsx +9 -2
  188. package/lib/ocm/components/clusterConfiguration/networkConfiguration/StackTypeControl.tsx +6 -13
  189. package/lib/ocm/components/clusterConfiguration/networkConfiguration/VirtualIPControlGroup.tsx +30 -32
  190. package/lib/ocm/components/clusterConfiguration/platformIntegration/PlatformIntegration.tsx +1 -1
  191. package/lib/ocm/components/clusterDetail/AssistedInstallerDetailCard.tsx +12 -2
  192. package/lib/ocm/components/clusterDetail/AssistedInstallerExtraDetailCard.tsx +9 -2
  193. package/lib/ocm/components/clusters/ClusterPage.tsx +17 -5
  194. package/lib/ocm/components/featureSupportLevels/FeatureSupportLevelProvider.tsx +6 -2
  195. package/lib/ocm/components/fetching/fetchEvents.ts +8 -3
  196. package/lib/ocm/components/newFeatureSupportLevels/NewFeatureSupportLevelProvider.tsx +6 -2
  197. package/lib/ocm/hooks/useInfraEnv.ts +10 -1
  198. package/lib/ocm/hooks/useInfraEnvId.ts +24 -4
  199. package/lib/ocm/hooks/useInfraEnvImageUrl.ts +1 -1
  200. package/lib/ocm/hooks/useInfraEnvIpxeImageUrl.ts +1 -1
  201. package/lib/ocm/services/Day2ClusterService.ts +12 -42
  202. package/lib/ocm/services/InfraEnvIdsCacheService.ts +9 -6
  203. package/lib/ocm/services/InfraEnvsService.ts +12 -13
  204. package/lib/ocm/services/apis/EventsAPI.ts +15 -1
  205. package/package.json +1 -1
@@ -37,8 +37,7 @@ const ClusterDeploymentHostsDiscoveryStep: React.FC<ClusterDeploymentHostsDiscov
37
37
  infraEnvAgents.length > 1 &&
38
38
  errors.push(t('ai:Single node cluster cannot contain more than 1 host.'));
39
39
  } else {
40
- (infraEnvAgents.length === 4 || infraEnvAgents.length < 3) &&
41
- errors.push(t('ai:Cluster must have 3 or 5 and more hosts.'));
40
+ infraEnvAgents.length < 3 && errors.push(t('ai:Cluster must have at least 3 hosts.'));
42
41
  }
43
42
 
44
43
  if (infraEnvAgents.some((a) => !a.spec.approved)) {
@@ -25,9 +25,7 @@ const ClusterDeploymentHostsSelectionBasic: React.FC<ClusterDeploymentHostsSelec
25
25
  const { t } = useTranslation();
26
26
 
27
27
  React.useEffect(() => {
28
- if (hostCount === 3) {
29
- setFieldValue('useMastersAsWorkers', true);
30
- }
28
+ setFieldValue('useMastersAsWorkers', hostCount === 3);
31
29
  }, [hostCount, setFieldValue]);
32
30
 
33
31
  return (
@@ -43,12 +41,6 @@ const ClusterDeploymentHostsSelectionBasic: React.FC<ClusterDeploymentHostsSelec
43
41
  minValue={isSNOCluster ? 1 : HOSTS_MIN_COUNT}
44
42
  maxValue={isSNOCluster ? 1 : HOSTS_MAX_COUNT}
45
43
  isDisabled={isSNOCluster}
46
- formatValue={(newValue) => {
47
- if (newValue === 4) {
48
- return hostCount >= 4 ? 3 : 5;
49
- }
50
- return newValue;
51
- }}
52
44
  />
53
45
  </GridItem>
54
46
 
@@ -58,7 +50,7 @@ const ClusterDeploymentHostsSelectionBasic: React.FC<ClusterDeploymentHostsSelec
58
50
  idPostfix="mastersasworkers"
59
51
  name="useMastersAsWorkers"
60
52
  label={t('ai:Run workloads on control plane hosts')}
61
- isDisabled={hostCount < 5}
53
+ isDisabled={hostCount !== 3}
62
54
  />
63
55
  </GridItem>
64
56
 
@@ -54,8 +54,8 @@ const getNetworkConfigurationValidationSchema = (
54
54
  ingressVip: vipValidationSchema(hostSubnets, values, initialValues.ingressVip),
55
55
  sshPublicKey: sshPublicKeyValidationSchema,
56
56
  hostSubnet: hostSubnetValidationSchema,
57
- httpProxy: httpProxyValidationSchema(values, 'httpsProxy'),
58
- httpsProxy: httpProxyValidationSchema(values, 'httpProxy'), // share the schema, httpS is currently not supported
57
+ httpProxy: httpProxyValidationSchema({ values, pairValueName: 'httpsProxy' }),
58
+ httpsProxy: httpProxyValidationSchema({ values, pairValueName: 'httpProxy' }), // share the schema, httpS is currently not supported
59
59
  noProxy: noProxyValidationSchema,
60
60
  }),
61
61
  );
@@ -14,6 +14,5 @@ export const hostCountValidationSchema = (t: TFunction) => {
14
14
  HOSTS_MAX_COUNT,
15
15
  t('ai:Maximum hosts count {{HOSTS_MAX_COUNT}} reached.', { HOSTS_MAX_COUNT }),
16
16
  )
17
- .test('not-four', t('ai:A cluster needs 2 or more worker nodes.'), (value) => value !== 4)
18
17
  .required(t('ai:Required field'));
19
18
  };
@@ -28,8 +28,8 @@ const getValidationSchema = (t: TFunction) =>
28
28
  clusterNetworkHostPrefix: values.isAdvanced
29
29
  ? hostPrefixValidationSchema(values.clusterNetworkCidr)
30
30
  : Yup.number(),
31
- httpProxy: httpProxyValidationSchema(values, 'httpsProxy'),
32
- httpsProxy: httpProxyValidationSchema(values, 'httpProxy'), // share the schema, httpS is currently not supported
31
+ httpProxy: httpProxyValidationSchema({ values, pairValueName: 'httpsProxy' }),
32
+ httpsProxy: httpProxyValidationSchema({ values, pairValueName: 'httpProxy' }), // share the schema, httpS is currently not supported
33
33
  noProxy: noProxyValidationSchema,
34
34
  nodePortAddress:
35
35
  values.apiPublishingStrategy === 'NodePort'
@@ -21,5 +21,4 @@ export type NetworkStepProps = {
21
21
  formRef: React.Ref<FormikProps<NetworkFormValues>>;
22
22
  onValuesChanged: (values: NetworkFormValues, initRender: boolean) => void;
23
23
  initialValues: NetworkFormValues;
24
- count: number;
25
24
  };
@@ -72,8 +72,16 @@ const validationSchema = (usedNames: string[], t: TFunction) =>
72
72
  location: locationValidationSchema(t).required(t('ai:Location is a required field.')),
73
73
  pullSecret: pullSecretValidationSchema.required(t('ai:Pull secret is a required field.')),
74
74
  sshPublicKey: sshPublicKeyValidationSchema,
75
- httpProxy: httpProxyValidationSchema(values, 'httpsProxy'),
76
- httpsProxy: httpProxyValidationSchema(values, 'httpProxy'), // share the schema, httpS is currently not supported
75
+ httpProxy: httpProxyValidationSchema({
76
+ values,
77
+ pairValueName: 'httpsProxy',
78
+ allowEmpty: true,
79
+ }),
80
+ httpsProxy: httpProxyValidationSchema({
81
+ values,
82
+ pairValueName: 'httpProxy',
83
+ allowEmpty: true,
84
+ }), // share the schema, httpS is currently not supported
77
85
  noProxy: noProxyValidationSchema,
78
86
  labels: Yup.array()
79
87
  .of(Yup.string())
@@ -73,6 +73,7 @@ const AddHostModal: React.FC<AddHostModalProps> = ({
73
73
  noProxy={noProxy}
74
74
  hasDHCP={hasDHCP}
75
75
  isIPXE={isIPXE}
76
+ allowEmpty
76
77
  />
77
78
  )}
78
79
  {dialogType === 'download' && (
@@ -27,8 +27,16 @@ import { getWarningMessage } from './utils';
27
27
  const validationSchema = () =>
28
28
  Yup.lazy<ProxyFieldsType>((values) =>
29
29
  Yup.object<ProxyFieldsType>().shape({
30
- httpProxy: httpProxyValidationSchema(values, 'httpsProxy'),
31
- httpsProxy: httpProxyValidationSchema(values, 'httpProxy'),
30
+ httpProxy: httpProxyValidationSchema({
31
+ values,
32
+ pairValueName: 'httpsProxy',
33
+ allowEmpty: true,
34
+ }),
35
+ httpsProxy: httpProxyValidationSchema({
36
+ values,
37
+ pairValueName: 'httpProxy',
38
+ allowEmpty: true,
39
+ }),
32
40
  noProxy: noProxyValidationSchema,
33
41
  }),
34
42
  );
@@ -62,6 +70,10 @@ const EditProxyModal: React.FC<EditProxyModalProps> = ({
62
70
  const { t } = useTranslation();
63
71
  const [error, setError] = React.useState<string>();
64
72
  const warningMsg = getWarningMessage(hasAgents, hasBMHs, t);
73
+ const enableProxy =
74
+ !!infraEnv.spec?.proxy?.httpProxy ||
75
+ !!infraEnv.spec?.proxy?.httpsProxy ||
76
+ !!infraEnv.spec?.proxy?.noProxy;
65
77
  return (
66
78
  <Modal
67
79
  aria-label={t('ai:Edit proxy settings')}
@@ -76,7 +88,7 @@ const EditProxyModal: React.FC<EditProxyModalProps> = ({
76
88
  httpProxy: infraEnv.spec?.proxy?.httpProxy,
77
89
  httpsProxy: infraEnv.spec?.proxy?.httpsProxy,
78
90
  noProxy: infraEnv.spec?.proxy?.noProxy,
79
- enableProxy: true,
91
+ enableProxy,
80
92
  }}
81
93
  validationSchema={validationSchema}
82
94
  onSubmit={async (values: ProxyFieldsType) => {
@@ -51,14 +51,15 @@ export const StaticIPInfo: React.FC = () => {
51
51
 
52
52
  export type DiscoveryImageFormValues = ImageCreateParams & ProxyFieldsType;
53
53
 
54
- const validationSchema = Yup.lazy<DiscoveryImageFormValues>((values) =>
55
- Yup.object<DiscoveryImageFormValues>().shape({
56
- sshPublicKey: sshPublicKeyValidationSchema,
57
- httpProxy: httpProxyValidationSchema(values, 'httpsProxy'),
58
- httpsProxy: httpProxyValidationSchema(values, 'httpProxy'), // share the schema, httpS is currently not supported
59
- noProxy: noProxyValidationSchema,
60
- }),
61
- );
54
+ const getValidationSchema = (allowEmpty: boolean) =>
55
+ Yup.lazy<DiscoveryImageFormValues>((values) =>
56
+ Yup.object<DiscoveryImageFormValues>().shape({
57
+ sshPublicKey: sshPublicKeyValidationSchema,
58
+ httpProxy: httpProxyValidationSchema({ values, pairValueName: 'httpsProxy', allowEmpty }),
59
+ httpsProxy: httpProxyValidationSchema({ values, pairValueName: 'httpProxy', allowEmpty }), // share the schema, httpS is currently not supported
60
+ noProxy: noProxyValidationSchema,
61
+ }),
62
+ );
62
63
 
63
64
  type DiscoveryImageConfigFormProps = Proxy & {
64
65
  onCancel: () => void;
@@ -71,6 +72,7 @@ type DiscoveryImageConfigFormProps = Proxy & {
71
72
  sshPublicKey?: string;
72
73
  imageType?: ImageType;
73
74
  isIPXE?: boolean;
75
+ allowEmpty?: boolean;
74
76
  };
75
77
 
76
78
  export const DiscoveryImageConfigForm: React.FC<DiscoveryImageConfigFormProps> = ({
@@ -84,6 +86,7 @@ export const DiscoveryImageConfigForm: React.FC<DiscoveryImageConfigFormProps> =
84
86
  hideDiscoveryImageType,
85
87
  hasDHCP,
86
88
  isIPXE,
89
+ allowEmpty,
87
90
  }) => {
88
91
  const initialValues: DiscoveryImageFormValues = {
89
92
  sshPublicKey: sshPublicKey || '',
@@ -99,7 +102,7 @@ export const DiscoveryImageConfigForm: React.FC<DiscoveryImageConfigFormProps> =
99
102
  <Formik
100
103
  initialValues={initialValues}
101
104
  initialStatus={{ error: null }}
102
- validationSchema={validationSchema}
105
+ validationSchema={getValidationSchema(!!allowEmpty)}
103
106
  onSubmit={handleSubmit}
104
107
  >
105
108
  {({ submitForm, isSubmitting, status }) => {
@@ -10,7 +10,11 @@ type ClusterWizardStepProps = {
10
10
  navigation?: React.ReactNode;
11
11
  };
12
12
 
13
- const ClusterWizardStep: React.FC<ClusterWizardStepProps> = ({ navigation, footer, children }) => {
13
+ const ClusterWizardStep = ({
14
+ navigation,
15
+ footer,
16
+ children,
17
+ }: React.PropsWithChildren<ClusterWizardStepProps>) => {
14
18
  // activeStep is required, but we're not passing it. Using the cast to avoid TS error
15
19
  const activeStep = undefined as unknown as WizardBodyProps['activeStep'];
16
20
  return (
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { FormGroup, TooltipProps } from '@patternfly/react-core';
3
- import { getFieldId } from '../../ui';
3
+ import { PopoverIcon, getFieldId } from '../../ui';
4
4
  import RadioFieldWithTooltip from '../../ui/formik/RadioFieldWithTooltip';
5
5
  import { useTranslation } from '../../../hooks/use-translation-wrapper';
6
6
 
@@ -47,7 +47,16 @@ export const ManagedNetworkingControlGroup = ({
47
47
  name={GROUP_NAME}
48
48
  isDisabled={disabled}
49
49
  value={'userManaged'}
50
- label={t('ai:User-Managed Networking')}
50
+ label={
51
+ <>
52
+ <span>{t('ai:User-Managed Networking')}</span>{' '}
53
+ <PopoverIcon
54
+ bodyContent={
55
+ "With User-Managed Networking, you'll need to provide and configure a load balancer for the API and ingress endpoints."
56
+ }
57
+ />
58
+ </>
59
+ }
51
60
  />
52
61
  </FormGroup>
53
62
  );
@@ -39,7 +39,7 @@ export const NetworkTypeControlGroup = ({
39
39
  <SplitItem>
40
40
  <PopoverIcon
41
41
  bodyContent={t(
42
- "ai:The next generation networking type, select this when you're using new features and telco features",
42
+ "ai:OVN separates the physical network topology from the logical one and is recommended if you're using new or telco features.",
43
43
  )}
44
44
  buttonStyle={{ top: '-4px' }}
45
45
  />
@@ -21,11 +21,10 @@ const initialSeverityCounts = {
21
21
  };
22
22
 
23
23
  export const EventListFetch = ({ onFetchEvents, ...props }: EventListFetchProps) => {
24
- const { cluster, hostId, className, entityKind } = props;
24
+ const { cluster, hostId, className, entityKind, setLoading } = props;
25
25
 
26
26
  const [lastPolling, setLastPolling] = useStateSafely(0);
27
27
  const [error, setError] = useStateSafely('');
28
- const [isLoading, setLoading] = useStateSafely(true);
29
28
  const [events, setEvents] = useStateSafely<EventList | undefined>(undefined);
30
29
 
31
30
  const [pageNum, setPageNum] = useStateSafely(1);
@@ -89,7 +88,10 @@ export const EventListFetch = ({ onFetchEvents, ...props }: EventListFetchProps)
89
88
  parseHeaders(headers);
90
89
  timer = setTimeout(() => setLastPolling(Date.now()), EVENTS_POLLING_INTERVAL);
91
90
  },
92
- setError,
91
+ (err: string) => {
92
+ setError(err);
93
+ setLoading(false);
94
+ },
93
95
  );
94
96
 
95
97
  return () => clearTimeout(timer);
@@ -101,7 +103,6 @@ export const EventListFetch = ({ onFetchEvents, ...props }: EventListFetchProps)
101
103
  perPage,
102
104
  pageNum,
103
105
  parseHeaders,
104
- totalEvents,
105
106
  filters,
106
107
  setLoading,
107
108
  setError,
@@ -125,7 +126,7 @@ export const EventListFetch = ({ onFetchEvents, ...props }: EventListFetchProps)
125
126
  eventList = <ErrorState title={error} fetchData={forceRefetch} />;
126
127
  }
127
128
 
128
- if (isLoading || !events) {
129
+ if (!events) {
129
130
  eventList = <LoadingState />;
130
131
  }
131
132
 
@@ -217,7 +217,7 @@ export const hostStatus: HostStatus<Host['status'] | 'finalizing'> = Object.free
217
217
  category: 'Installation related',
218
218
  icon: <ExclamationTriangleIcon color={warningColor.value} />,
219
219
  details:
220
- 'Host already booted from disk during previous installation. To finish resetting the installation please boot the host into Discovery ISO.',
220
+ 'Host has already been booted from disk during the previous installation. To finish resetting the installation, boot the host into the discovery image',
221
221
  },
222
222
  finalizing: {
223
223
  key: 'finalizing',
@@ -226,6 +226,9 @@ const ClusterEventsToolbar = ({
226
226
  isOpen={isHostExpanded}
227
227
  placeholderText={<Placeholder text="Hosts" />}
228
228
  isDisabled={allHosts.length === 0}
229
+ maxHeight={280}
230
+ zIndex={600}
231
+ menuAppendTo={document.body}
229
232
  >
230
233
  {[
231
234
  <SelectOption
@@ -5,7 +5,7 @@ import { getFieldId, HelperText } from './formik';
5
5
 
6
6
  export interface StaticFieldProps {
7
7
  name: string;
8
- label: string;
8
+ label: React.ReactNode;
9
9
  helperText?: React.ReactNode;
10
10
  helperTextInvalid?: React.ReactNode;
11
11
  isRequired?: boolean;
@@ -1,5 +1,13 @@
1
1
  import React from 'react';
2
- import { Button, Modal, ButtonVariant, ModalVariant, ModalBoxBody } from '@patternfly/react-core';
2
+ import {
3
+ Button,
4
+ Modal,
5
+ ButtonVariant,
6
+ ModalVariant,
7
+ ModalBoxBody,
8
+ Spinner,
9
+ Title,
10
+ } from '@patternfly/react-core';
3
11
  import { ExclamationTriangleIcon } from '@patternfly/react-icons';
4
12
  import { global_warning_color_100 as globalWarningColor100 } from '@patternfly/react-tokens';
5
13
  import { ToolbarButton } from './Toolbar';
@@ -12,6 +20,7 @@ import ErrorState from './uiState/ErrorState';
12
20
  import './EventsModal.css';
13
21
  import { useTranslation } from '../../hooks/use-translation-wrapper';
14
22
  import { Trans } from 'react-i18next';
23
+ import { useStateSafely } from '../../hooks';
15
24
 
16
25
  type EventsModalButtonProps = React.ComponentProps<typeof Button> & {
17
26
  ButtonComponent?: typeof Button | typeof ToolbarButton;
@@ -80,9 +89,15 @@ export const EventsModal = ({
80
89
  fallbackEventsURL,
81
90
  }: EventsModalProps) => {
82
91
  const { t } = useTranslation();
92
+ const [isLoading, setLoading] = useStateSafely(true);
93
+
83
94
  return (
84
95
  <Modal
85
- title={title}
96
+ header={
97
+ <Title headingLevel={'h1'}>
98
+ {title} {isLoading && <Spinner isSVG size="lg" />}
99
+ </Title>
100
+ }
86
101
  isOpen={isOpen}
87
102
  aria-label={t('ai:Displays events')}
88
103
  hasNoBodyWrapper
@@ -117,6 +132,7 @@ export const EventsModal = ({
117
132
  entityKind={entityKind}
118
133
  onFetchEvents={onFetchEvents}
119
134
  className="events-modal__event-list"
135
+ setLoading={setLoading}
120
136
  />
121
137
  )}
122
138
  </ModalBoxBody>
@@ -504,28 +504,46 @@ export const richHostnameValidationSchema = (
504
504
  };
505
505
 
506
506
  const httpProxyValidationMessage = 'Provide a valid HTTP URL.';
507
- export const httpProxyValidationSchema = (
508
- values: ProxyFieldsType,
509
- pairValueName: 'httpProxy' | 'httpsProxy',
510
- ) =>
511
- Yup.string()
512
- .test(
513
- 'http-proxy-no-empty-validation',
514
- 'At least one of the HTTP or HTTPS proxy URLs is required.',
515
- (value) => Boolean(!values.enableProxy || value || values[pairValueName]),
516
- )
517
- .test('http-proxy-validation', httpProxyValidationMessage, (value: string) => {
507
+ export const httpProxyValidationSchema = ({
508
+ values,
509
+ pairValueName,
510
+ allowEmpty,
511
+ }: {
512
+ values: ProxyFieldsType;
513
+ pairValueName: 'httpProxy' | 'httpsProxy';
514
+ allowEmpty?: boolean;
515
+ }) => {
516
+ const validation = Yup.string().test(
517
+ 'http-proxy-validation',
518
+ httpProxyValidationMessage,
519
+ (value: string) => {
518
520
  if (!value) {
519
521
  return true;
520
522
  }
521
523
 
524
+ if (!value.startsWith('http://')) {
525
+ return false;
526
+ }
527
+
522
528
  try {
523
- const url = new URL(value);
524
- return url.protocol === 'http:';
529
+ new URL(value);
525
530
  } catch {
526
531
  return false;
527
532
  }
528
- });
533
+ return true;
534
+ },
535
+ );
536
+
537
+ if (allowEmpty) {
538
+ return validation;
539
+ }
540
+
541
+ return validation.test(
542
+ 'http-proxy-no-empty-validation',
543
+ 'At least one of the HTTP or HTTPS proxy URLs is required.',
544
+ (value) => !values.enableProxy || !!value || !!values[pairValueName],
545
+ );
546
+ };
529
547
 
530
548
  const isIPorDN = (value: string, dnsRegex = DNS_NAME_REGEX) => {
531
549
  if (value.match(dnsRegex)) {
@@ -366,3 +366,7 @@ export const CHANGE_ISO_PASSWORD_FILE_LINK =
366
366
 
367
367
  export const CUSTOM_MANIFESTS_HELP_LINK =
368
368
  'https://docs.openshift.com/container-platform/4.12/installing/install_config/installing-customizing.html';
369
+
370
+ //TODO (mortegag): Change the link. Related to https://issues.redhat.com/browse/MGMT-13976
371
+ export const HOW_TO_KNOW_IF_CLUSTER_SUPPORTS_MULTIPLE_CPU_ARCHS =
372
+ 'https://57587--docspreview.netlify.app/openshift-enterprise/latest/post_installation_configuration/multi-architecture-configuration.html#multi-architecture-verifying-cluster-compatibility_multi-architecture-configuration';
@@ -24,4 +24,5 @@ export type EventListFetchProps = EventFetchProps & {
24
24
  onError: (message: string) => void,
25
25
  ) => Promise<void>;
26
26
  className?: string;
27
+ setLoading: (loading: boolean) => void;
27
28
  };