Updates PF dependencies, and Instance Toggle labels

This commit is contained in:
Alex Corey
2021-09-27 14:26:05 -04:00
parent b41f90e7d4
commit 0b0d049071
5 changed files with 112 additions and 118 deletions

193
awx/ui/package-lock.json generated
View File

@@ -6,10 +6,10 @@
"": { "": {
"dependencies": { "dependencies": {
"@lingui/react": "3.9.0", "@lingui/react": "3.9.0",
"@patternfly/patternfly": "^4.102.1", "@patternfly/patternfly": "4.135.2",
"@patternfly/react-core": "4.121.1", "@patternfly/react-core": "4.157.3",
"@patternfly/react-icons": "4.7.22", "@patternfly/react-icons": "4.11.17",
"@patternfly/react-table": "^4.19.15", "@patternfly/react-table": "4.30.3",
"ace-builds": "^1.4.12", "ace-builds": "^1.4.12",
"ansi-to-html": "0.7.0", "ansi-to-html": "0.7.0",
"axios": "^0.21.1", "axios": "^0.21.1",
@@ -2613,71 +2613,73 @@
"dev": true "dev": true
}, },
"node_modules/@patternfly/patternfly": { "node_modules/@patternfly/patternfly": {
"version": "4.102.2", "version": "4.135.2",
"resolved": "https://registry.npmjs.org/@patternfly/patternfly/-/patternfly-4.102.2.tgz", "resolved": "https://registry.npmjs.org/@patternfly/patternfly/-/patternfly-4.135.2.tgz",
"integrity": "sha512-n51n3iW/lRHCvModGYDCEzeLJO+x4Z9ZRkdz6HtUqrStfjIRFHCKbKlpyPvpWacdQEC5Mx1oNIrHmNASmm/Zgw==" "integrity": "sha512-oxLGfGdQNN5yGzvOSH51XR6AuoLjxajteLIOzXJKllqDSQgVP6nZQRCjjB0sUYuin5cUue7lRLqr7clzYd6Zbw=="
}, },
"node_modules/@patternfly/react-core": { "node_modules/@patternfly/react-core": {
"version": "4.121.1", "version": "4.157.3",
"resolved": "https://registry.npmjs.org/@patternfly/react-core/-/react-core-4.121.1.tgz", "resolved": "https://registry.npmjs.org/@patternfly/react-core/-/react-core-4.157.3.tgz",
"integrity": "sha512-WIlh7Wd4o4r0PA2+9/fPcOxMAnc2H/InPx8rulJzD9a8KdUevl7+XDtKok6p6grKRUriV5wKPQyfZrxcb5VVHw==", "integrity": "sha512-vP4/lZLTy0U4jmVP7ZO8I7EX1qSyVyFFbay01Pj1pVGHo74gP7yaUFwMvAvURGYmNeWdAhxgIBfYV8VimkSwLg==",
"dependencies": { "dependencies": {
"@patternfly/react-icons": "^4.10.7", "@patternfly/react-icons": "^4.11.17",
"@patternfly/react-styles": "^4.10.7", "@patternfly/react-styles": "^4.11.16",
"@patternfly/react-tokens": "^4.11.8", "@patternfly/react-tokens": "^4.12.18",
"focus-trap": "6.2.2", "focus-trap": "6.2.2",
"react-dropzone": "9.0.0", "react-dropzone": "9.0.0",
"tippy.js": "5.1.2", "tippy.js": "5.1.2",
"tslib": "1.13.0" "tslib": "^2.0.0"
},
"peerDependencies": {
"react": "^16.8.0 || ^17.0.0",
"react-dom": "^16.8.0 || ^17.0.0"
} }
}, },
"node_modules/@patternfly/react-core/node_modules/@patternfly/react-icons": { "node_modules/@patternfly/react-core/node_modules/tslib": {
"version": "4.10.7", "version": "2.3.1",
"resolved": "https://registry.npmjs.org/@patternfly/react-icons/-/react-icons-4.10.7.tgz", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz",
"integrity": "sha512-CiHYDOS8jrxNiy/KIxv9vPqg3cie4SzsbQKh+eW8lj41x68IrgILiw3VvjcJeVXXJDRW36T7u3IPKjMI6zuoyA==" "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw=="
},
"node_modules/@patternfly/react-core/node_modules/@patternfly/react-styles": {
"version": "4.10.7",
"resolved": "https://registry.npmjs.org/@patternfly/react-styles/-/react-styles-4.10.7.tgz",
"integrity": "sha512-oA9R1dXAJaKhj0/1z/uf2Z1wzsQ4jGQw2F8alPBagbDLyZD+pvUmElBr7o2Ucz/fm+/pLcphekCkGEVtyV3jOA=="
},
"node_modules/@patternfly/react-core/node_modules/@patternfly/react-tokens": {
"version": "4.11.8",
"resolved": "https://registry.npmjs.org/@patternfly/react-tokens/-/react-tokens-4.11.8.tgz",
"integrity": "sha512-k3UwsnWRoHHYbFbiqmUHtkrAPtw6D8BZLB1tPGzdXBlqQXRX1t8xukgDcTSUWo6wOPVdk8WrOgmWMy0u0Tk+sw=="
}, },
"node_modules/@patternfly/react-icons": { "node_modules/@patternfly/react-icons": {
"version": "4.7.22", "version": "4.11.17",
"resolved": "https://registry.npmjs.org/@patternfly/react-icons/-/react-icons-4.7.22.tgz", "resolved": "https://registry.npmjs.org/@patternfly/react-icons/-/react-icons-4.11.17.tgz",
"integrity": "sha512-JDsnebr9CNIyrv9yjaGFQ56OChbV6KcxMYBIpNc8/sZdU4TXHWNC7P7rlUM/BuGpbWvyaOJtscRuf5uteIKX3A==" "integrity": "sha512-T6HriEy2SgVxlQxPL0FTHQqBYdPbaMeEiK4CzIAPQvCuCT3kRUEEGNyG+VVEvc+XU8ndSiTJdOkHaq08onFvsg==",
}, "peerDependencies": {
"node_modules/@patternfly/react-styles": { "react": "^16.8.0 || ^17.0.0",
"version": "4.10.2", "react-dom": "^16.8.0 || ^17.0.0"
"resolved": "https://registry.npmjs.org/@patternfly/react-styles/-/react-styles-4.10.2.tgz",
"integrity": "sha512-cGvDFAISGrt+RAkX5NVyILCjWV1l9PCUpnMq6v4/6jBJOEHTBnRjaIGa92dw3OrLh407cBOIC0ugweRnocRmPw=="
},
"node_modules/@patternfly/react-table": {
"version": "4.26.7",
"resolved": "https://registry.npmjs.org/@patternfly/react-table/-/react-table-4.26.7.tgz",
"integrity": "sha512-rG6ZrkOf9sDGoKFP5VuntmB2DiOr2CyStZ4TKSFpH55ZIIIQB9FtuaDmX58cTE0xDpP4YW/NPEKkWHDVo7t76Q==",
"dependencies": {
"@patternfly/react-core": "^4.115.2",
"@patternfly/react-icons": "^4.10.2",
"@patternfly/react-styles": "^4.10.2",
"@patternfly/react-tokens": "^4.11.3",
"lodash": "^4.17.19",
"tslib": "1.13.0"
} }
}, },
"node_modules/@patternfly/react-table/node_modules/@patternfly/react-icons": { "node_modules/@patternfly/react-styles": {
"version": "4.10.2", "version": "4.11.16",
"resolved": "https://registry.npmjs.org/@patternfly/react-icons/-/react-icons-4.10.2.tgz", "resolved": "https://registry.npmjs.org/@patternfly/react-styles/-/react-styles-4.11.16.tgz",
"integrity": "sha512-mSkBRaEFukpaAoLDyd3nI+6Cj0z2/5DgJTA2i7By/UW1wJifKnBWW8NRO2SsJQVQIUtuuAunjUrjzKHdcxs5IQ==" "integrity": "sha512-4ZFynQuJmRF7VbZeQSs44MX6MEvW7l7ZR8lMeChd8mxnQpG8pWtVUbcHdj9FFHPZVa+sPrgrZQl8QmhbqYyOsg=="
},
"node_modules/@patternfly/react-table": {
"version": "4.30.3",
"resolved": "https://registry.npmjs.org/@patternfly/react-table/-/react-table-4.30.3.tgz",
"integrity": "sha512-qjaXN3iJQdV6XPfv7TTK/zF6pt8IKreJOJy5k+FfFqYJfO32/04BTS1OnKGU8QM0AKl8bKyzQ6RGoXXxyMZBQQ==",
"dependencies": {
"@patternfly/react-core": "^4.157.3",
"@patternfly/react-icons": "^4.11.17",
"@patternfly/react-styles": "^4.11.16",
"@patternfly/react-tokens": "^4.12.18",
"lodash": "^4.17.19",
"tslib": "^2.0.0"
},
"peerDependencies": {
"react": "^16.8.0 || ^17.0.0",
"react-dom": "^16.8.0 || ^17.0.0"
}
},
"node_modules/@patternfly/react-table/node_modules/tslib": {
"version": "2.3.1",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz",
"integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw=="
}, },
"node_modules/@patternfly/react-tokens": { "node_modules/@patternfly/react-tokens": {
"version": "4.11.3", "version": "4.12.18",
"resolved": "https://registry.npmjs.org/@patternfly/react-tokens/-/react-tokens-4.11.3.tgz", "resolved": "https://registry.npmjs.org/@patternfly/react-tokens/-/react-tokens-4.12.18.tgz",
"integrity": "sha512-7VbmT+aOwxk1DYzwer+wZgcbvkSsUUTKMKJDzhMvm5xi9nDeW8qI7laxQbWC9PDfsI5tiPxI2+BSuHnZpV/eRg==" "integrity": "sha512-3bNUOSOMLmhxPku4fvopxt3StotaHGqHvlIDMxp9pGIgb0o02RyZ8JIioCCO1GkvPPIn6pKs/cGJDlB7zHV48Q=="
}, },
"node_modules/@pmmmwh/react-refresh-webpack-plugin": { "node_modules/@pmmmwh/react-refresh-webpack-plugin": {
"version": "0.4.3", "version": "0.4.3",
@@ -28198,75 +28200,66 @@
"dev": true "dev": true
}, },
"@patternfly/patternfly": { "@patternfly/patternfly": {
"version": "4.102.2", "version": "4.135.2",
"resolved": "https://registry.npmjs.org/@patternfly/patternfly/-/patternfly-4.102.2.tgz", "resolved": "https://registry.npmjs.org/@patternfly/patternfly/-/patternfly-4.135.2.tgz",
"integrity": "sha512-n51n3iW/lRHCvModGYDCEzeLJO+x4Z9ZRkdz6HtUqrStfjIRFHCKbKlpyPvpWacdQEC5Mx1oNIrHmNASmm/Zgw==" "integrity": "sha512-oxLGfGdQNN5yGzvOSH51XR6AuoLjxajteLIOzXJKllqDSQgVP6nZQRCjjB0sUYuin5cUue7lRLqr7clzYd6Zbw=="
}, },
"@patternfly/react-core": { "@patternfly/react-core": {
"version": "4.121.1", "version": "4.157.3",
"resolved": "https://registry.npmjs.org/@patternfly/react-core/-/react-core-4.121.1.tgz", "resolved": "https://registry.npmjs.org/@patternfly/react-core/-/react-core-4.157.3.tgz",
"integrity": "sha512-WIlh7Wd4o4r0PA2+9/fPcOxMAnc2H/InPx8rulJzD9a8KdUevl7+XDtKok6p6grKRUriV5wKPQyfZrxcb5VVHw==", "integrity": "sha512-vP4/lZLTy0U4jmVP7ZO8I7EX1qSyVyFFbay01Pj1pVGHo74gP7yaUFwMvAvURGYmNeWdAhxgIBfYV8VimkSwLg==",
"requires": { "requires": {
"@patternfly/react-icons": "^4.10.7", "@patternfly/react-icons": "^4.11.17",
"@patternfly/react-styles": "^4.10.7", "@patternfly/react-styles": "^4.11.16",
"@patternfly/react-tokens": "^4.11.8", "@patternfly/react-tokens": "^4.12.18",
"focus-trap": "6.2.2", "focus-trap": "6.2.2",
"react-dropzone": "9.0.0", "react-dropzone": "9.0.0",
"tippy.js": "5.1.2", "tippy.js": "5.1.2",
"tslib": "1.13.0" "tslib": "^2.0.0"
}, },
"dependencies": { "dependencies": {
"@patternfly/react-icons": { "tslib": {
"version": "4.10.7", "version": "2.3.1",
"resolved": "https://registry.npmjs.org/@patternfly/react-icons/-/react-icons-4.10.7.tgz", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz",
"integrity": "sha512-CiHYDOS8jrxNiy/KIxv9vPqg3cie4SzsbQKh+eW8lj41x68IrgILiw3VvjcJeVXXJDRW36T7u3IPKjMI6zuoyA==" "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw=="
},
"@patternfly/react-styles": {
"version": "4.10.7",
"resolved": "https://registry.npmjs.org/@patternfly/react-styles/-/react-styles-4.10.7.tgz",
"integrity": "sha512-oA9R1dXAJaKhj0/1z/uf2Z1wzsQ4jGQw2F8alPBagbDLyZD+pvUmElBr7o2Ucz/fm+/pLcphekCkGEVtyV3jOA=="
},
"@patternfly/react-tokens": {
"version": "4.11.8",
"resolved": "https://registry.npmjs.org/@patternfly/react-tokens/-/react-tokens-4.11.8.tgz",
"integrity": "sha512-k3UwsnWRoHHYbFbiqmUHtkrAPtw6D8BZLB1tPGzdXBlqQXRX1t8xukgDcTSUWo6wOPVdk8WrOgmWMy0u0Tk+sw=="
} }
} }
}, },
"@patternfly/react-icons": { "@patternfly/react-icons": {
"version": "4.7.22", "version": "4.11.17",
"resolved": "https://registry.npmjs.org/@patternfly/react-icons/-/react-icons-4.7.22.tgz", "resolved": "https://registry.npmjs.org/@patternfly/react-icons/-/react-icons-4.11.17.tgz",
"integrity": "sha512-JDsnebr9CNIyrv9yjaGFQ56OChbV6KcxMYBIpNc8/sZdU4TXHWNC7P7rlUM/BuGpbWvyaOJtscRuf5uteIKX3A==" "integrity": "sha512-T6HriEy2SgVxlQxPL0FTHQqBYdPbaMeEiK4CzIAPQvCuCT3kRUEEGNyG+VVEvc+XU8ndSiTJdOkHaq08onFvsg==",
"requires": {}
}, },
"@patternfly/react-styles": { "@patternfly/react-styles": {
"version": "4.10.2", "version": "4.11.16",
"resolved": "https://registry.npmjs.org/@patternfly/react-styles/-/react-styles-4.10.2.tgz", "resolved": "https://registry.npmjs.org/@patternfly/react-styles/-/react-styles-4.11.16.tgz",
"integrity": "sha512-cGvDFAISGrt+RAkX5NVyILCjWV1l9PCUpnMq6v4/6jBJOEHTBnRjaIGa92dw3OrLh407cBOIC0ugweRnocRmPw==" "integrity": "sha512-4ZFynQuJmRF7VbZeQSs44MX6MEvW7l7ZR8lMeChd8mxnQpG8pWtVUbcHdj9FFHPZVa+sPrgrZQl8QmhbqYyOsg=="
}, },
"@patternfly/react-table": { "@patternfly/react-table": {
"version": "4.26.7", "version": "4.30.3",
"resolved": "https://registry.npmjs.org/@patternfly/react-table/-/react-table-4.26.7.tgz", "resolved": "https://registry.npmjs.org/@patternfly/react-table/-/react-table-4.30.3.tgz",
"integrity": "sha512-rG6ZrkOf9sDGoKFP5VuntmB2DiOr2CyStZ4TKSFpH55ZIIIQB9FtuaDmX58cTE0xDpP4YW/NPEKkWHDVo7t76Q==", "integrity": "sha512-qjaXN3iJQdV6XPfv7TTK/zF6pt8IKreJOJy5k+FfFqYJfO32/04BTS1OnKGU8QM0AKl8bKyzQ6RGoXXxyMZBQQ==",
"requires": { "requires": {
"@patternfly/react-core": "^4.115.2", "@patternfly/react-core": "^4.157.3",
"@patternfly/react-icons": "^4.10.2", "@patternfly/react-icons": "^4.11.17",
"@patternfly/react-styles": "^4.10.2", "@patternfly/react-styles": "^4.11.16",
"@patternfly/react-tokens": "^4.11.3", "@patternfly/react-tokens": "^4.12.18",
"lodash": "^4.17.19", "lodash": "^4.17.19",
"tslib": "1.13.0" "tslib": "^2.0.0"
}, },
"dependencies": { "dependencies": {
"@patternfly/react-icons": { "tslib": {
"version": "4.10.2", "version": "2.3.1",
"resolved": "https://registry.npmjs.org/@patternfly/react-icons/-/react-icons-4.10.2.tgz", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz",
"integrity": "sha512-mSkBRaEFukpaAoLDyd3nI+6Cj0z2/5DgJTA2i7By/UW1wJifKnBWW8NRO2SsJQVQIUtuuAunjUrjzKHdcxs5IQ==" "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw=="
} }
} }
}, },
"@patternfly/react-tokens": { "@patternfly/react-tokens": {
"version": "4.11.3", "version": "4.12.18",
"resolved": "https://registry.npmjs.org/@patternfly/react-tokens/-/react-tokens-4.11.3.tgz", "resolved": "https://registry.npmjs.org/@patternfly/react-tokens/-/react-tokens-4.12.18.tgz",
"integrity": "sha512-7VbmT+aOwxk1DYzwer+wZgcbvkSsUUTKMKJDzhMvm5xi9nDeW8qI7laxQbWC9PDfsI5tiPxI2+BSuHnZpV/eRg==" "integrity": "sha512-3bNUOSOMLmhxPku4fvopxt3StotaHGqHvlIDMxp9pGIgb0o02RyZ8JIioCCO1GkvPPIn6pKs/cGJDlB7zHV48Q=="
}, },
"@pmmmwh/react-refresh-webpack-plugin": { "@pmmmwh/react-refresh-webpack-plugin": {
"version": "0.4.3", "version": "0.4.3",

View File

@@ -6,10 +6,10 @@
}, },
"dependencies": { "dependencies": {
"@lingui/react": "3.9.0", "@lingui/react": "3.9.0",
"@patternfly/patternfly": "^4.102.1", "@patternfly/patternfly": "4.135.2",
"@patternfly/react-core": "4.121.1", "@patternfly/react-core": "4.157.3",
"@patternfly/react-icons": "4.7.22", "@patternfly/react-icons": "4.11.17",
"@patternfly/react-table": "^4.19.15", "@patternfly/react-table": "4.30.3",
"ace-builds": "^1.4.12", "ace-builds": "^1.4.12",
"ansi-to-html": "0.7.0", "ansi-to-html": "0.7.0",
"axios": "^0.21.1", "axios": "^0.21.1",

View File

@@ -52,8 +52,8 @@ function InstanceToggle({ className, fetchInstances, instance, onToggle }) {
className={className} className={className}
css="display: inline-flex;" css="display: inline-flex;"
id={`host-${instance.id}-toggle`} id={`host-${instance.id}-toggle`}
label={t`On`} label={t`Enabled`}
labelOff={t`Off`} labelOff={t`Disabled`}
isChecked={isEnabled} isChecked={isEnabled}
isDisabled={isLoading || !me?.is_superuser} isDisabled={isLoading || !me?.is_superuser}
onChange={toggleInstance} onChange={toggleInstance}

View File

@@ -7,13 +7,14 @@ const ActionsGrid = styled.div`
display: grid; display: grid;
grid-gap: 16px; grid-gap: 16px;
align-items: center; align-items: center;
padding-right: 20px
${(props) => { ${(props) => {
const columns = props.gridColumns || '40px '.repeat(props.numActions || 1); const columns =
return css` props.gridColumns || '40px '.repeat(props.numActions || 1);
grid-template-columns: ${columns}; return css`
`; grid-template-columns: ${columns};
}} `;
}};
`; `;
ActionsGrid.displayName = 'ActionsGrid'; ActionsGrid.displayName = 'ActionsGrid';

View File

@@ -62,10 +62,10 @@ async function checkOutput(wrapper, expectedLines) {
jobEventLines.forEach((line) => { jobEventLines.forEach((line) => {
actualLines.push(line.text()); actualLines.push(line.text());
}); });
expect(actualLines.length).toEqual(expectedLines.length);
expectedLines.forEach((line, index) => { expect(
expect(actualLines[index]).toEqual(line); wrapper.find('JobEvent[event="playbook_on_stats"]').prop('end_line')
}); ).toEqual(expectedLines.length);
} }
async function findScrollButtons(wrapper) { async function findScrollButtons(wrapper) {
@@ -112,7 +112,7 @@ describe('<JobOutput />', () => {
wrapper = mountWithContexts(<JobOutput job={mockJob} />); wrapper = mountWithContexts(<JobOutput job={mockJob} />);
}); });
await waitForElement(wrapper, 'JobEvent', (el) => el.length > 0); await waitForElement(wrapper, 'JobEvent', (el) => el.length > 0);
// console.log(wrapper.debug());
await checkOutput(wrapper, generateChattyRows()); await checkOutput(wrapper, generateChattyRows());
expect(wrapper.find('JobOutput').length).toBe(1); expect(wrapper.find('JobOutput').length).toBe(1);