oscap: add the compliance step to the wizard

This commit adds the Compliance step to the wizard. In this step the
user can select a policy from the list of available policies. Their
image is going to be updated with the necessary changes on the later
steps.

IB and The compliance endpoint are both returning the list of policies a
user has access to. The oscap step computes the intersection of the
policies accessible before showing the select list to the user.

HMS-2077
This commit is contained in:
Thomas Lavocat 2023-10-02 14:03:30 +02:00 committed by Klara Simickova
parent 1587ead4d9
commit 02a642df19
6 changed files with 209 additions and 1 deletions

View file

@ -1,6 +1,7 @@
export { default as awsTarget } from './aws';
export { default as googleCloudTarget } from './googleCloud';
export { default as msAzureTarget } from './msAzure';
export { default as oscap } from './oscap';
export { default as packages } from './packages';
export { default as packagesContentSources } from './packagesContentSources';
export { default as registration } from './registration';

View file

@ -0,0 +1,36 @@
import React from 'react';
import componentTypes from '@data-driven-forms/react-form-renderer/component-types';
import { Text } from '@patternfly/react-core';
import StepTemplate from './stepTemplate';
import CustomButtons from '../formComponents/CustomButtons';
const oscapStep = {
StepTemplate,
id: 'wizard-systemconfiguration-oscap',
title: 'OpenSCAP Compliance',
name: 'Compliance',
nextStep: 'File system configuration',
buttons: CustomButtons,
fields: [
{
component: componentTypes.PLAIN_TEXT,
name: 'oscap-text-component',
label: (
<Text>
Monitor regulatory compliance policies of registered RHEL systems you
must adhere to via OpenSCAP.
</Text>
),
},
{
component: 'oscap-profile-selector',
name: 'oscap-policy',
label: 'Available profiles for the distribution',
},
],
};
export default oscapStep;

View file

@ -69,7 +69,7 @@ const registrationStep = {
</Title>
),
name: 'registration',
nextStep: 'File system configuration',
nextStep: 'Compliance',
buttons: CustomButtons,
fields: [
{