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', () => {
|
||||
const pageSizeDropdownToggleSelector = 'DropdownToggle DropdownToggle[className="togglePageSize"]';
|
||||
const pageSizeDropdownItemsSelector = 'DropdownItem';
|
||||
const pageSizeDropdownItemsSelector = 'DropdownItem button';
|
||||
const onSetPage = jest.fn();
|
||||
|
||||
pagination = mount(
|
||||
|
60
package-lock.json
generated
60
package-lock.json
generated
@ -1306,18 +1306,18 @@
|
||||
}
|
||||
},
|
||||
"@patternfly/patternfly": {
|
||||
"version": "1.0.193",
|
||||
"resolved": "https://registry.npmjs.org/@patternfly/patternfly/-/patternfly-1.0.193.tgz",
|
||||
"integrity": "sha512-QYYg2Fkw/Et140E2FvzAKtdyI+qtRkoDBj6X22mmRt67dFRF5y3DEx+SvXUHYt7Usr1ModLtagql2oPjswHyjA=="
|
||||
"version": "1.0.242",
|
||||
"resolved": "https://registry.npmjs.org/@patternfly/patternfly/-/patternfly-1.0.242.tgz",
|
||||
"integrity": "sha512-qPJnMzwp6gscxO3CXvRR03o/UvXUf2KeWCsveKaYtAibIuzeSYsxLU4hP5LtCby/SVyLn6ciDTuKh+mRBvvM/A=="
|
||||
},
|
||||
"@patternfly/react-core": {
|
||||
"version": "2.1.8",
|
||||
"resolved": "https://registry.npmjs.org/@patternfly/react-core/-/react-core-2.1.8.tgz",
|
||||
"integrity": "sha512-3TyUOhJ4BUNWhWJ0YvxOsWf3sMJfmpx6YIroHWaD2hd5xOu3uvPCj8W3REgnIWGPIzYVlVaLrfNSSG7KEEnX1g==",
|
||||
"version": "2.3.6",
|
||||
"resolved": "https://registry.npmjs.org/@patternfly/react-core/-/react-core-2.3.6.tgz",
|
||||
"integrity": "sha512-A8Ajpbkn+kP7KRPBy9brP+QBpGQw0juMmKMBfjOqfTD+vnSfF3boCGGQGrrFZnnEQyYFJ0x/LMzNJVqyYDVNHQ==",
|
||||
"requires": {
|
||||
"@patternfly/react-icons": "^3.0.1",
|
||||
"@patternfly/react-styles": "^2.3.3",
|
||||
"@patternfly/react-tokens": "^2.0.2",
|
||||
"@patternfly/react-icons": "^3.1.1",
|
||||
"@patternfly/react-styles": "^2.3.5",
|
||||
"@patternfly/react-tokens": "^2.0.4",
|
||||
"@tippy.js/react": "^1.1.1",
|
||||
"emotion": "^9.2.9",
|
||||
"exenv": "^1.2.2",
|
||||
@ -1325,10 +1325,27 @@
|
||||
"tippy.js": "^3.4.1"
|
||||
},
|
||||
"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": {
|
||||
"version": "2.3.3",
|
||||
"resolved": "https://registry.npmjs.org/@patternfly/react-styles/-/react-styles-2.3.3.tgz",
|
||||
"integrity": "sha512-SU1CLe2U5RUZ5F5jNO426MTGriCRV8CM3jnJzdkQ3aXm6QfZ1FWDbHWFQgyur5KAZRlNSUlBuziNQS+DWeju8A==",
|
||||
"version": "2.3.5",
|
||||
"resolved": "https://registry.npmjs.org/@patternfly/react-styles/-/react-styles-2.3.5.tgz",
|
||||
"integrity": "sha512-48l5EFzSBIDFewHaBrzdQyQtZOXJyYHXmDjumLGnovFLypCfbAeBfwH7zOU500MIuTFjpkNF3ziQj0uSF1ydZQ==",
|
||||
"requires": {
|
||||
"@babel/helper-plugin-utils": "^7.0.0-beta.48",
|
||||
"camel-case": "^3.0.0",
|
||||
@ -1343,18 +1360,11 @@
|
||||
"relative": "^3.0.2",
|
||||
"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": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/@patternfly/react-tokens/-/react-tokens-2.0.2.tgz",
|
||||
"integrity": "sha512-Jx4XqXtgH4LaBdL5LdUCiXs6UmjRPKEW+zTP3+57Cw1uRnVzu6ieNRJRjdB8ovRDKPOwBDWAoxBDkl0y+Ktz/w=="
|
||||
"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=="
|
||||
},
|
||||
"@tippy.js/react": {
|
||||
"version": "1.1.1",
|
||||
@ -4273,9 +4283,9 @@
|
||||
}
|
||||
},
|
||||
"csstype": {
|
||||
"version": "2.6.2",
|
||||
"resolved": "https://registry.npmjs.org/csstype/-/csstype-2.6.2.tgz",
|
||||
"integrity": "sha512-Rl7PvTae0pflc1YtxtKbiSqq20Ts6vpIYOD5WBafl4y123DyHUeLrRdQP66sQW8/6gmX8jrYJLXwNeMqYVJcow=="
|
||||
"version": "2.6.3",
|
||||
"resolved": "https://registry.npmjs.org/csstype/-/csstype-2.6.3.tgz",
|
||||
"integrity": "sha512-rINUZXOkcBmoHWEyu7JdHu5JMzkGRoMX4ov9830WNgxf5UYxcBUO0QTKAqeJ5EZfSdlrcJYkC8WwfVW7JYi4yg=="
|
||||
},
|
||||
"currently-unhandled": {
|
||||
"version": "0.4.1",
|
||||
|
@ -47,10 +47,10 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@lingui/react": "^2.7.2",
|
||||
"@patternfly/patternfly": "^1.0.189",
|
||||
"@patternfly/react-core": "^2.1.8",
|
||||
"@patternfly/react-icons": "^3.0.1",
|
||||
"@patternfly/react-tokens": "^2.0.2",
|
||||
"@patternfly/patternfly": "^1.0.242",
|
||||
"@patternfly/react-core": "^2.3.6",
|
||||
"@patternfly/react-icons": "^3.5.0",
|
||||
"@patternfly/react-tokens": "^2.0.4",
|
||||
"axios": "^0.18.0",
|
||||
"prop-types": "^15.6.2",
|
||||
"react": "^16.4.1",
|
||||
|
14
src/app.scss
14
src/app.scss
@ -95,20 +95,6 @@
|
||||
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--PaddingTop: 16px;
|
||||
--pf-c-data-list__cell--PaddingBottom: 16px;
|
||||
|
@ -6,6 +6,8 @@ import {
|
||||
Checkbox,
|
||||
} from '@patternfly/react-core';
|
||||
|
||||
import VerticalSeparator from '../VerticalSeparator';
|
||||
|
||||
const CheckboxListItem = ({
|
||||
itemId,
|
||||
name,
|
||||
@ -13,7 +15,6 @@ const CheckboxListItem = ({
|
||||
onSelect,
|
||||
}) => (
|
||||
<li key={itemId} className="pf-c-data-list__item" aria-labelledby="check-action-item1">
|
||||
<div className="pf-c-data-list__check">
|
||||
<I18n>
|
||||
{({ i18n }) => (
|
||||
<Checkbox
|
||||
@ -25,7 +26,7 @@ const CheckboxListItem = ({
|
||||
/>
|
||||
)}
|
||||
</I18n>
|
||||
</div>
|
||||
<VerticalSeparator />
|
||||
<div className="pf-c-data-list__cell">
|
||||
<label htmlFor={`selectd-${itemId}`} className="check-action-item">
|
||||
<b>{name}</b>
|
||||
|
@ -109,7 +109,7 @@ class Pagination extends Component {
|
||||
style
|
||||
} = this.props;
|
||||
const { value, isOpen } = this.state;
|
||||
let opts;
|
||||
let opts = [];
|
||||
if (pageSizeOptions) {
|
||||
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 itemMax = itemMin + itemCount - 1;
|
||||
|
||||
const dropdownItems = opts.map(option => (
|
||||
<DropdownItem
|
||||
key={option}
|
||||
component="button"
|
||||
>
|
||||
{option}
|
||||
</DropdownItem>
|
||||
));
|
||||
|
||||
return (
|
||||
<I18n>
|
||||
{({ i18n }) => (
|
||||
@ -145,16 +154,8 @@ class Pagination extends Component {
|
||||
{page_size}
|
||||
</DropdownToggle>
|
||||
)}
|
||||
>
|
||||
{opts.map(option => (
|
||||
<DropdownItem
|
||||
key={option}
|
||||
component="button"
|
||||
>
|
||||
{option}
|
||||
</DropdownItem>
|
||||
))}
|
||||
</Dropdown>
|
||||
dropdownItems={dropdownItems}
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
<div className="awx-pagination__counts">
|
||||
|
@ -9,6 +9,8 @@ import {
|
||||
Link
|
||||
} from 'react-router-dom';
|
||||
|
||||
import VerticalSeparator from '../../../components/VerticalSeparator';
|
||||
|
||||
export default ({
|
||||
itemId,
|
||||
name,
|
||||
@ -19,7 +21,6 @@ export default ({
|
||||
detailUrl,
|
||||
}) => (
|
||||
<li key={itemId} className="pf-c-data-list__item" aria-labelledby="check-action-item1">
|
||||
<div className="pf-c-data-list__check">
|
||||
<I18n>
|
||||
{({ i18n }) => (
|
||||
<Checkbox
|
||||
@ -30,7 +31,7 @@ export default ({
|
||||
/>
|
||||
)}
|
||||
</I18n>
|
||||
</div>
|
||||
<VerticalSeparator />
|
||||
<div className="pf-c-data-list__cell">
|
||||
<span id="check-action-item1">
|
||||
<Link
|
||||
|
Loading…
Reference in New Issue
Block a user