From 61abf246440a072f3d7b9b92171d604c91893e2c Mon Sep 17 00:00:00 2001 From: mgold1234 Date: Sun, 4 Feb 2024 12:20:56 +0200 Subject: [PATCH] V2Wizard: fix ReleaseLifecycle component in the Review step this commit fix https://github.com/RedHatInsights/image-builder-frontend/issues/1615 add the relevant data to release lifeCycle at review step --- .../formComponents/ReleaseLifecycle.tsx | 2 +- .../steps/Review/ReviewStepTextLists.tsx | 28 +++++++++++++++++-- 2 files changed, 26 insertions(+), 4 deletions(-) diff --git a/src/Components/CreateImageWizard/formComponents/ReleaseLifecycle.tsx b/src/Components/CreateImageWizard/formComponents/ReleaseLifecycle.tsx index 79a05df6..d1174eb9 100644 --- a/src/Components/CreateImageWizard/formComponents/ReleaseLifecycle.tsx +++ b/src/Components/CreateImageWizard/formComponents/ReleaseLifecycle.tsx @@ -107,7 +107,7 @@ export const chartMajorVersionCfg = { }, }; -const MajorReleasesLifecyclesChart = () => { +export const MajorReleasesLifecyclesChart = () => { return ( diff --git a/src/Components/CreateImageWizardV2/steps/Review/ReviewStepTextLists.tsx b/src/Components/CreateImageWizardV2/steps/Review/ReviewStepTextLists.tsx index f5d6fa18..e3792ef5 100644 --- a/src/Components/CreateImageWizardV2/steps/Review/ReviewStepTextLists.tsx +++ b/src/Components/CreateImageWizardV2/steps/Review/ReviewStepTextLists.tsx @@ -12,16 +12,22 @@ import { TextListItemVariants, TextVariants, Spinner, + FormGroup, } from '@patternfly/react-core'; import { ExclamationTriangleIcon, HelpIcon } from '@patternfly/react-icons'; import { useChrome } from '@redhat-cloud-services/frontend-components/useChrome'; -import ReleaseLifecycle from './../ImageOutput/ReleaseLifecycle'; import ActivationKeyInformation from './../Registration/ActivationKeyInformation'; import { AwsAccountId } from './../TargetEnvironment/Aws/AwsAccountId'; import { RepositoriesTable } from './ReviewStepTables'; -import { RELEASES } from '../../../../constants'; +import { + RELEASES, + RHEL_8, + RHEL_8_FULL_SUPPORT, + RHEL_8_MAINTENANCE_SUPPORT, + RHEL_9, +} from '../../../../constants'; import { extractProvisioningList } from '../../../../store/helpers'; import { useAppSelector } from '../../../../store/hooks'; import { useGetOscapCustomizationsQuery } from '../../../../store/imageBuilderApi'; @@ -42,7 +48,9 @@ import { selectProfile, selectRegistrationType, } from '../../../../store/wizardSlice'; +import { toMonthAndYear } from '../../../../Utilities/time'; import { useGetEnvironment } from '../../../../Utilities/useGetEnvironment'; +import { MajorReleasesLifecyclesChart } from '../../../CreateImageWizard/formComponents/ReleaseLifecycle'; const ExpirationWarning = () => { return ( @@ -57,7 +65,21 @@ export const ImageOutputList = () => { const arch = useAppSelector((state) => selectArchitecture(state)); return ( - + {distribution === RHEL_8 && ( + <> + + {RELEASES.get(distribution)} will be supported through{' '} + {toMonthAndYear(RHEL_8_FULL_SUPPORT[0])}, with optional ELS support + through {toMonthAndYear(RHEL_8_MAINTENANCE_SUPPORT[0])}. Consider + building an image with {RELEASES.get(RHEL_9)} to extend the support + period. + + + + +
+ + )}