@openshift-assisted/ui-lib 2.42.2 → 2.43.0

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 (161) hide show
  1. package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentDetailsStep.d.ts.map +1 -1
  2. package/build/@types/cim/components/ClusterDeployment/ClusterDetailsFormFields.d.ts.map +1 -1
  3. package/build/@types/common/components/clusterConfiguration/index.d.ts +0 -2
  4. package/build/@types/common/components/clusterConfiguration/index.d.ts.map +1 -1
  5. package/build/@types/common/components/clusterWizard/clusterDetailsValidation.d.ts +1 -4
  6. package/build/@types/common/components/clusterWizard/clusterDetailsValidation.d.ts.map +1 -1
  7. package/build/@types/common/components/clusterWizard/types.d.ts +0 -2
  8. package/build/@types/common/components/clusterWizard/types.d.ts.map +1 -1
  9. package/build/@types/common/components/hosts/DiskRole.d.ts.map +1 -1
  10. package/build/@types/common/components/hosts/TableToolbar.d.ts.map +1 -1
  11. package/build/@types/common/components/operators/operatorSpecs.d.ts.map +1 -1
  12. package/build/@types/common/components/ui/SimpleDropdown.d.ts.map +1 -1
  13. package/build/@types/common/components/ui/formik/index.d.ts +0 -1
  14. package/build/@types/common/components/ui/formik/index.d.ts.map +1 -1
  15. package/build/@types/common/config/constants.d.ts.map +1 -1
  16. package/build/@types/common/config/docs_links.d.ts +3 -3
  17. package/build/@types/common/config/docs_links.d.ts.map +1 -1
  18. package/build/@types/common/selectors/clusterSelectors.d.ts +1 -1
  19. package/build/@types/common/selectors/clusterSelectors.d.ts.map +1 -1
  20. package/build/@types/common/types/cpuArchitecture.d.ts.map +1 -1
  21. package/build/@types/ocm/components/Routes.d.ts +2 -1
  22. package/build/@types/ocm/components/Routes.d.ts.map +1 -1
  23. package/build/@types/ocm/components/clusterConfiguration/ControlPlaneNodesDropdown.d.ts.map +1 -1
  24. package/build/@types/ocm/components/clusterConfiguration/OcmSNODisclaimer.d.ts +1 -4
  25. package/build/@types/ocm/components/clusterConfiguration/OcmSNODisclaimer.d.ts.map +1 -1
  26. package/build/@types/ocm/components/clusterConfiguration/networkConfiguration/SubnetsDropdown.d.ts.map +1 -1
  27. package/build/@types/ocm/components/clusterWizard/ClusterDetailsForm.d.ts.map +1 -1
  28. package/build/@types/ocm/components/clusterWizard/CredentialsDownload.d.ts.map +1 -1
  29. package/build/@types/ocm/components/clusterWizard/Operators.d.ts.map +1 -1
  30. package/build/@types/ocm/components/clusters/AssistedInstallerHeader.d.ts.map +1 -1
  31. package/build/@types/ocm/components/clusters/ClusterPage.d.ts.map +1 -1
  32. package/build/@types/ocm/components/clusters/NewClusterPage.d.ts.map +1 -1
  33. package/build/@types/ocm/components/hosts/use-hosts-table.d.ts.map +1 -1
  34. package/build/@types/ocm/services/OperatorsService.d.ts.map +1 -1
  35. package/build/@types/ocm/store/slices/current-cluster/selectors.d.ts.map +1 -1
  36. package/build/@types/ocm/store/slices/current-cluster/slice.d.ts +1 -1
  37. package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentDetailsStep.js +1 -4
  38. package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentDetailsStep.js.map +1 -1
  39. package/build/cjs/cim/components/ClusterDeployment/ClusterDetailsFormFields.js +9 -1
  40. package/build/cjs/cim/components/ClusterDeployment/ClusterDetailsFormFields.js.map +1 -1
  41. package/build/cjs/common/components/clusterConfiguration/index.js +1 -5
  42. package/build/cjs/common/components/clusterConfiguration/index.js.map +1 -1
  43. package/build/cjs/common/components/clusterWizard/clusterDetailsValidation.js +3 -23
  44. package/build/cjs/common/components/clusterWizard/clusterDetailsValidation.js.map +1 -1
  45. package/build/cjs/common/components/hosts/DiskRole.js +1 -1
  46. package/build/cjs/common/components/hosts/DiskRole.js.map +1 -1
  47. package/build/cjs/common/components/hosts/TableToolbar.js +3 -3
  48. package/build/cjs/common/components/hosts/TableToolbar.js.map +1 -1
  49. package/build/cjs/common/components/operators/operatorSpecs.js +10 -8
  50. package/build/cjs/common/components/operators/operatorSpecs.js.map +1 -1
  51. package/build/cjs/common/components/ui/OpenShiftVersionDropdown.js +6 -7
  52. package/build/cjs/common/components/ui/OpenShiftVersionDropdown.js.map +1 -1
  53. package/build/cjs/common/components/ui/SimpleDropdown.js +1 -1
  54. package/build/cjs/common/components/ui/SimpleDropdown.js.map +1 -1
  55. package/build/cjs/common/components/ui/formik/index.js +1 -3
  56. package/build/cjs/common/components/ui/formik/index.js.map +1 -1
  57. package/build/cjs/common/config/constants.js +0 -4
  58. package/build/cjs/common/config/constants.js.map +1 -1
  59. package/build/cjs/common/config/docs_links.js +13 -9
  60. package/build/cjs/common/config/docs_links.js.map +1 -1
  61. package/build/cjs/common/selectors/clusterSelectors.js +1 -1
  62. package/build/cjs/common/selectors/clusterSelectors.js.map +1 -1
  63. package/build/cjs/common/types/cpuArchitecture.js +3 -5
  64. package/build/cjs/common/types/cpuArchitecture.js.map +1 -1
  65. package/build/cjs/ocm/components/Routes.js +3 -2
  66. package/build/cjs/ocm/components/Routes.js.map +1 -1
  67. package/build/cjs/ocm/components/clusterConfiguration/ControlPlaneNodesDropdown.js +2 -4
  68. package/build/cjs/ocm/components/clusterConfiguration/ControlPlaneNodesDropdown.js.map +1 -1
  69. package/build/cjs/ocm/components/clusterConfiguration/OcmSNODisclaimer.js +5 -21
  70. package/build/cjs/ocm/components/clusterConfiguration/OcmSNODisclaimer.js.map +1 -1
  71. package/build/cjs/ocm/components/clusterConfiguration/networkConfiguration/SubnetsDropdown.js +12 -18
  72. package/build/cjs/ocm/components/clusterConfiguration/networkConfiguration/SubnetsDropdown.js.map +1 -1
  73. package/build/cjs/ocm/components/clusterConfiguration/staticIp/commonValidationSchemas.js +1 -1
  74. package/build/cjs/ocm/components/clusterConfiguration/staticIp/commonValidationSchemas.js.map +1 -1
  75. package/build/cjs/ocm/components/clusterConfiguration/staticIp/components/FormViewNetworkWide/FormViewNetworkWideFields.js +1 -1
  76. package/build/cjs/ocm/components/clusterConfiguration/staticIp/components/FormViewNetworkWide/FormViewNetworkWideFields.js.map +1 -1
  77. package/build/cjs/ocm/components/clusterConfiguration/staticIp/components/staticIp.css +3 -3
  78. package/build/cjs/ocm/components/clusterConfiguration/staticIp/data/formDataToInfraEnvField.js +1 -1
  79. package/build/cjs/ocm/components/clusterConfiguration/staticIp/data/formDataToInfraEnvField.js.map +1 -1
  80. package/build/cjs/ocm/components/clusterDetail/ProgressBarAlerts.js +1 -1
  81. package/build/cjs/ocm/components/clusterDetail/ProgressBarAlerts.js.map +1 -1
  82. package/build/cjs/ocm/components/clusterWizard/ClusterDetailsForm.js +0 -1
  83. package/build/cjs/ocm/components/clusterWizard/ClusterDetailsForm.js.map +1 -1
  84. package/build/cjs/ocm/components/clusterWizard/CredentialsDownload.js +2 -1
  85. package/build/cjs/ocm/components/clusterWizard/CredentialsDownload.js.map +1 -1
  86. package/build/cjs/ocm/components/clusterWizard/Operators.js +4 -1
  87. package/build/cjs/ocm/components/clusterWizard/Operators.js.map +1 -1
  88. package/build/cjs/ocm/components/clusters/AssistedInstallerHeader.js +3 -0
  89. package/build/cjs/ocm/components/clusters/AssistedInstallerHeader.js.map +1 -1
  90. package/build/cjs/ocm/components/clusters/ClusterPage.js +2 -0
  91. package/build/cjs/ocm/components/clusters/ClusterPage.js.map +1 -1
  92. package/build/cjs/ocm/components/clusters/NewClusterPage.js +6 -7
  93. package/build/cjs/ocm/components/clusters/NewClusterPage.js.map +1 -1
  94. package/build/cjs/ocm/components/hosts/use-hosts-table.js +8 -1
  95. package/build/cjs/ocm/components/hosts/use-hosts-table.js.map +1 -1
  96. package/build/cjs/ocm/services/DiskEncryptionService.js +1 -1
  97. package/build/cjs/ocm/services/DiskEncryptionService.js.map +1 -1
  98. package/build/cjs/ocm/services/OperatorsService.js +12 -2
  99. package/build/cjs/ocm/services/OperatorsService.js.map +1 -1
  100. package/build/cjs/ocm/store/slices/current-cluster/selectors.js +1 -1
  101. package/build/cjs/ocm/store/slices/current-cluster/selectors.js.map +1 -1
  102. package/lib/cim/components/ClusterDeployment/ClusterDeploymentDetailsStep.tsx +1 -5
  103. package/lib/cim/components/ClusterDeployment/ClusterDetailsFormFields.tsx +11 -2
  104. package/lib/common/components/clusterConfiguration/index.ts +0 -2
  105. package/lib/common/components/clusterWizard/clusterDetailsValidation.ts +2 -33
  106. package/lib/common/components/clusterWizard/types.ts +0 -2
  107. package/lib/common/components/hosts/DiskRole.tsx +0 -1
  108. package/lib/common/components/hosts/TableToolbar.tsx +9 -10
  109. package/lib/common/components/operators/operatorSpecs.tsx +11 -8
  110. package/lib/common/components/ui/OpenShiftVersionDropdown.tsx +10 -10
  111. package/lib/common/components/ui/SimpleDropdown.tsx +0 -1
  112. package/lib/common/components/ui/formik/index.tsx +0 -1
  113. package/lib/common/config/constants.ts +0 -4
  114. package/lib/common/config/docs_links.ts +15 -15
  115. package/lib/common/selectors/clusterSelectors.ts +1 -2
  116. package/lib/common/types/cpuArchitecture.ts +3 -9
  117. package/lib/ocm/components/Routes.tsx +3 -0
  118. package/lib/ocm/components/clusterConfiguration/ControlPlaneNodesDropdown.tsx +3 -16
  119. package/lib/ocm/components/clusterConfiguration/OcmSNODisclaimer.tsx +14 -60
  120. package/lib/ocm/components/clusterConfiguration/networkConfiguration/SubnetsDropdown.tsx +18 -25
  121. package/lib/ocm/components/clusterConfiguration/staticIp/commonValidationSchemas.tsx +1 -1
  122. package/lib/ocm/components/clusterConfiguration/staticIp/components/FormViewNetworkWide/FormViewNetworkWideFields.tsx +2 -2
  123. package/lib/ocm/components/clusterConfiguration/staticIp/components/staticIp.css +3 -3
  124. package/lib/ocm/components/clusterConfiguration/staticIp/data/formDataToInfraEnvField.ts +1 -1
  125. package/lib/ocm/components/clusterDetail/ProgressBarAlerts.tsx +1 -1
  126. package/lib/ocm/components/clusterWizard/ClusterDetailsForm.tsx +0 -1
  127. package/lib/ocm/components/clusterWizard/CredentialsDownload.tsx +2 -1
  128. package/lib/ocm/components/clusterWizard/Operators.tsx +5 -1
  129. package/lib/ocm/components/clusters/AssistedInstallerHeader.tsx +9 -1
  130. package/lib/ocm/components/clusters/ClusterPage.tsx +3 -0
  131. package/lib/ocm/components/clusters/NewClusterPage.tsx +9 -13
  132. package/lib/ocm/components/hosts/use-hosts-table.tsx +8 -1
  133. package/lib/ocm/services/DiskEncryptionService.ts +1 -1
  134. package/lib/ocm/services/OperatorsService.tsx +18 -2
  135. package/lib/ocm/store/slices/current-cluster/selectors.ts +1 -1
  136. package/package.json +3 -3
  137. package/build/@types/common/components/clusterConfiguration/SNOControlGroup.d.ts +0 -10
  138. package/build/@types/common/components/clusterConfiguration/SNOControlGroup.d.ts.map +0 -1
  139. package/build/@types/common/components/clusterConfiguration/SNODisclaimer.d.ts +0 -10
  140. package/build/@types/common/components/clusterConfiguration/SNODisclaimer.d.ts.map +0 -1
  141. package/build/@types/common/components/operators/test.d.ts +0 -50
  142. package/build/@types/common/components/operators/test.d.ts.map +0 -1
  143. package/build/@types/common/components/ui/formik/SingleNodeCheckbox.d.ts +0 -9
  144. package/build/@types/common/components/ui/formik/SingleNodeCheckbox.d.ts.map +0 -1
  145. package/build/@types/ocm/components/clusterConfiguration/OcmSingleNodeCheckbox.d.ts +0 -11
  146. package/build/@types/ocm/components/clusterConfiguration/OcmSingleNodeCheckbox.d.ts.map +0 -1
  147. package/build/cjs/common/components/clusterConfiguration/SNOControlGroup.js +0 -20
  148. package/build/cjs/common/components/clusterConfiguration/SNOControlGroup.js.map +0 -1
  149. package/build/cjs/common/components/clusterConfiguration/SNODisclaimer.js +0 -31
  150. package/build/cjs/common/components/clusterConfiguration/SNODisclaimer.js.map +0 -1
  151. package/build/cjs/common/components/operators/test.js +0 -323
  152. package/build/cjs/common/components/operators/test.js.map +0 -1
  153. package/build/cjs/common/components/ui/formik/SingleNodeCheckbox.js +0 -45
  154. package/build/cjs/common/components/ui/formik/SingleNodeCheckbox.js.map +0 -1
  155. package/build/cjs/ocm/components/clusterConfiguration/OcmSingleNodeCheckbox.js +0 -51
  156. package/build/cjs/ocm/components/clusterConfiguration/OcmSingleNodeCheckbox.js.map +0 -1
  157. package/lib/common/components/clusterConfiguration/SNOControlGroup.tsx +0 -41
  158. package/lib/common/components/clusterConfiguration/SNODisclaimer.tsx +0 -79
  159. package/lib/common/components/operators/test.tsx +0 -469
  160. package/lib/common/components/ui/formik/SingleNodeCheckbox.tsx +0 -98
  161. package/lib/ocm/components/clusterConfiguration/OcmSingleNodeCheckbox.tsx +0 -107
@@ -1,79 +0,0 @@
1
- import React from 'react';
2
- import { Alert, AlertVariant, List, ListItem, Stack, StackItem } from '@patternfly/react-core';
3
- import { CheckboxField } from '../ui';
4
- import { useTranslation } from '../../hooks/use-translation-wrapper';
5
- import { SupportLevel } from '@openshift-assisted/types/assisted-installer-service';
6
-
7
- type SNODisclaimerProps = {
8
- snoSupportLevel: SupportLevel;
9
- isDisabled?: boolean;
10
- snoExpansionSupported?: boolean;
11
- };
12
- const SNODisclaimer = ({
13
- snoSupportLevel,
14
- isDisabled = false,
15
- snoExpansionSupported = false,
16
- }: SNODisclaimerProps) => {
17
- const { t } = useTranslation();
18
- if (!['dev-preview', 'supported'].includes(snoSupportLevel)) {
19
- //if tech preview or unsupported there's no definition which warning to show
20
- return null;
21
- }
22
- const isDevPreview = snoSupportLevel === 'dev-preview';
23
- const generalSNOFacts = (
24
- <>
25
- <ListItem>
26
- {t(
27
- 'ai:Installing SNO will result in an OpenShift deployment that is not highly available.',
28
- )}
29
- </ListItem>
30
- {!snoExpansionSupported && (
31
- <ListItem>
32
- {t('ai:Currently, adding additional machines to your cluster is not supported.')}
33
- </ListItem>
34
- )}
35
- </>
36
- );
37
- const unsupportedWarnings = (
38
- <>
39
- <ListItem>
40
- {t('ai:SNO is in a proof-of-concept stage and is not supported in any way.')}
41
- </ListItem>
42
- <ListItem>
43
- {t(
44
- "ai:OpenShift in-place upgrades aren't expected to work with SNO. If an upgrade is needed, your system will need a redeployment.",
45
- )}
46
- </ListItem>
47
- </>
48
- );
49
-
50
- return (
51
- <Alert
52
- variant={isDevPreview ? AlertVariant.warning : AlertVariant.info}
53
- title={t('ai:Limitations for using Single Node OpenShift')}
54
- isInline
55
- >
56
- <Stack hasGutter>
57
- <StackItem>
58
- <List>
59
- {generalSNOFacts}
60
- {isDevPreview && unsupportedWarnings}
61
- </List>
62
- </StackItem>
63
- {isDevPreview && (
64
- <StackItem>
65
- <CheckboxField
66
- name="SNODisclaimer"
67
- label={t(
68
- 'ai:I understand, accept, and agree to the limitations associated with using Single Node OpenShift.',
69
- )}
70
- isDisabled={isDisabled}
71
- />
72
- </StackItem>
73
- )}
74
- </Stack>
75
- </Alert>
76
- );
77
- };
78
-
79
- export default SNODisclaimer;
@@ -1,469 +0,0 @@
1
- import React from 'react';
2
- import { Cluster, SupportLevel } from '@openshift-assisted/types/assisted-installer-service';
3
- import { FeatureId } from '../../types';
4
- import {
5
- OPERATOR_NAME_AMD_GPU,
6
- OPERATOR_NAME_AUTHORINO,
7
- OPERATOR_NAME_CNV,
8
- OPERATOR_NAME_KMM,
9
- OPERATOR_NAME_LSO,
10
- OPERATOR_NAME_LVM,
11
- OPERATOR_NAME_MCE,
12
- OPERATOR_NAME_MTV,
13
- OPERATOR_NAME_NMSTATE,
14
- OPERATOR_NAME_NODE_FEATURE_DISCOVERY,
15
- OPERATOR_NAME_NVIDIA_GPU,
16
- OPERATOR_NAME_ODF,
17
- OPERATOR_NAME_OPENSHIFT_AI,
18
- OPERATOR_NAME_OSC,
19
- OPERATOR_NAME_PIPELINES,
20
- OPERATOR_NAME_SERVERLESS,
21
- OPERATOR_NAME_SERVICEMESH,
22
- OPERATOR_NAME_NODE_MAINTENANCE,
23
- OPERATOR_NAME_KUBE_DESCHEDULER,
24
- } from '../../config/constants';
25
- import { ExternalLink } from '../ui';
26
- import {
27
- AUTHORINO_OPERATOR_LINK,
28
- CNV_LINK,
29
- getKmmDocsLink,
30
- getKubeDeschedulerLink,
31
- getLsoLink,
32
- getLvmsDocsLink,
33
- getMceDocsLink,
34
- getNmstateLink,
35
- getNodeFeatureDiscoveryLink,
36
- getNvidiaGpuLink,
37
- getServiceMeshLink,
38
- MTV_LINK,
39
- NODE_MAINTENANCE_LINK,
40
- ODF_LINK,
41
- ODF_REQUIREMENTS_LINK,
42
- OPENSHIFT_AI_LINK,
43
- OPENSHIFT_AI_REQUIREMENTS_LINK,
44
- OSC_LINK,
45
- OSC_REQUIREMENTS_LINK,
46
- PIPELINES_OPERATOR_LINK,
47
- SERVERLESS_OPERATOR_LINK,
48
- } from '../../config';
49
- import { getMajorMinorVersion } from '../../utils';
50
- import { GetFeatureSupportLevel, useNewFeatureSupportLevel } from '../newFeatureSupportLevels';
51
- import {
52
- DESCRIPTION_AMD_GPU,
53
- DESCRIPTION_AUTHORINO,
54
- DESCRIPTION_LSO,
55
- DESCRIPTION_MTV,
56
- DESCRIPTION_CNV,
57
- DESCRIPTION_KMM,
58
- DESCRIPTION_KUBE_DESCHEDULER,
59
- DESCRIPTION_MCE,
60
- DESCRIPTION_NMSTATE,
61
- DESCRIPTION_NODE_FEATURE_DISCOVERY,
62
- DESCRIPTION_NODE_MAINTENANCE,
63
- DESCRIPTION_NVIDIA_GPU,
64
- DESCRIPTION_ODF,
65
- DESCRIPTION_OPENSHIFT_AI,
66
- DESCRIPTION_OSC,
67
- DESCRIPTION_PIPELINES,
68
- DESCRIPTION_SERVERLESS,
69
- DESCRIPTION_SERVICEMESH,
70
- DESCRIPTION_LVM,
71
- } from './operatorDescriptions';
72
-
73
- // TODO check if it's unused and it can be deleted in favor of "isMajorMinorVersionEqualOrGreater"
74
- export const isOCPVersionEqualsOrMore = (
75
- openshiftVersion: string,
76
- ocpVersionToCompare: string,
77
- ): boolean => {
78
- const [majorA, minorA] = getMajorMinorVersion(openshiftVersion).split('.');
79
- const [majorB, minorB] = ocpVersionToCompare.split('.');
80
- return (
81
- Number(majorA) > Number(majorB) ||
82
- (Number(majorA) === Number(majorB) && Number(minorA) >= Number(minorB))
83
- );
84
- };
85
-
86
- export const highlightMatch = (text: string, searchTerm?: string): React.ReactNode => {
87
- if (!searchTerm) return text;
88
- const escapeSearchTerm = searchTerm.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
89
- const regex = new RegExp(`(${escapeSearchTerm})`, 'gi');
90
-
91
- const parts = text.split(regex);
92
-
93
- return parts.map((part, i) =>
94
- part.toLowerCase() === searchTerm.toLowerCase() ? <mark key={i}>{part}</mark> : part,
95
- );
96
- };
97
-
98
- export const HighlightedText = ({ text, searchTerm }: { text: string; searchTerm?: string }) => (
99
- <>{highlightMatch(text, searchTerm)}</>
100
- );
101
-
102
- export type OperatorSpec = {
103
- operatorKey: string;
104
- title: string;
105
- featureId: FeatureId;
106
- descriptionText?: string;
107
- Description?: React.ComponentType<{ openshiftVersion?: string; searchTerm?: string }>;
108
- notStandalone?: boolean;
109
- Requirements?: React.ComponentType<{ cluster: Cluster }>;
110
- supportLevel?: SupportLevel | undefined;
111
- };
112
-
113
- export const getOperatorSpecs = (
114
- getFeatureSupportLevel: GetFeatureSupportLevel,
115
- useLVMS?: boolean,
116
- ): { [category: string]: OperatorSpec[] } => {
117
- return {
118
- [categories[Category.STORAGE]]: [
119
- {
120
- operatorKey: OPERATOR_NAME_LSO,
121
- title: 'Local Storage Operator',
122
- featureId: 'LSO',
123
- descriptionText: DESCRIPTION_LSO,
124
- Description: ({ openshiftVersion, searchTerm }) => (
125
- <>
126
- <HighlightedText text={DESCRIPTION_LSO} searchTerm={searchTerm} />{' '}
127
- <ExternalLink href={getLsoLink(openshiftVersion)}>Learn more</ExternalLink>
128
- </>
129
- ),
130
- notStandalone: true,
131
- supportLevel: getFeatureSupportLevel('LSO'),
132
- },
133
- {
134
- operatorKey: OPERATOR_NAME_LVM,
135
- title: useLVMS ? 'Logical Volume Manager Storage' : 'Logical Volume Manager',
136
- featureId: 'LVM',
137
- descriptionText: DESCRIPTION_LVM,
138
- Description: ({ openshiftVersion, searchTerm }) =>
139
- useLVMS ? (
140
- <>
141
- <HighlightedText text={DESCRIPTION_LVM} searchTerm={searchTerm} />{' '}
142
- <ExternalLink href={getLvmsDocsLink(openshiftVersion)}>Learn more</ExternalLink>
143
- </>
144
- ) : (
145
- <>{DESCRIPTION_LVM}</>
146
- ),
147
- supportLevel: getFeatureSupportLevel('LVM'),
148
- },
149
- {
150
- operatorKey: OPERATOR_NAME_ODF,
151
- title: 'OpenShift Data Foundation',
152
- featureId: 'ODF',
153
- descriptionText: DESCRIPTION_ODF,
154
- Requirements: () => (
155
- <ExternalLink href={ODF_REQUIREMENTS_LINK}>
156
- Learn more about the requirements for OpenShift Data Foundation
157
- </ExternalLink>
158
- ),
159
- Description: ({ searchTerm }) => (
160
- <>
161
- <HighlightedText text={DESCRIPTION_ODF} searchTerm={searchTerm} />{' '}
162
- <ExternalLink href={ODF_LINK}>Learn more</ExternalLink>
163
- </>
164
- ),
165
- supportLevel: getFeatureSupportLevel('ODF'),
166
- },
167
- ],
168
- [categories[Category.VIRT]]: [
169
- {
170
- operatorKey: OPERATOR_NAME_CNV,
171
- title: 'OpenShift Virtualization',
172
- featureId: 'CNV',
173
- descriptionText: DESCRIPTION_CNV,
174
- Requirements: () => (
175
- <>Enabled CPU virtualization support in BIOS (Intel-VT / AMD-V) on all nodes</>
176
- ),
177
- Description: ({ searchTerm }) => (
178
- <>
179
- <HighlightedText text={DESCRIPTION_CNV} searchTerm={searchTerm} />{' '}
180
- <ExternalLink href={CNV_LINK}>Learn more</ExternalLink>
181
- </>
182
- ),
183
- supportLevel: getFeatureSupportLevel('CNV'),
184
- },
185
- {
186
- operatorKey: OPERATOR_NAME_MTV,
187
- title: 'Migration Toolkit for Virtualization',
188
- featureId: 'MTV',
189
- descriptionText: DESCRIPTION_MTV,
190
- Description: ({ searchTerm }) => (
191
- <>
192
- <HighlightedText text={DESCRIPTION_MTV} searchTerm={searchTerm} />{' '}
193
- <ExternalLink href={MTV_LINK}>Learn more</ExternalLink>
194
- </>
195
- ),
196
- supportLevel: getFeatureSupportLevel('MTV'),
197
- },
198
- {
199
- operatorKey: OPERATOR_NAME_OSC,
200
- title: 'OpenShift sandboxed containers',
201
- featureId: 'OSC',
202
- descriptionText: DESCRIPTION_OSC,
203
- Requirements: () => (
204
- <ExternalLink href={OSC_REQUIREMENTS_LINK}>
205
- Learn more about the requirements for OpenShift sandboxed containers
206
- </ExternalLink>
207
- ),
208
- Description: () => (
209
- <>
210
- {DESCRIPTION_OSC} <ExternalLink href={OSC_LINK}>Learn more</ExternalLink>
211
- </>
212
- ),
213
- supportLevel: getFeatureSupportLevel('OSC'),
214
- },
215
- ],
216
- [categories[Category.AI]]: [
217
- {
218
- operatorKey: OPERATOR_NAME_OPENSHIFT_AI,
219
- title: 'OpenShift AI',
220
- featureId: 'OPENSHIFT_AI',
221
- descriptionText: DESCRIPTION_OPENSHIFT_AI,
222
- Requirements: () => (
223
- <ExternalLink href={OPENSHIFT_AI_REQUIREMENTS_LINK}>Learn more</ExternalLink>
224
- ),
225
- Description: ({ searchTerm }) => (
226
- <>
227
- <HighlightedText text={DESCRIPTION_OPENSHIFT_AI} searchTerm={searchTerm} />{' '}
228
- <ExternalLink href={OPENSHIFT_AI_LINK}>Learn more</ExternalLink>
229
- </>
230
- ),
231
- supportLevel: getFeatureSupportLevel('OPENSHIFT_AI'),
232
- },
233
- {
234
- operatorKey: OPERATOR_NAME_AMD_GPU,
235
- title: 'AMD GPU',
236
- featureId: 'AMD_GPU',
237
- descriptionText: DESCRIPTION_AMD_GPU,
238
- Requirements: () => <>Requires at least one supported AMD GPU</>,
239
- Description: ({ searchTerm }) => (
240
- <>
241
- {' '}
242
- <HighlightedText text={DESCRIPTION_AMD_GPU} searchTerm={searchTerm} />{' '}
243
- </>
244
- ),
245
- supportLevel: getFeatureSupportLevel('AMD_GPU'),
246
- },
247
- {
248
- operatorKey: OPERATOR_NAME_NVIDIA_GPU,
249
- title: 'NVIDIA GPU',
250
- featureId: 'NVIDIA_GPU',
251
- descriptionText: DESCRIPTION_NVIDIA_GPU,
252
- Requirements: () => <>Requires at least one supported NVIDIA GPU</>,
253
- Description: ({ openshiftVersion, searchTerm }) => (
254
- <>
255
- <HighlightedText text={DESCRIPTION_NVIDIA_GPU} searchTerm={searchTerm} />{' '}
256
- <ExternalLink href={getNvidiaGpuLink(openshiftVersion)}>Learn more</ExternalLink>
257
- </>
258
- ),
259
- supportLevel: getFeatureSupportLevel('NVIDIA_GPU'),
260
- },
261
- ],
262
- [categories[Category.NETWORK]]: [
263
- {
264
- operatorKey: OPERATOR_NAME_NMSTATE,
265
- title: 'NMState',
266
- featureId: 'NMSTATE',
267
- descriptionText: DESCRIPTION_NMSTATE,
268
- Description: ({ openshiftVersion, searchTerm }) => (
269
- <>
270
- <HighlightedText text={DESCRIPTION_NMSTATE} searchTerm={searchTerm} />{' '}
271
- <ExternalLink href={getNmstateLink(openshiftVersion)}>Learn more</ExternalLink>
272
- </>
273
- ),
274
- supportLevel: getFeatureSupportLevel('NMSTATE'),
275
- },
276
- {
277
- operatorKey: OPERATOR_NAME_SERVICEMESH,
278
- title: 'Service Mesh',
279
- featureId: 'SERVICEMESH',
280
- descriptionText: DESCRIPTION_SERVICEMESH,
281
- Description: ({ openshiftVersion, searchTerm }) => (
282
- <>
283
- <HighlightedText text={DESCRIPTION_SERVICEMESH} searchTerm={searchTerm} />{' '}
284
- <ExternalLink href={getServiceMeshLink(openshiftVersion)}>Learn more</ExternalLink>
285
- </>
286
- ),
287
- notStandalone: true,
288
- supportLevel: getFeatureSupportLevel('SERVICEMESH'),
289
- },
290
- ],
291
- [categories[Category.SECURITY]]: [
292
- {
293
- operatorKey: OPERATOR_NAME_AUTHORINO,
294
- title: 'Authorino',
295
- featureId: 'AUTHORINO',
296
- descriptionText: DESCRIPTION_AUTHORINO,
297
- Description: ({ searchTerm }) => (
298
- <>
299
- <HighlightedText text={DESCRIPTION_AUTHORINO} searchTerm={searchTerm} />{' '}
300
- <ExternalLink href={AUTHORINO_OPERATOR_LINK}>Learn more</ExternalLink>
301
- </>
302
- ),
303
- notStandalone: true,
304
- supportLevel: getFeatureSupportLevel('AUTHORINO'),
305
- },
306
- {
307
- operatorKey: OPERATOR_NAME_KMM,
308
- title: 'Kernel Module Management',
309
- featureId: 'KMM',
310
- descriptionText: DESCRIPTION_KMM,
311
- Description: ({ openshiftVersion, searchTerm }) => (
312
- <>
313
- <HighlightedText text={DESCRIPTION_KMM} searchTerm={searchTerm} />{' '}
314
- <ExternalLink href={getKmmDocsLink(openshiftVersion)}>Learn more</ExternalLink>
315
- </>
316
- ),
317
- supportLevel: getFeatureSupportLevel('KMM'),
318
- },
319
- ],
320
- [categories[Category.CI_CD]]: [
321
- {
322
- operatorKey: OPERATOR_NAME_PIPELINES,
323
- title: 'Pipelines',
324
- featureId: 'PIPELINES',
325
- descriptionText: DESCRIPTION_PIPELINES,
326
- Description: ({ searchTerm }) => (
327
- <>
328
- <HighlightedText text={DESCRIPTION_PIPELINES} searchTerm={searchTerm} />{' '}
329
- <ExternalLink href={PIPELINES_OPERATOR_LINK}>Learn more</ExternalLink>
330
- </>
331
- ),
332
- notStandalone: true,
333
- supportLevel: getFeatureSupportLevel('PIPELINES'),
334
- },
335
- {
336
- operatorKey: OPERATOR_NAME_SERVERLESS,
337
- title: 'Serverless',
338
- featureId: 'SERVERLESS',
339
- descriptionText: DESCRIPTION_SERVERLESS,
340
- Description: ({ searchTerm }) => (
341
- <>
342
- <HighlightedText text={DESCRIPTION_SERVERLESS} searchTerm={searchTerm} />{' '}
343
- <ExternalLink href={SERVERLESS_OPERATOR_LINK}>Learn more</ExternalLink>
344
- </>
345
- ),
346
- notStandalone: true,
347
- supportLevel: getFeatureSupportLevel('SERVERLESS'),
348
- },
349
- ],
350
- [categories[Category.PLATFORM]]: [
351
- {
352
- operatorKey: OPERATOR_NAME_MCE,
353
- title: 'Multicluster engine',
354
- featureId: 'MCE',
355
- descriptionText: DESCRIPTION_MCE,
356
- Description: ({ openshiftVersion, searchTerm }) => (
357
- <>
358
- <HighlightedText text={DESCRIPTION_MCE} searchTerm={searchTerm} />{' '}
359
- <ExternalLink href={getMceDocsLink(openshiftVersion)}>Learn more</ExternalLink>
360
- </>
361
- ),
362
- supportLevel: getFeatureSupportLevel('MCE'),
363
- },
364
- {
365
- operatorKey: OPERATOR_NAME_NODE_MAINTENANCE,
366
- title: 'Node Maintenance',
367
- featureId: 'NODE_MAINTENANCE',
368
- descriptionText: DESCRIPTION_NODE_MAINTENANCE,
369
- Description: () => (
370
- <>
371
- {DESCRIPTION_NODE_MAINTENANCE}{' '}
372
- <ExternalLink href={NODE_MAINTENANCE_LINK}>Learn more</ExternalLink>
373
- </>
374
- ),
375
- notStandalone: true,
376
- supportLevel: getFeatureSupportLevel('NODE_MAINTENANCE'),
377
- },
378
- ],
379
- [categories[Category.SCHEDULING]]: [
380
- {
381
- operatorKey: OPERATOR_NAME_NODE_FEATURE_DISCOVERY,
382
- title: 'Node Feature Discovery',
383
- featureId: 'NODE_FEATURE_DISCOVERY',
384
- descriptionText: DESCRIPTION_NODE_FEATURE_DISCOVERY,
385
- Description: ({ openshiftVersion }) => (
386
- <>
387
- {DESCRIPTION_NODE_FEATURE_DISCOVERY}{' '}
388
- <ExternalLink href={getNodeFeatureDiscoveryLink(openshiftVersion)}>
389
- Learn more
390
- </ExternalLink>
391
- </>
392
- ),
393
- supportLevel: getFeatureSupportLevel('NODE_FEATURE_DISCOVERY'),
394
- },
395
- {
396
- operatorKey: OPERATOR_NAME_KUBE_DESCHEDULER,
397
- title: 'Kube Descheduler',
398
- featureId: 'KUBE_DESCHEDULER',
399
- descriptionText: DESCRIPTION_KUBE_DESCHEDULER,
400
- Description: ({ openshiftVersion, searchTerm }) => (
401
- <>
402
- <HighlightedText text={DESCRIPTION_KUBE_DESCHEDULER} searchTerm={searchTerm} />{' '}
403
- <ExternalLink href={getKubeDeschedulerLink(openshiftVersion)}>Learn more</ExternalLink>
404
- </>
405
- ),
406
- notStandalone: true,
407
- supportLevel: getFeatureSupportLevel('KUBE_DESCHEDULER'),
408
- },
409
- ],
410
- };
411
- };
412
-
413
- export const useOperatorSpecs = () => {
414
- const { getFeatureSupportLevel } = useNewFeatureSupportLevel();
415
- const useLVMS = getFeatureSupportLevel('LVM') === 'supported';
416
-
417
- // Grouped by category
418
- const byCategory = React.useMemo(
419
- () => getOperatorSpecs(getFeatureSupportLevel, useLVMS),
420
- [getFeatureSupportLevel, useLVMS],
421
- );
422
-
423
- // Flat map operatorKey -> spec
424
- const byKey: Record<string, OperatorSpec> = React.useMemo(() => {
425
- return Object.values(byCategory).reduce((acc, specs) => {
426
- specs.forEach((spec) => {
427
- acc[spec.operatorKey] = spec;
428
- });
429
- return acc;
430
- }, {} as Record<string, OperatorSpec>);
431
- }, [byCategory]);
432
-
433
- return { byCategory, byKey };
434
- };
435
-
436
- export const getOperatorTitleByFeatureId = (featureId: FeatureId): string | undefined => {
437
- const allSpecs = getOperatorSpecs(() => undefined);
438
-
439
- for (const categorySpecs of Object.values(allSpecs)) {
440
- const spec = categorySpecs.find((s) => s.featureId === featureId);
441
- if (spec) {
442
- return spec.title;
443
- }
444
- }
445
-
446
- return undefined;
447
- };
448
-
449
- enum Category {
450
- STORAGE,
451
- VIRT,
452
- AI,
453
- NETWORK,
454
- CI_CD,
455
- PLATFORM,
456
- SECURITY,
457
- SCHEDULING,
458
- }
459
-
460
- export const categories: { [key in Category]: string } = {
461
- [Category.STORAGE]: 'Storage',
462
- [Category.VIRT]: 'Virtualization',
463
- [Category.AI]: 'AI',
464
- [Category.NETWORK]: 'Network',
465
- [Category.SECURITY]: 'Security & Access Control',
466
- [Category.CI_CD]: 'CI/CD & Dev Productivity',
467
- [Category.PLATFORM]: 'Platform Operations & Lifecycle',
468
- [Category.SCHEDULING]: 'Scheduling',
469
- };
@@ -1,98 +0,0 @@
1
- import * as React from 'react';
2
- import { useField, useFormikContext } from 'formik';
3
- import {
4
- Checkbox,
5
- FormGroup,
6
- FormHelperText,
7
- HelperText,
8
- HelperTextItem,
9
- Tooltip,
10
- } from '@patternfly/react-core';
11
- import { OpenshiftVersionOptionType } from '../../../types';
12
- import { getFieldId } from './utils';
13
- import { CheckboxFieldProps } from './types';
14
- import { FeatureSupportLevelBadge, useFeatureSupportLevel } from '../../featureSupportLevels';
15
- import { ClusterCreateParams } from '@openshift-assisted/types/assisted-installer-service';
16
- import { useTranslation } from '../../../hooks/use-translation-wrapper';
17
-
18
- type SingleNodeCheckboxProps = CheckboxFieldProps & { versions: OpenshiftVersionOptionType[] };
19
-
20
- const SingleNodeCheckbox: React.FC<SingleNodeCheckboxProps> = ({
21
- versions,
22
- validate,
23
- idPostfix,
24
- ...props
25
- }) => {
26
- const {
27
- values: { openshiftVersion },
28
- } = useFormikContext<ClusterCreateParams>();
29
- const [field, meta, helpers] = useField<'None' | 'Full'>({ name: props.name, validate });
30
- const featureSupportLevelContext = useFeatureSupportLevel();
31
- const prevVersionRef = React.useRef(openshiftVersion);
32
- const fieldId = getFieldId(props.name, 'input', idPostfix);
33
- const { t } = useTranslation();
34
- const { value } = meta;
35
- const { setValue } = helpers;
36
- const isSupportedVersionAvailable = !!versions.find((version) =>
37
- featureSupportLevelContext.isFeatureSupported(version.value, 'SNO'),
38
- );
39
- const onChanged = React.useCallback(
40
- (checked: boolean) => setValue(checked ? 'None' : 'Full'),
41
- [setValue],
42
- );
43
-
44
- const disabledReason = featureSupportLevelContext.getFeatureDisabledReason(
45
- openshiftVersion,
46
- 'SNO',
47
- t,
48
- );
49
-
50
- React.useEffect(() => {
51
- if (
52
- prevVersionRef.current !== openshiftVersion &&
53
- !featureSupportLevelContext.isFeatureSupported(openshiftVersion, 'SNO')
54
- ) {
55
- //invoke updating SNO value only if the version changed to not be in danger of touching existing clusters
56
- onChanged(false);
57
- }
58
- prevVersionRef.current = openshiftVersion;
59
- }, [openshiftVersion, onChanged, featureSupportLevelContext]);
60
-
61
- if (isSupportedVersionAvailable) {
62
- return (
63
- <FormGroup isInline fieldId={fieldId}>
64
- <Tooltip hidden={!disabledReason} content={disabledReason}>
65
- <Checkbox
66
- {...field}
67
- {...props}
68
- id={fieldId}
69
- label={
70
- <>
71
- {t('ai:Install single node OpenShift (SNO)')}&nbsp;
72
- <FeatureSupportLevelBadge featureId="SNO" openshiftVersion={openshiftVersion} />
73
- </>
74
- }
75
- aria-describedby={`${fieldId}-helper`}
76
- description={
77
- <FormGroup>
78
- <FormHelperText>
79
- <HelperText id={fieldId}>
80
- <HelperTextItem>
81
- {t('ai:SNO enables you to install OpenShift using only one host.')}
82
- </HelperTextItem>
83
- </HelperText>
84
- </FormHelperText>
85
- </FormGroup>
86
- }
87
- isChecked={value === 'None'}
88
- onChange={(_event, value) => onChanged(value)}
89
- className="with-tooltip"
90
- />
91
- </Tooltip>
92
- </FormGroup>
93
- );
94
- }
95
- return null;
96
- };
97
-
98
- export default SingleNodeCheckbox;