mirror of
https://github.com/ansible/awx.git
synced 2024-11-01 08:21:15 +03:00
Merge pull request #135 from mabashian/upgrade-pf
Upgrades pf deps to latest
This commit is contained in:
commit
7bd8234edf
@ -95,7 +95,7 @@ describe('<Pagination />', () => {
|
|||||||
|
|
||||||
test('changing pageSize works', () => {
|
test('changing pageSize works', () => {
|
||||||
const pageSizeDropdownToggleSelector = 'DropdownToggle DropdownToggle[className="togglePageSize"]';
|
const pageSizeDropdownToggleSelector = 'DropdownToggle DropdownToggle[className="togglePageSize"]';
|
||||||
const pageSizeDropdownItemsSelector = 'DropdownItem';
|
const pageSizeDropdownItemsSelector = 'DropdownItem button';
|
||||||
const onSetPage = jest.fn();
|
const onSetPage = jest.fn();
|
||||||
|
|
||||||
pagination = mount(
|
pagination = mount(
|
||||||
|
60
package-lock.json
generated
60
package-lock.json
generated
@ -1306,18 +1306,18 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@patternfly/patternfly": {
|
"@patternfly/patternfly": {
|
||||||
"version": "1.0.193",
|
"version": "1.0.242",
|
||||||
"resolved": "https://registry.npmjs.org/@patternfly/patternfly/-/patternfly-1.0.193.tgz",
|
"resolved": "https://registry.npmjs.org/@patternfly/patternfly/-/patternfly-1.0.242.tgz",
|
||||||
"integrity": "sha512-QYYg2Fkw/Et140E2FvzAKtdyI+qtRkoDBj6X22mmRt67dFRF5y3DEx+SvXUHYt7Usr1ModLtagql2oPjswHyjA=="
|
"integrity": "sha512-qPJnMzwp6gscxO3CXvRR03o/UvXUf2KeWCsveKaYtAibIuzeSYsxLU4hP5LtCby/SVyLn6ciDTuKh+mRBvvM/A=="
|
||||||
},
|
},
|
||||||
"@patternfly/react-core": {
|
"@patternfly/react-core": {
|
||||||
"version": "2.1.8",
|
"version": "2.3.6",
|
||||||
"resolved": "https://registry.npmjs.org/@patternfly/react-core/-/react-core-2.1.8.tgz",
|
"resolved": "https://registry.npmjs.org/@patternfly/react-core/-/react-core-2.3.6.tgz",
|
||||||
"integrity": "sha512-3TyUOhJ4BUNWhWJ0YvxOsWf3sMJfmpx6YIroHWaD2hd5xOu3uvPCj8W3REgnIWGPIzYVlVaLrfNSSG7KEEnX1g==",
|
"integrity": "sha512-A8Ajpbkn+kP7KRPBy9brP+QBpGQw0juMmKMBfjOqfTD+vnSfF3boCGGQGrrFZnnEQyYFJ0x/LMzNJVqyYDVNHQ==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@patternfly/react-icons": "^3.0.1",
|
"@patternfly/react-icons": "^3.1.1",
|
||||||
"@patternfly/react-styles": "^2.3.3",
|
"@patternfly/react-styles": "^2.3.5",
|
||||||
"@patternfly/react-tokens": "^2.0.2",
|
"@patternfly/react-tokens": "^2.0.4",
|
||||||
"@tippy.js/react": "^1.1.1",
|
"@tippy.js/react": "^1.1.1",
|
||||||
"emotion": "^9.2.9",
|
"emotion": "^9.2.9",
|
||||||
"exenv": "^1.2.2",
|
"exenv": "^1.2.2",
|
||||||
@ -1325,10 +1325,27 @@
|
|||||||
"tippy.js": "^3.4.1"
|
"tippy.js": "^3.4.1"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@patternfly/react-icons": {
|
||||||
|
"version": "3.5.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@patternfly/react-icons/-/react-icons-3.5.0.tgz",
|
||||||
|
"integrity": "sha512-dXbyczYViN4n5i/rTLU95iPCpL2geRIsW+/K/6R9cvB6Lsa1OBmkvos+czDaBSYNGRp+wowo1K65j+6BI5opgQ=="
|
||||||
|
},
|
||||||
|
"@patternfly/react-tokens": {
|
||||||
|
"version": "2.0.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/@patternfly/react-tokens/-/react-tokens-2.0.4.tgz",
|
||||||
|
"integrity": "sha512-ZiKBjsMmEC8xhqI2lscMve4+7C/qJlcnU7+fPsDxAiaR4OTfSASLY/XwAf08WuK3PwX2Jbz5kOyI04eGt6VfCg=="
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"@patternfly/react-icons": {
|
||||||
|
"version": "3.5.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@patternfly/react-icons/-/react-icons-3.5.0.tgz",
|
||||||
|
"integrity": "sha512-dXbyczYViN4n5i/rTLU95iPCpL2geRIsW+/K/6R9cvB6Lsa1OBmkvos+czDaBSYNGRp+wowo1K65j+6BI5opgQ=="
|
||||||
|
},
|
||||||
"@patternfly/react-styles": {
|
"@patternfly/react-styles": {
|
||||||
"version": "2.3.3",
|
"version": "2.3.5",
|
||||||
"resolved": "https://registry.npmjs.org/@patternfly/react-styles/-/react-styles-2.3.3.tgz",
|
"resolved": "https://registry.npmjs.org/@patternfly/react-styles/-/react-styles-2.3.5.tgz",
|
||||||
"integrity": "sha512-SU1CLe2U5RUZ5F5jNO426MTGriCRV8CM3jnJzdkQ3aXm6QfZ1FWDbHWFQgyur5KAZRlNSUlBuziNQS+DWeju8A==",
|
"integrity": "sha512-48l5EFzSBIDFewHaBrzdQyQtZOXJyYHXmDjumLGnovFLypCfbAeBfwH7zOU500MIuTFjpkNF3ziQj0uSF1ydZQ==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@babel/helper-plugin-utils": "^7.0.0-beta.48",
|
"@babel/helper-plugin-utils": "^7.0.0-beta.48",
|
||||||
"camel-case": "^3.0.0",
|
"camel-case": "^3.0.0",
|
||||||
@ -1343,18 +1360,11 @@
|
|||||||
"relative": "^3.0.2",
|
"relative": "^3.0.2",
|
||||||
"resolve-from": "^4.0.0"
|
"resolve-from": "^4.0.0"
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"@patternfly/react-icons": {
|
|
||||||
"version": "3.0.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/@patternfly/react-icons/-/react-icons-3.0.1.tgz",
|
|
||||||
"integrity": "sha512-A/ACY0zCpIvNR8bzR21hKghqFTkFNIUX4pksDoMH8MY2tdCkJVZwkGAVy9jQ98H9DnyMnaNDd4KZuaoyicmlug=="
|
|
||||||
},
|
},
|
||||||
"@patternfly/react-tokens": {
|
"@patternfly/react-tokens": {
|
||||||
"version": "2.0.2",
|
"version": "2.0.4",
|
||||||
"resolved": "https://registry.npmjs.org/@patternfly/react-tokens/-/react-tokens-2.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/@patternfly/react-tokens/-/react-tokens-2.0.4.tgz",
|
||||||
"integrity": "sha512-Jx4XqXtgH4LaBdL5LdUCiXs6UmjRPKEW+zTP3+57Cw1uRnVzu6ieNRJRjdB8ovRDKPOwBDWAoxBDkl0y+Ktz/w=="
|
"integrity": "sha512-ZiKBjsMmEC8xhqI2lscMve4+7C/qJlcnU7+fPsDxAiaR4OTfSASLY/XwAf08WuK3PwX2Jbz5kOyI04eGt6VfCg=="
|
||||||
},
|
},
|
||||||
"@tippy.js/react": {
|
"@tippy.js/react": {
|
||||||
"version": "1.1.1",
|
"version": "1.1.1",
|
||||||
@ -4273,9 +4283,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"csstype": {
|
"csstype": {
|
||||||
"version": "2.6.2",
|
"version": "2.6.3",
|
||||||
"resolved": "https://registry.npmjs.org/csstype/-/csstype-2.6.2.tgz",
|
"resolved": "https://registry.npmjs.org/csstype/-/csstype-2.6.3.tgz",
|
||||||
"integrity": "sha512-Rl7PvTae0pflc1YtxtKbiSqq20Ts6vpIYOD5WBafl4y123DyHUeLrRdQP66sQW8/6gmX8jrYJLXwNeMqYVJcow=="
|
"integrity": "sha512-rINUZXOkcBmoHWEyu7JdHu5JMzkGRoMX4ov9830WNgxf5UYxcBUO0QTKAqeJ5EZfSdlrcJYkC8WwfVW7JYi4yg=="
|
||||||
},
|
},
|
||||||
"currently-unhandled": {
|
"currently-unhandled": {
|
||||||
"version": "0.4.1",
|
"version": "0.4.1",
|
||||||
|
@ -47,10 +47,10 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@lingui/react": "^2.7.2",
|
"@lingui/react": "^2.7.2",
|
||||||
"@patternfly/patternfly": "^1.0.189",
|
"@patternfly/patternfly": "^1.0.242",
|
||||||
"@patternfly/react-core": "^2.1.8",
|
"@patternfly/react-core": "^2.3.6",
|
||||||
"@patternfly/react-icons": "^3.0.1",
|
"@patternfly/react-icons": "^3.5.0",
|
||||||
"@patternfly/react-tokens": "^2.0.2",
|
"@patternfly/react-tokens": "^2.0.4",
|
||||||
"axios": "^0.18.0",
|
"axios": "^0.18.0",
|
||||||
"prop-types": "^15.6.2",
|
"prop-types": "^15.6.2",
|
||||||
"react": "^16.4.1",
|
"react": "^16.4.1",
|
||||||
|
14
src/app.scss
14
src/app.scss
@ -95,20 +95,6 @@
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.pf-c-data-list__check {
|
|
||||||
--pf-c-data-list__check--MarginRight: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.pf-c-data-list__check:after {
|
|
||||||
content: "";
|
|
||||||
background-color: #d7d7d7;
|
|
||||||
width: 1px;
|
|
||||||
height: 25px;
|
|
||||||
display: block;
|
|
||||||
margin-left: 20px;
|
|
||||||
margin-right: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.pf-c-data-list__cell {
|
.pf-c-data-list__cell {
|
||||||
--pf-c-data-list__cell--PaddingTop: 16px;
|
--pf-c-data-list__cell--PaddingTop: 16px;
|
||||||
--pf-c-data-list__cell--PaddingBottom: 16px;
|
--pf-c-data-list__cell--PaddingBottom: 16px;
|
||||||
|
@ -6,6 +6,8 @@ import {
|
|||||||
Checkbox,
|
Checkbox,
|
||||||
} from '@patternfly/react-core';
|
} from '@patternfly/react-core';
|
||||||
|
|
||||||
|
import VerticalSeparator from '../VerticalSeparator';
|
||||||
|
|
||||||
const CheckboxListItem = ({
|
const CheckboxListItem = ({
|
||||||
itemId,
|
itemId,
|
||||||
name,
|
name,
|
||||||
@ -13,7 +15,6 @@ const CheckboxListItem = ({
|
|||||||
onSelect,
|
onSelect,
|
||||||
}) => (
|
}) => (
|
||||||
<li key={itemId} className="pf-c-data-list__item" aria-labelledby="check-action-item1">
|
<li key={itemId} className="pf-c-data-list__item" aria-labelledby="check-action-item1">
|
||||||
<div className="pf-c-data-list__check">
|
|
||||||
<I18n>
|
<I18n>
|
||||||
{({ i18n }) => (
|
{({ i18n }) => (
|
||||||
<Checkbox
|
<Checkbox
|
||||||
@ -25,7 +26,7 @@ const CheckboxListItem = ({
|
|||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</I18n>
|
</I18n>
|
||||||
</div>
|
<VerticalSeparator />
|
||||||
<div className="pf-c-data-list__cell">
|
<div className="pf-c-data-list__cell">
|
||||||
<label htmlFor={`selectd-${itemId}`} className="check-action-item">
|
<label htmlFor={`selectd-${itemId}`} className="check-action-item">
|
||||||
<b>{name}</b>
|
<b>{name}</b>
|
||||||
|
@ -109,7 +109,7 @@ class Pagination extends Component {
|
|||||||
style
|
style
|
||||||
} = this.props;
|
} = this.props;
|
||||||
const { value, isOpen } = this.state;
|
const { value, isOpen } = this.state;
|
||||||
let opts;
|
let opts = [];
|
||||||
if (pageSizeOptions) {
|
if (pageSizeOptions) {
|
||||||
opts = pageSizeOptions.slice().reverse().filter(o => o !== page_size);
|
opts = pageSizeOptions.slice().reverse().filter(o => o !== page_size);
|
||||||
}
|
}
|
||||||
@ -125,6 +125,15 @@ class Pagination extends Component {
|
|||||||
const itemMin = ((page - 1) * page_size) + 1;
|
const itemMin = ((page - 1) * page_size) + 1;
|
||||||
const itemMax = itemMin + itemCount - 1;
|
const itemMax = itemMin + itemCount - 1;
|
||||||
|
|
||||||
|
const dropdownItems = opts.map(option => (
|
||||||
|
<DropdownItem
|
||||||
|
key={option}
|
||||||
|
component="button"
|
||||||
|
>
|
||||||
|
{option}
|
||||||
|
</DropdownItem>
|
||||||
|
));
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<I18n>
|
<I18n>
|
||||||
{({ i18n }) => (
|
{({ i18n }) => (
|
||||||
@ -145,16 +154,8 @@ class Pagination extends Component {
|
|||||||
{page_size}
|
{page_size}
|
||||||
</DropdownToggle>
|
</DropdownToggle>
|
||||||
)}
|
)}
|
||||||
>
|
dropdownItems={dropdownItems}
|
||||||
{opts.map(option => (
|
/>
|
||||||
<DropdownItem
|
|
||||||
key={option}
|
|
||||||
component="button"
|
|
||||||
>
|
|
||||||
{option}
|
|
||||||
</DropdownItem>
|
|
||||||
))}
|
|
||||||
</Dropdown>
|
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
<div className="awx-pagination__counts">
|
<div className="awx-pagination__counts">
|
||||||
|
@ -9,6 +9,8 @@ import {
|
|||||||
Link
|
Link
|
||||||
} from 'react-router-dom';
|
} from 'react-router-dom';
|
||||||
|
|
||||||
|
import VerticalSeparator from '../../../components/VerticalSeparator';
|
||||||
|
|
||||||
export default ({
|
export default ({
|
||||||
itemId,
|
itemId,
|
||||||
name,
|
name,
|
||||||
@ -19,7 +21,6 @@ export default ({
|
|||||||
detailUrl,
|
detailUrl,
|
||||||
}) => (
|
}) => (
|
||||||
<li key={itemId} className="pf-c-data-list__item" aria-labelledby="check-action-item1">
|
<li key={itemId} className="pf-c-data-list__item" aria-labelledby="check-action-item1">
|
||||||
<div className="pf-c-data-list__check">
|
|
||||||
<I18n>
|
<I18n>
|
||||||
{({ i18n }) => (
|
{({ i18n }) => (
|
||||||
<Checkbox
|
<Checkbox
|
||||||
@ -30,7 +31,7 @@ export default ({
|
|||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</I18n>
|
</I18n>
|
||||||
</div>
|
<VerticalSeparator />
|
||||||
<div className="pf-c-data-list__cell">
|
<div className="pf-c-data-list__cell">
|
||||||
<span id="check-action-item1">
|
<span id="check-action-item1">
|
||||||
<Link
|
<Link
|
||||||
|
Loading…
Reference in New Issue
Block a user