debian-image-builder-frontend/src/Components/CreateImageWizard/steps/packages.js
Thomas Lavocat e8f454a579 packages: load the oscap profile when available
The packages list is now pre populated with the customization packages
asked by the oscap profile the user has selected.

HMS-2077
2023-10-06 16:26:09 +02:00

46 lines
1.1 KiB
JavaScript

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';
export const reinitPackagesStep = (change) => {
change('selected-packages', undefined);
};
const packagesStep = {
StepTemplate,
id: 'wizard-systemconfiguration-packages',
title: 'Additional Red Hat packages',
name: 'packages',
substepOf: 'Content',
nextStep: ({ values }) => {
if (values.contentSourcesEnabled) {
return 'repositories';
} else {
return 'details';
}
},
buttons: CustomButtons,
fields: [
{
component: componentTypes.PLAIN_TEXT,
name: 'packages-text-component',
label: (
<Text>
Images built with Image Builder include all required packages.
</Text>
),
},
{
component: 'package-selector',
name: 'selected-packages',
label: 'Available options',
},
],
};
export default packagesStep;