@openshift-assisted/ui-lib 2.9.7-cim → 2.9.8-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 (123) hide show
  1. package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentDetails.d.ts.map +1 -1
  2. package/build/@types/cim/components/ClusterDeployment/helpers.d.ts.map +1 -1
  3. package/build/@types/cim/components/Hypershift/utils/nodepool.d.ts.map +1 -1
  4. package/build/@types/cim/components/InfraEnv/InfraEnvFormPage.d.ts +2 -0
  5. package/build/@types/cim/components/InfraEnv/InfraEnvFormPage.d.ts.map +1 -1
  6. package/build/@types/cim/components/modals/AddHostModal.d.ts.map +1 -1
  7. package/build/@types/common/api/assisted-service/NewFeatureSupportLevelsAPI.d.ts +1 -1
  8. package/build/@types/common/api/assisted-service/NewFeatureSupportLevelsAPI.d.ts.map +1 -1
  9. package/build/@types/common/components/clusterConfiguration/DiscoveryImageConfigForm.d.ts +4 -1
  10. package/build/@types/common/components/clusterConfiguration/DiscoveryImageConfigForm.d.ts.map +1 -1
  11. package/build/@types/common/components/clusterConfiguration/DownloadIso.d.ts +2 -1
  12. package/build/@types/common/components/clusterConfiguration/DownloadIso.d.ts.map +1 -1
  13. package/build/@types/common/components/hosts/HostRowDetail.d.ts +2 -1
  14. package/build/@types/common/components/hosts/HostRowDetail.d.ts.map +1 -1
  15. package/build/@types/common/components/newFeatureSupportLevels/types.d.ts +3 -3
  16. package/build/@types/common/components/newFeatureSupportLevels/types.d.ts.map +1 -1
  17. package/build/@types/common/components/ui/formik/validationSchemas.d.ts.map +1 -1
  18. package/build/@types/common/config/constants.d.ts +1 -1
  19. package/build/@types/common/config/constants.d.ts.map +1 -1
  20. package/build/@types/common/services/DateAndTime.d.ts.map +1 -0
  21. package/build/@types/common/types/featureSupportLevel.d.ts +3 -3
  22. package/build/@types/common/types/featureSupportLevel.d.ts.map +1 -1
  23. package/build/@types/ocm/components/HostsClusterDetailTab/HostsClusterDetailTabContent.d.ts.map +1 -1
  24. package/build/@types/ocm/components/clusterConfiguration/CpuArchitectureDropdown.d.ts +3 -3
  25. package/build/@types/ocm/components/clusterConfiguration/CpuArchitectureDropdown.d.ts.map +1 -1
  26. package/build/@types/ocm/components/clusterConfiguration/OcmClusterDetailsFormFields.d.ts.map +1 -1
  27. package/build/@types/ocm/components/clusterConfiguration/networkConfiguration/NetworkConfiguration.d.ts.map +1 -1
  28. package/build/@types/ocm/components/clusterConfiguration/platformIntegration/ExternalPlatformDropdown.d.ts +2 -1
  29. package/build/@types/ocm/components/clusterConfiguration/platformIntegration/ExternalPlatformDropdown.d.ts.map +1 -1
  30. package/build/@types/ocm/components/clusterDetail/AssistedInstallerDetailCard.d.ts.map +1 -1
  31. package/build/@types/ocm/components/clusterDetail/AssistedInstallerExtraDetailCard.d.ts.map +1 -1
  32. package/build/@types/ocm/components/clusters/ClusterPage.d.ts.map +1 -1
  33. package/build/@types/ocm/components/featureSupportLevels/FeatureSupportLevelProvider.d.ts +4 -3
  34. package/build/@types/ocm/components/featureSupportLevels/FeatureSupportLevelProvider.d.ts.map +1 -1
  35. package/build/@types/ocm/components/featureSupportLevels/ReviewClusterFeatureSupportLevels.d.ts.map +1 -1
  36. package/build/@types/ocm/components/featureSupportLevels/featureStateUtils.d.ts +3 -3
  37. package/build/@types/ocm/components/featureSupportLevels/featureStateUtils.d.ts.map +1 -1
  38. package/build/@types/ocm/components/hosts/HostsDiscoveryTable.d.ts.map +1 -1
  39. package/build/@types/ocm/hooks/useSupportLevelsAPI.d.ts +3 -1
  40. package/build/@types/ocm/hooks/useSupportLevelsAPI.d.ts.map +1 -1
  41. package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentDetails.js +58 -55
  42. package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentDetails.js.map +1 -1
  43. package/build/cjs/cim/components/ClusterDeployment/helpers.js +4 -2
  44. package/build/cjs/cim/components/ClusterDeployment/helpers.js.map +1 -1
  45. package/build/cjs/cim/components/Hypershift/utils/nodepool.js +6 -5
  46. package/build/cjs/cim/components/Hypershift/utils/nodepool.js.map +1 -1
  47. package/build/cjs/cim/components/InfraEnv/InfraEnvFormPage.js +2 -2
  48. package/build/cjs/cim/components/InfraEnv/InfraEnvFormPage.js.map +1 -1
  49. package/build/cjs/cim/components/modals/AddHostModal.js +4 -4
  50. package/build/cjs/cim/components/modals/AddHostModal.js.map +1 -1
  51. package/build/cjs/common/api/assisted-service/NewFeatureSupportLevelsAPI.js +8 -5
  52. package/build/cjs/common/api/assisted-service/NewFeatureSupportLevelsAPI.js.map +1 -1
  53. package/build/cjs/common/components/clusterConfiguration/DiscoveryImageConfigForm.js +4 -4
  54. package/build/cjs/common/components/clusterConfiguration/DiscoveryImageConfigForm.js.map +1 -1
  55. package/build/cjs/common/components/clusterConfiguration/DownloadIso.js +2 -2
  56. package/build/cjs/common/components/clusterConfiguration/DownloadIso.js.map +1 -1
  57. package/build/cjs/common/components/hosts/HostRowDetail.js +2 -2
  58. package/build/cjs/common/components/hosts/HostRowDetail.js.map +1 -1
  59. package/build/cjs/common/components/ui/formik/validationSchemas.js +14 -6
  60. package/build/cjs/common/components/ui/formik/validationSchemas.js.map +1 -1
  61. package/build/cjs/common/config/constants.js +3 -2
  62. package/build/cjs/common/config/constants.js.map +1 -1
  63. package/build/cjs/common/services/DateAndTime.js.map +1 -0
  64. package/build/cjs/common/types/featureSupportLevel.js.map +1 -1
  65. package/build/cjs/ocm/components/HostsClusterDetailTab/HostsClusterDetailTabContent.js +2 -2
  66. package/build/cjs/ocm/components/HostsClusterDetailTab/HostsClusterDetailTabContent.js.map +1 -1
  67. package/build/cjs/ocm/components/clusterConfiguration/CpuArchitectureDropdown.js.map +1 -1
  68. package/build/cjs/ocm/components/clusterConfiguration/OcmClusterDetailsFormFields.js.map +1 -1
  69. package/build/cjs/ocm/components/clusterConfiguration/networkConfiguration/NetworkConfiguration.js +17 -17
  70. package/build/cjs/ocm/components/clusterConfiguration/networkConfiguration/NetworkConfiguration.js.map +1 -1
  71. package/build/cjs/ocm/components/clusterConfiguration/platformIntegration/ExternalPlatformDropdown.js +2 -1
  72. package/build/cjs/ocm/components/clusterConfiguration/platformIntegration/ExternalPlatformDropdown.js.map +1 -1
  73. package/build/cjs/ocm/components/clusterDetail/AssistedInstallerDetailCard.js +2 -1
  74. package/build/cjs/ocm/components/clusterDetail/AssistedInstallerDetailCard.js.map +1 -1
  75. package/build/cjs/ocm/components/clusterDetail/AssistedInstallerExtraDetailCard.js +2 -1
  76. package/build/cjs/ocm/components/clusterDetail/AssistedInstallerExtraDetailCard.js.map +1 -1
  77. package/build/cjs/ocm/components/clusterDetail/ClusterDetailStatusMessages.js +1 -1
  78. package/build/cjs/ocm/components/clusterDetail/ClusterDetailStatusMessages.js.map +1 -1
  79. package/build/cjs/ocm/components/clusters/ClusterPage.js +2 -1
  80. package/build/cjs/ocm/components/clusters/ClusterPage.js.map +1 -1
  81. package/build/cjs/ocm/components/featureSupportLevels/FeatureSupportLevelProvider.js +4 -4
  82. package/build/cjs/ocm/components/featureSupportLevels/FeatureSupportLevelProvider.js.map +1 -1
  83. package/build/cjs/ocm/components/featureSupportLevels/ReviewClusterFeatureSupportLevels.js +1 -3
  84. package/build/cjs/ocm/components/featureSupportLevels/ReviewClusterFeatureSupportLevels.js.map +1 -1
  85. package/build/cjs/ocm/components/featureSupportLevels/featureStateUtils.js +8 -2
  86. package/build/cjs/ocm/components/featureSupportLevels/featureStateUtils.js.map +1 -1
  87. package/build/cjs/ocm/components/hosts/HostsDiscoveryTable.js +1 -1
  88. package/build/cjs/ocm/components/hosts/HostsDiscoveryTable.js.map +1 -1
  89. package/build/cjs/ocm/hooks/useSupportLevelsAPI.js +5 -4
  90. package/build/cjs/ocm/hooks/useSupportLevelsAPI.js.map +1 -1
  91. package/lib/cim/components/ClusterDeployment/ClusterDeploymentDetails.tsx +112 -102
  92. package/lib/cim/components/ClusterDeployment/helpers.ts +13 -10
  93. package/lib/cim/components/Hypershift/utils/nodepool.ts +3 -2
  94. package/lib/cim/components/InfraEnv/InfraEnvFormPage.tsx +11 -2
  95. package/lib/cim/components/modals/AddHostModal.tsx +5 -0
  96. package/lib/common/api/assisted-service/NewFeatureSupportLevelsAPI.ts +9 -5
  97. package/lib/common/components/clusterConfiguration/DiscoveryImageConfigForm.tsx +6 -4
  98. package/lib/common/components/clusterConfiguration/DownloadIso.tsx +3 -1
  99. package/lib/common/components/hosts/HostRowDetail.tsx +3 -1
  100. package/lib/common/components/newFeatureSupportLevels/types.ts +4 -2
  101. package/lib/common/components/ui/formik/validationSchemas.ts +16 -6
  102. package/lib/common/config/constants.ts +2 -2
  103. package/lib/common/types/featureSupportLevel.ts +6 -5
  104. package/lib/ocm/components/HostsClusterDetailTab/HostsClusterDetailTabContent.tsx +2 -1
  105. package/lib/ocm/components/clusterConfiguration/CpuArchitectureDropdown.tsx +5 -3
  106. package/lib/ocm/components/clusterConfiguration/OcmClusterDetailsFormFields.tsx +3 -2
  107. package/lib/ocm/components/clusterConfiguration/networkConfiguration/NetworkConfiguration.tsx +48 -25
  108. package/lib/ocm/components/clusterConfiguration/platformIntegration/ExternalPlatformDropdown.tsx +12 -5
  109. package/lib/ocm/components/clusterDetail/AssistedInstallerDetailCard.tsx +2 -1
  110. package/lib/ocm/components/clusterDetail/AssistedInstallerExtraDetailCard.tsx +2 -1
  111. package/lib/ocm/components/clusterDetail/ClusterDetailStatusMessages.tsx +1 -1
  112. package/lib/ocm/components/clusters/ClusterPage.tsx +2 -1
  113. package/lib/ocm/components/featureSupportLevels/FeatureSupportLevelProvider.tsx +14 -3
  114. package/lib/ocm/components/featureSupportLevels/ReviewClusterFeatureSupportLevels.tsx +1 -8
  115. package/lib/ocm/components/featureSupportLevels/featureStateUtils.ts +18 -3
  116. package/lib/ocm/components/hosts/HostsDiscoveryTable.tsx +1 -0
  117. package/lib/ocm/hooks/useSupportLevelsAPI.ts +12 -4
  118. package/package.json +3 -3
  119. package/build/@types/common/sevices/DateAndTime.d.ts.map +0 -1
  120. package/build/cjs/common/sevices/DateAndTime.js.map +0 -1
  121. /package/build/@types/common/{sevices → services}/DateAndTime.d.ts +0 -0
  122. /package/build/cjs/common/{sevices → services}/DateAndTime.js +0 -0
  123. /package/lib/common/{sevices → services}/DateAndTime.tsx +0 -0
@@ -1,17 +1,18 @@
1
1
  import {
2
- FeatureSupportLevel,
3
2
  FeatureSupportLevelId,
4
3
  SupportLevel,
5
4
  } from '@openshift-assisted/types/assisted-installer-service';
6
5
  import { ArrayElementType } from './typescriptExtensions';
7
6
 
8
- type Features = Required<ArrayElementType<FeatureSupportLevel['features']>>;
7
+ type Features = Required<ArrayElementType<FeatureSupportLevelId>>;
9
8
  export type FeatureId =
10
9
  | FeatureSupportLevelId
11
10
  | Features['featureId']
12
- | 'ODF'
13
- | 'CNV'
14
- | 'NETWORK_TYPE_SELECTION';
11
+ | 'NETWORK_TYPE_SELECTION'
12
+ | 'ARM64_ARCHITECTURE'
13
+ | 'ARM64_ARCHITECTURE_WITH_CLUSTER_MANAGED_NETWORKING'
14
+ | 'DUAL_STACK_NETWORKING'
15
+ | 'MULTIARCH_RELEASE_IMAGE';
15
16
 
16
17
  export type FeatureIdToSupportLevel = {
17
18
  [id in FeatureId]?: SupportLevel;
@@ -190,8 +190,9 @@ export const HostsClusterDetailTabContent = ({
190
190
  <NewFeatureSupportLevelProvider
191
191
  loadingUi={<LoadingState />}
192
192
  cluster={day2Cluster}
193
- cpuArchitecture={infraEnv?.cpuArchitecture}
193
+ cpuArchitecture={infraEnv?.cpuArchitecture as CpuArchitecture}
194
194
  openshiftVersion={day2Cluster.openshiftVersion}
195
+ platformType={day2Cluster.platform?.type}
195
196
  >
196
197
  <AddHosts />
197
198
  </NewFeatureSupportLevelProvider>
@@ -4,16 +4,18 @@ import { CaretDownIcon } from '@patternfly/react-icons';
4
4
  import { useField } from 'formik';
5
5
  import {
6
6
  CpuArchitecture,
7
- FeatureId,
8
7
  getDefaultCpuArchitecture,
9
8
  getFieldId,
10
9
  SupportedCpuArchitecture,
11
10
  } from '../../../common';
12
- import { Cluster } from '@openshift-assisted/types/assisted-installer-service';
11
+ import {
12
+ ArchitectureSupportLevelId,
13
+ Cluster,
14
+ } from '@openshift-assisted/types/assisted-installer-service';
13
15
 
14
16
  export type CpuArchitectureItem = {
15
17
  description: string;
16
- featureSupportLevelId?: FeatureId;
18
+ featureSupportLevelId?: ArchitectureSupportLevelId;
17
19
  label: string;
18
20
  };
19
21
 
@@ -14,6 +14,7 @@ import {
14
14
  StaticTextField,
15
15
  useFeature,
16
16
  getSupportedCpuArchitectures,
17
+ SupportedCpuArchitecture,
17
18
  } from '../../../common';
18
19
  import DiskEncryptionControlGroup from '../../../common/components/clusterConfiguration/DiskEncryptionFields/DiskEncryptionControlGroup';
19
20
  import { useTranslation } from '../../../common/hooks/use-translation-wrapper';
@@ -74,7 +75,7 @@ export const OcmClusterDetailsFormFields = ({
74
75
  const featureSupportLevelData = useSupportLevelsAPI(
75
76
  'features',
76
77
  values.openshiftVersion,
77
- values.cpuArchitecture,
78
+ values.cpuArchitecture as SupportedCpuArchitecture,
78
79
  );
79
80
  const cpuArchitectures = React.useMemo(
80
81
  () => getSupportedCpuArchitectures(isMultiArchSupported, cpuArchitecturesByVersionImage),
@@ -171,7 +172,7 @@ export const OcmClusterDetailsFormFields = ({
171
172
  ) : (
172
173
  <ExternalPlatformDropdown
173
174
  onChange={handleExternalPartnerIntegrationsChange}
174
- cpuArchitecture={values.cpuArchitecture}
175
+ cpuArchitecture={values.cpuArchitecture as SupportedCpuArchitecture}
175
176
  showOciOption={isOracleCloudPlatformIntegrationEnabled}
176
177
  featureSupportLevelData={featureSupportLevelData}
177
178
  isSNO={isSNO({ highAvailabilityMode })}
@@ -1,12 +1,13 @@
1
1
  import React from 'react';
2
2
  import { useFormikContext } from 'formik';
3
3
  import { useSelector } from 'react-redux';
4
- import { Alert, AlertVariant, Grid, Tooltip } from '@patternfly/react-core';
4
+ import { Grid, Tooltip } from '@patternfly/react-core';
5
5
  import { VirtualIPControlGroup, VirtualIPControlGroupProps } from './VirtualIPControlGroup';
6
6
  import {
7
7
  canBeDualStack,
8
8
  canSelectNetworkTypeSDN,
9
9
  clusterNetworksEqual,
10
+ CpuArchitecture,
10
11
  DUAL_STACK,
11
12
  HostSubnets,
12
13
  isSNO,
@@ -27,12 +28,15 @@ import { OcmCheckbox } from '../../ui/OcmFormFields';
27
28
  import { NetworkTypeControlGroup } from '../../../../common/components/clusterWizard/networkingSteps/NetworkTypeControlGroup';
28
29
  import {
29
30
  NewFeatureSupportLevelData,
31
+ NewFeatureSupportLevelMap,
30
32
  useNewFeatureSupportLevel,
31
33
  } from '../../../../common/components/newFeatureSupportLevels';
32
34
  import {
33
35
  Cluster,
34
36
  ClusterDefaultConfig,
37
+ PlatformType,
35
38
  } from '@openshift-assisted/types/assisted-installer-service';
39
+ import useSupportLevelsAPI from '../../../hooks/useSupportLevelsAPI';
36
40
 
37
41
  export type NetworkConfigurationProps = VirtualIPControlGroupProps & {
38
42
  hostSubnets: HostSubnets;
@@ -74,15 +78,30 @@ const getManagedNetworkingDisabledReason = (
74
78
  }
75
79
  };
76
80
 
77
- const getUserManagedDisabledReason = (featureSupportLevelData: NewFeatureSupportLevelData) => {
78
- if (!featureSupportLevelData.isFeatureSupported('USER_MANAGED_NETWORKING')) {
79
- return featureSupportLevelData.getFeatureDisabledReason('USER_MANAGED_NETWORKING');
81
+ const getUserManagedDisabledReason = (
82
+ featureSupportLevelContext: NewFeatureSupportLevelData,
83
+ platformType?: PlatformType,
84
+ featureSupportLevelMap?: NewFeatureSupportLevelMap | null,
85
+ ) => {
86
+ if (!featureSupportLevelContext.isFeatureSupported('USER_MANAGED_NETWORKING')) {
87
+ return featureSupportLevelContext.getFeatureDisabledReason(
88
+ 'USER_MANAGED_NETWORKING',
89
+ featureSupportLevelMap ?? undefined,
90
+ undefined,
91
+ platformType,
92
+ );
80
93
  }
81
94
  };
82
95
 
83
- const getClusterManagedDisabledReason = (featureSupportLevelData: NewFeatureSupportLevelData) => {
84
- if (!featureSupportLevelData.isFeatureSupported('CLUSTER_MANAGED_NETWORKING')) {
85
- return featureSupportLevelData.getFeatureDisabledReason('CLUSTER_MANAGED_NETWORKING');
96
+ const getClusterManagedDisabledReason = (
97
+ featureSupportLevelContext: NewFeatureSupportLevelData,
98
+ featureSupportLevelMap?: NewFeatureSupportLevelMap | null,
99
+ ) => {
100
+ if (!featureSupportLevelContext.isFeatureSupported('CLUSTER_MANAGED_NETWORKING')) {
101
+ return featureSupportLevelContext.getFeatureDisabledReason(
102
+ 'CLUSTER_MANAGED_NETWORKING',
103
+ featureSupportLevelMap ?? undefined,
104
+ );
86
105
  }
87
106
  };
88
107
 
@@ -90,6 +109,8 @@ const getManagedNetworkingState = (
90
109
  isDualStack: boolean,
91
110
  isOracleCloudInfrastructure: boolean,
92
111
  featureSupportLevelData: NewFeatureSupportLevelData,
112
+ platformType?: PlatformType,
113
+ featureSupportLevelMap?: NewFeatureSupportLevelMap | null,
93
114
  ): {
94
115
  isDisabled: boolean;
95
116
  clusterManagedDisabledReason?: string;
@@ -100,8 +121,15 @@ const getManagedNetworkingState = (
100
121
  isOracleCloudInfrastructure,
101
122
  featureSupportLevelData,
102
123
  );
103
- const cmnReason = getClusterManagedDisabledReason(featureSupportLevelData);
104
- const umnReason = getUserManagedDisabledReason(featureSupportLevelData);
124
+ const cmnReason = getClusterManagedDisabledReason(
125
+ featureSupportLevelData,
126
+ featureSupportLevelMap,
127
+ );
128
+ const umnReason = getUserManagedDisabledReason(
129
+ featureSupportLevelData,
130
+ platformType,
131
+ featureSupportLevelMap,
132
+ );
105
133
 
106
134
  return {
107
135
  isDisabled: !!(cmnReason || umnReason || networkingReason),
@@ -116,7 +144,13 @@ const NetworkConfiguration = ({
116
144
  isVipDhcpAllocationDisabled,
117
145
  defaultNetworkSettings,
118
146
  }: NetworkConfigurationProps) => {
119
- const featureSupportLevelData = useNewFeatureSupportLevel();
147
+ const featureSupportLevelContext = useNewFeatureSupportLevel();
148
+ const featureSupportLevelData = useSupportLevelsAPI(
149
+ 'features',
150
+ cluster.openshiftVersion,
151
+ cluster.cpuArchitecture as CpuArchitecture,
152
+ cluster.platform?.type,
153
+ );
120
154
  const { isViewerMode } = useSelector(selectCurrentClusterPermissionsState);
121
155
  const { setFieldValue, values, validateField } = useFormikContext<NetworkConfigurationValues>();
122
156
 
@@ -194,9 +228,11 @@ const NetworkConfiguration = ({
194
228
  getManagedNetworkingState(
195
229
  isDualStack,
196
230
  cluster.platform?.type === 'oci',
231
+ featureSupportLevelContext,
232
+ cluster.platform?.type,
197
233
  featureSupportLevelData,
198
234
  ),
199
- [isDualStack, cluster.platform?.type, featureSupportLevelData],
235
+ [isDualStack, cluster.platform?.type, featureSupportLevelContext, featureSupportLevelData],
200
236
  );
201
237
 
202
238
  return (
@@ -214,19 +250,6 @@ const NetworkConfiguration = ({
214
250
  />
215
251
  )}
216
252
 
217
- {!isUserManagedNetworking &&
218
- !featureSupportLevelData.isFeatureSupported('CLUSTER_MANAGED_NETWORKING_WITH_VMS') && (
219
- <Alert
220
- title="Your cluster will be subject to support limitations"
221
- variant={AlertVariant.info}
222
- isInline={true}
223
- data-testid="networking-vms-alert"
224
- >
225
- Some or all of your discovered hosts are virtual machines, so selecting the
226
- cluster-managed networking option will limit your installed cluster's support.
227
- </Alert>
228
- )}
229
-
230
253
  {(isSNOCluster || !isUserManagedNetworking) && (
231
254
  <StackTypeControlGroup
232
255
  clusterId={cluster.id}
@@ -255,7 +278,7 @@ const NetworkConfiguration = ({
255
278
  <VirtualIPControlGroup
256
279
  cluster={cluster}
257
280
  isVipDhcpAllocationDisabled={isVipDhcpAllocationDisabled}
258
- supportLevel={featureSupportLevelData.getFeatureSupportLevel('VIP_AUTO_ALLOC')}
281
+ supportLevel={featureSupportLevelContext.getFeatureSupportLevel('VIP_AUTO_ALLOC')}
259
282
  />
260
283
  )}
261
284
 
@@ -12,7 +12,13 @@ import {
12
12
  } from '@patternfly/react-core';
13
13
  import { CaretDownIcon } from '@patternfly/react-icons';
14
14
  import { useField } from 'formik';
15
- import { CpuArchitecture, DeveloperPreview, FeatureId, getFieldId } from '../../../../common';
15
+ import {
16
+ CpuArchitecture,
17
+ DeveloperPreview,
18
+ FeatureId,
19
+ SupportedCpuArchitecture,
20
+ getFieldId,
21
+ } from '../../../../common';
16
22
  import { ExternalPlaformIds, ExternalPlatformLabels, ExternalPlatformLinks } from './constants';
17
23
  import { PlatformType } from '@openshift-assisted/types/assisted-installer-service';
18
24
  import {
@@ -20,6 +26,7 @@ import {
20
26
  NewFeatureSupportLevelMap,
21
27
  useNewFeatureSupportLevel,
22
28
  } from '../../../../common/components/newFeatureSupportLevels';
29
+ import { architectureData } from '../CpuArchitectureDropdown';
23
30
 
24
31
  const INPUT_NAME = 'platform';
25
32
  const fieldId = getFieldId(INPUT_NAME, 'input');
@@ -27,7 +34,7 @@ const fieldId = getFieldId(INPUT_NAME, 'input');
27
34
  type ExternalPlatformDropdownProps = {
28
35
  showOciOption: boolean;
29
36
  onChange: (selectedPlatform: PlatformType) => void;
30
- cpuArchitecture?: string;
37
+ cpuArchitecture?: SupportedCpuArchitecture;
31
38
  featureSupportLevelData: NewFeatureSupportLevelMap | null;
32
39
  isSNO: boolean;
33
40
  };
@@ -43,7 +50,7 @@ const getDisabledReasonForExternalPlatform = (
43
50
  newFeatureSupportLevelContext: NewFeatureSupportLevelData,
44
51
  platform: PlatformType,
45
52
  featureSupportLevelData?: NewFeatureSupportLevelMap | null,
46
- cpuArchitecture?: string,
53
+ cpuArchitecture?: SupportedCpuArchitecture,
47
54
  ): string | undefined => {
48
55
  if (!isSNO) {
49
56
  return newFeatureSupportLevelContext.getFeatureDisabledReason(
@@ -66,7 +73,7 @@ const getExternalPlatformTypes = (
66
73
  isSNO: boolean,
67
74
  newFeatureSupportLevelContext: NewFeatureSupportLevelData,
68
75
  featureSupportLevelData?: NewFeatureSupportLevelMap | null,
69
- cpuArchitecture?: string,
76
+ cpuArchitecture?: SupportedCpuArchitecture,
70
77
  ): Partial<{ [key in PlatformType]: ExternalPlatformInfo }> => {
71
78
  const platforms = ['none', 'nutanix', showOciOption && 'oci', 'vsphere'] as PlatformType[];
72
79
 
@@ -111,7 +118,7 @@ export const ExternalPlatformDropdown = ({
111
118
  >({});
112
119
 
113
120
  const tooltipDropdownDisabled = `Platform integration is not supported when ${
114
- cpuArchitecture || ''
121
+ cpuArchitecture ? architectureData[cpuArchitecture].label : ''
115
122
  } is selected`;
116
123
 
117
124
  const handleClick = (event: MouseEvent<HTMLButtonElement>, href: string) => {
@@ -142,8 +142,9 @@ const AssistedInstallerDetailCard = ({
142
142
  <NewFeatureSupportLevelProvider
143
143
  loadingUi={<LoadingCard />}
144
144
  cluster={cluster}
145
- cpuArchitecture={infraEnv.cpuArchitecture}
145
+ cpuArchitecture={infraEnv.cpuArchitecture as CpuArchitecture}
146
146
  openshiftVersion={cluster.openshiftVersion}
147
+ platformType={cluster.platform?.type}
147
148
  >
148
149
  {content}
149
150
  </NewFeatureSupportLevelProvider>
@@ -45,8 +45,9 @@ const AssistedInstallerExtraDetailCard: React.FC<AssistedInstallerExtraDetailCar
45
45
  <NewFeatureSupportLevelProvider
46
46
  loadingUi={<div />}
47
47
  cluster={cluster}
48
- cpuArchitecture={infraEnv?.cpuArchitecture}
48
+ cpuArchitecture={infraEnv?.cpuArchitecture as CpuArchitecture}
49
49
  openshiftVersion={cluster.openshiftVersion}
50
+ platformType={cluster.platform?.type}
50
51
  >
51
52
  <Grid className="pf-u-mt-md">
52
53
  <ClusterProperties cluster={cluster} externalMode />
@@ -10,7 +10,7 @@ import {
10
10
 
11
11
  import { useDefaultConfiguration } from '../clusterConfiguration/ClusterDefaultConfigurationContext';
12
12
  import { ExternalLinkAltIcon } from '@patternfly/react-icons';
13
- import { calculateClusterDateDiff } from '../../../common/sevices/DateAndTime';
13
+ import { calculateClusterDateDiff } from '../../../common/services/DateAndTime';
14
14
  import { isInOcm } from '../../api';
15
15
  import { ExternalPlatformLinks } from '../clusterConfiguration/platformIntegration/constants';
16
16
  import { useNewFeatureSupportLevel } from '../../../common/components/newFeatureSupportLevels';
@@ -171,8 +171,9 @@ const ClusterPageGeneric: React.FC<{ clusterId: string; showBreadcrumbs?: boolea
171
171
  <NewFeatureSupportLevelProvider
172
172
  loadingUi={<ClusterLoading />}
173
173
  cluster={cluster}
174
- cpuArchitecture={infraEnv.cpuArchitecture}
174
+ cpuArchitecture={infraEnv.cpuArchitecture as CpuArchitecture}
175
175
  openshiftVersion={cluster.openshiftVersion}
176
+ platformType={cluster.platform?.type}
176
177
  >
177
178
  {/* TODO(mlibra): Will be reworked within https://issues.redhat.com/browse/AGENT-522
178
179
  <RebootNodeZeroModal cluster={cluster} />
@@ -3,6 +3,7 @@ import {
3
3
  ActiveFeatureConfiguration,
4
4
  CpuArchitecture,
5
5
  FeatureId,
6
+ SupportedCpuArchitecture,
6
7
  getDefaultCpuArchitecture,
7
8
  } from '../../../common';
8
9
  import { useOpenshiftVersions, usePullSecret } from '../../hooks';
@@ -16,6 +17,7 @@ import {
16
17
  import useSupportLevelsAPI from '../../hooks/useSupportLevelsAPI';
17
18
  import {
18
19
  Cluster,
20
+ PlatformType,
19
21
  SupportLevel,
20
22
  SupportLevels,
21
23
  } from '@openshift-assisted/types/assisted-installer-service';
@@ -25,7 +27,8 @@ export type NewSupportLevelProviderProps = PropsWithChildren<{
25
27
  openshiftVersion?: string;
26
28
  loadingUi: React.ReactNode;
27
29
  cluster?: Cluster;
28
- cpuArchitecture?: string;
30
+ cpuArchitecture?: CpuArchitecture;
31
+ platformType?: PlatformType;
29
32
  }>;
30
33
 
31
34
  export const getFeatureSupported = (featureSupportLevels: SupportLevels, featureId: FeatureId) => {
@@ -38,6 +41,7 @@ export const NewFeatureSupportLevelProvider: React.FC<NewSupportLevelProviderPro
38
41
  loadingUi,
39
42
  cpuArchitecture,
40
43
  openshiftVersion,
44
+ platformType,
41
45
  }) => {
42
46
  const { loading: loadingOCPVersions } = useOpenshiftVersions();
43
47
  const pullSecret = usePullSecret();
@@ -50,7 +54,12 @@ export const NewFeatureSupportLevelProvider: React.FC<NewSupportLevelProviderPro
50
54
  pullSecret,
51
55
  cluster?.openshiftVersion,
52
56
  );
53
- const featureSupportLevels = useSupportLevelsAPI('features', openshiftVersion, cpuArchitecture);
57
+ const featureSupportLevels = useSupportLevelsAPI(
58
+ 'features',
59
+ openshiftVersion,
60
+ cpuArchitecture,
61
+ platformType,
62
+ );
54
63
 
55
64
  const supportLevelData = React.useMemo<NewFeatureSupportLevelMap>(() => {
56
65
  if (!featureSupportLevels) {
@@ -108,7 +117,8 @@ export const NewFeatureSupportLevelProvider: React.FC<NewSupportLevelProviderPro
108
117
  (
109
118
  featureId: FeatureId,
110
119
  supportLevelDataNew?: NewFeatureSupportLevelMap,
111
- cpuArchitecture?: string,
120
+ cpuArchitecture?: SupportedCpuArchitecture,
121
+ platformType?: PlatformType,
112
122
  ) => {
113
123
  const isSupported = isFeatureSupportedCallback(featureId, supportLevelDataNew);
114
124
  return getNewFeatureDisabledReason(
@@ -117,6 +127,7 @@ export const NewFeatureSupportLevelProvider: React.FC<NewSupportLevelProviderPro
117
127
  activeFeatureConfiguration,
118
128
  isSupported,
119
129
  cpuArchitecture,
130
+ platformType,
120
131
  );
121
132
  },
122
133
  [isFeatureSupportedCallback, cluster, activeFeatureConfiguration],
@@ -93,14 +93,7 @@ export const LimitedSupportedCluster = ({
93
93
  <>
94
94
  <InfoCircleIcon size="sm" color="var(--pf-global--info-color--100)" />
95
95
  &nbsp;Your cluster will be subject to support limitations because it includes:
96
- <TextList>
97
- {getPreviewFeatureList(clusterFeatureSupportLevels)}
98
- {clusterFeatureSupportLevels['CLUSTER_MANAGED_NETWORKING_WITH_VMS'] === 'unsupported' && (
99
- <TextListItem>
100
- Cluster-managed networking with some or all discovered hosts as virtual machines
101
- </TextListItem>
102
- )}
103
- </TextList>
96
+ <TextList>{getPreviewFeatureList(clusterFeatureSupportLevels)}</TextList>
104
97
  </>
105
98
  )}
106
99
  </TextContent>
@@ -7,7 +7,12 @@ import {
7
7
  SupportedCpuArchitecture,
8
8
  } from '../../../common';
9
9
  import { architectureData } from '../clusterConfiguration/CpuArchitectureDropdown';
10
- import { Cluster, SupportLevel } from '@openshift-assisted/types/assisted-installer-service';
10
+ import {
11
+ Cluster,
12
+ PlatformType,
13
+ SupportLevel,
14
+ } from '@openshift-assisted/types/assisted-installer-service';
15
+ import { ExternalPlatformLabels } from '../clusterConfiguration/platformIntegration/constants';
11
16
 
12
17
  const CNV_OPERATOR_LABEL = 'Openshift Virtualization';
13
18
  const LVMS_OPERATOR_LABEL = 'Logical Volume Manager Storage';
@@ -149,7 +154,8 @@ export const getNewFeatureDisabledReason = (
149
154
  cluster: Cluster | undefined,
150
155
  activeFeatureConfiguration: ActiveFeatureConfiguration,
151
156
  isSupported: boolean,
152
- cpuArchitecture?: string,
157
+ cpuArchitecture?: SupportedCpuArchitecture,
158
+ platformType?: PlatformType,
153
159
  ): string | undefined => {
154
160
  switch (featureId) {
155
161
  case 'SNO': {
@@ -171,7 +177,9 @@ export const getNewFeatureDisabledReason = (
171
177
  return getNetworkTypeSelectionDisabledReason(cluster);
172
178
  }
173
179
  case 'CLUSTER_MANAGED_NETWORKING': {
174
- return 'Cluster-managed networking is not supported for ARM architecture with this version of OpenShift.';
180
+ return `Cluster-managed networking is not supported when using ${
181
+ platformType ? ExternalPlatformLabels[platformType] : ''
182
+ }`;
175
183
  }
176
184
  case 'EXTERNAL_PLATFORM_OCI': {
177
185
  return getOciDisabledReason(cpuArchitecture, isSupported);
@@ -191,6 +199,13 @@ export const getNewFeatureDisabledReason = (
191
199
  return `Integration with vSphere is not available with the selected CPU architecture.`;
192
200
  }
193
201
  }
202
+ case 'USER_MANAGED_NETWORKING': {
203
+ if (!isSupported) {
204
+ return `User-Managed Networking is not supported when using ${
205
+ platformType ? ExternalPlatformLabels[platformType] : ''
206
+ }`;
207
+ }
208
+ }
194
209
  default: {
195
210
  return undefined;
196
211
  }
@@ -35,6 +35,7 @@ const HostRowDetailExpand = ({ obj: host }: ExpandComponentProps<Host>) => (
35
35
  key={host.id}
36
36
  host={host}
37
37
  AdditionalNTPSourcesDialogToggleComponent={AdditionalNTPSourcesDialogToggle}
38
+ hideStorage
38
39
  />
39
40
  );
40
41
 
@@ -1,11 +1,12 @@
1
1
  import React from 'react';
2
- import { useAlerts } from '../../common';
2
+ import { CpuArchitecture, useAlerts } from '../../common';
3
3
  import {
4
4
  ArchitectureSupportLevelMap,
5
5
  NewFeatureSupportLevelMap,
6
6
  } from '../../common/components/newFeatureSupportLevels';
7
7
  import { getApiErrorMessage, handleApiError } from '../api';
8
8
  import NewFeatureSupportLevelsAPI from '../../common/api/assisted-service/NewFeatureSupportLevelsAPI';
9
+ import { PlatformType } from '@openshift-assisted/types/./assisted-installer-service';
9
10
 
10
11
  type SupportLevelAPIResources = 'architectures' | 'features';
11
12
  type UseSupportLevelAPIResponse<T extends SupportLevelAPIResources> = T extends 'architectures'
@@ -17,7 +18,8 @@ type UseSupportLevelAPIResponse<T extends SupportLevelAPIResources> = T extends
17
18
  export default function useSupportLevelsAPI<T extends SupportLevelAPIResources>(
18
19
  resourceKind: T,
19
20
  openshiftVersion?: string,
20
- cpuArchitecture?: string,
21
+ cpuArchitecture?: CpuArchitecture,
22
+ platformType?: PlatformType,
21
23
  ): UseSupportLevelAPIResponse<T> | null {
22
24
  const [cpuArchitectures, setCpuArchitectures] =
23
25
  React.useState<ArchitectureSupportLevelMap | null>(null);
@@ -45,11 +47,16 @@ export default function useSupportLevelsAPI<T extends SupportLevelAPIResources>(
45
47
  );
46
48
 
47
49
  const fetchFeaturesSupportLevels = React.useCallback(
48
- async (openshiftVersion: string, cpuArchitecture?: string) => {
50
+ async (
51
+ openshiftVersion: string,
52
+ cpuArchitecture?: CpuArchitecture,
53
+ platformType?: PlatformType,
54
+ ) => {
49
55
  try {
50
56
  const { data: features } = await NewFeatureSupportLevelsAPI.featuresSupportLevel(
51
57
  openshiftVersion,
52
58
  cpuArchitecture,
59
+ platformType,
53
60
  );
54
61
  setFeatures(features.features);
55
62
  } catch (e) {
@@ -70,7 +77,7 @@ export default function useSupportLevelsAPI<T extends SupportLevelAPIResources>(
70
77
  if (resourceKind === 'architectures') {
71
78
  void fetchArchitecturesSupportLevels(openshiftVersion);
72
79
  } else {
73
- void fetchFeaturesSupportLevels(openshiftVersion, cpuArchitecture);
80
+ void fetchFeaturesSupportLevels(openshiftVersion, cpuArchitecture, platformType);
74
81
  }
75
82
  }
76
83
  }, [
@@ -79,6 +86,7 @@ export default function useSupportLevelsAPI<T extends SupportLevelAPIResources>(
79
86
  fetchArchitecturesSupportLevels,
80
87
  fetchFeaturesSupportLevels,
81
88
  resourceKind,
89
+ platformType,
82
90
  ]);
83
91
 
84
92
  if (resourceKind === 'architectures') {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "dependencies": {
3
- "@openshift-assisted/locales": "2.9.7-cim",
4
- "@openshift-assisted/types": "2.9.7-cim",
3
+ "@openshift-assisted/locales": "2.9.8-cim",
4
+ "@openshift-assisted/types": "2.9.8-cim",
5
5
  "axios-case-converter": "^0.11.1",
6
6
  "camel-case": "^4.1.2",
7
7
  "cidr-tools": "^4.3.0",
@@ -127,5 +127,5 @@
127
127
  ]
128
128
  }
129
129
  },
130
- "version": "2.9.7-cim"
130
+ "version": "2.9.8-cim"
131
131
  }
@@ -1 +0,0 @@
1
- {"version":3,"file":"DateAndTime.d.ts","sourceRoot":"","sources":["../../../../lib/common/sevices/DateAndTime.tsx"],"names":[],"mappings":"AAEA,wBAAgB,sBAAsB,CAAC,SAAS,EAAE,MAAM,UAIvD;AAED,wBAAgB,wBAAwB,CAAC,oBAAoB,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM,UAM1F"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"DateAndTime.js","sourceRoot":"","sources":["../../../../lib/common/sevices/DateAndTime.tsx"],"names":[],"mappings":";;;AAAA,mDAA4D;AAE5D,SAAgB,sBAAsB,CAAC,SAAiB;IACtD,MAAM,UAAU,GAAG,IAAI,IAAI,CAAC,SAAS,CAAC,CAAC;IACvC,MAAM,KAAK,GAAG,IAAI,IAAI,EAAE,CAAC;IACzB,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,OAAO,EAAE,GAAG,UAAU,CAAC,OAAO,EAAE,CAAC,GAAG,sBAAU,CAAC,CAAC;AACnF,CAAC;AAJD,wDAIC;AAED,SAAgB,wBAAwB,CAAC,oBAA4B,EAAE,WAAoB;IACzF,IAAI,WAAW,IAAI,WAAW,KAAK,qBAAS,EAAE;QAC5C,OAAO,oBAAoB,GAAG,sBAAsB,CAAC,WAAW,CAAC,CAAC;KACnE;SAAM;QACL,OAAO,oBAAoB,CAAC;KAC7B;AACH,CAAC;AAND,4DAMC"}