diff --git a/libs/ui-lib/lib/common/components/clusterConfiguration/OpenShiftVersionSelect.tsx b/libs/ui-lib/lib/common/components/clusterConfiguration/OpenShiftVersionSelect.tsx index a5a5a5da62..f499b3403e 100644 --- a/libs/ui-lib/lib/common/components/clusterConfiguration/OpenShiftVersionSelect.tsx +++ b/libs/ui-lib/lib/common/components/clusterConfiguration/OpenShiftVersionSelect.tsx @@ -35,7 +35,10 @@ const getOpenshiftVersionHelperText = return null; } - if (selectedVersion.supportLevel !== 'production') { + if ( + selectedVersion.supportLevel !== 'production' && + selectedVersion.supportLevel !== 'maintenance' + ) { return ( <> } /> @@ -55,12 +58,10 @@ type OpenShiftVersionSelectProps = { const OpenShiftVersionSelect: React.FC = ({ versions, onChange }) => { const selectOptions = React.useMemo( () => - versions - .filter((version) => version.supportLevel !== 'maintenance') - .map((version) => ({ - label: version.label, - value: version.value, - })), + versions.map((version) => ({ + label: version.label, + value: version.value, + })), [versions], ); const { t } = useTranslation(); diff --git a/libs/ui-lib/lib/ocm/components/clusterConfiguration/OcmOpenShiftVersionSelect.tsx b/libs/ui-lib/lib/ocm/components/clusterConfiguration/OcmOpenShiftVersionSelect.tsx index 9e313d40dd..54cdc006b8 100644 --- a/libs/ui-lib/lib/ocm/components/clusterConfiguration/OcmOpenShiftVersionSelect.tsx +++ b/libs/ui-lib/lib/ocm/components/clusterConfiguration/OcmOpenShiftVersionSelect.tsx @@ -44,7 +44,10 @@ const getOpenshiftVersionHelperText = ( return null; } - if (selectedVersion.supportLevel !== 'production') { + if ( + selectedVersion.supportLevel !== 'production' && + selectedVersion.supportLevel !== 'maintenance' + ) { let messageSelectedVersion = t('ai:Please note that this version is not production-ready.'); if (selectedVersion.supportLevel === 'end-of-life') { messageSelectedVersion = t('ai:Please note that this version is not maintained anymore.'); @@ -72,17 +75,15 @@ const OcmOpenShiftVersionSelect = ({ versions }: OcmOpenShiftVersionSelectProps) } = useFormikContext(); const selectOptions = React.useMemo( () => - versions - .filter((version) => version.supportLevel !== 'maintenance') - .map((version) => ({ - label: - version.supportLevel === 'beta' - ? version.label + ' - ' + t('ai:Developer preview release') - : version.label, - // This is the "key" from openshift-versions API response - // It can either be in the long or short (for default versions) form - value: version.value, - })), + versions.map((version) => ({ + label: + version.supportLevel === 'beta' + ? version.label + ' - ' + t('ai:Developer preview release') + : version.label, + // This is the "key" from openshift-versions API response + // It can either be in the long or short (for default versions) form + value: version.value, + })), [versions, t], ); const [isOpenshiftVersionModalOpen, setIsOpenshiftVersionModalOpen] = React.useState(false);