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>
|
||||||
<Content component={ContentVariants.h3}>Configure partitions</Content>
|
<Content component={ContentVariants.h3}>Configure partitions</Content>
|
||||||
</Content>
|
</Content>
|
||||||
{partitions?.find((partition) =>
|
{partitions.find((partition) =>
|
||||||
partition?.mountpoint?.includes('/usr')
|
partition.mountpoint.includes('/usr')
|
||||||
) && <UsrSubDirectoriesDisabled />}
|
) && <UsrSubDirectoriesDisabled />}
|
||||||
<Content>
|
<Content>
|
||||||
<Content>
|
<Content>
|
||||||
|
|
|
||||||
|
|
@ -520,7 +520,7 @@ const FileSystemTable = () => {
|
||||||
onDragLeave={onDragLeave}
|
onDragLeave={onDragLeave}
|
||||||
ref={bodyRef}
|
ref={bodyRef}
|
||||||
>
|
>
|
||||||
{partitions &&
|
{partitions.length > 0 &&
|
||||||
partitions.map((partition) => (
|
partitions.map((partition) => (
|
||||||
<Row
|
<Row
|
||||||
onDrop={onDrop}
|
onDrop={onDrop}
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,7 @@ import FileSystemPartition from './components/FileSystemPartition';
|
||||||
import { useAppSelector } from '../../../../store/hooks';
|
import { useAppSelector } from '../../../../store/hooks';
|
||||||
import { selectFileSystemConfigurationType } from '../../../../store/wizardSlice';
|
import { selectFileSystemConfigurationType } from '../../../../store/wizardSlice';
|
||||||
import { useHasSpecificTargetOnly } from '../../utilities/hasSpecificTargetOnly';
|
import { useHasSpecificTargetOnly } from '../../utilities/hasSpecificTargetOnly';
|
||||||
|
|
||||||
export type FileSystemConfigurationType = 'automatic' | 'manual';
|
export type FileSystemConfigurationType = 'automatic' | 'manual';
|
||||||
|
|
||||||
const FileSystemStep = () => {
|
const FileSystemStep = () => {
|
||||||
|
|
@ -30,13 +31,11 @@ const FileSystemStep = () => {
|
||||||
<FileSystemPartition />
|
<FileSystemPartition />
|
||||||
<FileSystemAutomaticPartition />
|
<FileSystemAutomaticPartition />
|
||||||
</>
|
</>
|
||||||
) : fileSystemConfigurationType === 'manual' ? (
|
) : (
|
||||||
<>
|
<>
|
||||||
<FileSystemPartition />
|
<FileSystemPartition />
|
||||||
<FileSystemConfiguration />
|
<FileSystemConfiguration />
|
||||||
</>
|
</>
|
||||||
) : (
|
|
||||||
fileSystemConfigurationType === 'oscap' && <FileSystemConfiguration />
|
|
||||||
)}
|
)}
|
||||||
</Form>
|
</Form>
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -202,7 +202,7 @@ type MinSizeProps = {
|
||||||
|
|
||||||
export const MinSize = ({ partitions }: MinSizeProps) => {
|
export const MinSize = ({ partitions }: MinSizeProps) => {
|
||||||
let minSize = '';
|
let minSize = '';
|
||||||
if (partitions) {
|
if (partitions.length > 0) {
|
||||||
let size = 0;
|
let size = 0;
|
||||||
for (const partition of partitions) {
|
for (const partition of partitions) {
|
||||||
size += Number(partition.min_size) * getConversionFactor(partition.unit);
|
size += Number(partition.min_size) * getConversionFactor(partition.unit);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue