Wizard: Remove RHEL betas from release options
This removes RHEL betas from release menu and cleans up the code in several places.
This commit is contained in:
parent
90c2c65ebe
commit
64e5744d8c
7 changed files with 8 additions and 63 deletions
|
|
@ -65,7 +65,6 @@ import {
|
|||
AARCH64,
|
||||
AMPLITUDE_MODULE_NAME,
|
||||
RHEL_10,
|
||||
RHEL_10_BETA,
|
||||
RHEL_8,
|
||||
RHEL_9,
|
||||
} from '../../constants';
|
||||
|
|
@ -210,9 +209,6 @@ const CreateImageWizard = ({ isEdit }: CreateImageWizardProps) => {
|
|||
if (searchParams.get('release') === 'rhel9') {
|
||||
dispatch(changeDistribution(RHEL_9));
|
||||
}
|
||||
if (searchParams.get('release') === 'rhel10beta') {
|
||||
dispatch(changeDistribution(RHEL_10_BETA));
|
||||
}
|
||||
if (searchParams.get('release') === 'rhel10') {
|
||||
dispatch(changeDistribution(RHEL_10));
|
||||
}
|
||||
|
|
@ -489,7 +485,6 @@ const CreateImageWizard = ({ isEdit }: CreateImageWizardProps) => {
|
|||
name={complianceEnabled ? 'Compliance' : 'OpenSCAP'}
|
||||
id="step-oscap"
|
||||
key="step-oscap"
|
||||
isHidden={distribution === RHEL_10_BETA}
|
||||
navItem={CustomStatusNavItem}
|
||||
footer={
|
||||
<CustomWizardFooter disableNext={false} optional={true} />
|
||||
|
|
@ -529,9 +524,7 @@ const CreateImageWizard = ({ isEdit }: CreateImageWizardProps) => {
|
|||
key="wizard-repository-snapshot"
|
||||
navItem={CustomStatusNavItem}
|
||||
status={snapshotValidation.disabledNext ? 'error' : 'default'}
|
||||
isHidden={
|
||||
distribution === RHEL_10_BETA || !!process.env.IS_ON_PREMISE
|
||||
}
|
||||
isHidden={!!process.env.IS_ON_PREMISE}
|
||||
footer={
|
||||
<CustomWizardFooter
|
||||
disableNext={snapshotValidation.disabledNext}
|
||||
|
|
@ -546,9 +539,7 @@ const CreateImageWizard = ({ isEdit }: CreateImageWizardProps) => {
|
|||
id="wizard-custom-repositories"
|
||||
key="wizard-custom-repositories"
|
||||
navItem={CustomStatusNavItem}
|
||||
isHidden={
|
||||
distribution === RHEL_10_BETA || !!process.env.IS_ON_PREMISE
|
||||
}
|
||||
isHidden={!!process.env.IS_ON_PREMISE}
|
||||
isDisabled={snapshotValidation.disabledNext}
|
||||
footer={
|
||||
<CustomWizardFooter disableNext={false} optional={true} />
|
||||
|
|
|
|||
|
|
@ -13,14 +13,12 @@ import {
|
|||
ON_PREM_RELEASES,
|
||||
RELEASES,
|
||||
RHEL_10,
|
||||
RHEL_10_BETA,
|
||||
RHEL_10_FULL_SUPPORT,
|
||||
RHEL_10_MAINTENANCE_SUPPORT,
|
||||
RHEL_8,
|
||||
RHEL_8_FULL_SUPPORT,
|
||||
RHEL_8_MAINTENANCE_SUPPORT,
|
||||
RHEL_9,
|
||||
RHEL_9_BETA,
|
||||
RHEL_9_FULL_SUPPORT,
|
||||
RHEL_9_MAINTENANCE_SUPPORT,
|
||||
} from '../../../../../constants';
|
||||
|
|
@ -33,7 +31,6 @@ import {
|
|||
} from '../../../../../store/wizardSlice';
|
||||
import isRhel from '../../../../../Utilities/isRhel';
|
||||
import { toMonthAndYear } from '../../../../../Utilities/time';
|
||||
import { useFlag } from '../../../../../Utilities/useGetEnvironment';
|
||||
|
||||
const ReleaseSelect = () => {
|
||||
// What the UI refers to as the "release" is referred to as the "distribution" in the API.
|
||||
|
|
@ -44,9 +41,6 @@ const ReleaseSelect = () => {
|
|||
const [isOpen, setIsOpen] = useState(false);
|
||||
const [showDevelopmentOptions, setShowDevelopmentOptions] = useState(false);
|
||||
|
||||
const isRHEL9BetaEnabled = useFlag('image-builder.rhel9.beta.enabled');
|
||||
const isRHEL10BetaEnabled = useFlag('image-builder.rhel10.beta.enabled');
|
||||
|
||||
const releases = process.env.IS_ON_PREMISE ? ON_PREM_RELEASES : RELEASES;
|
||||
|
||||
const handleSelect = (_event: React.MouseEvent, selection: Distributions) => {
|
||||
|
|
@ -70,10 +64,6 @@ const ReleaseSelect = () => {
|
|||
return '';
|
||||
}
|
||||
|
||||
if (key === RHEL_9_BETA || key === RHEL_10_BETA) {
|
||||
return '';
|
||||
}
|
||||
|
||||
let fullSupportEnd = '';
|
||||
let maintenanceSupportEnd = '';
|
||||
|
||||
|
|
@ -105,14 +95,6 @@ const ReleaseSelect = () => {
|
|||
return key === distribution;
|
||||
}
|
||||
|
||||
if (key === RHEL_9_BETA) {
|
||||
return isRHEL9BetaEnabled;
|
||||
}
|
||||
|
||||
if (key === RHEL_10_BETA) {
|
||||
return isRHEL10BetaEnabled;
|
||||
}
|
||||
|
||||
// Only show non-RHEL distros if expanded
|
||||
if (showDevelopmentOptions) {
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ import { Distributions } from '../../../../store/imageBuilderApi';
|
|||
export const removeBetaFromRelease = (dist: Distributions): Distributions => {
|
||||
switch (dist) {
|
||||
case RHEL_10_BETA:
|
||||
return RHEL_10 as Distributions;
|
||||
return RHEL_10;
|
||||
case RHEL_9_BETA:
|
||||
return RHEL_9;
|
||||
default:
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import React, { useEffect, useState } from 'react';
|
||||
import React, { useState } from 'react';
|
||||
|
||||
import {
|
||||
Button,
|
||||
|
|
@ -11,11 +11,10 @@ import {
|
|||
import { ExternalLinkAltIcon, HelpIcon } from '@patternfly/react-icons';
|
||||
import { useFlag } from '@unleash/proxy-client-react';
|
||||
|
||||
import { INSIGHTS_URL, RHC_URL, RHEL_10_BETA } from '../../../../../constants';
|
||||
import { INSIGHTS_URL, RHC_URL } from '../../../../../constants';
|
||||
import { useAppDispatch, useAppSelector } from '../../../../../store/hooks';
|
||||
import {
|
||||
changeRegistrationType,
|
||||
selectDistribution,
|
||||
selectRegistrationType,
|
||||
} from '../../../../../store/wizardSlice';
|
||||
|
||||
|
|
@ -98,7 +97,6 @@ const RhcPopover = () => {
|
|||
|
||||
const Registration = () => {
|
||||
const dispatch = useAppDispatch();
|
||||
const distribution = useAppSelector(selectDistribution);
|
||||
const registrationType = useAppSelector(selectRegistrationType);
|
||||
|
||||
const [showOptions, setShowOptions] = useState(
|
||||
|
|
@ -109,13 +107,6 @@ const Registration = () => {
|
|||
'image-builder.satellite.enabled'
|
||||
);
|
||||
|
||||
// TO DO: Remove when rhc starts working for RHEL 10 Beta
|
||||
useEffect(() => {
|
||||
if (distribution === RHEL_10_BETA) {
|
||||
dispatch(changeRegistrationType('register-now-insights'));
|
||||
}
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<FormGroup label="Registration method">
|
||||
<Radio
|
||||
|
|
@ -126,11 +117,8 @@ const Registration = () => {
|
|||
registrationType === 'register-now-rhc'
|
||||
}
|
||||
onChange={(_event, checked) => {
|
||||
// TO DO: Update when rhc starts working for RHEL 10 Beta
|
||||
if (checked && distribution !== RHEL_10_BETA) {
|
||||
if (checked) {
|
||||
dispatch(changeRegistrationType('register-now-rhc'));
|
||||
} else if (checked && distribution === RHEL_10_BETA) {
|
||||
dispatch(changeRegistrationType('register-now-insights'));
|
||||
}
|
||||
}}
|
||||
id="register-system-now"
|
||||
|
|
@ -187,8 +175,6 @@ const Registration = () => {
|
|||
dispatch(changeRegistrationType('register-now-insights'));
|
||||
}
|
||||
}}
|
||||
// TO DO: Remove when rhc starts working for RHEL 10 Beta
|
||||
isDisabled={distribution === RHEL_10_BETA}
|
||||
id="register-system-now-rhc"
|
||||
name="register-system-rhc"
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -9,10 +9,8 @@ import {
|
|||
FIRSTBOOT_PATH,
|
||||
FIRSTBOOT_SERVICE_PATH,
|
||||
RHEL_10,
|
||||
RHEL_10_BETA,
|
||||
RHEL_8,
|
||||
RHEL_9,
|
||||
RHEL_9_BETA,
|
||||
SATELLITE_PATH,
|
||||
SATELLITE_SERVICE_DATA,
|
||||
SATELLITE_SERVICE_PATH,
|
||||
|
|
@ -163,12 +161,8 @@ const convertFilesystemToPartition = (filesystem: Filesystem): Partition => {
|
|||
* @param distribution blueprint distribution
|
||||
*/
|
||||
const getLatestRelease = (distribution: Distributions) => {
|
||||
return distribution === RHEL_10_BETA
|
||||
? (RHEL_10_BETA as Distributions)
|
||||
: distribution.startsWith('rhel-10')
|
||||
? (RHEL_10 as Distributions)
|
||||
: distribution === RHEL_9_BETA
|
||||
? (RHEL_9_BETA as Distributions)
|
||||
return distribution.startsWith('rhel-10')
|
||||
? RHEL_10
|
||||
: distribution.startsWith('rhel-9')
|
||||
? RHEL_9
|
||||
: distribution.startsWith('rhel-8')
|
||||
|
|
|
|||
|
|
@ -88,8 +88,6 @@ export const RELEASES = new Map([
|
|||
[RHEL_10, 'Red Hat Enterprise Linux (RHEL) 10'],
|
||||
[RHEL_9, 'Red Hat Enterprise Linux (RHEL) 9'],
|
||||
[RHEL_8, 'Red Hat Enterprise Linux (RHEL) 8'],
|
||||
[RHEL_9_BETA, 'Red Hat Enterprise Linux (RHEL) 9 Beta'],
|
||||
[RHEL_10_BETA, 'Red Hat Enterprise Linux (RHEL) 10 Beta'],
|
||||
[CENTOS_9, 'CentOS Stream 9'],
|
||||
[CENTOS_10, 'CentOS Stream 10'],
|
||||
]);
|
||||
|
|
@ -98,7 +96,6 @@ export const ON_PREM_RELEASES = new Map([
|
|||
[CENTOS_10, 'CentOS Stream 10'],
|
||||
[FEDORA_41, 'Fedora Linux 41'],
|
||||
[FEDORA_42, 'Fedora Linux 42'],
|
||||
[RHEL_10_BETA, 'Red Hat Enterprise Linux (RHEL) 10 Beta'],
|
||||
[RHEL_10, 'Red Hat Enterprise Linux (RHEL) 10'],
|
||||
]);
|
||||
|
||||
|
|
|
|||
|
|
@ -682,11 +682,6 @@ describe('Set release using query parameter', () => {
|
|||
await renderCreateMode({ release: 'rhel9' });
|
||||
await screen.findByText('Red Hat Enterprise Linux (RHEL) 9');
|
||||
});
|
||||
|
||||
test('rhel 10 beta (query parameter provided)', async () => {
|
||||
await renderCreateMode({ release: 'rhel10beta' });
|
||||
await screen.findByText('Red Hat Enterprise Linux (RHEL) 10 Beta');
|
||||
});
|
||||
});
|
||||
|
||||
describe('Set architecture using query parameter', () => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue