mirror of
https://github.com/ansible/awx.git
synced 2026-03-26 21:35:01 -02:30
Merge pull request #10869 from AlexSCorey/10822-fixReactWarnings
Fixes several react warnings
This commit is contained in:
@@ -89,6 +89,11 @@ function Lookup(props) {
|
|||||||
}, [state.selectedItems, multiple]);
|
}, [state.selectedItems, multiple]);
|
||||||
|
|
||||||
const clearQSParams = () => {
|
const clearQSParams = () => {
|
||||||
|
if (!history.location.search) {
|
||||||
|
// This prevents "Warning: Hash history cannot PUSH the same path;
|
||||||
|
// a new entry will not be added to the history stack" from appearing in the console.
|
||||||
|
return;
|
||||||
|
}
|
||||||
const parts = history.location.search.replace(/^\?/, '').split('&');
|
const parts = history.location.search.replace(/^\?/, '').split('&');
|
||||||
const ns = qsConfig.namespace;
|
const ns = qsConfig.namespace;
|
||||||
const otherParts = parts.filter((param) => !param.startsWith(`${ns}.`));
|
const otherParts = parts.filter((param) => !param.startsWith(`${ns}.`));
|
||||||
|
|||||||
@@ -256,8 +256,8 @@ function ActivityStream() {
|
|||||||
renderToolbar={(props) => (
|
renderToolbar={(props) => (
|
||||||
<DatalistToolbar {...props} qsConfig={QS_CONFIG} />
|
<DatalistToolbar {...props} qsConfig={QS_CONFIG} />
|
||||||
)}
|
)}
|
||||||
renderRow={(streamItem) => (
|
renderRow={(streamItem, index) => (
|
||||||
<ActivityStreamListItem streamItem={streamItem} />
|
<ActivityStreamListItem key={index} streamItem={streamItem} />
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
</Card>
|
</Card>
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ function InstanceGroup({ setBreadcrumb }) {
|
|||||||
name: (
|
name: (
|
||||||
<>
|
<>
|
||||||
<CaretLeftIcon />
|
<CaretLeftIcon />
|
||||||
{t`Back to instance groups`}
|
{t`Back to Instance Groups`}
|
||||||
</>
|
</>
|
||||||
),
|
),
|
||||||
link: '/instance_groups',
|
link: '/instance_groups',
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ describe('<InstanceGroup/>', () => {
|
|||||||
|
|
||||||
test('should render expected tabs', async () => {
|
test('should render expected tabs', async () => {
|
||||||
const expectedTabs = [
|
const expectedTabs = [
|
||||||
'Back to instance groups',
|
'Back to Instance Groups',
|
||||||
'Details',
|
'Details',
|
||||||
'Instances',
|
'Instances',
|
||||||
'Jobs',
|
'Jobs',
|
||||||
|
|||||||
@@ -135,7 +135,10 @@ function OrganizationDetail({ organization }) {
|
|||||||
value={
|
value={
|
||||||
<ChipGroup numChips={5} totalChips={galaxy_credentials.length}>
|
<ChipGroup numChips={5} totalChips={galaxy_credentials.length}>
|
||||||
{galaxy_credentials.map((credential) => (
|
{galaxy_credentials.map((credential) => (
|
||||||
<Link to={`/credentials/${credential.id}/details`}>
|
<Link
|
||||||
|
key={credential.id}
|
||||||
|
to={`/credentials/${credential.id}/details`}
|
||||||
|
>
|
||||||
<CredentialChip
|
<CredentialChip
|
||||||
credential={credential}
|
credential={credential}
|
||||||
key={credential.id}
|
key={credential.id}
|
||||||
|
|||||||
Reference in New Issue
Block a user