1
0
mirror of https://github.com/ansible/awx.git synced 2024-11-01 16:51:11 +03:00

Merge pull request #5510 from jakemcdermott/ui-next-fix-user-link-in

Fix access list and navigation user link-ins

Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
This commit is contained in:
softwarefactory-project-zuul[bot] 2019-12-16 17:48:58 +00:00 committed by GitHub
commit cdf4b0d1ed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 18 additions and 11 deletions

View File

@ -111,7 +111,14 @@ class PageHeaderToolbar extends Component {
</DropdownToggle>
}
dropdownItems={[
<DropdownItem key="user" href="#/home">
<DropdownItem
key="user"
href={
loggedInUser
? `#/users/${loggedInUser.id}/details`
: '#/home'
}
>
{i18n._(t`User Details`)}
</DropdownItem>,
<DropdownItem

View File

@ -79,10 +79,10 @@ class ResourceAccessListItem extends React.Component {
<DataListCell key="name">
{accessRecord.username && (
<TextContent>
{accessRecord.url ? (
{accessRecord.id ? (
<Text component={TextVariants.h6}>
<Link
to={{ pathname: accessRecord.url }}
to={{ pathname: `/users/${accessRecord.id}/details` }}
css="font-weight: bold"
>
{accessRecord.username}

View File

@ -58,7 +58,7 @@ exports[`<ResourceAccessListItem /> initially renders succesfully 1`] = `
<ForwardRef
to={
Object {
"pathname": "/bar",
"pathname": "/users/2/details",
}
}
>
@ -114,7 +114,7 @@ exports[`<ResourceAccessListItem /> initially renders succesfully 1`] = `
<ForwardRef
to={
Object {
"pathname": "/bar",
"pathname": "/users/2/details",
}
}
>
@ -193,7 +193,7 @@ exports[`<ResourceAccessListItem /> initially renders succesfully 1`] = `
<ForwardRef
to={
Object {
"pathname": "/bar",
"pathname": "/users/2/details",
}
}
>
@ -260,7 +260,7 @@ exports[`<ResourceAccessListItem /> initially renders succesfully 1`] = `
<Styled(Link)
to={
Object {
"pathname": "/bar",
"pathname": "/users/2/details",
}
}
>
@ -308,7 +308,7 @@ exports[`<ResourceAccessListItem /> initially renders succesfully 1`] = `
forwardedRef={null}
to={
Object {
"pathname": "/bar",
"pathname": "/users/2/details",
}
}
>
@ -316,18 +316,18 @@ exports[`<ResourceAccessListItem /> initially renders succesfully 1`] = `
className="sc-bdVaJa fqQVUT"
to={
Object {
"pathname": "/bar",
"pathname": "/users/2/details",
}
}
>
<LinkAnchor
className="sc-bdVaJa fqQVUT"
href="/bar"
href="/users/2/details"
navigate={[Function]}
>
<a
className="sc-bdVaJa fqQVUT"
href="/bar"
href="/users/2/details"
onClick={[Function]}
>
jane