V2Wizard: Remove manual partitioning for ISO only images
This hides the "Manually configure partitions" option from the FSC step for blueprints which have only ISO selected as a target. There is already an alert in place for cases when ISO is combined with another target.
This commit is contained in:
parent
e76b0578e5
commit
a4eeab7156
2 changed files with 12 additions and 1 deletions
|
|
@ -8,10 +8,12 @@ import FileSystemPartition from './FileSystemPartition';
|
|||
|
||||
import { useAppSelector } from '../../../../store/hooks';
|
||||
import { selectFileSystemPartitionMode } from '../../../../store/wizardSlice';
|
||||
import { useHasIsoTargetOnly } from '../../utilities/hasIsoTargetOnly';
|
||||
export type FileSystemPartitionMode = 'automatic' | 'manual';
|
||||
|
||||
const FileSystemStep = () => {
|
||||
const fileSystemPartitionMode = useAppSelector(selectFileSystemPartitionMode);
|
||||
const hasIsoTargetOnly = useHasIsoTargetOnly();
|
||||
|
||||
return (
|
||||
<Form>
|
||||
|
|
@ -19,7 +21,9 @@ const FileSystemStep = () => {
|
|||
File system configuration
|
||||
</Title>
|
||||
<Text>Define the partitioning of the image</Text>
|
||||
{fileSystemPartitionMode === 'automatic' ? (
|
||||
{hasIsoTargetOnly ? (
|
||||
<FileSystemAutomaticPartition />
|
||||
) : fileSystemPartitionMode === 'automatic' ? (
|
||||
<>
|
||||
<FileSystemPartition />
|
||||
<FileSystemAutomaticPartition />
|
||||
|
|
|
|||
|
|
@ -0,0 +1,7 @@
|
|||
import { useAppSelector } from '../../../store/hooks';
|
||||
import { selectImageTypes } from '../../../store/wizardSlice';
|
||||
|
||||
export const useHasIsoTargetOnly = () => {
|
||||
const environments = useAppSelector(selectImageTypes);
|
||||
return environments.length === 1 && environments.includes('image-installer');
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue