wizard: the oscap step is reserved for beta
Do not show the oscap step outside of beta. Only protecting the step itself is sufficient since the FSC and the Packages steps wont load any profile data if no entry point allows to get one. HMS-2077 wizardrecreatebeta
This commit is contained in:
parent
02a642df19
commit
3e11639960
3 changed files with 28 additions and 8 deletions
|
|
@ -478,8 +478,10 @@ const requestToState = (composeRequest, distroInfo, isBeta, isProd) => {
|
|||
}
|
||||
|
||||
// oscap policy
|
||||
formState['oscap-policy'] =
|
||||
composeRequest?.customizations?.openscap?.profile_id;
|
||||
if (isBeta) {
|
||||
formState['oscap-policy'] =
|
||||
composeRequest?.customizations?.openscap?.profile_id;
|
||||
}
|
||||
|
||||
return formState;
|
||||
} else {
|
||||
|
|
@ -487,7 +489,7 @@ const requestToState = (composeRequest, distroInfo, isBeta, isProd) => {
|
|||
}
|
||||
};
|
||||
|
||||
const formStepHistory = (composeRequest, contentSourcesEnabled) => {
|
||||
const formStepHistory = (composeRequest, contentSourcesEnabled, isBeta) => {
|
||||
if (composeRequest) {
|
||||
const imageRequest = composeRequest.image_requests[0];
|
||||
const uploadRequest = imageRequest.upload_request;
|
||||
|
|
@ -506,7 +508,9 @@ const formStepHistory = (composeRequest, contentSourcesEnabled) => {
|
|||
steps.push('registration');
|
||||
}
|
||||
|
||||
steps.push('Compliance');
|
||||
if (isBeta) {
|
||||
steps.push('Compliance');
|
||||
}
|
||||
|
||||
if (contentSourcesEnabled) {
|
||||
steps.push('File system configuration', 'packages', 'repositories');
|
||||
|
|
@ -564,7 +568,11 @@ const CreateImageWizard = () => {
|
|||
isBeta(),
|
||||
isProd()
|
||||
);
|
||||
const stepHistory = formStepHistory(composeRequest, contentSourcesEnabled);
|
||||
const stepHistory = formStepHistory(
|
||||
composeRequest,
|
||||
contentSourcesEnabled,
|
||||
isBeta()
|
||||
);
|
||||
|
||||
if (initialState) {
|
||||
initialState.isBeta = isBeta();
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import isRhel from '../../../Utilities/isRhel.js';
|
||||
|
||||
const imageOutputStepMapper = (
|
||||
{ 'target-environment': targetEnv, release } = {},
|
||||
{ 'target-environment': targetEnv, release, isBeta } = {},
|
||||
{ skipAws, skipGoogle, skipAzure } = {}
|
||||
) => {
|
||||
if (!skipAws && targetEnv?.aws) {
|
||||
|
|
@ -16,7 +16,13 @@ const imageOutputStepMapper = (
|
|||
return 'ms-azure-target-env';
|
||||
}
|
||||
|
||||
return isRhel(release) ? 'registration' : 'File system configuration';
|
||||
if (isRhel(release)) {
|
||||
return 'registration';
|
||||
}
|
||||
if (isBeta) {
|
||||
return 'Compliance';
|
||||
}
|
||||
return 'File system configuration';
|
||||
};
|
||||
|
||||
export default imageOutputStepMapper;
|
||||
|
|
|
|||
|
|
@ -69,7 +69,13 @@ const registrationStep = {
|
|||
</Title>
|
||||
),
|
||||
name: 'registration',
|
||||
nextStep: 'Compliance',
|
||||
nextStep: ({ values }) => {
|
||||
if (values.isBeta) {
|
||||
return 'Compliance';
|
||||
} else {
|
||||
return 'File system configuration';
|
||||
}
|
||||
},
|
||||
buttons: CustomButtons,
|
||||
fields: [
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue