1
0
mirror of https://github.com/ansible/awx.git synced 2024-10-30 22:21:13 +03:00

Linting cleanup. Also fixed error thrown to console around passing Link to the DropdownItem component.

This commit is contained in:
mabashian 2019-08-29 11:18:34 -04:00
parent 5f1f4bd109
commit 7c81ec0df5
7 changed files with 33 additions and 35 deletions

View File

@ -132,6 +132,7 @@ NotificationListItem.propTypes = {
NotificationListItem.defaultProps = {
errorTurnedOn: false,
startedTurnedOn: false,
successTurnedOn: false,
};

View File

@ -13,6 +13,7 @@ exports[`<NotificationListItem canToggleNotifications /> initially renders succe
"notification_type": "slack",
}
}
startedTurnedOn={false}
successTurnedOn={false}
toggleNotification={[MockFunction]}
typeLabels={
@ -63,6 +64,7 @@ exports[`<NotificationListItem canToggleNotifications /> initially renders succe
<ForwardRef
aria-label="Toggle notification start"
id="notification-9000-started-toggle"
isChecked={false}
isDisabled={false}
label="Start"
labelOff="Start"
@ -290,6 +292,7 @@ exports[`<NotificationListItem canToggleNotifications /> initially renders succe
<NotificationListItem__Switch
aria-label="Toggle notification start"
id="notification-9000-started-toggle"
isChecked={false}
isDisabled={false}
label="Start"
labelOff="Start"
@ -321,6 +324,7 @@ exports[`<NotificationListItem canToggleNotifications /> initially renders succe
}
forwardedRef={null}
id="notification-9000-started-toggle"
isChecked={false}
isDisabled={false}
label="Start"
labelOff="Start"
@ -330,6 +334,7 @@ exports[`<NotificationListItem canToggleNotifications /> initially renders succe
aria-label="Toggle notification start"
className="NotificationListItem__Switch-j7c411-1 ceuHGn"
id="notification-9000-started-toggle"
isChecked={false}
isDisabled={false}
label="Start"
labelOff="Start"
@ -342,7 +347,7 @@ exports[`<NotificationListItem canToggleNotifications /> initially renders succe
"aria-label": "Toggle notification start",
"className": "NotificationListItem__Switch-j7c411-1 ceuHGn",
"id": "notification-9000-started-toggle",
"isChecked": undefined,
"isChecked": false,
"isDisabled": false,
"label": "Start",
"labelOff": "Start",
@ -355,7 +360,7 @@ exports[`<NotificationListItem canToggleNotifications /> initially renders succe
aria-label="Toggle notification start"
className="NotificationListItem__Switch-j7c411-1 ceuHGn"
id="notification-9000-started-toggle"
isChecked={true}
isChecked={false}
isDisabled={false}
label="Start"
labelOff="Start"
@ -374,7 +379,7 @@ exports[`<NotificationListItem canToggleNotifications /> initially renders succe
<input
aria-label="Toggle notification start"
aria-labelledby={null}
checked={true}
checked={false}
className="pf-c-switch__input"
disabled={false}
id="notification-9000-started-toggle"

View File

@ -24,6 +24,7 @@ export default props => (
<AWXPagination
titles={{
items: i18n._(t`items`),
page: i18n._(t`page`),
pages: i18n._(t`pages`),
itemsPerPage: i18n._(t`Items per page`),
perPageSuffix: i18n._(t`per page`),

View File

@ -2,7 +2,7 @@ import React, { Component } from 'react';
import { withRouter } from 'react-router-dom';
import { withI18n } from '@lingui/react';
import { t } from '@lingui/macro';
import { Card, PageSection, PageSectionVariants } from '@patternfly/react-core';
import { Card, PageSection } from '@patternfly/react-core';
import {
AdHocCommandsAPI,
@ -150,7 +150,6 @@ class JobList extends Component {
selected,
} = this.state;
const { match, i18n } = this.props;
const { medium } = PageSectionVariants;
const isAllSelected = selected.length === jobs.length;
const itemName = i18n._(t`Job`);
return (

View File

@ -2,7 +2,7 @@ import React, { Component, Fragment } from 'react';
import { withRouter } from 'react-router-dom';
import { withI18n } from '@lingui/react';
import { t } from '@lingui/macro';
import { Card, PageSection, PageSectionVariants } from '@patternfly/react-core';
import { Card, PageSection } from '@patternfly/react-core';
import { OrganizationsAPI } from '@api';
import AlertModal from '@components/AlertModal';
@ -129,7 +129,6 @@ class OrganizationsList extends Component {
}
render() {
const { medium } = PageSectionVariants;
const {
actions,
itemCount,

View File

@ -3771,6 +3771,7 @@ exports[`<OrganizationNotifications /> initially renders succesfully 1`] = `
"items": "items",
"itemsPerPage": "Items per page",
"optionsToggle": "Select",
"page": "page",
"pages": "pages",
"paginationTitle": "Pagination",
"perPageSuffix": "per page",
@ -3838,6 +3839,7 @@ exports[`<OrganizationNotifications /> initially renders succesfully 1`] = `
"items": "items",
"itemsPerPage": "Items per page",
"optionsToggle": "Select",
"page": "page",
"pages": "pages",
"paginationTitle": "Pagination",
"perPageSuffix": "per page",
@ -3883,6 +3885,7 @@ exports[`<OrganizationNotifications /> initially renders succesfully 1`] = `
"items": "items",
"itemsPerPage": "Items per page",
"optionsToggle": "Select",
"page": "page",
"pages": "pages",
"paginationTitle": "Pagination",
"perPageSuffix": "per page",
@ -4548,7 +4551,7 @@ exports[`<OrganizationNotifications /> initially renders succesfully 1`] = `
onPreviousClick={[Function]}
onSetPage={[Function]}
page={1}
pagesTitle=""
pagesTitle="page"
paginationTitle="Pagination"
toFirstPage="Go to first page"
toLastPage="Go to last page"
@ -4667,7 +4670,7 @@ exports[`<OrganizationNotifications /> initially renders succesfully 1`] = `
aria-hidden="true"
>
of
1
1 page
</span>
</div>
<Button

View File

@ -6,7 +6,6 @@ import { t } from '@lingui/macro';
import {
Card,
PageSection,
PageSectionVariants,
Dropdown,
DropdownItem,
DropdownPosition,
@ -171,7 +170,6 @@ class TemplatesList extends Component {
const canAdd =
actions && Object.prototype.hasOwnProperty.call(actions, 'POST');
const isAllSelected = selected.length === templates.length;
const { medium } = PageSectionVariants;
return (
<PageSection>
<Card>
@ -227,19 +225,15 @@ class TemplatesList extends Component {
<ToolbarAddButton onClick={this.handleAddToggle} />
}
dropdownItems={[
<DropdownItem
key="job"
component={Link}
to={`${match.url}/job_template/add`}
>
{i18n._(t`Job Template`)}
<DropdownItem key="job">
<Link to={`${match.url}/job_template/add/`}>
{i18n._(t`Job Template`)}
</Link>
</DropdownItem>,
<DropdownItem
key="workflow"
component={Link}
to={`${match.url}/add`}
>
{i18n._(t`Workflow Template`)}
<DropdownItem key="workflow">
<Link to={`${match.url}_workflow/add/`}>
{i18n._(t`Workflow Template`)}
</Link>
</DropdownItem>,
]}
/>
@ -267,19 +261,15 @@ class TemplatesList extends Component {
onSelect={this.handleAddSelect}
toggle={<ToolbarAddButton onClick={this.handleAddToggle} />}
dropdownItems={[
<DropdownItem
key="job"
component={Link}
to={`${match.url}/job_template/add/`}
>
{i18n._(t`Job Template`)}
<DropdownItem key="job">
<Link to={`${match.url}/job_template/add/`}>
{i18n._(t`Job Template`)}
</Link>
</DropdownItem>,
<DropdownItem
key="workflow"
component={Link}
to={`${match.url}_workflow/add/`}
>
{i18n._(t`Workflow Template`)}
<DropdownItem key="workflow">
<Link to={`${match.url}_workflow/add/`}>
{i18n._(t`Workflow Template`)}
</Link>
</DropdownItem>,
]}
/>