From bbf077b98f264643fd79db59e5ca9f507e14cdd3 Mon Sep 17 00:00:00 2001 From: Michal Gold Date: Sun, 10 Mar 2024 11:32:52 +0200 Subject: [PATCH] V2Wizard: fix partition at review step this commit fix the partition table at review step when user choose manual partition --- .../FileSystem/FileSystemConfiguration.tsx | 33 +++++++++++-------- .../steps/FileSystem/FileSystemPartition.tsx | 8 ++++- .../steps/Review/ReviewStepTables.tsx | 19 ++++++++++- src/store/wizardSlice.ts | 18 +++++++++- 4 files changed, 61 insertions(+), 17 deletions(-) diff --git a/src/Components/CreateImageWizardV2/steps/FileSystem/FileSystemConfiguration.tsx b/src/Components/CreateImageWizardV2/steps/FileSystem/FileSystemConfiguration.tsx index 481a1654..b9fac99c 100644 --- a/src/Components/CreateImageWizardV2/steps/FileSystem/FileSystemConfiguration.tsx +++ b/src/Components/CreateImageWizardV2/steps/FileSystem/FileSystemConfiguration.tsx @@ -28,6 +28,7 @@ import { selectImageTypes, removePartition, selectPartitions, + changePartitionUnit, } from '../../../../store/wizardSlice'; import UsrSubDirectoriesDisabled from '../../UsrSubDirectoriesDisabled'; import { ValidatedTextInput } from '../../ValidatedTextInput'; @@ -36,6 +37,7 @@ export type Partition = { id: string; mountpoint: string; min_size: string; + unit: Units; }; const FileSystemConfiguration = () => { @@ -50,7 +52,8 @@ const FileSystemConfiguration = () => { addPartition({ id, mountpoint: '/home', - min_size: '1', + min_size: UNIT_GIB.toString(), + unit: 'GiB', }) ); }; @@ -163,7 +166,6 @@ const getSuffix = (mountpoint: string) => { }; const Row = ({ partition }: RowPropTypes) => { - const [units, setUnits] = useState('MiB'); const dispatch = useAppDispatch(); const handleRemovePartition = (id: string) => { @@ -188,10 +190,10 @@ const Row = ({ partition }: RowPropTypes) => { xfs - + - +