Wizard: Resolve FSC lint warnings
This resolves lint warnings for File System Configuration step.
This commit is contained in:
parent
ad5ea22da8
commit
2c3efe4c04
4 changed files with 6 additions and 7 deletions
|
|
@ -58,8 +58,8 @@ const FileSystemConfiguration = () => {
|
|||
<Content>
|
||||
<Content component={ContentVariants.h3}>Configure partitions</Content>
|
||||
</Content>
|
||||
{partitions?.find((partition) =>
|
||||
partition?.mountpoint?.includes('/usr')
|
||||
{partitions.find((partition) =>
|
||||
partition.mountpoint.includes('/usr')
|
||||
) && <UsrSubDirectoriesDisabled />}
|
||||
<Content>
|
||||
<Content>
|
||||
|
|
|
|||
|
|
@ -520,7 +520,7 @@ const FileSystemTable = () => {
|
|||
onDragLeave={onDragLeave}
|
||||
ref={bodyRef}
|
||||
>
|
||||
{partitions &&
|
||||
{partitions.length > 0 &&
|
||||
partitions.map((partition) => (
|
||||
<Row
|
||||
onDrop={onDrop}
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ import FileSystemPartition from './components/FileSystemPartition';
|
|||
import { useAppSelector } from '../../../../store/hooks';
|
||||
import { selectFileSystemConfigurationType } from '../../../../store/wizardSlice';
|
||||
import { useHasSpecificTargetOnly } from '../../utilities/hasSpecificTargetOnly';
|
||||
|
||||
export type FileSystemConfigurationType = 'automatic' | 'manual';
|
||||
|
||||
const FileSystemStep = () => {
|
||||
|
|
@ -30,13 +31,11 @@ const FileSystemStep = () => {
|
|||
<FileSystemPartition />
|
||||
<FileSystemAutomaticPartition />
|
||||
</>
|
||||
) : fileSystemConfigurationType === 'manual' ? (
|
||||
) : (
|
||||
<>
|
||||
<FileSystemPartition />
|
||||
<FileSystemConfiguration />
|
||||
</>
|
||||
) : (
|
||||
fileSystemConfigurationType === 'oscap' && <FileSystemConfiguration />
|
||||
)}
|
||||
</Form>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -202,7 +202,7 @@ type MinSizeProps = {
|
|||
|
||||
export const MinSize = ({ partitions }: MinSizeProps) => {
|
||||
let minSize = '';
|
||||
if (partitions) {
|
||||
if (partitions.length > 0) {
|
||||
let size = 0;
|
||||
for (const partition of partitions) {
|
||||
size += Number(partition.min_size) * getConversionFactor(partition.unit);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue