src: Run lint autofix
This commit is contained in:
parent
4c098db796
commit
e9025e460c
35 changed files with 177 additions and 176 deletions
|
|
@ -142,8 +142,14 @@ const TargetEnvironment = () => {
|
|||
};
|
||||
|
||||
if (isFetching) {
|
||||
return <EmptyState titleText="Loading target environments" headingLevel="h6" icon={Spinner} />
|
||||
};
|
||||
return (
|
||||
<EmptyState
|
||||
titleText="Loading target environments"
|
||||
headingLevel="h6"
|
||||
icon={Spinner}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
if (isError) {
|
||||
return (
|
||||
|
|
@ -152,10 +158,11 @@ const TargetEnvironment = () => {
|
|||
variant="danger"
|
||||
isInline
|
||||
>
|
||||
Target environments couldn't be loaded, please refresh the page or try again later.
|
||||
Target environments couldn't be loaded, please refresh the page or
|
||||
try again later.
|
||||
</Alert>
|
||||
)
|
||||
};
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<FormGroup
|
||||
|
|
|
|||
|
|
@ -211,7 +211,7 @@ const ProfileSelector = () => {
|
|||
const onKeyDown = (event: React.KeyboardEvent) => {
|
||||
if (event.key === 'Enter') {
|
||||
event.preventDefault();
|
||||
|
||||
|
||||
if (!isOpen) {
|
||||
setIsOpen(true);
|
||||
} else if (selectOptions.length === 1) {
|
||||
|
|
@ -220,7 +220,7 @@ const ProfileSelector = () => {
|
|||
profileID: singleProfile.id,
|
||||
toString: () => singleProfile.name || '',
|
||||
};
|
||||
|
||||
|
||||
setInputValue(singleProfile.name || '');
|
||||
setFilterValue('');
|
||||
applyChanges(selection);
|
||||
|
|
|
|||
|
|
@ -1485,8 +1485,8 @@ const Packages = () => {
|
|||
packages.length + groups.length === 0
|
||||
? ''
|
||||
: packages.length + groups.length <= 100
|
||||
? ` (${packages.length + groups.length})`
|
||||
: ' (100+)'
|
||||
? ` (${packages.length + groups.length})`
|
||||
: ' (100+)'
|
||||
}`}
|
||||
buttonId="toggle-selected"
|
||||
isSelected={toggleSelected === 'toggle-selected'}
|
||||
|
|
@ -1501,10 +1501,10 @@ const Packages = () => {
|
|||
searchTerm === '' && toggleSelected === 'toggle-available'
|
||||
? 0
|
||||
: showPackages && showGroups
|
||||
? transformedPackages.length + transformedGroups.length
|
||||
: showPackages
|
||||
? transformedPackages.length
|
||||
: transformedGroups.length
|
||||
? transformedPackages.length + transformedGroups.length
|
||||
: showPackages
|
||||
? transformedPackages.length
|
||||
: transformedGroups.length
|
||||
}
|
||||
perPage={perPage}
|
||||
page={page}
|
||||
|
|
@ -1550,10 +1550,10 @@ const Packages = () => {
|
|||
searchTerm === '' && toggleSelected === 'toggle-available'
|
||||
? 0
|
||||
: showPackages && showGroups
|
||||
? transformedPackages.length + transformedGroups.length
|
||||
: showPackages
|
||||
? transformedPackages.length
|
||||
: transformedGroups.length
|
||||
? transformedPackages.length + transformedGroups.length
|
||||
: showPackages
|
||||
? transformedPackages.length
|
||||
: transformedGroups.length
|
||||
}
|
||||
perPage={perPage}
|
||||
page={page}
|
||||
|
|
|
|||
|
|
@ -26,8 +26,8 @@ const SatelliteRegistration = () => {
|
|||
const validated = stepValidation.errors['certificate']
|
||||
? 'error'
|
||||
: stepValidation.errors['certificate'] === undefined && caCertificate
|
||||
? 'success'
|
||||
: 'default';
|
||||
? 'success'
|
||||
: 'default';
|
||||
const handleClear = () => {
|
||||
dispatch(changeSatelliteCaCertificate(''));
|
||||
};
|
||||
|
|
@ -79,17 +79,17 @@ const SatelliteRegistration = () => {
|
|||
isRejected || validated === 'error'
|
||||
? 'error'
|
||||
: validated === 'success'
|
||||
? 'success'
|
||||
: 'default'
|
||||
? 'success'
|
||||
: 'default'
|
||||
}
|
||||
>
|
||||
{isRejected
|
||||
? 'Must be a .PEM/.CER/.CRT file no larger than 512 KB'
|
||||
: validated === 'error'
|
||||
? stepValidation.errors['certificate']
|
||||
: validated === 'success'
|
||||
? 'Certificate was uploaded'
|
||||
: 'Drag and drop a valid certificate file or upload one'}
|
||||
? stepValidation.errors['certificate']
|
||||
: validated === 'success'
|
||||
? 'Certificate was uploaded'
|
||||
: 'Drag and drop a valid certificate file or upload one'}
|
||||
</HelperTextItem>
|
||||
{(isRejected || validated !== 'success') && (
|
||||
<HelperTextItem>
|
||||
|
|
|
|||
|
|
@ -140,8 +140,8 @@ export const SnapshotTable = ({
|
|||
snapshotForDate.length > 0
|
||||
? snapshotForDate.map(({ repository_uuid }) => repository_uuid).join()
|
||||
: template && templateData && templateData.repository_uuids
|
||||
? templateData.repository_uuids.join(',')
|
||||
: '',
|
||||
? templateData.repository_uuids.join(',')
|
||||
: '',
|
||||
origin: ContentOrigin.REDHAT + ',' + ContentOrigin.CUSTOM, // Make sure to show both redhat and external
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -313,10 +313,10 @@ export const TargetEnvGCPList = () => {
|
|||
{accountType === 'group'
|
||||
? 'Google group'
|
||||
: accountType === 'serviceAccount'
|
||||
? 'Service account'
|
||||
: accountType === 'user'
|
||||
? 'Google account'
|
||||
: 'Domain'}
|
||||
? 'Service account'
|
||||
: accountType === 'user'
|
||||
? 'Google account'
|
||||
: 'Domain'}
|
||||
</Content>
|
||||
<Content
|
||||
component={ContentVariants.dt}
|
||||
|
|
@ -520,10 +520,10 @@ export const ContentList = () => {
|
|||
useLatest
|
||||
? 'Use the latest repository content'
|
||||
: template
|
||||
? 'Use content from the content template'
|
||||
: `Repositories as of ${yyyyMMddFormat(
|
||||
new Date(snapshotDate)
|
||||
)}`
|
||||
? 'Use content from the content template'
|
||||
: `Repositories as of ${yyyyMMddFormat(
|
||||
new Date(snapshotDate)
|
||||
)}`
|
||||
}
|
||||
hasAutoWidth
|
||||
minWidth="60rem"
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ export const AwsAccountId = () => {
|
|||
readOnlyVariant="default"
|
||||
isRequired
|
||||
id="aws-account-id"
|
||||
value={sourceId && data ? data.aws?.account_id ?? '' : ''}
|
||||
value={sourceId && data ? (data.aws?.account_id ?? '') : ''}
|
||||
aria-label="aws account id"
|
||||
/>
|
||||
</FormGroup>
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ const AWSRegion = ({ value, onChange }: FormGroupProps<string>) => {
|
|||
|
||||
const onSelect = (
|
||||
_event: React.MouseEvent<Element, MouseEvent> | undefined,
|
||||
value: string | number | undefined,
|
||||
value: string | number | undefined
|
||||
) => {
|
||||
onChange(value as string);
|
||||
setIsOpen(false);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue