V2 Wizard: Add File System Configuration Step (HMS-2781)
The FSC step is added to the wizard and takes full advantage of Redux for state management. This is still a work in progress. Supported features: 1. Select partition mountpoint prefix (e.g. /var, /home) 2. Edit partition mountpoint suffix (e.g. /home/videogames) 3. Change displayed units (KiB, MiB, GiB) Supported but buggy features: 1. Edit partition size Unsupported features: 1. Add partitions 2. Remove partitions 3. Validation
This commit is contained in:
parent
d063279b79
commit
430ea83df0
20 changed files with 751 additions and 111 deletions
|
|
@ -0,0 +1,49 @@
|
|||
import React from 'react';
|
||||
|
||||
import { FormGroup, Label, Radio } from '@patternfly/react-core';
|
||||
|
||||
import { useAppDispatch, useAppSelector } from '../../../../store/hooks';
|
||||
import {
|
||||
changeFileSystemPartitionMode,
|
||||
selectFileSystemPartitionMode,
|
||||
} from '../../../../store/wizardSlice';
|
||||
|
||||
const FileSystemPartition = () => {
|
||||
const dispatch = useAppDispatch();
|
||||
const fileSystemPartition = useAppSelector((state) =>
|
||||
selectFileSystemPartitionMode(state)
|
||||
);
|
||||
return (
|
||||
<FormGroup>
|
||||
<Radio
|
||||
id="automatic file system config radio"
|
||||
label={
|
||||
<>
|
||||
<Label isCompact color="blue">
|
||||
Recommended
|
||||
</Label>{' '}
|
||||
Use automatic partitioning
|
||||
</>
|
||||
}
|
||||
name="sc-radio-automatic"
|
||||
description="Automatically partition your image to what is best, depending on the target environment(s)"
|
||||
isChecked={fileSystemPartition === 'automatic'}
|
||||
onChange={() => {
|
||||
dispatch(changeFileSystemPartitionMode('automatic'));
|
||||
}}
|
||||
/>
|
||||
<Radio
|
||||
id="manual file system config radio"
|
||||
label="Manually configure partitions"
|
||||
name="fsc-radio-manual"
|
||||
description="Manually configure the file system of your image by adding, removing, and editing partitions"
|
||||
isChecked={fileSystemPartition === 'manual'}
|
||||
onChange={() => {
|
||||
dispatch(changeFileSystemPartitionMode('manual'));
|
||||
}}
|
||||
/>
|
||||
</FormGroup>
|
||||
);
|
||||
};
|
||||
|
||||
export default FileSystemPartition;
|
||||
Loading…
Add table
Add a link
Reference in a new issue