make prettier adjustments to things the pf v4 codemod tool broke

This commit is contained in:
John Mitchell
2020-06-10 13:23:26 -04:00
parent 781869a436
commit 826b03b78e
64 changed files with 169 additions and 158 deletions

View File

@@ -63,7 +63,9 @@ function AlertModal({
const customHeader = (
<Header>
{variant ? variantIcons[variant] : null}
<Title id="alert-modal-header-label" size="2xl" headingLevel="h2">{title}</Title>
<Title id="alert-modal-header-label" size="2xl" headingLevel="h2">
{title}
</Title>
</Header>
);

View File

@@ -43,7 +43,7 @@ class AnsibleSelect extends React.Component {
onChange={this.onSelectChange}
onBlur={onBlur}
aria-label={i18n._(t`Select Input`)}
validated={(isValid) ? 'default' : 'error'}
validated={isValid ? 'default' : 'error'}
className={className}
isDisabled={isDisabled}
>

View File

@@ -74,7 +74,6 @@ function AssociateModal({
return (
<Fragment>
<Modal
variant="large"
title={title}
isOpen={isModalOpen}

View File

@@ -12,7 +12,9 @@ import { CubesIcon } from '@patternfly/react-icons';
const ContentEmpty = ({ i18n, title = '', message = '' }) => (
<EmptyState variant="full">
<EmptyStateIcon icon={CubesIcon} />
<Title size="lg" headingLevel="h3">{title || i18n._(t`No items found.`)}</Title>
<Title size="lg" headingLevel="h3">
{title || i18n._(t`No items found.`)}
</Title>
<EmptyStateBody>{message}</EmptyStateBody>
</EmptyState>
);

View File

@@ -9,7 +9,7 @@ import {
ToolbarGroup as _ToolbarGroup,
ToolbarItem,
ToolbarToggleGroup,
} from '@patternfly/react-core';
} from '@patternfly/react-core';
import { SearchIcon } from '@patternfly/react-icons';
import ExpandCollapse from '../ExpandCollapse';
import Search from '../Search';

View File

@@ -29,14 +29,14 @@ function FormField(props) {
helperText={helperText}
helperTextInvalid={meta.error}
isRequired={isRequired}
validated={(isValid) ? 'default' : 'error'}
validated={isValid ? 'default' : 'error'}
label={label}
>
<FieldTooltip content={tooltip} maxWidth={tooltipMaxWidth} />
<TextArea
id={id}
isRequired={isRequired}
validated={(isValid) ? 'default' : 'error'}
validated={isValid ? 'default' : 'error'}
resizeOrientation="vertical"
{...rest}
{...field}
@@ -51,14 +51,14 @@ function FormField(props) {
helperText={helperText}
helperTextInvalid={meta.error}
isRequired={isRequired}
validated={(isValid) ? 'default' : 'error'}
validated={isValid ? 'default' : 'error'}
label={label}
>
<FieldTooltip content={tooltip} maxWidth={tooltipMaxWidth} />
<TextInput
id={id}
isRequired={isRequired}
validated={(isValid) ? 'default' : 'error'}
validated={isValid ? 'default' : 'error'}
{...rest}
{...field}
type={type}

View File

@@ -14,7 +14,7 @@ function PasswordField(props) {
fieldId={id}
helperTextInvalid={meta.error}
isRequired={isRequired}
validated={(isValid) ? 'default' : 'error'}
validated={isValid ? 'default' : 'error'}
label={label}
>
<InputGroup>

View File

@@ -44,7 +44,7 @@ function PasswordInput(props) {
value={field.value === '$encrypted$' ? '' : field.value}
isDisabled={isDisabled}
isRequired={isRequired}
validated={(isValid) ? 'default' : 'error'}
validated={isValid ? 'default' : 'error'}
type={inputType}
onChange={(_, event) => {
field.onChange(event);

View File

@@ -27,7 +27,9 @@ const InventoryLookupField = withI18n()(({ i18n, host }) => {
label={i18n._(t`Inventory`)}
isRequired
fieldId="inventory-lookup"
validated={(!inventoryMeta.touched || !inventoryMeta.error) ? 'default' : 'error'}
validated={
!inventoryMeta.touched || !inventoryMeta.error ? 'default' : 'error'
}
helperTextInvalid={inventoryMeta.error}
>
<FieldTooltip

View File

@@ -101,7 +101,7 @@ function JobTypeField({ i18n }) {
<FormGroup
fieldId="propmt-job-type"
label={i18n._(t`Job Type`)}
validated={(isValid) ? 'default' : 'error'}
validated={isValid ? 'default' : 'error'}
>
<FieldTooltip
content={i18n._(t`For job templates, select run to execute the playbook.
@@ -132,7 +132,7 @@ function VerbosityField({ i18n }) {
return (
<FormGroup
fieldId="prompt-verbosity"
validated={(isValid) ? 'default' : 'error'}
validated={isValid ? 'default' : 'error'}
label={i18n._(t`Verbosity`)}
>
<FieldTooltip

View File

@@ -96,7 +96,7 @@ function MultipleChoiceField({ question }) {
fieldId={id}
helperTextInvalid={meta.error}
isRequired={question.required}
validated={(isValid) ? 'default' : 'error'}
validated={isValid ? 'default' : 'error'}
label={question.question_name}
>
<FieldTooltip content={question.question_description} />
@@ -124,7 +124,7 @@ function MultiSelectField({ question }) {
fieldId={id}
helperTextInvalid={meta.error}
isRequired={question.required}
validated={(isValid) ? 'default' : 'error'}
validated={isValid ? 'default' : 'error'}
label={question.question_name}
>
<FieldTooltip content={question.question_description} />

View File

@@ -2,10 +2,7 @@ import React, { Fragment } from 'react';
import PropTypes from 'prop-types';
import { withRouter } from 'react-router-dom';
import styled from 'styled-components';
import {
Toolbar,
ToolbarContent,
} from '@patternfly/react-core';
import { Toolbar, ToolbarContent } from '@patternfly/react-core';
import DataListToolbar from '../DataListToolbar';
import {

View File

@@ -84,7 +84,7 @@ function CredentialLookup({
<FormGroup
fieldId="credential"
isRequired={required}
validated={(isValid) ? 'default' : 'error'}
validated={isValid ? 'default' : 'error'}
label={label}
helperTextInvalid={helperTextInvalid}
>

View File

@@ -142,7 +142,6 @@ function Lookup(props) {
</ChipHolder>
</InputGroup>
<Modal
variant="large"
title={i18n._(t`Select ${header || i18n._(t`Items`)}`)}
isOpen={isModalOpen}
@@ -196,11 +195,7 @@ Lookup.defaultProps = {
required: false,
onBlur: () => {},
renderItemChip: ({ item, removeItem, canDelete }) => (
<Chip
key={item.id}
onClick={() => removeItem(item)}
>
<Chip key={item.id} onClick={() => removeItem(item)}>
{item.name}
</Chip>
),

View File

@@ -49,7 +49,7 @@ function OrganizationLookup({
fieldId="organization"
helperTextInvalid={helperTextInvalid}
isRequired={required}
validated={(isValid) ? 'default' : 'error'}
validated={isValid ? 'default' : 'error'}
label={i18n._(t`Organization`)}
>
<Lookup

View File

@@ -63,7 +63,7 @@ function ProjectLookup({
fieldId="project"
helperTextInvalid={helperTextInvalid}
isRequired={required}
validated={(isValid) ? 'default' : 'error'}
validated={isValid ? 'default' : 'error'}
label={i18n._(t`Project`)}
>
{tooltip && <FieldTooltip content={tooltip} />}

View File

@@ -194,9 +194,7 @@ function PromptDetail({ i18n, resource, launchConfig = {}, overrides = {} }) {
totalChips={overrides.job_tags.split(',').length}
>
{overrides.job_tags.split(',').map(jobTag => (
<Chip key={jobTag} >
{jobTag}
</Chip>
<Chip key={jobTag}>{jobTag}</Chip>
))}
</ChipGroup>
}
@@ -212,9 +210,7 @@ function PromptDetail({ i18n, resource, launchConfig = {}, overrides = {} }) {
totalChips={overrides.skip_tags.split(',').length}
>
{overrides.skip_tags.split(',').map(skipTag => (
<Chip key={skipTag} >
{skipTag}
</Chip>
<Chip key={skipTag}>{skipTag}</Chip>
))}
</ChipGroup>
}

View File

@@ -126,9 +126,7 @@ function PromptInventorySourceDetail({ i18n, resource }) {
totalChips={source_regions.split(',').length}
>
{source_regions.split(',').map(region => (
<Chip key={region} >
{region}
</Chip>
<Chip key={region}>{region}</Chip>
))}
</ChipGroup>
}
@@ -144,9 +142,7 @@ function PromptInventorySourceDetail({ i18n, resource }) {
totalChips={instance_filters.split(',').length}
>
{instance_filters.split(',').map(filter => (
<Chip key={filter} >
{filter}
</Chip>
<Chip key={filter}>{filter}</Chip>
))}
</ChipGroup>
}
@@ -159,9 +155,7 @@ function PromptInventorySourceDetail({ i18n, resource }) {
value={
<ChipGroup numChips={5} totalChips={group_by.split(',').length}>
{group_by.split(',').map(group => (
<Chip key={group} >
{group}
</Chip>
<Chip key={group}>{group}</Chip>
))}
</ChipGroup>
}

View File

@@ -196,9 +196,7 @@ function PromptJobTemplateDetail({ i18n, resource }) {
totalChips={summary_fields.labels.results.length}
>
{summary_fields.labels.results.map(label => (
<Chip key={label.id} >
{label.name}
</Chip>
<Chip key={label.id}>{label.name}</Chip>
))}
</ChipGroup>
}
@@ -211,9 +209,7 @@ function PromptJobTemplateDetail({ i18n, resource }) {
value={
<ChipGroup numChips={5} totalChips={instance_groups.length}>
{instance_groups.map(ig => (
<Chip key={ig.id} >
{ig.name}
</Chip>
<Chip key={ig.id}>{ig.name}</Chip>
))}
</ChipGroup>
}
@@ -226,9 +222,7 @@ function PromptJobTemplateDetail({ i18n, resource }) {
value={
<ChipGroup numChips={5} totalChips={job_tags.split(',').length}>
{job_tags.split(',').map(jobTag => (
<Chip key={jobTag} >
{jobTag}
</Chip>
<Chip key={jobTag}>{jobTag}</Chip>
))}
</ChipGroup>
}
@@ -241,9 +235,7 @@ function PromptJobTemplateDetail({ i18n, resource }) {
value={
<ChipGroup numChips={5} totalChips={skip_tags.split(',').length}>
{skip_tags.split(',').map(skipTag => (
<Chip key={skipTag} >
{skipTag}
</Chip>
<Chip key={skipTag}>{skipTag}</Chip>
))}
</ChipGroup>
}

View File

@@ -114,9 +114,7 @@ function PromptWFJobTemplateDetail({ i18n, resource }) {
totalChips={summary_fields.labels.results.length}
>
{summary_fields.labels.results.map(label => (
<Chip key={label.id} >
{label.name}
</Chip>
<Chip key={label.id}>{label.name}</Chip>
))}
</ChipGroup>
}

View File

@@ -59,7 +59,6 @@ class ResourceAccessListItem extends React.Component {
return (
<Chip
key={role.id}
onClick={() => {
onRoleDelete(role, accessRecord);
}}

View File

@@ -194,9 +194,7 @@ function ScheduleDetail({ schedule, i18n }) {
totalChips={job_tags.split(',').length}
>
{job_tags.split(',').map(jobTag => (
<Chip key={jobTag} >
{jobTag}
</Chip>
<Chip key={jobTag}>{jobTag}</Chip>
))}
</ChipGroup>
}
@@ -212,9 +210,7 @@ function ScheduleDetail({ schedule, i18n }) {
totalChips={skip_tags.split(',').length}
>
{skip_tags.split(',').map(skipTag => (
<Chip key={skipTag} >
{skipTag}
</Chip>
<Chip key={skipTag}>{skipTag}</Chip>
))}
</ChipGroup>
}

View File

@@ -231,7 +231,9 @@ const FrequencyDetailSubform = ({ i18n }) => {
fieldId="schedule-run-every"
helperTextInvalid={intervalMeta.error}
isRequired
validated={(!intervalMeta.touched || !intervalMeta.error) ? 'default' : 'error'}
validated={
!intervalMeta.touched || !intervalMeta.error ? 'default' : 'error'
}
label={i18n._(t`Run every`)}
>
<div css="display: flex">
@@ -255,7 +257,11 @@ const FrequencyDetailSubform = ({ i18n }) => {
fieldId="schedule-days-of-week"
helperTextInvalid={daysOfWeekMeta.error}
isRequired
validated={(!daysOfWeekMeta.touched || !daysOfWeekMeta.error) ? 'default' : 'error'}
validated={
!daysOfWeekMeta.touched || !daysOfWeekMeta.error
? 'default'
: 'error'
}
label={i18n._(t`On days`)}
>
<div css="display: flex">
@@ -339,7 +345,9 @@ const FrequencyDetailSubform = ({ i18n }) => {
fieldId="schedule-run-on"
helperTextInvalid={runOnMeta.error}
isRequired
validated={(!runOnMeta.touched || !runOnMeta.error) ? 'default' : 'error'}
validated={
!runOnMeta.touched || !runOnMeta.error ? 'default' : 'error'
}
label={i18n._(t`Run on`)}
>
<RunOnRadio
@@ -502,7 +510,7 @@ const FrequencyDetailSubform = ({ i18n }) => {
fieldId="schedule-end"
helperTextInvalid={endMeta.error}
isRequired
validated={(!endMeta.touched || !endMeta.error) ? 'default' : 'error'}
validated={!endMeta.touched || !endMeta.error ? 'default' : 'error'}
label={i18n._(t`End`)}
>
<Radio
@@ -556,7 +564,11 @@ const FrequencyDetailSubform = ({ i18n }) => {
fieldId="schedule-end-datetime"
helperTextInvalid={endDateTimeMeta.error}
isRequired
validated={(!endDateTimeMeta.touched || !endDateTimeMeta.error) ? 'default' : 'error'}
validated={
!endDateTimeMeta.touched || !endDateTimeMeta.error
? 'default'
: 'error'
}
label={i18n._(t`End date/time`)}
>
<input

View File

@@ -104,7 +104,11 @@ function ScheduleFormFields({ i18n, zoneOptions }) {
fieldId="schedule-start-datetime"
helperTextInvalid={startDateTimeMeta.error}
isRequired
validated={(!startDateTimeMeta.touched || !startDateTimeMeta.error) ? 'default' : 'error'}
validated={
!startDateTimeMeta.touched || !startDateTimeMeta.error
? 'default'
: 'error'
}
label={i18n._(t`Start date/time`)}
>
<input
@@ -120,7 +124,9 @@ function ScheduleFormFields({ i18n, zoneOptions }) {
fieldId="schedule-timezone"
helperTextInvalid={timezoneMeta.error}
isRequired
validated={(!timezoneMeta.touched || !timezoneMeta.error) ? 'default' : 'error'}
validated={
!timezoneMeta.touched || !timezoneMeta.error ? 'default' : 'error'
}
label={i18n._(t`Local time zone`)}
>
<AnsibleSelect
@@ -134,7 +140,9 @@ function ScheduleFormFields({ i18n, zoneOptions }) {
fieldId="schedule-requency"
helperTextInvalid={frequencyMeta.error}
isRequired
validated={(!frequencyMeta.touched || !frequencyMeta.error) ? 'default' : 'error'}
validated={
!frequencyMeta.touched || !frequencyMeta.error ? 'default' : 'error'
}
label={i18n._(t`Run frequency`)}
>
<AnsibleSelect
@@ -153,7 +161,9 @@ function ScheduleFormFields({ i18n, zoneOptions }) {
</FormGroup>
{frequency.value !== 'none' && (
<SubFormLayout>
<Title size="md" headingLevel="h4">{i18n._(t`Frequency Details`)}</Title>
<Title size="md" headingLevel="h4">
{i18n._(t`Frequency Details`)}
</Title>
<FormColumnLayout>
<FrequencyDetailSubform />
</FormColumnLayout>

View File

@@ -1,8 +1,5 @@
import React from 'react';
import {
Toolbar,
ToolbarContent,
} from '@patternfly/react-core';
import { Toolbar, ToolbarContent } from '@patternfly/react-core';
import { createMemoryHistory } from 'history';
import { act } from 'react-dom/test-utils';
import { mountWithContexts } from '../../../testUtils/enzymeHelpers';

View File

@@ -30,7 +30,7 @@ class SelectedList extends Component {
const renderChip =
renderItemChip ||
(({ item, removeItem }) => (
<Chip key={item.id} onClick={removeItem} >
<Chip key={item.id} onClick={removeItem}>
{item[displayKey]}
</Chip>
));

View File

@@ -15,7 +15,9 @@ class AuthSettings extends Component {
return (
<Fragment>
<PageSection variant={light} className="pf-m-condensed">
<Title size="2xl" headingLevel="h2">{i18n._(t`Authentication Settings`)}</Title>
<Title size="2xl" headingLevel="h2">
{i18n._(t`Authentication Settings`)}
</Title>
</PageSection>
<PageSection />
</Fragment>

View File

@@ -104,7 +104,9 @@ function CredentialFormFields({
fieldId="credential-credentialType"
helperTextInvalid={credTypeMeta.error}
isRequired
validated={(!credTypeMeta.touched || !credTypeMeta.error) ? 'default' : 'error'}
validated={
!credTypeMeta.touched || !credTypeMeta.error ? 'default' : 'error'
}
label={i18n._(t`Credential Type`)}
>
<AnsibleSelect

View File

@@ -34,7 +34,7 @@ function CredentialPluginField(props) {
fieldId={id}
helperTextInvalid={meta.error}
isRequired={isRequired}
validated={(isValid) ? 'default' : 'error'}
validated={isValid ? 'default' : 'error'}
label={label}
>
{field?.value?.credential ? (

View File

@@ -33,7 +33,7 @@ const GoogleComputeEngineSubForm = ({ i18n }) => {
<FormColumnLayout>
<FormGroup
fieldId="credential-gce-file"
validated={(!fileError) ? 'default' : 'error'}
validated={!fileError ? 'default' : 'error'}
label={i18n._(t`Service account JSON file`)}
helperText={i18n._(
t`Select a JSON formatted service account key to autopopulate the following fields.`

View File

@@ -15,7 +15,9 @@ class Dashboard extends Component {
return (
<Fragment>
<PageSection variant={light} className="pf-m-condensed">
<Title size="2xl" headingLevel="h2">{i18n._(t`Dashboard`)}</Title>
<Title size="2xl" headingLevel="h2">
{i18n._(t`Dashboard`)}
</Title>
</PageSection>
<PageSection />
</Fragment>

View File

@@ -15,7 +15,9 @@ class InstanceGroups extends Component {
return (
<Fragment>
<PageSection variant={light} className="pf-m-condensed">
<Title size="2xl" headingLevel="h2">{i18n._(t`Instance Groups`)}</Title>
<Title size="2xl" headingLevel="h2">
{i18n._(t`Instance Groups`)}
</Title>
</PageSection>
<PageSection />
</Fragment>

View File

@@ -81,9 +81,7 @@ function InventoryDetail({ inventory, i18n }) {
value={
<ChipGroup numChips={5} totalChips={instanceGroups.length}>
{instanceGroups.map(ig => (
<Chip key={ig.id} >
{ig.name}
</Chip>
<Chip key={ig.id}>{ig.name}</Chip>
))}
</ChipGroup>
}

View File

@@ -163,9 +163,7 @@ describe('<InventoryGroupsList />', () => {
});
wrapper.update();
await act(async () => {
wrapper
.find('Toolbar Button[aria-label="Delete"]')
.invoke('onClick')();
wrapper.find('Toolbar Button[aria-label="Delete"]').invoke('onClick')();
});
await waitForElement(
wrapper,
@@ -197,9 +195,7 @@ describe('<InventoryGroupsList />', () => {
});
wrapper.update();
await act(async () => {
wrapper
.find('Toolbar Button[aria-label="Delete"]')
.invoke('onClick')();
wrapper.find('Toolbar Button[aria-label="Delete"]').invoke('onClick')();
});
await waitForElement(
wrapper,

View File

@@ -248,9 +248,7 @@ function InventorySourceDetail({ inventorySource, i18n }) {
totalChips={source_regions.split(',').length}
>
{source_regions.split(',').map(region => (
<Chip key={region} >
{region}
</Chip>
<Chip key={region}>{region}</Chip>
))}
</ChipGroup>
}
@@ -266,9 +264,7 @@ function InventorySourceDetail({ inventorySource, i18n }) {
totalChips={instance_filters.split(',').length}
>
{instance_filters.split(',').map(filter => (
<Chip key={filter} >
{filter}
</Chip>
<Chip key={filter}>{filter}</Chip>
))}
</ChipGroup>
}
@@ -281,9 +277,7 @@ function InventorySourceDetail({ inventorySource, i18n }) {
value={
<ChipGroup numChips={5} totalChips={group_by.split(',').length}>
{group_by.split(',').map(group => (
<Chip key={group} >
{group}
</Chip>
<Chip key={group}>{group}</Chip>
))}
</ChipGroup>
}

View File

@@ -117,7 +117,9 @@ const InventorySourceFormFields = ({ sourceOptions, i18n }) => {
fieldId="source"
helperTextInvalid={sourceMeta.error}
isRequired
validated={(!sourceMeta.touched || !sourceMeta.error) ? 'default' : 'error'}
validated={
!sourceMeta.touched || !sourceMeta.error ? 'default' : 'error'
}
label={i18n._(t`Source`)}
>
<AnsibleSelect
@@ -161,7 +163,9 @@ const InventorySourceFormFields = ({ sourceOptions, i18n }) => {
)}
{sourceField.value !== '' && (
<SubFormLayout>
<Title size="md" headingLevel="h4">{i18n._(t`Source details`)}</Title>
<Title size="md" headingLevel="h4">
{i18n._(t`Source details`)}
</Title>
<FormColumnLayout>
{
{

View File

@@ -83,8 +83,12 @@ const SCMSubForm = ({ i18n }) => {
<FormGroup
fieldId="source_path"
helperTextInvalid={sourcePathError?.message || sourcePathMeta.error}
validated={((!sourcePathMeta.error || !sourcePathMeta.touched) &&
!sourcePathError?.message) ? 'default' : 'error'}
validated={
(!sourcePathMeta.error || !sourcePathMeta.touched) &&
!sourcePathError?.message
? 'default'
: 'error'
}
isRequired
label={i18n._(t`Inventory file`)}
>

View File

@@ -229,7 +229,7 @@ export const VerbosityField = withI18n()(({ i18n }) => {
return (
<FormGroup
fieldId="verbosity"
validated={(isValid) ? 'default' : 'error'}
validated={isValid ? 'default' : 'error'}
label={i18n._(t`Verbosity`)}
>
<FieldTooltip

View File

@@ -15,7 +15,9 @@ class InventoryScripts extends Component {
return (
<Fragment>
<PageSection variant={light} className="pf-m-condensed">
<Title size="2xl" headingLevel="h2">{i18n._(t`Inventory Scripts`)}</Title>
<Title size="2xl" headingLevel="h2">
{i18n._(t`Inventory Scripts`)}
</Title>
</PageSection>
<PageSection />
</Fragment>

View File

@@ -232,9 +232,7 @@ function JobDetail({ job, i18n }) {
value={
<ChipGroup numChips={5} totalChips={labels.results.length}>
{labels.results.map(l => (
<Chip key={l.id} >
{l.name}
</Chip>
<Chip key={l.id}>{l.name}</Chip>
))}
</ChipGroup>
}

View File

@@ -1,5 +1,10 @@
import React, { useEffect, useState } from 'react';
import { Modal as PFModal, Tab, Tabs as PFTabs, TabTitleText } from '@patternfly/react-core';
import {
Modal as PFModal,
Tab,
Tabs as PFTabs,
TabTitleText,
} from '@patternfly/react-core';
import PropTypes from 'prop-types';
import { withI18n } from '@lingui/react';
import { t } from '@lingui/macro';
@@ -175,7 +180,7 @@ function HostEventModal({ onClose, hostEvent = {}, isOpen = false, i18n }) {
</Tab>
<Tab
eventKey={1}
title={<TabTitleText>{i18n._(t`JSON`)}</TabTitleText>}
title={<TabTitleText>{i18n._(t`JSON`)}</TabTitleText>}
aria-label={i18n._(t`JSON tab`)}
>
{activeTabKey === 1 && jsonObj ? (

View File

@@ -15,7 +15,9 @@ class JobsSettings extends Component {
return (
<Fragment>
<PageSection variant={light} className="pf-m-condensed">
<Title size="2xl" headingLevel="h2">{i18n._(t`Jobs Settings`)}</Title>
<Title size="2xl" headingLevel="h2">
{i18n._(t`Jobs Settings`)}
</Title>
</PageSection>
<PageSection />
</Fragment>

View File

@@ -15,7 +15,9 @@ class License extends Component {
return (
<Fragment>
<PageSection variant={light} className="pf-m-condensed">
<Title size="2xl" headingLevel="h2">{i18n._(t`License`)}</Title>
<Title size="2xl" headingLevel="h2">
{i18n._(t`License`)}
</Title>
</PageSection>
<PageSection />
</Fragment>

View File

@@ -15,7 +15,9 @@ class ManagementJobs extends Component {
return (
<Fragment>
<PageSection variant={light} className="pf-m-condensed">
<Title size="2xl" headingLevel="h2">{i18n._(t`Management Jobs`)}</Title>
<Title size="2xl" headingLevel="h2">
{i18n._(t`Management Jobs`)}
</Title>
</PageSection>
<PageSection />
</Fragment>

View File

@@ -15,7 +15,9 @@ class NotificationTemplates extends Component {
return (
<Fragment>
<PageSection variant={light} className="pf-m-condensed">
<Title size="2xl" headingLevel="h2">{i18n._(t`Notification Templates`)}</Title>
<Title size="2xl" headingLevel="h2">
{i18n._(t`Notification Templates`)}
</Title>
</PageSection>
<PageSection />
</Fragment>

View File

@@ -105,9 +105,7 @@ function OrganizationDetail({ i18n, organization }) {
value={
<ChipGroup numChips={5} totalChips={instanceGroups.length}>
{instanceGroups.map(ig => (
<Chip key={ig.id} >
{ig.name}
</Chip>
<Chip key={ig.id}>{ig.name}</Chip>
))}
</ChipGroup>
}

View File

@@ -15,7 +15,9 @@ class Portal extends Component {
return (
<Fragment>
<PageSection variant={light} className="pf-m-condensed">
<Title size="2xl" headingLevel="h2">{i18n._(t`My View`)}</Title>
<Title size="2xl" headingLevel="h2">
{i18n._(t`My View`)}
</Title>
</PageSection>
<PageSection />
</Fragment>

View File

@@ -172,7 +172,9 @@ function ProjectFormFields({
fieldId="project-scm-type"
helperTextInvalid={scmTypeMeta.error}
isRequired
validated={(!scmTypeMeta.touched || !scmTypeMeta.error) ? 'default' : 'error'}
validated={
!scmTypeMeta.touched || !scmTypeMeta.error ? 'default' : 'error'
}
label={i18n._(t`Source Control Credential Type`)}
>
<AnsibleSelect
@@ -204,7 +206,9 @@ function ProjectFormFields({
</FormGroup>
{formik.values.scm_type !== '' && (
<SubFormLayout>
<Title size="md" headingLevel="h4">{i18n._(t`Type Details`)}</Title>
<Title size="md" headingLevel="h4">
{i18n._(t`Type Details`)}
</Title>
<FormColumnLayout>
{
{

View File

@@ -81,7 +81,7 @@ const ManualSubForm = ({
fieldId="project-local-path"
helperTextInvalid={pathMeta.error}
isRequired
validated={(!pathMeta.touched || !pathMeta.error) ? 'default' : 'error'}
validated={!pathMeta.touched || !pathMeta.error ? 'default' : 'error'}
label={i18n._(t`Playbook Directory`)}
>
<FieldTooltip

View File

@@ -104,7 +104,9 @@ export const ScmTypeOptions = withI18n()(
{scmUpdateOnLaunch && (
<>
<Title size="md" headingLevel="h4">{i18n._(t`Option Details`)}</Title>
<Title size="md" headingLevel="h4">
{i18n._(t`Option Details`)}
</Title>
<FormField
id="project-cache-timeout"
name="scm_update_cache_timeout"

View File

@@ -15,7 +15,9 @@ class SystemSettings extends Component {
return (
<Fragment>
<PageSection variant={light} className="pf-m-condensed">
<Title size="2xl" headingLevel="h2">{i18n._(t`System Settings`)}</Title>
<Title size="2xl" headingLevel="h2">
{i18n._(t`System Settings`)}
</Title>
</PageSection>
<PageSection />
</Fragment>

View File

@@ -40,7 +40,6 @@ function TeamAccessListItem({ role, i18n, detailUrl, onSelect }) {
label={i18n._(t`Role`)}
value={
<Chip
key={role.name}
aria-label={role.name}
onClick={() => onSelect(role)}

View File

@@ -304,9 +304,7 @@ function JobTemplateDetail({ i18n, template }) {
totalChips={summary_fields.labels.results.length}
>
{summary_fields.labels.results.map(l => (
<Chip key={l.id} >
{l.name}
</Chip>
<Chip key={l.id}>{l.name}</Chip>
))}
</ChipGroup>
}
@@ -319,9 +317,7 @@ function JobTemplateDetail({ i18n, template }) {
value={
<ChipGroup numChips={5} totalChips={instanceGroups.length}>
{instanceGroups.map(ig => (
<Chip key={ig.id} >
{ig.name}
</Chip>
<Chip key={ig.id}>{ig.name}</Chip>
))}
</ChipGroup>
}
@@ -334,9 +330,7 @@ function JobTemplateDetail({ i18n, template }) {
value={
<ChipGroup numChips={5} totalChips={job_tags.split(',').length}>
{job_tags.split(',').map(jobTag => (
<Chip key={jobTag} >
{jobTag}
</Chip>
<Chip key={jobTag}>{jobTag}</Chip>
))}
</ChipGroup>
}
@@ -349,9 +343,7 @@ function JobTemplateDetail({ i18n, template }) {
value={
<ChipGroup numChips={5} totalChips={skip_tags.split(',').length}>
{skip_tags.split(',').map(skipTag => (
<Chip key={skipTag} >
{skipTag}
</Chip>
<Chip key={skipTag}>{skipTag}</Chip>
))}
</ChipGroup>
}

View File

@@ -125,9 +125,7 @@ function SurveyListItem({
totalChips={question.default.split('\n').length}
>
{question.default.split('\n').map(chip => (
<Chip key={chip} >
{chip}
</Chip>
<Chip key={chip}>{chip}</Chip>
))}
</ChipGroup>
)}

View File

@@ -172,9 +172,7 @@ function WorkflowJobTemplateDetail({ template, i18n }) {
totalChips={summary_fields.labels.results.length}
>
{summary_fields.labels.results.map(l => (
<Chip key={l.id} >
{l.name}
</Chip>
<Chip key={l.id}>{l.name}</Chip>
))}
</ChipGroup>
}

View File

@@ -20,7 +20,6 @@ function LinkModal({ header, i18n, onConfirm }) {
width={600}
header={header}
isOpen
title={i18n._(t`Workflow Link`)}
onClose={() => dispatch({ type: 'CANCEL_LINK_MODAL' })}
actions={[

View File

@@ -131,14 +131,14 @@ function NodeTypeStep({
<FormGroup
fieldId="approval-name"
isRequired
validated={(isValid) ? 'default' : 'error'}
validated={isValid ? 'default' : 'error'}
label={i18n._(t`Name`)}
>
<TextInput
autoFocus
id="approval-name"
isRequired
validated={(isValid) ? 'default' : 'error'}
validated={isValid ? 'default' : 'error'}
type="text"
{...field}
onChange={(value, evt) => {

View File

@@ -133,7 +133,6 @@ function NodeViewModal({ i18n }) {
<Modal
variant="large"
isOpen
title={unifiedJobTemplate.name}
onClose={() => dispatch({ type: 'SET_NODE_TO_VIEW', value: null })}
actions={[

View File

@@ -11,7 +11,6 @@ function UnsavedChangesModal({ i18n, onSaveAndExit, onExit }) {
<Modal
width={600}
isOpen
title={i18n._(t`Warning: Unsaved Changes`)}
onClose={() => dispatch({ type: 'TOGGLE_UNSAVED_CHANGES_MODAL' })}
actions={[

View File

@@ -68,7 +68,11 @@ function VisualizerToolbar({
return (
<div id="visualizer-toolbar">
<div css="align-items: center; border-bottom: 1px solid grey; display: flex; height: 56px; padding: 0px 20px;">
<Title headingLevel="h2" size="xl" id="visualizer-toolbar-template-name">
<Title
headingLevel="h2"
size="xl"
id="visualizer-toolbar-template-name"
>
{template.name}
</Title>
<div css="align-items: center; display: flex; flex: 1; justify-content: flex-end">

View File

@@ -291,7 +291,9 @@ function JobTemplateForm({
<FormGroup
fieldId="template-playbook"
helperTextInvalid={playbookMeta.error}
validated={(!playbookMeta.touched || !playbookMeta.error) ? 'default' : 'error'}
validated={
!playbookMeta.touched || !playbookMeta.error ? 'default' : 'error'
}
isRequired
label={i18n._(t`Playbook`)}
>
@@ -381,7 +383,9 @@ function JobTemplateForm({
<TextInput
id="template-limit"
{...limitField}
validated={(!limitMeta.touched || !limitMeta.error) ? 'default' : 'error'}
validated={
!limitMeta.touched || !limitMeta.error ? 'default' : 'error'
}
onChange={value => {
limitHelpers.setValue(value);
}}

View File

@@ -15,7 +15,9 @@ class UISettings extends Component {
return (
<Fragment>
<PageSection variant={light} className="pf-m-condensed">
<Title size="2xl" headingLevel="h2">{i18n._(t`User Interface Settings`)}</Title>
<Title size="2xl" headingLevel="h2">
{i18n._(t`User Interface Settings`)}
</Title>
</PageSection>
<PageSection />
</Fragment>

View File

@@ -40,7 +40,6 @@ function UserAccessListItem({ role, i18n, detailUrl, onSelect }) {
label={i18n._(t`Role`)}
value={
<Chip
key={role.name}
aria-label={role.name}
onClick={() => onSelect(role)}

View File

@@ -117,7 +117,9 @@ function UserFormFields({ user, i18n }) {
fieldId="user-type"
helperTextInvalid={userTypeMeta.error}
isRequired
validated={(!userTypeMeta.touched || !userTypeMeta.error) ? 'default' : 'error'}
validated={
!userTypeMeta.touched || !userTypeMeta.error ? 'default' : 'error'
}
label={i18n._(t`User Type`)}
>
<AnsibleSelect