@openshift-assisted/ui-lib 2.38.2 → 2.38.3

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 (64) hide show
  1. package/build/@types/cim/components/ClusterDeployment/wizardTransition.d.ts +1 -1
  2. package/build/@types/cim/components/ClusterDeployment/wizardTransition.d.ts.map +1 -1
  3. package/build/@types/common/config/constants.d.ts +8 -0
  4. package/build/@types/common/config/constants.d.ts.map +1 -1
  5. package/build/@types/common/config/docs_links.d.ts.map +1 -1
  6. package/build/@types/common/types/clusters.d.ts +2 -0
  7. package/build/@types/common/types/clusters.d.ts.map +1 -1
  8. package/build/@types/ocm/components/clusterConfiguration/operators/AmdGpuCheckbox.d.ts +6 -0
  9. package/build/@types/ocm/components/clusterConfiguration/operators/AmdGpuCheckbox.d.ts.map +1 -0
  10. package/build/@types/ocm/components/clusterConfiguration/operators/KmmCheckbox.d.ts +6 -0
  11. package/build/@types/ocm/components/clusterConfiguration/operators/KmmCheckbox.d.ts.map +1 -0
  12. package/build/@types/ocm/components/clusterConfiguration/operators/MtvOperatorCheckbox.d.ts.map +1 -1
  13. package/build/@types/ocm/components/clusterConfiguration/operators/OpenshiftAIAmdRequirements.d.ts +4 -0
  14. package/build/@types/ocm/components/clusterConfiguration/operators/OpenshiftAIAmdRequirements.d.ts.map +1 -0
  15. package/build/@types/ocm/components/clusterConfiguration/operators/OpenshiftAINvidiaRequirements.d.ts.map +1 -1
  16. package/build/@types/ocm/components/clusterConfiguration/operators/SupportedOperators.d.ts.map +1 -1
  17. package/build/@types/ocm/components/clusterWizard/Operators.d.ts.map +1 -1
  18. package/build/@types/ocm/components/clusterWizard/OperatorsStep.d.ts.map +1 -1
  19. package/build/@types/ocm/components/clusterWizard/wizardTransition.d.ts +1 -1
  20. package/build/@types/ocm/components/clusterWizard/wizardTransition.d.ts.map +1 -1
  21. package/build/@types/ocm/services/OperatorsService.d.ts.map +1 -1
  22. package/build/cjs/common/config/constants.js +13 -1
  23. package/build/cjs/common/config/constants.js.map +1 -1
  24. package/build/cjs/common/config/docs_links.js +8 -1
  25. package/build/cjs/common/config/docs_links.js.map +1 -1
  26. package/build/cjs/common/types/clusters.js.map +1 -1
  27. package/build/cjs/ocm/components/clusterConfiguration/operators/AmdGpuCheckbox.js +36 -0
  28. package/build/cjs/ocm/components/clusterConfiguration/operators/AmdGpuCheckbox.js.map +1 -0
  29. package/build/cjs/ocm/components/clusterConfiguration/operators/KmmCheckbox.js +34 -0
  30. package/build/cjs/ocm/components/clusterConfiguration/operators/KmmCheckbox.js.map +1 -0
  31. package/build/cjs/ocm/components/clusterConfiguration/operators/MtvOperatorCheckbox.js +2 -0
  32. package/build/cjs/ocm/components/clusterConfiguration/operators/MtvOperatorCheckbox.js.map +1 -1
  33. package/build/cjs/ocm/components/clusterConfiguration/operators/NvidiaGpuCheckbox.js +1 -1
  34. package/build/cjs/ocm/components/clusterConfiguration/operators/NvidiaGpuCheckbox.js.map +1 -1
  35. package/build/cjs/ocm/components/clusterConfiguration/operators/OpenshiftAIAmdRequirements.js +32 -0
  36. package/build/cjs/ocm/components/clusterConfiguration/operators/OpenshiftAIAmdRequirements.js.map +1 -0
  37. package/build/cjs/ocm/components/clusterConfiguration/operators/OpenshiftAINvidiaRequirements.js +2 -1
  38. package/build/cjs/ocm/components/clusterConfiguration/operators/OpenshiftAINvidiaRequirements.js.map +1 -1
  39. package/build/cjs/ocm/components/clusterConfiguration/operators/SupportedOperators.js +6 -0
  40. package/build/cjs/ocm/components/clusterConfiguration/operators/SupportedOperators.js.map +1 -1
  41. package/build/cjs/ocm/components/clusterWizard/Operators.js +2 -0
  42. package/build/cjs/ocm/components/clusterWizard/Operators.js.map +1 -1
  43. package/build/cjs/ocm/components/clusterWizard/OperatorsStep.js +37 -23
  44. package/build/cjs/ocm/components/clusterWizard/OperatorsStep.js.map +1 -1
  45. package/build/cjs/ocm/components/clusterWizard/wizardTransition.js +2 -0
  46. package/build/cjs/ocm/components/clusterWizard/wizardTransition.js.map +1 -1
  47. package/build/cjs/ocm/services/OperatorsService.js +2 -0
  48. package/build/cjs/ocm/services/OperatorsService.js.map +1 -1
  49. package/lib/common/config/constants.ts +12 -0
  50. package/lib/common/config/docs_links.ts +7 -2
  51. package/lib/common/types/clusters.ts +2 -0
  52. package/lib/ocm/components/clusterConfiguration/operators/AmdGpuCheckbox.tsx +70 -0
  53. package/lib/ocm/components/clusterConfiguration/operators/KmmCheckbox.tsx +68 -0
  54. package/lib/ocm/components/clusterConfiguration/operators/MtvOperatorCheckbox.tsx +1 -0
  55. package/lib/ocm/components/clusterConfiguration/operators/NvidiaGpuCheckbox.tsx +1 -1
  56. package/lib/ocm/components/clusterConfiguration/operators/OpenshiftAIAmdRequirements.tsx +36 -0
  57. package/lib/ocm/components/clusterConfiguration/operators/OpenshiftAINvidiaRequirements.tsx +2 -1
  58. package/lib/ocm/components/clusterConfiguration/operators/SupportedOperators.tsx +8 -0
  59. package/lib/ocm/components/clusterWizard/Operators.tsx +4 -0
  60. package/lib/ocm/components/clusterWizard/OperatorsStep.tsx +50 -41
  61. package/lib/ocm/components/clusterWizard/_wizardTransition.test.ts +10 -0
  62. package/lib/ocm/components/clusterWizard/wizardTransition.ts +2 -0
  63. package/lib/ocm/services/OperatorsService.tsx +4 -0
  64. package/package.json +3 -3
@@ -14,10 +14,14 @@ import AuthorinoCheckbox from './AuthorinoCheckbox';
14
14
  import PipelinesCheckbox from './PipelinesChekbox';
15
15
  import ServiceMeshCheckbox from './ServicemeshCheckbox';
16
16
  import NvidiaGpuCheckbox from './NvidiaGpuCheckbox';
17
+ import AmdGpuCheckbox from './AmdGpuCheckbox';
18
+ import KmmCheckbox from './KmmCheckbox';
17
19
  import {
18
20
  FeatureId,
21
+ OPERATOR_NAME_AMD_GPU,
19
22
  OPERATOR_NAME_AUTHORINO,
20
23
  OPERATOR_NAME_CNV,
24
+ OPERATOR_NAME_KMM,
21
25
  OPERATOR_NAME_LSO,
22
26
  OPERATOR_NAME_LVM,
23
27
  OPERATOR_NAME_MCE,
@@ -66,6 +70,8 @@ export const operatorComponentMap: Record<string, (props: OperatorProps) => JSX.
66
70
  pipelines: (props) => <PipelinesCheckbox {...props} />,
67
71
  servicemesh: (props) => <ServiceMeshCheckbox {...props} />,
68
72
  'nvidia-gpu': (props) => <NvidiaGpuCheckbox {...props} />,
73
+ 'amd-gpu': (props) => <AmdGpuCheckbox {...props} />,
74
+ kmm: (props) => <KmmCheckbox {...props} />,
69
75
  };
70
76
 
71
77
  export const mapOperatorsToFieldIds: { [key: string]: string } = {
@@ -84,6 +90,8 @@ export const mapOperatorsToFieldIds: { [key: string]: string } = {
84
90
  [OPERATOR_NAME_PIPELINES]: 'usePipelines',
85
91
  [OPERATOR_NAME_SERVICEMESH]: 'useServicemesh',
86
92
  [OPERATOR_NAME_NVIDIA_GPU]: 'useNvidiaGpu',
93
+ [OPERATOR_NAME_AMD_GPU]: 'useAmdGpu',
94
+ [OPERATOR_NAME_KMM]: 'useKmm',
87
95
  };
88
96
 
89
97
  export const mapOperatorIdToFeatureId: { [key: string]: FeatureId } = {
@@ -5,8 +5,10 @@ import { Formik, FormikConfig, useFormikContext } from 'formik';
5
5
  import {
6
6
  ClusterWizardStep,
7
7
  getFormikErrorFields,
8
+ OPERATOR_NAME_AMD_GPU,
8
9
  OPERATOR_NAME_AUTHORINO,
9
10
  OPERATOR_NAME_CNV,
11
+ OPERATOR_NAME_KMM,
10
12
  OPERATOR_NAME_LSO,
11
13
  OPERATOR_NAME_LVM,
12
14
  OPERATOR_NAME_MCE,
@@ -56,6 +58,8 @@ export const getOperatorsInitialValues = (
56
58
  usePipelines: isOperatorEnabled([OPERATOR_NAME_PIPELINES]),
57
59
  useServicemesh: isOperatorEnabled([OPERATOR_NAME_SERVICEMESH]),
58
60
  useNvidiaGpu: isOperatorEnabled([OPERATOR_NAME_NVIDIA_GPU]),
61
+ useAmdGpu: isOperatorEnabled([OPERATOR_NAME_AMD_GPU]),
62
+ useKmm: isOperatorEnabled([OPERATOR_NAME_KMM]),
59
63
  };
60
64
  };
61
65
 
@@ -49,6 +49,7 @@ import {
49
49
  getOpenShiftAIIncompatibleWithLvmsReason,
50
50
  } from '../featureSupportLevels/featureStateUtils';
51
51
  import OpenshiftAINvidiaRequirements from '../clusterConfiguration/operators/OpenshiftAINvidiaRequirements';
52
+ import OpenshiftAIAmdRequirements from '../clusterConfiguration/operators/OpenshiftAIAmdRequirements';
52
53
  import VirtualizationRequirements from '../clusterConfiguration/operators/VirtualizationRequirements';
53
54
 
54
55
  const operatorsThatCanNotBeInstalledAlone = [
@@ -78,8 +79,6 @@ export const OperatorsStep = (props: ClusterOperatorProps) => {
78
79
  const { updateUISettings, uiSettings } = useClusterWizardContext();
79
80
  const { values, setFieldValue } = useFormikContext<OperatorsValues>();
80
81
  const featureSupportLevelData = useNewFeatureSupportLevel();
81
- const [hasUnsupportedOperators, setHasUnsupportedOperators] = useState<boolean>(false);
82
- const [hasIncompatibleOperators, setHasIncompatibleOperators] = useState<boolean>(false);
83
82
 
84
83
  useEffect(() => {
85
84
  const fetchBundles = async () => {
@@ -191,23 +190,34 @@ export const OperatorsStep = (props: ClusterOperatorProps) => {
191
190
  setBundleOperators(newBundleOperators);
192
191
  };
193
192
 
194
- const getBundleLabel = (title: string | undefined) => {
193
+ const getBundleLabel = (bundle: Bundle) => {
194
+ let requirements: React.ReactElement | null = null;
195
+ switch (bundle.id) {
196
+ case 'virtualization':
197
+ requirements = <VirtualizationRequirements />;
198
+ break;
199
+ case 'openshift-ai-nvidia':
200
+ requirements = <OpenshiftAINvidiaRequirements />;
201
+ break;
202
+ case 'openshift-ai-amd':
203
+ requirements = <OpenshiftAIAmdRequirements />;
204
+ break;
205
+ }
206
+
195
207
  return (
196
208
  <>
197
- <span>{title} </span>
198
- <PopoverIcon
199
- component={'a'}
200
- bodyContent={
201
- <>
202
- <span style={{ fontSize: '1.1em' }}>{'Requirements and dependencies'}</span>
203
- {title === 'Virtualization' ? (
204
- <VirtualizationRequirements />
205
- ) : (
206
- <OpenshiftAINvidiaRequirements />
207
- )}
208
- </>
209
- }
210
- />
209
+ <span>{bundle.title} </span>
210
+ {requirements && (
211
+ <PopoverIcon
212
+ component={'a'}
213
+ bodyContent={
214
+ <>
215
+ <span style={{ fontSize: '1.1em' }}>{'Requirements and dependencies'}</span>
216
+ {requirements}
217
+ </>
218
+ }
219
+ />
220
+ )}
211
221
  </>
212
222
  );
213
223
  };
@@ -265,28 +275,20 @@ export const OperatorsStep = (props: ClusterOperatorProps) => {
265
275
  );
266
276
 
267
277
  const bundleHasOperatorsNotCompatibles = React.useCallback(
268
- (operators: string[] | undefined, values: OperatorsValues) => {
269
- return (
270
- operators?.some((operatorKey) => {
271
- const disabledReason = getDisabledReasonForOperator(operatorKey, values);
272
- console.log(disabledReason);
273
- return disabledReason !== undefined;
274
- }) ?? false
275
- );
278
+ (operators: string[] | undefined, values: OperatorsValues, isSelected: boolean) => {
279
+ if (!isSelected) {
280
+ return (
281
+ operators?.some((operatorKey) => {
282
+ const disabledReason = getDisabledReasonForOperator(operatorKey, values);
283
+ console.log(disabledReason);
284
+ return disabledReason !== undefined;
285
+ }) ?? false
286
+ );
287
+ } else return false;
276
288
  },
277
289
  [getDisabledReasonForOperator],
278
290
  );
279
291
 
280
- useEffect(() => {
281
- setHasUnsupportedOperators(
282
- bundles.some((bundle) => bundleHasOperatorsNotSupported(bundle.operators)),
283
- );
284
-
285
- setHasIncompatibleOperators(
286
- bundles.some((bundle) => bundleHasOperatorsNotCompatibles(bundle.operators, values)),
287
- );
288
- }, [values, bundles, bundleHasOperatorsNotSupported, bundleHasOperatorsNotCompatibles]);
289
-
290
292
  return (
291
293
  <Stack hasGutter data-testid={'operators-page'}>
292
294
  <StackItem>
@@ -316,14 +318,20 @@ export const OperatorsStep = (props: ClusterOperatorProps) => {
316
318
  {/* Mostrar bundles como tarjetas */}
317
319
  <Gallery hasGutter minWidths={{ default: '350px' }} maxWidths={{ default: '2fr' }}>
318
320
  {filteredBundles.map((bundle) => {
319
- const isSnoAndBlockedBundle = isSNO && bundle.id === 'openshift-ai-nvidia';
320
-
321
+ const isSnoAndBlockedBundle =
322
+ isSNO && (bundle.id === 'openshift-ai-nvidia' || bundle.id === 'openshift-ai-amd');
323
+ const hasUnsupportedOperators = bundleHasOperatorsNotSupported(bundle.operators);
324
+ const hasIncompatibleOperators = bundleHasOperatorsNotCompatibles(
325
+ bundle.operators,
326
+ values,
327
+ bundle.id ? selectedBundles[bundle.id] : false,
328
+ );
321
329
  const tooltipContent = hasUnsupportedOperators
322
330
  ? 'Some operators in this bundle are not supported with the current configuration.'
323
- : hasIncompatibleOperators
324
- ? 'Some operators in this bundle can not be installed with some single operators selected.'
325
331
  : isSnoAndBlockedBundle
326
332
  ? 'This bundle is not available when deploying a Single Node OpenShift.'
333
+ : hasIncompatibleOperators
334
+ ? 'Some operators in this bundle can not be installed with some single operators selected.'
327
335
  : '';
328
336
 
329
337
  return (
@@ -352,7 +360,7 @@ export const OperatorsStep = (props: ClusterOperatorProps) => {
352
360
  }}
353
361
  >
354
362
  <div style={{ display: 'flex', alignItems: 'center', gap: '8px' }}>
355
- {getBundleLabel(bundle.title)}
363
+ {getBundleLabel(bundle)}
356
364
  </div>
357
365
  <Checkbox
358
366
  id={`bundle-${bundle.id || ''}`}
@@ -377,7 +385,8 @@ export const OperatorsStep = (props: ClusterOperatorProps) => {
377
385
 
378
386
  {/* Badge aligned to the bottom-left */}
379
387
  <div style={{ marginTop: '10px', alignSelf: 'flex-end', height: '25px' }}>
380
- {bundle.id === 'openshift-ai-nvidia' && (
388
+ {(bundle.id === 'openshift-ai-nvidia' ||
389
+ bundle.id === 'openshift-ai-amd') && (
381
390
  <NewFeatureSupportLevelBadge
382
391
  featureId="OPENSHIFT_AI"
383
392
  supportLevel="dev-preview"
@@ -92,6 +92,11 @@ const validationInfoHostsDisovery: ValidationsInfo = {
92
92
  message: 'a validation unrelated to the canNextHostDiscovery',
93
93
  status: 'error',
94
94
  },
95
+ {
96
+ id: 'amd-gpu-requirements-satisfied',
97
+ message: 'a validation message',
98
+ status: 'success',
99
+ },
95
100
  ],
96
101
  };
97
102
 
@@ -205,6 +210,11 @@ const flatValidationHostsDiscovery: HostValidation[] = [
205
210
  message: 'a host validation message',
206
211
  status: 'success',
207
212
  },
213
+ {
214
+ id: 'amd-gpu-requirements-satisfied',
215
+ message: 'a host validation message',
216
+ status: 'success',
217
+ },
208
218
  ];
209
219
 
210
220
  const flatValidationHostsStorage: HostValidation[] = [
@@ -174,6 +174,7 @@ const hostDiscoveryStepValidationsMap: WizardStepValidationMap = {
174
174
  'nvidia-gpu-requirements-satisfied',
175
175
  'openshift-ai-requirements-satisfied',
176
176
  'osc-requirements-satisfied',
177
+ 'amd-gpu-requirements-satisfied',
177
178
  ],
178
179
  },
179
180
  host: {
@@ -189,6 +190,7 @@ const hostDiscoveryStepValidationsMap: WizardStepValidationMap = {
189
190
  'nvidia-gpu-requirements-satisfied',
190
191
  'openshift-ai-requirements-satisfied',
191
192
  'osc-requirements-satisfied',
193
+ 'amd-gpu-requirements-satisfied',
192
194
  ],
193
195
  },
194
196
  softValidationIds: ['no-skip-installation-disk', 'no-skip-missing-disk', 'compatible-agent'],
@@ -16,6 +16,8 @@ import {
16
16
  OPERATOR_NAME_PIPELINES,
17
17
  OPERATOR_NAME_SERVICEMESH,
18
18
  OPERATOR_NAME_NVIDIA_GPU,
19
+ OPERATOR_NAME_AMD_GPU,
20
+ OPERATOR_NAME_KMM,
19
21
  } from '../../common';
20
22
  import { getOlmOperatorCreateParamsByName } from '../components/clusters/utils';
21
23
  import {
@@ -52,6 +54,8 @@ const OperatorsService = {
52
54
  setOperator(OPERATOR_NAME_PIPELINES, values.usePipelines);
53
55
  setOperator(OPERATOR_NAME_SERVICEMESH, values.useServicemesh);
54
56
  setOperator(OPERATOR_NAME_NVIDIA_GPU, values.useNvidiaGpu);
57
+ setOperator(OPERATOR_NAME_AMD_GPU, values.useAmdGpu);
58
+ setOperator(OPERATOR_NAME_KMM, values.useKmm);
55
59
 
56
60
  return Object.values(enabledOlmOperatorsByName);
57
61
  },
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "dependencies": {
3
- "@openshift-assisted/locales": "2.38.2",
4
- "@openshift-assisted/types": "2.38.2",
3
+ "@openshift-assisted/locales": "2.38.3",
4
+ "@openshift-assisted/types": "2.38.3",
5
5
  "@openshift-console/dynamic-plugin-sdk": "0.0.3",
6
6
  "@patternfly/patternfly": "5.2.0",
7
7
  "@patternfly/react-code-editor": "5.2.0",
@@ -139,5 +139,5 @@
139
139
  ]
140
140
  }
141
141
  },
142
- "version": "2.38.2"
142
+ "version": "2.38.3"
143
143
  }