@openshift-assisted/ui-lib 2.42.0 → 2.42.2

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 (68) hide show
  1. package/build/@types/common/components/newFeatureSupportLevels/types.d.ts +1 -1
  2. package/build/@types/common/components/newFeatureSupportLevels/types.d.ts.map +1 -1
  3. package/build/@types/common/components/operators/operatorDescriptions.d.ts +23 -0
  4. package/build/@types/common/components/operators/operatorDescriptions.d.ts.map +1 -0
  5. package/build/@types/common/components/operators/operatorSpecs.d.ts +32 -4
  6. package/build/@types/common/components/operators/operatorSpecs.d.ts.map +1 -1
  7. package/build/@types/common/components/operators/test.d.ts +50 -0
  8. package/build/@types/common/components/operators/test.d.ts.map +1 -0
  9. package/build/@types/ocm/components/clusterConfiguration/ControlPlaneNodesDropdown.d.ts +2 -0
  10. package/build/@types/ocm/components/clusterConfiguration/ControlPlaneNodesDropdown.d.ts.map +1 -1
  11. package/build/@types/ocm/components/clusterConfiguration/OcmClusterDetailsFormFields.d.ts.map +1 -1
  12. package/build/@types/ocm/components/clusterConfiguration/manifestsConfiguration/components/FolderDropdown.d.ts.map +1 -1
  13. package/build/@types/ocm/components/clusterConfiguration/operators/OperatorCheckbox.d.ts +2 -1
  14. package/build/@types/ocm/components/clusterConfiguration/operators/OperatorCheckbox.d.ts.map +1 -1
  15. package/build/@types/ocm/components/clusterConfiguration/review/ReviewOperatorsTable.d.ts.map +1 -1
  16. package/build/@types/ocm/components/clusterWizard/OperatorsBundle.d.ts +2 -1
  17. package/build/@types/ocm/components/clusterWizard/OperatorsBundle.d.ts.map +1 -1
  18. package/build/@types/ocm/components/clusterWizard/OperatorsSelect.d.ts +2 -1
  19. package/build/@types/ocm/components/clusterWizard/OperatorsSelect.d.ts.map +1 -1
  20. package/build/@types/ocm/components/clusterWizard/OperatorsStep.d.ts.map +1 -1
  21. package/build/@types/ocm/components/featureSupportLevels/featureStateUtils.d.ts.map +1 -1
  22. package/build/cjs/common/components/clusterDetail/OperatorsProgressItem.js +1 -1
  23. package/build/cjs/common/components/clusterDetail/OperatorsProgressItem.js.map +1 -1
  24. package/build/cjs/common/components/operators/operatorDescriptions.js +26 -0
  25. package/build/cjs/common/components/operators/operatorDescriptions.js.map +1 -0
  26. package/build/cjs/common/components/operators/operatorSpecs.js +303 -190
  27. package/build/cjs/common/components/operators/operatorSpecs.js.map +1 -1
  28. package/build/cjs/common/components/operators/test.js +323 -0
  29. package/build/cjs/common/components/operators/test.js.map +1 -0
  30. package/build/cjs/ocm/components/clusterConfiguration/ControlPlaneNodesDropdown.js +20 -10
  31. package/build/cjs/ocm/components/clusterConfiguration/ControlPlaneNodesDropdown.js.map +1 -1
  32. package/build/cjs/ocm/components/clusterConfiguration/OcmClusterDetailsFormFields.js +16 -0
  33. package/build/cjs/ocm/components/clusterConfiguration/OcmClusterDetailsFormFields.js.map +1 -1
  34. package/build/cjs/ocm/components/clusterConfiguration/OcmOperatorProgressItem.js +1 -1
  35. package/build/cjs/ocm/components/clusterConfiguration/OcmOperatorProgressItem.js.map +1 -1
  36. package/build/cjs/ocm/components/clusterConfiguration/manifestsConfiguration/components/FolderDropdown.js +1 -1
  37. package/build/cjs/ocm/components/clusterConfiguration/manifestsConfiguration/components/FolderDropdown.js.map +1 -1
  38. package/build/cjs/ocm/components/clusterConfiguration/operators/OperatorCheckbox.js +4 -4
  39. package/build/cjs/ocm/components/clusterConfiguration/operators/OperatorCheckbox.js.map +1 -1
  40. package/build/cjs/ocm/components/clusterConfiguration/review/ReviewOperatorsTable.js +1 -1
  41. package/build/cjs/ocm/components/clusterConfiguration/review/ReviewOperatorsTable.js.map +1 -1
  42. package/build/cjs/ocm/components/clusterDetail/ProgressBarAlerts.js +1 -1
  43. package/build/cjs/ocm/components/clusterDetail/ProgressBarAlerts.js.map +1 -1
  44. package/build/cjs/ocm/components/clusterWizard/OperatorsBundle.js +17 -18
  45. package/build/cjs/ocm/components/clusterWizard/OperatorsBundle.js.map +1 -1
  46. package/build/cjs/ocm/components/clusterWizard/OperatorsSelect.js +36 -20
  47. package/build/cjs/ocm/components/clusterWizard/OperatorsSelect.js.map +1 -1
  48. package/build/cjs/ocm/components/clusterWizard/OperatorsStep.js +13 -3
  49. package/build/cjs/ocm/components/clusterWizard/OperatorsStep.js.map +1 -1
  50. package/build/cjs/ocm/components/featureSupportLevels/featureStateUtils.js +5 -15
  51. package/build/cjs/ocm/components/featureSupportLevels/featureStateUtils.js.map +1 -1
  52. package/lib/common/components/clusterDetail/OperatorsProgressItem.tsx +1 -1
  53. package/lib/common/components/newFeatureSupportLevels/types.ts +1 -0
  54. package/lib/common/components/operators/operatorDescriptions.tsx +58 -0
  55. package/lib/common/components/operators/operatorSpecs.tsx +392 -264
  56. package/lib/common/components/operators/test.tsx +469 -0
  57. package/lib/ocm/components/clusterConfiguration/ControlPlaneNodesDropdown.tsx +26 -14
  58. package/lib/ocm/components/clusterConfiguration/OcmClusterDetailsFormFields.tsx +33 -1
  59. package/lib/ocm/components/clusterConfiguration/OcmOperatorProgressItem.tsx +1 -1
  60. package/lib/ocm/components/clusterConfiguration/manifestsConfiguration/components/FolderDropdown.tsx +1 -0
  61. package/lib/ocm/components/clusterConfiguration/operators/OperatorCheckbox.tsx +6 -3
  62. package/lib/ocm/components/clusterConfiguration/review/ReviewOperatorsTable.tsx +2 -1
  63. package/lib/ocm/components/clusterDetail/ProgressBarAlerts.tsx +1 -1
  64. package/lib/ocm/components/clusterWizard/OperatorsBundle.tsx +25 -23
  65. package/lib/ocm/components/clusterWizard/OperatorsSelect.tsx +67 -44
  66. package/lib/ocm/components/clusterWizard/OperatorsStep.tsx +30 -3
  67. package/lib/ocm/components/featureSupportLevels/featureStateUtils.ts +7 -18
  68. package/package.json +3 -3
@@ -6,7 +6,8 @@ import { TableSummaryExpandable } from './TableSummaryExpandable';
6
6
  import { useOperatorSpecs } from '../../../../common/components/operators/operatorSpecs';
7
7
 
8
8
  export const ReviewOperatorsTable = ({ cluster }: { cluster: Cluster }) => {
9
- const opSpecs = useOperatorSpecs();
9
+ const { byKey: opSpecs } = useOperatorSpecs();
10
+
10
11
  const rows = React.useMemo(
11
12
  () =>
12
13
  cluster.monitoredOperators
@@ -66,7 +66,7 @@ export const HostInstallationWarning = ({
66
66
  message,
67
67
  }: InstallationProgressWarningProps) => {
68
68
  const { addAlert, clearAlerts } = useAlerts();
69
- const opSpecs = useOperatorSpecs();
69
+ const { byKey: opSpecs } = useOperatorSpecs();
70
70
 
71
71
  return (
72
72
  <>
@@ -24,27 +24,26 @@ import NewFeatureSupportLevelBadge, {
24
24
  } from '../../../common/components/newFeatureSupportLevels/NewFeatureSupportLevelBadge';
25
25
  import { ExternalLink, OperatorsValues, PopoverIcon, singleClusterBundles } from '../../../common';
26
26
  import { useFormikContext } from 'formik';
27
- import {
28
- GetFeatureSupportLevel,
29
- useNewFeatureSupportLevel,
30
- } from '../../../common/components/newFeatureSupportLevels';
27
+ import { useNewFeatureSupportLevel } from '../../../common/components/newFeatureSupportLevels';
31
28
  import { useFeature } from '../../hooks/use-feature';
32
29
  import { useSelector } from 'react-redux';
33
30
  import { selectIsCurrentClusterSNO } from '../../store/slices/current-cluster/selectors';
34
31
  import { getNewBundleOperators } from '../clusterConfiguration/operators/utils';
35
32
  import { bundleSpecs } from '../clusterConfiguration/operators/bundleSpecs';
36
- import { useOperatorSpecs } from '../../../common/components/operators/operatorSpecs';
37
-
38
- import './OperatorsBundle.css';
33
+ import {
34
+ highlightMatch,
35
+ OperatorSpec,
36
+ useOperatorSpecs,
37
+ } from '../../../common/components/operators/operatorSpecs';
39
38
  import { useClusterWizardContext } from './ClusterWizardContext';
39
+ import './OperatorsBundle.css';
40
40
 
41
- const BundleLabel = ({ bundle }: { bundle: Bundle }) => {
42
- const opSpecs = useOperatorSpecs();
41
+ const BundleLabel = ({ bundle, searchTerm }: { bundle: Bundle; searchTerm?: string }) => {
42
+ const { byKey: opSpecs } = useOperatorSpecs();
43
43
  const bundleSpec = bundleSpecs[bundle.id || ''];
44
-
45
44
  return (
46
45
  <>
47
- <span>{bundle.title} </span>
46
+ <span>{highlightMatch(bundle.title || '', searchTerm)} </span>
48
47
  <PopoverIcon
49
48
  component={'a'}
50
49
  headerContent={<div>Requirements and dependencies</div>}
@@ -81,19 +80,17 @@ const BundleLabel = ({ bundle }: { bundle: Bundle }) => {
81
80
 
82
81
  const getBundleSupportLevel = (
83
82
  bundle: Bundle,
84
- opSpecs: ReturnType<typeof useOperatorSpecs>,
85
- getFeatureSupportLevel: GetFeatureSupportLevel,
83
+ opSpecsByKey: Record<string, OperatorSpec>,
86
84
  ): NewSupportLevelBadgeProps['supportLevel'] => {
87
85
  let supportLevel: NewSupportLevelBadgeProps['supportLevel'] = undefined;
88
86
  if (bundle.operators) {
89
87
  for (const op of bundle.operators) {
90
- const operatorSpec = opSpecs[op];
88
+ const operatorSpec = opSpecsByKey[op];
91
89
  if (operatorSpec) {
92
- const opSupportLevel = getFeatureSupportLevel(operatorSpec.featureId);
93
- if (opSupportLevel === 'dev-preview') {
90
+ if (operatorSpec.supportLevel === 'dev-preview') {
94
91
  supportLevel = 'dev-preview';
95
92
  break;
96
- } else if (opSupportLevel === 'tech-preview') {
93
+ } else if (operatorSpec.supportLevel === 'tech-preview') {
97
94
  supportLevel = 'tech-preview';
98
95
  }
99
96
  }
@@ -106,18 +103,20 @@ const BundleCard = ({
106
103
  bundle,
107
104
  bundles,
108
105
  preflightRequirements,
106
+ searchTerm,
109
107
  }: {
110
108
  bundle: Bundle;
111
109
  bundles: Bundle[];
112
110
  preflightRequirements: PreflightHardwareRequirements | undefined;
111
+ searchTerm?: string;
113
112
  }) => {
114
113
  const { values, setFieldValue } = useFormikContext<OperatorsValues>();
115
114
  const isSNO = useSelector(selectIsCurrentClusterSNO);
116
- const { isFeatureSupported, getFeatureSupportLevel } = useNewFeatureSupportLevel();
117
- const opSpecs = useOperatorSpecs();
115
+ const { isFeatureSupported } = useNewFeatureSupportLevel();
116
+ const { byKey: opSpecs } = useOperatorSpecs();
118
117
  const { uiSettings } = useClusterWizardContext();
119
118
 
120
- const supportLevel = getBundleSupportLevel(bundle, opSpecs, getFeatureSupportLevel);
119
+ const supportLevel = getBundleSupportLevel(bundle, opSpecs);
121
120
 
122
121
  const hasUnsupportedOperators = !!bundle.operators?.some((op) => {
123
122
  const operatorSpec = opSpecs[op];
@@ -183,13 +182,13 @@ const BundleCard = ({
183
182
  }}
184
183
  >
185
184
  <CardTitle>
186
- <BundleLabel bundle={bundle} />
185
+ <BundleLabel bundle={bundle} searchTerm={searchTerm} />
187
186
  </CardTitle>
188
187
  </CardHeader>
189
188
  <CardBody isFilled>
190
189
  <Stack hasGutter>
191
190
  <StackItem isFilled>
192
- <div>{bundle.description}</div>
191
+ <div>{highlightMatch(bundle.description || '', searchTerm)}</div>
193
192
  </StackItem>
194
193
  <StackItem>
195
194
  <Split>
@@ -212,9 +211,11 @@ const BundleCard = ({
212
211
  const OperatorsBundle = ({
213
212
  bundles,
214
213
  preflightRequirements,
214
+ searchTerm,
215
215
  }: {
216
216
  bundles: Bundle[];
217
217
  preflightRequirements: PreflightHardwareRequirements | undefined;
218
+ searchTerm?: string;
218
219
  }) => {
219
220
  const isSingleClusterFeatureEnabled = useFeature('ASSISTED_INSTALLER_SINGLE_CLUSTER_FEATURE');
220
221
 
@@ -222,7 +223,7 @@ const OperatorsBundle = ({
222
223
  <Stack hasGutter>
223
224
  <StackItem>
224
225
  <Title headingLevel="h2" size="lg">
225
- Bundles
226
+ {bundles.length > 0 ? 'Bundles' : ''}
226
227
  </Title>
227
228
  </StackItem>
228
229
  <StackItem>
@@ -236,6 +237,7 @@ const OperatorsBundle = ({
236
237
  bundle={bundle}
237
238
  bundles={bundles}
238
239
  preflightRequirements={preflightRequirements}
240
+ searchTerm={searchTerm}
239
241
  />
240
242
  </GalleryItem>
241
243
  ))}
@@ -24,10 +24,12 @@ const OperatorsSelect = ({
24
24
  cluster,
25
25
  bundles,
26
26
  preflightRequirements,
27
+ searchTerm,
27
28
  }: {
28
29
  cluster: Cluster;
29
30
  bundles: Bundle[];
30
31
  preflightRequirements: PreflightHardwareRequirements | undefined;
32
+ searchTerm?: string;
31
33
  }) => {
32
34
  const [isLoading, setIsLoading] = useStateSafely(true);
33
35
  const { addAlert } = useAlerts();
@@ -53,59 +55,80 @@ const OperatorsSelect = ({
53
55
  void fetchSupportedOperators();
54
56
  }, [addAlert, setSupportedOperators, setIsLoading]);
55
57
 
56
- const opSpecs = useOperatorSpecs();
58
+ const { byCategory, byKey: opSpecs } = useOperatorSpecs();
57
59
 
58
60
  const operators = React.useMemo(() => {
59
- return supportedOperators
60
- .sort((a, b) => {
61
- const aTitle = opSpecs[a]?.title || a;
62
- const bTitle = opSpecs[b]?.title || b;
63
- return aTitle.localeCompare(bTitle);
64
- })
65
- .filter((op) => {
66
- if (!isSingleClusterFeatureEnabled) {
67
- return true;
68
- }
69
- return singleClusterOperators.includes(op);
70
- });
71
- }, [isSingleClusterFeatureEnabled, supportedOperators, opSpecs]);
72
-
73
- if (isLoading) {
74
- return <LoadingState />;
75
- }
61
+ return supportedOperators.filter((op) => {
62
+ if (!isSingleClusterFeatureEnabled) {
63
+ return true;
64
+ }
65
+ return singleClusterOperators.includes(op);
66
+ });
67
+ }, [isSingleClusterFeatureEnabled, supportedOperators]);
76
68
 
77
69
  const selectedOperators = values.selectedOperators.filter(
78
70
  (opKey) => operators.includes(opKey) && !!opSpecs[opKey],
79
71
  );
80
72
 
73
+ if (isLoading) {
74
+ return <LoadingState />;
75
+ }
76
+ let foundAtLeastOneOperator = false;
81
77
  return (
82
- <ExpandableSection
83
- toggleText={`Single Operators (${operators.length} | ${selectedOperators.length} selected)`}
84
- onToggle={() => setIsExpanded(!isExpanded)}
85
- isExpanded={isExpanded}
86
- data-testid="single-operators-section"
87
- >
88
- <Stack hasGutter data-testid={'operators-form'}>
89
- {operators.map((operatorKey) => {
90
- if (!opSpecs[operatorKey]) {
91
- return null;
92
- }
78
+ <>
79
+ <ExpandableSection
80
+ toggleText={`Single Operators (${operators.length} | ${selectedOperators.length} selected)`}
81
+ onToggle={() => setIsExpanded(!isExpanded)}
82
+ isExpanded={isExpanded}
83
+ data-testid="single-operators-section"
84
+ >
85
+ <Stack hasGutter data-testid={'operators-form'}>
86
+ {Object.entries(byCategory).map(([categoryName, specs]) => {
87
+ let categoryOperators = specs.filter((spec) => operators.includes(spec.operatorKey));
88
+ // Filter by searchTerm
89
+ if (searchTerm?.trim()) {
90
+ const term = searchTerm.trim().toLowerCase();
91
+ categoryOperators = categoryOperators.filter((spec) => {
92
+ const op = opSpecs[spec.operatorKey];
93
+ const title = op?.title?.toLowerCase() || '';
94
+ const description = op?.descriptionText?.toLowerCase() || '';
95
+ return title.includes(term) || description.includes(term);
96
+ });
97
+ }
98
+ if (categoryOperators.length === 0) {
99
+ return null;
100
+ }
101
+ foundAtLeastOneOperator = true;
102
+ if (!!searchTerm?.trim() && !isExpanded) {
103
+ //if we found some results expand operators section
104
+ setIsExpanded(true);
105
+ }
93
106
 
94
- return (
95
- <StackItem key={operatorKey}>
96
- <OperatorCheckbox
97
- bundles={bundles}
98
- operatorId={operatorKey}
99
- cluster={cluster}
100
- openshiftVersion={cluster.openshiftVersion}
101
- preflightRequirements={preflightRequirements}
102
- {...opSpecs[operatorKey]}
103
- />
104
- </StackItem>
105
- );
106
- })}
107
- </Stack>
108
- </ExpandableSection>
107
+ return (
108
+ <React.Fragment key={categoryName}>
109
+ <StackItem>
110
+ <strong>{categoryName}</strong>
111
+ </StackItem>
112
+ {categoryOperators.map((spec) => (
113
+ <StackItem key={spec.operatorKey}>
114
+ <OperatorCheckbox
115
+ bundles={bundles}
116
+ operatorId={spec.operatorKey}
117
+ cluster={cluster}
118
+ openshiftVersion={cluster.openshiftVersion}
119
+ preflightRequirements={preflightRequirements}
120
+ searchTerm={searchTerm}
121
+ {...spec}
122
+ />
123
+ </StackItem>
124
+ ))}
125
+ </React.Fragment>
126
+ );
127
+ })}
128
+ </Stack>
129
+ </ExpandableSection>
130
+ {!foundAtLeastOneOperator && !!searchTerm?.trim() && <StackItem>No results found</StackItem>}
131
+ </>
109
132
  );
110
133
  };
111
134
 
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { Stack, StackItem } from '@patternfly/react-core';
2
+ import { Flex, FlexItem, SearchInput, Stack, StackItem } from '@patternfly/react-core';
3
3
  import { Bundle } from '@openshift-assisted/types/assisted-installer-service';
4
4
  import {
5
5
  ClusterOperatorProps,
@@ -19,6 +19,7 @@ export const OperatorsStep = ({ cluster }: ClusterOperatorProps) => {
19
19
  const [bundlesLoading, setBundlesLoading] = React.useState(true);
20
20
  const [bundles, setBundles] = React.useState<Bundle[]>([]);
21
21
  const { preflightRequirements, isLoading } = useClusterPreflightRequirements(cluster.id);
22
+ const [searchTerm, setSearchTerm] = React.useState('');
22
23
  React.useEffect(() => {
23
24
  const fetchBundles = async () => {
24
25
  try {
@@ -39,6 +40,12 @@ export const OperatorsStep = ({ cluster }: ClusterOperatorProps) => {
39
40
  void fetchBundles();
40
41
  }, [addAlert]);
41
42
 
43
+ const filteredBundles = bundles.filter(
44
+ (bundle) =>
45
+ bundle.title?.toLowerCase().includes(searchTerm.toLowerCase()) ||
46
+ bundle.description?.toLowerCase().includes(searchTerm.toLowerCase()),
47
+ );
48
+
42
49
  if (isLoading || bundlesLoading) {
43
50
  return <LoadingState />;
44
51
  }
@@ -46,16 +53,36 @@ export const OperatorsStep = ({ cluster }: ClusterOperatorProps) => {
46
53
  return (
47
54
  <Stack hasGutter data-testid={'operators-page'}>
48
55
  <StackItem>
49
- <ClusterWizardStepHeader>Operators</ClusterWizardStepHeader>
56
+ <Flex
57
+ justifyContent={{ default: 'justifyContentSpaceBetween' }}
58
+ alignItems={{ default: 'alignItemsCenter' }}
59
+ >
60
+ <FlexItem>
61
+ <ClusterWizardStepHeader>Operators</ClusterWizardStepHeader>
62
+ </FlexItem>
63
+ <FlexItem style={{ minWidth: '300px' }}>
64
+ <SearchInput
65
+ placeholder={'Find bundles or operators'}
66
+ value={searchTerm}
67
+ onChange={(_e, value) => setSearchTerm(value)}
68
+ onClear={() => setSearchTerm('')}
69
+ />
70
+ </FlexItem>
71
+ </Flex>
50
72
  </StackItem>
51
73
  <StackItem>
52
- <OperatorsBundle bundles={bundles} preflightRequirements={preflightRequirements} />
74
+ <OperatorsBundle
75
+ bundles={filteredBundles}
76
+ preflightRequirements={preflightRequirements}
77
+ searchTerm={searchTerm}
78
+ />
53
79
  </StackItem>
54
80
  <StackItem>
55
81
  <OperatorsSelect
56
82
  bundles={bundles}
57
83
  cluster={cluster}
58
84
  preflightRequirements={preflightRequirements}
85
+ searchTerm={searchTerm}
59
86
  />
60
87
  </StackItem>
61
88
  </Stack>
@@ -4,11 +4,6 @@ import {
4
4
  CpuArchitecture,
5
5
  FeatureId,
6
6
  isSNO,
7
- OPERATOR_NAME_CNV,
8
- OPERATOR_NAME_LVM,
9
- OPERATOR_NAME_ODF,
10
- OPERATOR_NAME_OPENSHIFT_AI,
11
- OPERATOR_NAME_OSC,
12
7
  SupportedCpuArchitecture,
13
8
  } from '../../../common';
14
9
  import {
@@ -17,7 +12,7 @@ import {
17
12
  SupportLevel,
18
13
  } from '@openshift-assisted/types/assisted-installer-service';
19
14
  import { ExternalPlatformLabels } from '../clusterConfiguration/platformIntegration/constants';
20
- import { getOperatorSpecs } from '../../../common/components/operators/operatorSpecs';
15
+ import { getOperatorTitleByFeatureId } from '../../../common/components/operators/operatorSpecs';
21
16
 
22
17
  export const clusterExistsReason = 'This option is not editable after the draft cluster is created';
23
18
 
@@ -46,10 +41,7 @@ const getOdfDisabledReason = (
46
41
  return undefined;
47
42
  }
48
43
 
49
- const opSpecs = getOperatorSpecs();
50
-
51
- const operatorTitle = opSpecs[OPERATOR_NAME_ODF]?.title || '';
52
-
44
+ const operatorTitle = getOperatorTitleByFeatureId('ODF') || '';
53
45
  const isArm = activeFeatureConfiguration?.underlyingCpuArchitecture === CpuArchitecture.ARM;
54
46
  if (isArm && isSNO(cluster)) {
55
47
  return `${operatorTitle} is not available when using Single Node OpenShift or ARM CPU architecture.`;
@@ -75,8 +67,8 @@ const getCnvDisabledReason = (
75
67
  return undefined;
76
68
  }
77
69
 
78
- const opSpecs = getOperatorSpecs();
79
- const operatorTitle = opSpecs[OPERATOR_NAME_CNV]?.title || '';
70
+ const operatorTitle = getOperatorTitleByFeatureId('CNV') || '';
71
+
80
72
  if (platformType === 'nutanix') {
81
73
  return `${operatorTitle} is not available when Nutanix platform type is selected.`;
82
74
  }
@@ -105,8 +97,7 @@ const getLvmDisabledReason = (
105
97
  return undefined;
106
98
  }
107
99
 
108
- const opSpecs = getOperatorSpecs();
109
- const operatorTitle = opSpecs[OPERATOR_NAME_LVM]?.title;
100
+ const operatorTitle = getOperatorTitleByFeatureId('LVM') || '';
110
101
  if (platformType === 'nutanix') {
111
102
  return `${operatorTitle} is not supported when Nutanix platform type is selected.`;
112
103
  }
@@ -125,8 +116,7 @@ const getOscDisabledReason = (
125
116
  return undefined;
126
117
  }
127
118
 
128
- const opSpecs = getOperatorSpecs();
129
- const operatorTitle = opSpecs[OPERATOR_NAME_OSC]?.title || '';
119
+ const operatorTitle = getOperatorTitleByFeatureId('OSC') || '';
130
120
  if (!isSupported) {
131
121
  return `${operatorTitle} is not supported in this OpenShift version.`;
132
122
  }
@@ -299,8 +289,7 @@ const getOpenShiftAIDisabledReason = (
299
289
  return undefined;
300
290
  }
301
291
 
302
- const opSpecs = getOperatorSpecs();
303
- const operatorTitle = opSpecs[OPERATOR_NAME_OPENSHIFT_AI]?.title || '';
292
+ const operatorTitle = getOperatorTitleByFeatureId('OPENSHIFT_AI') || '';
304
293
  const isArm = activeFeatureConfiguration?.underlyingCpuArchitecture === CpuArchitecture.ARM;
305
294
  if (isArm) {
306
295
  return `${operatorTitle} is not available when ARM CPU architecture is selected.`;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "dependencies": {
3
- "@openshift-assisted/locales": "2.42.0",
4
- "@openshift-assisted/types": "2.42.0",
3
+ "@openshift-assisted/locales": "2.42.2",
4
+ "@openshift-assisted/types": "2.42.2",
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",
@@ -140,5 +140,5 @@
140
140
  ]
141
141
  }
142
142
  },
143
- "version": "2.42.0"
143
+ "version": "2.42.2"
144
144
  }