mirror of
https://github.com/ansible/awx.git
synced 2026-03-18 17:37:30 -02:30
Merge pull request #10202 from tiagodread/3420-fix
Use non-root path links Resolves ansible/tower#3420 Use non-root path for links Reviewed-by: Jake McDermott <yo@jakemcdermott.me>
This commit is contained in:
@@ -151,8 +151,8 @@ function PageHeaderToolbar({
|
|||||||
aria-label={t`User details`}
|
aria-label={t`User details`}
|
||||||
href={
|
href={
|
||||||
loggedInUser
|
loggedInUser
|
||||||
? `/#/users/${loggedInUser.id}/details`
|
? `#/users/${loggedInUser.id}/details`
|
||||||
: '/#/home'
|
: '#/home'
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
{t`User Details`}
|
{t`User Details`}
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ describe('PageHeaderToolbar', () => {
|
|||||||
wrapper.update();
|
wrapper.update();
|
||||||
expect(
|
expect(
|
||||||
wrapper.find('DropdownItem[aria-label="User details"]').prop('href')
|
wrapper.find('DropdownItem[aria-label="User details"]').prop('href')
|
||||||
).toBe('/#/users/1/details');
|
).toBe('#/users/1/details');
|
||||||
expect(wrapper.find('DropdownItem')).toHaveLength(2);
|
expect(wrapper.find('DropdownItem')).toHaveLength(2);
|
||||||
|
|
||||||
const logout = wrapper.find('DropdownItem li button');
|
const logout = wrapper.find('DropdownItem li button');
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ import ErrorDetail from '../ErrorDetail';
|
|||||||
|
|
||||||
async function logout() {
|
async function logout() {
|
||||||
await RootAPI.logout();
|
await RootAPI.logout();
|
||||||
window.location.replace('/#/login');
|
window.location.replace('#/login');
|
||||||
}
|
}
|
||||||
|
|
||||||
function ContentError({ error, children, isNotFound }) {
|
function ContentError({ error, children, isNotFound }) {
|
||||||
|
|||||||
Reference in New Issue
Block a user