Wizard: Update the File system step
Fixes #911. Fixes #912. This updates the File system step. The changes are: - changed the toggle group for selecting the mode of partitioning to radio select and updated information for each radio button as mentioned in #911 - added information to the "automatic" option of the file system configuration as mentioned in #912 - updated information for the "manual" option of the configuration as mentioned in mocks
This commit is contained in:
parent
a3a7d9a441
commit
cbd6b1e4cb
8 changed files with 110 additions and 80 deletions
|
|
@ -1,46 +0,0 @@
|
|||
import React, { useEffect, useState } from 'react';
|
||||
|
||||
import useFieldApi from '@data-driven-forms/react-form-renderer/use-field-api';
|
||||
import useFormApi from '@data-driven-forms/react-form-renderer/use-form-api';
|
||||
import { ToggleGroup, ToggleGroupItem } from '@patternfly/react-core';
|
||||
|
||||
const FileSystemConfigToggle = ({ ...props }) => {
|
||||
const { change, getState } = useFormApi();
|
||||
const { input } = useFieldApi(props);
|
||||
const [selected, setSelected] = useState(
|
||||
getState()?.values?.['file-system-config-toggle'] || 'auto'
|
||||
);
|
||||
|
||||
useEffect(() => {
|
||||
change(input.name, selected);
|
||||
}, [selected]);
|
||||
|
||||
const onClick = (_, evt) => {
|
||||
setSelected(evt.currentTarget.id);
|
||||
};
|
||||
|
||||
return (
|
||||
<>
|
||||
<ToggleGroup
|
||||
data-testid="fsc-paritioning-toggle"
|
||||
aria-label="Automatic partitioning toggle"
|
||||
>
|
||||
<ToggleGroupItem
|
||||
onChange={onClick}
|
||||
text="Use automatic partitioning"
|
||||
buttonId="auto"
|
||||
isSelected={selected === 'auto'}
|
||||
/>
|
||||
<ToggleGroupItem
|
||||
onChange={onClick}
|
||||
text="Manually configure partitions"
|
||||
buttonId="manual"
|
||||
isSelected={selected === 'manual'}
|
||||
data-testid="file-system-config-toggle-manual"
|
||||
/>
|
||||
</ToggleGroup>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export default FileSystemConfigToggle;
|
||||
|
|
@ -16,6 +16,7 @@ import {
|
|||
MinusCircleIcon,
|
||||
PlusCircleIcon,
|
||||
} from '@patternfly/react-icons';
|
||||
import { ExternalLinkAltIcon } from '@patternfly/react-icons';
|
||||
import styles from '@patternfly/react-styles/css/components/Table/table';
|
||||
import {
|
||||
TableComposable,
|
||||
|
|
@ -272,9 +273,25 @@ const FileSystemConfiguration = ({ ...props }) => {
|
|||
)}
|
||||
<TextContent>
|
||||
<Text>
|
||||
Partitions have been generated and given default values based on
|
||||
best practices from Red Hat, and your selections in previous steps
|
||||
of the wizard.
|
||||
Create partitions for your image by defining mount points and
|
||||
minimum sizes. Image builder creates partitions with a logical
|
||||
volume (LVM) device type.
|
||||
</Text>
|
||||
<Text>
|
||||
The order of partitions may change when the image is installed in
|
||||
order to conform to best practices and ensure functionality.
|
||||
<br></br>
|
||||
<Button
|
||||
component="a"
|
||||
target="_blank"
|
||||
variant="link"
|
||||
icon={<ExternalLinkAltIcon />}
|
||||
iconPosition="right"
|
||||
href="https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/installation_guide/sect-partitioning-naming-schemes-and-mount-points"
|
||||
className="pf-u-pl-0"
|
||||
>
|
||||
Partition naming schemes and mount points
|
||||
</Button>
|
||||
</Text>
|
||||
</TextContent>
|
||||
<TableComposable
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ const ReviewStep = () => {
|
|||
}
|
||||
|
||||
if (
|
||||
getState()?.values?.['file-system-config-toggle'] === 'manual' &&
|
||||
getState()?.values?.['file-system-config-radio'] === 'manual' &&
|
||||
getState()?.values?.['file-system-configuration']
|
||||
) {
|
||||
let size = 0;
|
||||
|
|
@ -368,10 +368,10 @@ const ReviewStep = () => {
|
|||
component={TextListItemVariants.dd}
|
||||
data-testid="partitioning-auto-manual"
|
||||
>
|
||||
{getState()?.values?.['file-system-config-toggle'] === 'manual'
|
||||
{getState()?.values?.['file-system-config-radio'] === 'manual'
|
||||
? 'Manual'
|
||||
: 'Automatic'}
|
||||
{getState()?.values?.['file-system-config-toggle'] ===
|
||||
{getState()?.values?.['file-system-config-radio'] ===
|
||||
'manual' && (
|
||||
<>
|
||||
{' '}
|
||||
|
|
@ -399,7 +399,7 @@ const ReviewStep = () => {
|
|||
</>
|
||||
)}
|
||||
</TextListItem>
|
||||
{getState()?.values?.['file-system-config-toggle'] ===
|
||||
{getState()?.values?.['file-system-config-radio'] ===
|
||||
'manual' && (
|
||||
<>
|
||||
<TextListItem component={TextListItemVariants.dt}>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue