diff --git a/awx/ui_next/dist/index.html b/awx/ui_next/dist/index.html
index 10a4088e01..8afa7581c8 100644
--- a/awx/ui_next/dist/index.html
+++ b/awx/ui_next/dist/index.html
@@ -1,7 +1,7 @@
-
+
diff --git a/awx/ui_next/src/App.jsx b/awx/ui_next/src/App.jsx
index 704515c113..fdc4bb4ec2 100644
--- a/awx/ui_next/src/App.jsx
+++ b/awx/ui_next/src/App.jsx
@@ -204,7 +204,7 @@ class App extends Component {
/>
diff --git a/awx/ui_next/src/app.scss b/awx/ui_next/src/app.scss
deleted file mode 100644
index 2c02873917..0000000000
--- a/awx/ui_next/src/app.scss
+++ /dev/null
@@ -1,117 +0,0 @@
-// https://github.com/patternfly/patternfly-react/issues/1294
-#app {
- height: 100%;
-}
-
-//
-// data list overrides
-//
-
-.pf-c-data-list {
- --pf-global--target-size--MinHeight: 32px;
- --pf-global--target-size--MinWidth: 32px;
- --pf-global--FontSize--md: 14px;
-
- .pf-c-badge:not(:last-child),
- .pf-c-switch:not(:last-child) {
- margin-right: 18px;
- }
-}
-
-.pf-c-data-list__item-row {
- --pf-c-data-list__item-row--PaddingRight: 20px;
- --pf-c-data-list__item-row--PaddingLeft: 20px;
-}
-
-.pf-c-data-list__item-content {
- --pf-c-data-list__item-content--PaddingBottom: 16px;
-
- min-height: 59px;
- align-items: center;
-}
-
-.pf-c-data-list__item-control {
- --pf-c-data-list__item-control--PaddingTop: 16px;
- --pf-c-data-list__item-control--MarginRight: 8px;
- --pf-c-data-list__item-control--PaddingBottom: 16px;
-}
-
-.pf-c-data-list__item {
- --pf-c-data-list__item--PaddingLeft: 20px;
- --pf-c-data-list__item--PaddingRight: 20px;
-}
-
-.pf-c-data-list__cell {
- --pf-c-data-list__cell--PaddingTop: 16px;
- --pf-c-data-list__cell-cell--PaddingTop: 16px;
-
- &.pf-c-data-list__cell--divider {
- --pf-c-data-list__cell-cell--MarginRight: 0;
- --pf-c-data-list__cell--PaddingTop: 12px;
- flex-grow: 0;
- }
-}
-
-//
-// AlertModal styles
-//
-
-.at-c-alertModal.pf-c-modal-box {
- border: 0;
- border-left: 56px solid black;
-
- .at-c-alertModal__icon {
- position: absolute;
- font-size: 23px;
- top: 28px;
- left: -39px;
- }
-}
-
-.at-c-alertModal--warning.pf-c-modal-box {
- border-color: var(--pf-global--warning-color--100);
-
- .pf-c-title {
- color: var(--pf-global--warning-color--200);
- }
-
- .at-c-alertModal__icon {
- color: var(--pf-global--warning-color--200);
- }
-}
-
-.at-c-alertModal--danger.pf-c-modal-box {
- border-color: var(--pf-global--danger-color--100);
-
- .pf-c-title {
- color: var(--pf-global--danger-color--200);
- }
-
- .at-c-alertModal__icon {
- color: white;
- }
-}
-
-.at-c-alertModal--info.pf-c-modal-box {
- border-color: var(--pf-global--info-color--100);
-
- .pf-c-title {
- color: var(--pf-global--info-color--200);
- }
-
- .at-c-alertModal__icon {
- color: var(--pf-global--info-color--200);
- }
-}
-
-.at-c-alertModal--success.pf-c-modal-box {
- border-color: var(--pf-global--success-color--100);
-
- .pf-c-title {
- color: var(--pf-global--success-color--200);
- }
-
- .at-c-alertModal__icon {
- color: var(--pf-global--success-color--200);
- }
-}
diff --git a/awx/ui_next/src/components/AlertModal/AlertModal.jsx b/awx/ui_next/src/components/AlertModal/AlertModal.jsx
index 1b31f79653..f600d77745 100644
--- a/awx/ui_next/src/components/AlertModal/AlertModal.jsx
+++ b/awx/ui_next/src/components/AlertModal/AlertModal.jsx
@@ -1,42 +1,47 @@
import React from 'react';
-
-import { Modal } from '@patternfly/react-core';
-
+import { Modal, Title } from '@patternfly/react-core';
import {
- ExclamationTriangleIcon,
- ExclamationCircleIcon,
- InfoCircleIcon,
CheckCircleIcon,
+ ExclamationCircleIcon,
+ ExclamationTriangleIcon,
+ InfoCircleIcon,
+ TimesCircleIcon,
} from '@patternfly/react-icons';
+import styled from 'styled-components';
-const getIcon = variant => {
- let icon;
- if (variant === 'warning') {
- icon = ;
- } else if (variant === 'danger') {
- icon = ;
+const Header = styled.div`
+ display: flex;
+ svg {
+ margin-right: 16px;
}
- if (variant === 'info') {
- icon = ;
- }
- if (variant === 'success') {
- icon = ;
- }
- return icon;
-};
+`;
+
+export default ({ isOpen = null, title, variant, children, ...props }) => {
+ const variantIcons = {
+ danger: ,
+ error: ,
+ info: ,
+ success: ,
+ warning: ,
+ };
+
+ const customHeader = (
+
+ {variant ? variantIcons[variant] : null}
+ {title}
+
+ );
-export default ({ variant, children, ...props }) => {
- const { isOpen = null } = props;
- props.isOpen = Boolean(isOpen);
return (
{children}
- {getIcon(variant)}
);
};
diff --git a/awx/ui_next/src/components/AlertModal/AlertModal.test.jsx b/awx/ui_next/src/components/AlertModal/AlertModal.test.jsx
index 4c9389543f..da8b234e5c 100644
--- a/awx/ui_next/src/components/AlertModal/AlertModal.test.jsx
+++ b/awx/ui_next/src/components/AlertModal/AlertModal.test.jsx
@@ -5,7 +5,9 @@ import AlertModal from './AlertModal';
describe('AlertModal', () => {
test('renders the expected content', () => {
- const wrapper = mount();
+ const wrapper = mount(
+ Are you sure?
+ );
expect(wrapper).toHaveLength(1);
});
});
diff --git a/awx/ui_next/src/components/CheckboxListItem/CheckboxListItem.jsx b/awx/ui_next/src/components/CheckboxListItem/CheckboxListItem.jsx
index 2616cf15cd..0213d7d113 100644
--- a/awx/ui_next/src/components/CheckboxListItem/CheckboxListItem.jsx
+++ b/awx/ui_next/src/components/CheckboxListItem/CheckboxListItem.jsx
@@ -6,19 +6,21 @@ import {
DataListItemCells,
DataListCell,
DataListCheck,
+ Radio,
} from '@patternfly/react-core';
-import DataListRadio from '@components/DataListRadio';
const CheckboxListItem = ({
+ isDisabled = false,
+ isRadio = false,
+ isSelected = false,
itemId,
- name,
label,
- isSelected,
- onSelect,
+ name,
onDeselect,
- isRadio,
+ onSelect,
}) => {
- const CheckboxRadio = isRadio ? DataListRadio : DataListCheck;
+ const CheckboxRadio = isRadio ? Radio : DataListCheck;
+
return (
(props.righthalf ? '16px' : '8px')};
- @media screen and (min-width: 768px) {
- padding-bottom: 0;
- justify-content: ${props => (props.lastcolumn ? 'flex-end' : 'inherit')};
- }
-`;
-
-export default DataListCell;
diff --git a/awx/ui_next/src/components/DataListCell/DataListCell.test.jsx b/awx/ui_next/src/components/DataListCell/DataListCell.test.jsx
deleted file mode 100644
index 55ec0b3018..0000000000
--- a/awx/ui_next/src/components/DataListCell/DataListCell.test.jsx
+++ /dev/null
@@ -1,11 +0,0 @@
-import React from 'react';
-import { mountWithContexts } from '@testUtils/enzymeHelpers';
-
-import DataListCell from './DataListCell';
-
-describe('DataListCell', () => {
- test('renders without failing', () => {
- const wrapper = mountWithContexts();
- expect(wrapper).toHaveLength(1);
- });
-});
diff --git a/awx/ui_next/src/components/DataListCell/index.js b/awx/ui_next/src/components/DataListCell/index.js
deleted file mode 100644
index d925b63c7d..0000000000
--- a/awx/ui_next/src/components/DataListCell/index.js
+++ /dev/null
@@ -1 +0,0 @@
-export { default } from './DataListCell';
diff --git a/awx/ui_next/src/components/DataListCheck/DataListCheck.jsx b/awx/ui_next/src/components/DataListCheck/DataListCheck.jsx
deleted file mode 100644
index 30817989cf..0000000000
--- a/awx/ui_next/src/components/DataListCheck/DataListCheck.jsx
+++ /dev/null
@@ -1,15 +0,0 @@
-import { DataListCheck as PFDataListCheck } from '@patternfly/react-core';
-import styled from 'styled-components';
-
-PFDataListCheck.displayName = 'PFDataListCheck';
-export default styled(PFDataListCheck)`
- padding-top: 18px;
- @media screen and (min-width: 768px) {
- padding-top: 16px;
- justify-content: ${props => (props.lastcolumn ? 'flex-end' : 'inherit')};
- .pf-c-data-list__check {
- display: flex;
- align-items: center;
- }
- }
-`;
diff --git a/awx/ui_next/src/components/DataListCheck/DataListCheck.test.jsx b/awx/ui_next/src/components/DataListCheck/DataListCheck.test.jsx
deleted file mode 100644
index f2414374fc..0000000000
--- a/awx/ui_next/src/components/DataListCheck/DataListCheck.test.jsx
+++ /dev/null
@@ -1,10 +0,0 @@
-import React from 'react';
-import { mount } from 'enzyme';
-import DataListCheck from './DataListCheck';
-
-describe('DataListCheck', () => {
- test('renders the expected content', () => {
- const wrapper = mount();
- expect(wrapper).toHaveLength(1);
- });
-});
diff --git a/awx/ui_next/src/components/DataListCheck/index.js b/awx/ui_next/src/components/DataListCheck/index.js
deleted file mode 100644
index cdb8b6137c..0000000000
--- a/awx/ui_next/src/components/DataListCheck/index.js
+++ /dev/null
@@ -1 +0,0 @@
-export { default } from './DataListCheck';
diff --git a/awx/ui_next/src/components/DataListRadio/DataListRadio.jsx b/awx/ui_next/src/components/DataListRadio/DataListRadio.jsx
deleted file mode 100644
index bccb1a3efe..0000000000
--- a/awx/ui_next/src/components/DataListRadio/DataListRadio.jsx
+++ /dev/null
@@ -1,47 +0,0 @@
-import * as React from 'react';
-import { string, bool, func } from 'prop-types';
-
-function DataListRadio({
- className = '',
- onChange,
- isValid = true,
- isDisabled = false,
- isChecked = null,
- checked = null,
- ...props
-}) {
- return (
-
-
- onChange(event.currentTarget.checked, event)}
- aria-invalid={!isValid}
- disabled={isDisabled}
- checked={isChecked || checked}
- />
-
-
- );
-}
-DataListRadio.propTypes = {
- className: string,
- isValid: bool,
- isDisabled: bool,
- isChecked: bool,
- checked: bool,
- onChange: func,
- 'aria-labelledby': string,
-};
-DataListRadio.defaultProps = {
- className: '',
- isValid: true,
- isDisabled: false,
- isChecked: false,
- checked: false,
- onChange: () => {},
- 'aria-labelledby': '',
-};
-
-export default DataListRadio;
diff --git a/awx/ui_next/src/components/DataListRadio/DataListRadio.test.jsx b/awx/ui_next/src/components/DataListRadio/DataListRadio.test.jsx
deleted file mode 100644
index b8fa2e4135..0000000000
--- a/awx/ui_next/src/components/DataListRadio/DataListRadio.test.jsx
+++ /dev/null
@@ -1,36 +0,0 @@
-import React from 'react';
-import { mountWithContexts } from '@testUtils/enzymeHelpers';
-import DataListRadio from './DataListRadio';
-
-describe('DataListRadio', () => {
- test('should call onChange', () => {
- const onChange = jest.fn();
- const wrapper = mountWithContexts();
- wrapper.find('input[type="radio"]').prop('onChange')({
- currentTarget: { checked: true },
- });
- expect(onChange).toHaveBeenCalledWith(true, {
- currentTarget: { checked: true },
- });
- });
-
- test('should pass props to correct children', () => {
- const onChange = jest.fn();
- const wrapper = mountWithContexts(
-
- );
- const div = wrapper.find('.pf-c-data-list__item-control');
- const input = wrapper.find('input[type="radio"]');
-
- expect(div.prop('className')).toEqual('pf-c-data-list__item-control foo');
- expect(input.prop('disabled')).toBe(true);
- expect(input.prop('checked')).toBe(true);
- expect(input.prop('aria-invalid')).toBe(false);
- });
-});
diff --git a/awx/ui_next/src/components/DataListRadio/index.js b/awx/ui_next/src/components/DataListRadio/index.js
deleted file mode 100644
index c8f5b6d345..0000000000
--- a/awx/ui_next/src/components/DataListRadio/index.js
+++ /dev/null
@@ -1 +0,0 @@
-export { default } from './DataListRadio';
diff --git a/awx/ui_next/src/components/DataListToolbar/DataListToolbar.jsx b/awx/ui_next/src/components/DataListToolbar/DataListToolbar.jsx
index 3b03ac838e..ce1f53f053 100644
--- a/awx/ui_next/src/components/DataListToolbar/DataListToolbar.jsx
+++ b/awx/ui_next/src/components/DataListToolbar/DataListToolbar.jsx
@@ -7,10 +7,10 @@ import styled from 'styled-components';
import { SearchIcon } from '@patternfly/react-icons';
import {
DataToolbar,
- DataToolbarContent,
- DataToolbarGroup,
- DataToolbarToggleGroup,
+ DataToolbarContent as _DataToolbarContent,
+ DataToolbarGroup as _DataToolbarGroup,
DataToolbarItem,
+ DataToolbarToggleGroup,
} from '@patternfly/react-core/dist/umd/experimental';
import ExpandCollapse from '../ExpandCollapse';
import Search from '../Search';
@@ -18,27 +18,12 @@ import Sort from '../Sort';
import { SearchColumns, SortColumns, QSConfig } from '@types';
-const AdditionalControlsWrapper = styled.div`
- display: flex;
- flex-grow: 1;
- justify-content: flex-end;
- align-items: center;
-
- & > :not(:first-child) {
- margin-left: 20px;
- }
+const DataToolbarContent = styled(_DataToolbarContent)`
+ --pf-c-data-toolbar__content--PaddingLeft: 24px;
+ --pf-c-data-toolbar__content--PaddingRight: 8px;
`;
-
-const AdditionalControlsDataToolbarGroup = styled(DataToolbarGroup)`
- margin-left: auto;
- margin-right: 0 !important;
-`;
-
-const DataToolbarSeparator = styled(DataToolbarItem)`
- width: 1px !important;
- height: 30px !important;
- margin-left: 3px !important;
- margin-right: 10px !important;
+const DataToolbarGroup = styled(_DataToolbarGroup)`
+ --pf-c-data-toolbar__group--spacer: 24px;
`;
class DataListToolbar extends React.Component {
@@ -80,7 +65,6 @@ class DataListToolbar extends React.Component {
id="select-all"
/>
-
)}
} breakpoint="lg">
@@ -110,13 +94,11 @@ class DataListToolbar extends React.Component {
)}
-
-
-
- {additionalControls}
-
-
-
+
+ {additionalControls.map(control => (
+ {control}
+ ))}
+
);
diff --git a/awx/ui_next/src/components/DeleteButton/DeleteButton.jsx b/awx/ui_next/src/components/DeleteButton/DeleteButton.jsx
index f434ea40d5..184caf9ef9 100644
--- a/awx/ui_next/src/components/DeleteButton/DeleteButton.jsx
+++ b/awx/ui_next/src/components/DeleteButton/DeleteButton.jsx
@@ -3,7 +3,6 @@ import { withI18n } from '@lingui/react';
import { t } from '@lingui/macro';
import { Button } from '@patternfly/react-core';
import AlertModal from '@components/AlertModal';
-import { CardActionsRow } from '@components/Card';
function DeleteButton({
onConfirm,
@@ -29,26 +28,28 @@ function DeleteButton({
title={modalTitle}
variant="danger"
onClose={() => setIsOpen(false)}
- >
- {i18n._(t`Are you sure you want to delete:`)}
-
- {name}
-
-
+ actions={[
-
+ ,
+ ,
+ ]}
+ >
+ {i18n._(t`Are you sure you want to delete:`)}
+
+ {name}
>
);
diff --git a/awx/ui_next/src/components/LaunchButton/LaunchButton.jsx b/awx/ui_next/src/components/LaunchButton/LaunchButton.jsx
index 1793eed8ba..86df83f41e 100644
--- a/awx/ui_next/src/components/LaunchButton/LaunchButton.jsx
+++ b/awx/ui_next/src/components/LaunchButton/LaunchButton.jsx
@@ -128,7 +128,7 @@ class LaunchButton extends React.Component {
{launchError && (
diff --git a/awx/ui_next/src/components/Lookup/MultiCredentialsLookup.jsx b/awx/ui_next/src/components/Lookup/MultiCredentialsLookup.jsx
index 782b11da36..cf05f48e89 100644
--- a/awx/ui_next/src/components/Lookup/MultiCredentialsLookup.jsx
+++ b/awx/ui_next/src/components/Lookup/MultiCredentialsLookup.jsx
@@ -8,7 +8,6 @@ import { CredentialsAPI, CredentialTypesAPI } from '@api';
import AnsibleSelect from '@components/AnsibleSelect';
import { FieldTooltip } from '@components/FormField';
import CredentialChip from '@components/CredentialChip';
-import VerticalSeperator from '@components/VerticalSeparator';
import { getQSConfig, parseQueryString } from '@util/qs';
import Lookup from './Lookup';
import OptionsList from './shared/OptionsList';
@@ -97,8 +96,9 @@ function MultiCredentialsLookup(props) {
{credentialTypes && credentialTypes.length > 0 && (
- {i18n._(t`Selected Category`)}
-
+
+ {i18n._(t`Selected Category`)}
+
(props.righthalf ? 'flex-start' : 'inherit')};
- padding-bottom: ${props => (props.righthalf ? '16px' : '8px')};
-
- @media screen and (min-width: 768px) {
- justify-content: ${props => (props.righthalf ? 'flex-end' : 'inherit')};
- padding-bottom: 0;
- }
+const DataListAction = styled(_DataListAction)`
+ align-items: center;
+ display: grid;
+ grid-gap: 16px;
+ grid-template-columns: repeat(3, max-content);
`;
function NotificationListItem(props) {
@@ -51,7 +47,6 @@ function NotificationListItem(props) {
to={{
pathname: detailUrl,
}}
- css="margin-right: 1.5em;"
>
{notification.name}
@@ -61,51 +56,47 @@ function NotificationListItem(props) {
{typeLabels[notification.notification_type]}
,
-
-
- toggleNotification(
- notification.id,
- startedTurnedOn,
- 'started'
- )
- }
- aria-label={i18n._(t`Toggle notification start`)}
- />
-
- toggleNotification(
- notification.id,
- successTurnedOn,
- 'success'
- )
- }
- aria-label={i18n._(t`Toggle notification success`)}
- />
-
- toggleNotification(notification.id, errorTurnedOn, 'error')
- }
- aria-label={i18n._(t`Toggle notification failure`)}
- />
- ,
]}
/>
+
+
+ toggleNotification(notification.id, startedTurnedOn, 'started')
+ }
+ aria-label={i18n._(t`Toggle notification start`)}
+ />
+
+ toggleNotification(notification.id, successTurnedOn, 'success')
+ }
+ aria-label={i18n._(t`Toggle notification success`)}
+ />
+
+ toggleNotification(notification.id, errorTurnedOn, 'error')
+ }
+ aria-label={i18n._(t`Toggle notification failure`)}
+ />
+
);
diff --git a/awx/ui_next/src/components/NotificationList/__snapshots__/NotificationListItem.test.jsx.snap b/awx/ui_next/src/components/NotificationList/__snapshots__/NotificationListItem.test.jsx.snap
index c531e44c0c..2ec6011b1d 100644
--- a/awx/ui_next/src/components/NotificationList/__snapshots__/NotificationListItem.test.jsx.snap
+++ b/awx/ui_next/src/components/NotificationList/__snapshots__/NotificationListItem.test.jsx.snap
@@ -42,7 +42,7 @@ exports[` initially renders succe
+
initially renders succe
Foo
- ,
-
+ ,
+
Slack
- ,
-
-
-
-
- ,
+ ,
]
}
key=".0"
@@ -99,453 +68,324 @@ exports[` initially renders succe
+
+
-
-
-
- Slack
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
-
+
-
-
+
+ Start
+
+
+
+
+
+
+
+
-
+
-
+
+
-
-
-
-
- Success
-
-
- Success
-
-
-
-
-
-
+
+ Success
+
+
+
+
+
+
+
+
-
+
-
+
+
-
-
-
-
- Failure
-
-
- Failure
-
-
-
-
-
-
-
-
-
-
-
+ Failure
+
+
+ Failure
+
+
+
+
+
+
+
+
+
diff --git a/awx/ui_next/src/components/PaginatedDataList/ToolbarDeleteButton.jsx b/awx/ui_next/src/components/PaginatedDataList/ToolbarDeleteButton.jsx
index c9d1b01247..0bad51f112 100644
--- a/awx/ui_next/src/components/PaginatedDataList/ToolbarDeleteButton.jsx
+++ b/awx/ui_next/src/components/PaginatedDataList/ToolbarDeleteButton.jsx
@@ -137,6 +137,7 @@ class ToolbarDeleteButton extends React.Component {
render() {
const { itemsToDelete, pluralizedItemName, i18n } = this.props;
const { isModalOpen } = this.state;
+ const modalTitle = i18n._(t`Delete ${pluralizedItemName}?`);
const isDisabled =
itemsToDelete.length === 0 || itemsToDelete.some(cannotDelete);
@@ -161,7 +162,7 @@ class ToolbarDeleteButton extends React.Component {
{isModalOpen && (
,
]}
>
- {i18n._(t`Are you sure you want to delete:`)}
-
+ {i18n._(t`This action will delete the following:`)}
{itemsToDelete.map(item => (
{item.name || item.username}
))}
-
)}
diff --git a/awx/ui_next/src/components/ResourceAccessList/ResourceAccessList.jsx b/awx/ui_next/src/components/ResourceAccessList/ResourceAccessList.jsx
index 1baefcf6a5..e321a14b2b 100644
--- a/awx/ui_next/src/components/ResourceAccessList/ResourceAccessList.jsx
+++ b/awx/ui_next/src/components/ResourceAccessList/ResourceAccessList.jsx
@@ -232,7 +232,7 @@ class ResourceAccessList extends React.Component {
)}
diff --git a/awx/ui_next/src/components/ResourceAccessList/__snapshots__/DeleteRoleConfirmationModal.test.jsx.snap b/awx/ui_next/src/components/ResourceAccessList/__snapshots__/DeleteRoleConfirmationModal.test.jsx.snap
index 50969673ec..9ea0627668 100644
--- a/awx/ui_next/src/components/ResourceAccessList/__snapshots__/DeleteRoleConfirmationModal.test.jsx.snap
+++ b/awx/ui_next/src/components/ResourceAccessList/__snapshots__/DeleteRoleConfirmationModal.test.jsx.snap
@@ -73,7 +73,7 @@ exports[` should render initially 1`] = `
aria-describedby="pf-modal-0"
aria-label="Remove {0} Access"
aria-modal="true"
- class="pf-c-modal-box awx-c-modal at-c-alertModal at-c-alertModal--danger pf-m-lg"
+ class="pf-c-modal-box pf-m-sm"
role="dialog"
>
should render initially 1`] = `
/>
-
-
- Remove {0} Access
-
-
+
+
should render initially 1`] = `
If you only want to remove access for this particular user, please remove them from the team.
-