src: Run codemods and lint

Run `npx @patternfly/pf-codemods@latest src --v6 --fix` and lint autofix to get the bulk of the changes in.
This commit is contained in:
regexowl 2025-05-19 13:52:20 +02:00 committed by Lucas Garfield
parent 3617c0260d
commit 1fc1f0cb8d
79 changed files with 833 additions and 1066 deletions

View file

@ -1,20 +1,15 @@
import React from 'react';
import {
Button,
Text,
TextContent,
TextVariants,
} from '@patternfly/react-core';
import { Button, Content, ContentVariants } from '@patternfly/react-core';
import { ExternalLinkAltIcon } from '@patternfly/react-icons';
import { FILE_SYSTEM_CUSTOMIZATION_URL } from '../../../../constants';
const FileSystemAutomaticPartition = () => {
return (
<TextContent>
<Text component={TextVariants.h3}>Automatic partitioning</Text>
<Text>
<Content>
<Content component={ContentVariants.h3}>Automatic partitioning</Content>
<Content component="p">
The system automatically partitions your image storage depending on the
target environment(s). The target environment sometimes dictates all or
part of the partitioning scheme. Automatic partitioning applies the most
@ -31,8 +26,8 @@ const FileSystemAutomaticPartition = () => {
>
Customizing file systems during the image creation
</Button>
</Text>
</TextContent>
</Content>
</Content>
);
};

View file

@ -3,9 +3,8 @@ import React from 'react';
import {
Alert,
Button,
Text,
TextContent,
TextVariants,
Content,
ContentVariants,
} from '@patternfly/react-core';
import { PlusCircleIcon } from '@patternfly/react-icons';
import { ExternalLinkAltIcon } from '@patternfly/react-icons';
@ -42,19 +41,19 @@ const FileSystemConfiguration = () => {
return (
<>
<TextContent>
<Text component={TextVariants.h3}>Configure partitions</Text>
</TextContent>
<Content>
<Content component={ContentVariants.h3}>Configure partitions</Content>
</Content>
{partitions?.find((partition) =>
partition?.mountpoint?.includes('/usr')
) && <UsrSubDirectoriesDisabled />}
<TextContent>
<Text>
<Content>
<Content component="p">
Create partitions for your image by defining mount points and minimum
sizes. Image builder creates partitions with a logical volume (LVM)
device type.
</Text>
<Text>
</Content>
<Content component="p">
The order of partitions may change when the image is installed in
order to conform to best practices and ensure functionality.
<br></br>
@ -69,8 +68,8 @@ const FileSystemConfiguration = () => {
>
Read more about manual configuration here
</Button>
</Text>
</TextContent>
</Content>
</Content>
{environments.includes('image-installer') && (
<Alert
variant="warning"
@ -79,7 +78,7 @@ const FileSystemConfiguration = () => {
/>
)}
<FileSystemTable />
<TextContent>
<Content>
<Button
className="pf-v5-u-text-align-left"
variant="link"
@ -88,7 +87,7 @@ const FileSystemConfiguration = () => {
>
Add partition
</Button>
</TextContent>
</Content>
</>
);
};

View file

@ -2,8 +2,7 @@ import React, { useRef, useState } from 'react';
import {
Popover,
TextContent,
Text,
Content,
Button,
Alert,
TextInput,
@ -46,22 +45,21 @@ export const MinimumSizePopover = () => {
<Popover
maxWidth="30rem"
bodyContent={
<TextContent>
<Text>
<Content>
<Content component="p">
Image Builder may extend this size based on requirements, selected
packages, and configurations.
</Text>
</TextContent>
</Content>
</Content>
}
>
<Button
icon={<HelpIcon />}
variant="plain"
aria-label="File system configuration info"
aria-describedby="file-system-configuration-info"
className="pf-v5-u-p-0"
>
<HelpIcon />
</Button>
/>
</Popover>
);
};

View file

@ -1,6 +1,6 @@
import React from 'react';
import { Text, Form, Title } from '@patternfly/react-core';
import { Content, Form, Title } from '@patternfly/react-core';
import FileSystemAutomaticPartition from './FileSystemAutomaticPartitionInformation';
import FileSystemConfiguration from './FileSystemConfiguration';
@ -22,7 +22,7 @@ const FileSystemStep = () => {
<Title headingLevel="h1" size="xl">
File system configuration
</Title>
<Text>Define the partitioning of the image.</Text>
<Content component="p">Define the partitioning of the image.</Content>
{hasIsoTargetOnly ? (
<FileSystemAutomaticPartition />
) : fileSystemConfigurationType === 'automatic' ? (