mirror of
https://github.com/ansible/awx.git
synced 2026-05-08 09:57:35 -02:30
Linting cleanup. Also fixed error thrown to console around passing Link to the DropdownItem component.
This commit is contained in:
@@ -132,6 +132,7 @@ NotificationListItem.propTypes = {
|
|||||||
|
|
||||||
NotificationListItem.defaultProps = {
|
NotificationListItem.defaultProps = {
|
||||||
errorTurnedOn: false,
|
errorTurnedOn: false,
|
||||||
|
startedTurnedOn: false,
|
||||||
successTurnedOn: false,
|
successTurnedOn: false,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ exports[`<NotificationListItem canToggleNotifications /> initially renders succe
|
|||||||
"notification_type": "slack",
|
"notification_type": "slack",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
startedTurnedOn={false}
|
||||||
successTurnedOn={false}
|
successTurnedOn={false}
|
||||||
toggleNotification={[MockFunction]}
|
toggleNotification={[MockFunction]}
|
||||||
typeLabels={
|
typeLabels={
|
||||||
@@ -63,6 +64,7 @@ exports[`<NotificationListItem canToggleNotifications /> initially renders succe
|
|||||||
<ForwardRef
|
<ForwardRef
|
||||||
aria-label="Toggle notification start"
|
aria-label="Toggle notification start"
|
||||||
id="notification-9000-started-toggle"
|
id="notification-9000-started-toggle"
|
||||||
|
isChecked={false}
|
||||||
isDisabled={false}
|
isDisabled={false}
|
||||||
label="Start"
|
label="Start"
|
||||||
labelOff="Start"
|
labelOff="Start"
|
||||||
@@ -290,6 +292,7 @@ exports[`<NotificationListItem canToggleNotifications /> initially renders succe
|
|||||||
<NotificationListItem__Switch
|
<NotificationListItem__Switch
|
||||||
aria-label="Toggle notification start"
|
aria-label="Toggle notification start"
|
||||||
id="notification-9000-started-toggle"
|
id="notification-9000-started-toggle"
|
||||||
|
isChecked={false}
|
||||||
isDisabled={false}
|
isDisabled={false}
|
||||||
label="Start"
|
label="Start"
|
||||||
labelOff="Start"
|
labelOff="Start"
|
||||||
@@ -321,6 +324,7 @@ exports[`<NotificationListItem canToggleNotifications /> initially renders succe
|
|||||||
}
|
}
|
||||||
forwardedRef={null}
|
forwardedRef={null}
|
||||||
id="notification-9000-started-toggle"
|
id="notification-9000-started-toggle"
|
||||||
|
isChecked={false}
|
||||||
isDisabled={false}
|
isDisabled={false}
|
||||||
label="Start"
|
label="Start"
|
||||||
labelOff="Start"
|
labelOff="Start"
|
||||||
@@ -330,6 +334,7 @@ exports[`<NotificationListItem canToggleNotifications /> initially renders succe
|
|||||||
aria-label="Toggle notification start"
|
aria-label="Toggle notification start"
|
||||||
className="NotificationListItem__Switch-j7c411-1 ceuHGn"
|
className="NotificationListItem__Switch-j7c411-1 ceuHGn"
|
||||||
id="notification-9000-started-toggle"
|
id="notification-9000-started-toggle"
|
||||||
|
isChecked={false}
|
||||||
isDisabled={false}
|
isDisabled={false}
|
||||||
label="Start"
|
label="Start"
|
||||||
labelOff="Start"
|
labelOff="Start"
|
||||||
@@ -342,7 +347,7 @@ exports[`<NotificationListItem canToggleNotifications /> initially renders succe
|
|||||||
"aria-label": "Toggle notification start",
|
"aria-label": "Toggle notification start",
|
||||||
"className": "NotificationListItem__Switch-j7c411-1 ceuHGn",
|
"className": "NotificationListItem__Switch-j7c411-1 ceuHGn",
|
||||||
"id": "notification-9000-started-toggle",
|
"id": "notification-9000-started-toggle",
|
||||||
"isChecked": undefined,
|
"isChecked": false,
|
||||||
"isDisabled": false,
|
"isDisabled": false,
|
||||||
"label": "Start",
|
"label": "Start",
|
||||||
"labelOff": "Start",
|
"labelOff": "Start",
|
||||||
@@ -355,7 +360,7 @@ exports[`<NotificationListItem canToggleNotifications /> initially renders succe
|
|||||||
aria-label="Toggle notification start"
|
aria-label="Toggle notification start"
|
||||||
className="NotificationListItem__Switch-j7c411-1 ceuHGn"
|
className="NotificationListItem__Switch-j7c411-1 ceuHGn"
|
||||||
id="notification-9000-started-toggle"
|
id="notification-9000-started-toggle"
|
||||||
isChecked={true}
|
isChecked={false}
|
||||||
isDisabled={false}
|
isDisabled={false}
|
||||||
label="Start"
|
label="Start"
|
||||||
labelOff="Start"
|
labelOff="Start"
|
||||||
@@ -374,7 +379,7 @@ exports[`<NotificationListItem canToggleNotifications /> initially renders succe
|
|||||||
<input
|
<input
|
||||||
aria-label="Toggle notification start"
|
aria-label="Toggle notification start"
|
||||||
aria-labelledby={null}
|
aria-labelledby={null}
|
||||||
checked={true}
|
checked={false}
|
||||||
className="pf-c-switch__input"
|
className="pf-c-switch__input"
|
||||||
disabled={false}
|
disabled={false}
|
||||||
id="notification-9000-started-toggle"
|
id="notification-9000-started-toggle"
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ export default props => (
|
|||||||
<AWXPagination
|
<AWXPagination
|
||||||
titles={{
|
titles={{
|
||||||
items: i18n._(t`items`),
|
items: i18n._(t`items`),
|
||||||
|
page: i18n._(t`page`),
|
||||||
pages: i18n._(t`pages`),
|
pages: i18n._(t`pages`),
|
||||||
itemsPerPage: i18n._(t`Items per page`),
|
itemsPerPage: i18n._(t`Items per page`),
|
||||||
perPageSuffix: i18n._(t`per page`),
|
perPageSuffix: i18n._(t`per page`),
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import React, { Component } from 'react';
|
|||||||
import { withRouter } from 'react-router-dom';
|
import { withRouter } from 'react-router-dom';
|
||||||
import { withI18n } from '@lingui/react';
|
import { withI18n } from '@lingui/react';
|
||||||
import { t } from '@lingui/macro';
|
import { t } from '@lingui/macro';
|
||||||
import { Card, PageSection, PageSectionVariants } from '@patternfly/react-core';
|
import { Card, PageSection } from '@patternfly/react-core';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
AdHocCommandsAPI,
|
AdHocCommandsAPI,
|
||||||
@@ -150,7 +150,6 @@ class JobList extends Component {
|
|||||||
selected,
|
selected,
|
||||||
} = this.state;
|
} = this.state;
|
||||||
const { match, i18n } = this.props;
|
const { match, i18n } = this.props;
|
||||||
const { medium } = PageSectionVariants;
|
|
||||||
const isAllSelected = selected.length === jobs.length;
|
const isAllSelected = selected.length === jobs.length;
|
||||||
const itemName = i18n._(t`Job`);
|
const itemName = i18n._(t`Job`);
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import React, { Component, Fragment } from 'react';
|
|||||||
import { withRouter } from 'react-router-dom';
|
import { withRouter } from 'react-router-dom';
|
||||||
import { withI18n } from '@lingui/react';
|
import { withI18n } from '@lingui/react';
|
||||||
import { t } from '@lingui/macro';
|
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 { OrganizationsAPI } from '@api';
|
||||||
import AlertModal from '@components/AlertModal';
|
import AlertModal from '@components/AlertModal';
|
||||||
@@ -129,7 +129,6 @@ class OrganizationsList extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { medium } = PageSectionVariants;
|
|
||||||
const {
|
const {
|
||||||
actions,
|
actions,
|
||||||
itemCount,
|
itemCount,
|
||||||
|
|||||||
@@ -3771,6 +3771,7 @@ exports[`<OrganizationNotifications /> initially renders succesfully 1`] = `
|
|||||||
"items": "items",
|
"items": "items",
|
||||||
"itemsPerPage": "Items per page",
|
"itemsPerPage": "Items per page",
|
||||||
"optionsToggle": "Select",
|
"optionsToggle": "Select",
|
||||||
|
"page": "page",
|
||||||
"pages": "pages",
|
"pages": "pages",
|
||||||
"paginationTitle": "Pagination",
|
"paginationTitle": "Pagination",
|
||||||
"perPageSuffix": "per page",
|
"perPageSuffix": "per page",
|
||||||
@@ -3838,6 +3839,7 @@ exports[`<OrganizationNotifications /> initially renders succesfully 1`] = `
|
|||||||
"items": "items",
|
"items": "items",
|
||||||
"itemsPerPage": "Items per page",
|
"itemsPerPage": "Items per page",
|
||||||
"optionsToggle": "Select",
|
"optionsToggle": "Select",
|
||||||
|
"page": "page",
|
||||||
"pages": "pages",
|
"pages": "pages",
|
||||||
"paginationTitle": "Pagination",
|
"paginationTitle": "Pagination",
|
||||||
"perPageSuffix": "per page",
|
"perPageSuffix": "per page",
|
||||||
@@ -3883,6 +3885,7 @@ exports[`<OrganizationNotifications /> initially renders succesfully 1`] = `
|
|||||||
"items": "items",
|
"items": "items",
|
||||||
"itemsPerPage": "Items per page",
|
"itemsPerPage": "Items per page",
|
||||||
"optionsToggle": "Select",
|
"optionsToggle": "Select",
|
||||||
|
"page": "page",
|
||||||
"pages": "pages",
|
"pages": "pages",
|
||||||
"paginationTitle": "Pagination",
|
"paginationTitle": "Pagination",
|
||||||
"perPageSuffix": "per page",
|
"perPageSuffix": "per page",
|
||||||
@@ -4548,7 +4551,7 @@ exports[`<OrganizationNotifications /> initially renders succesfully 1`] = `
|
|||||||
onPreviousClick={[Function]}
|
onPreviousClick={[Function]}
|
||||||
onSetPage={[Function]}
|
onSetPage={[Function]}
|
||||||
page={1}
|
page={1}
|
||||||
pagesTitle=""
|
pagesTitle="page"
|
||||||
paginationTitle="Pagination"
|
paginationTitle="Pagination"
|
||||||
toFirstPage="Go to first page"
|
toFirstPage="Go to first page"
|
||||||
toLastPage="Go to last page"
|
toLastPage="Go to last page"
|
||||||
@@ -4667,7 +4670,7 @@ exports[`<OrganizationNotifications /> initially renders succesfully 1`] = `
|
|||||||
aria-hidden="true"
|
aria-hidden="true"
|
||||||
>
|
>
|
||||||
of
|
of
|
||||||
1
|
1 page
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<Button
|
<Button
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ import { t } from '@lingui/macro';
|
|||||||
import {
|
import {
|
||||||
Card,
|
Card,
|
||||||
PageSection,
|
PageSection,
|
||||||
PageSectionVariants,
|
|
||||||
Dropdown,
|
Dropdown,
|
||||||
DropdownItem,
|
DropdownItem,
|
||||||
DropdownPosition,
|
DropdownPosition,
|
||||||
@@ -171,7 +170,6 @@ class TemplatesList extends Component {
|
|||||||
const canAdd =
|
const canAdd =
|
||||||
actions && Object.prototype.hasOwnProperty.call(actions, 'POST');
|
actions && Object.prototype.hasOwnProperty.call(actions, 'POST');
|
||||||
const isAllSelected = selected.length === templates.length;
|
const isAllSelected = selected.length === templates.length;
|
||||||
const { medium } = PageSectionVariants;
|
|
||||||
return (
|
return (
|
||||||
<PageSection>
|
<PageSection>
|
||||||
<Card>
|
<Card>
|
||||||
@@ -227,19 +225,15 @@ class TemplatesList extends Component {
|
|||||||
<ToolbarAddButton onClick={this.handleAddToggle} />
|
<ToolbarAddButton onClick={this.handleAddToggle} />
|
||||||
}
|
}
|
||||||
dropdownItems={[
|
dropdownItems={[
|
||||||
<DropdownItem
|
<DropdownItem key="job">
|
||||||
key="job"
|
<Link to={`${match.url}/job_template/add/`}>
|
||||||
component={Link}
|
{i18n._(t`Job Template`)}
|
||||||
to={`${match.url}/job_template/add`}
|
</Link>
|
||||||
>
|
|
||||||
{i18n._(t`Job Template`)}
|
|
||||||
</DropdownItem>,
|
</DropdownItem>,
|
||||||
<DropdownItem
|
<DropdownItem key="workflow">
|
||||||
key="workflow"
|
<Link to={`${match.url}_workflow/add/`}>
|
||||||
component={Link}
|
{i18n._(t`Workflow Template`)}
|
||||||
to={`${match.url}/add`}
|
</Link>
|
||||||
>
|
|
||||||
{i18n._(t`Workflow Template`)}
|
|
||||||
</DropdownItem>,
|
</DropdownItem>,
|
||||||
]}
|
]}
|
||||||
/>
|
/>
|
||||||
@@ -267,19 +261,15 @@ class TemplatesList extends Component {
|
|||||||
onSelect={this.handleAddSelect}
|
onSelect={this.handleAddSelect}
|
||||||
toggle={<ToolbarAddButton onClick={this.handleAddToggle} />}
|
toggle={<ToolbarAddButton onClick={this.handleAddToggle} />}
|
||||||
dropdownItems={[
|
dropdownItems={[
|
||||||
<DropdownItem
|
<DropdownItem key="job">
|
||||||
key="job"
|
<Link to={`${match.url}/job_template/add/`}>
|
||||||
component={Link}
|
{i18n._(t`Job Template`)}
|
||||||
to={`${match.url}/job_template/add/`}
|
</Link>
|
||||||
>
|
|
||||||
{i18n._(t`Job Template`)}
|
|
||||||
</DropdownItem>,
|
</DropdownItem>,
|
||||||
<DropdownItem
|
<DropdownItem key="workflow">
|
||||||
key="workflow"
|
<Link to={`${match.url}_workflow/add/`}>
|
||||||
component={Link}
|
{i18n._(t`Workflow Template`)}
|
||||||
to={`${match.url}_workflow/add/`}
|
</Link>
|
||||||
>
|
|
||||||
{i18n._(t`Workflow Template`)}
|
|
||||||
</DropdownItem>,
|
</DropdownItem>,
|
||||||
]}
|
]}
|
||||||
/>
|
/>
|
||||||
|
|||||||
Reference in New Issue
Block a user