diff --git a/awx/ui_next/src/App.jsx b/awx/ui_next/src/App.jsx index ffafd07dba..9b230ac553 100644 --- a/awx/ui_next/src/App.jsx +++ b/awx/ui_next/src/App.jsx @@ -2,7 +2,7 @@ import React from 'react'; import { useRouteMatch, useLocation, - HashRouter, + BrowserRouter, Route, Switch, Redirect, @@ -76,7 +76,7 @@ function App() { } export default () => ( - + - + ); diff --git a/awx/ui_next/src/components/AppContainer/AppContainer.test.jsx b/awx/ui_next/src/components/AppContainer/AppContainer.test.jsx index c01a7ee6d4..93a7bb5963 100644 --- a/awx/ui_next/src/components/AppContainer/AppContainer.test.jsx +++ b/awx/ui_next/src/components/AppContainer/AppContainer.test.jsx @@ -66,9 +66,9 @@ describe('', () => { // sidebar groups and route links expect(wrapper.find('NavExpandableGroup').length).toBe(2); - expect(wrapper.find('a[href="/#/foo"]').length).toBe(1); - expect(wrapper.find('a[href="/#/bar"]').length).toBe(1); - expect(wrapper.find('a[href="/#/fiz"]').length).toBe(1); + expect(wrapper.find('a[href="/foo"]').length).toBe(1); + expect(wrapper.find('a[href="/bar"]').length).toBe(1); + expect(wrapper.find('a[href="/fiz"]').length).toBe(1); expect(wrapper.find('#group_one').length).toBe(1); expect(wrapper.find('#group_two').length).toBe(1); diff --git a/awx/ui_next/src/components/AppContainer/NavExpandableGroup.jsx b/awx/ui_next/src/components/AppContainer/NavExpandableGroup.jsx index 2b8805d589..370ac52f40 100644 --- a/awx/ui_next/src/components/AppContainer/NavExpandableGroup.jsx +++ b/awx/ui_next/src/components/AppContainer/NavExpandableGroup.jsx @@ -1,6 +1,6 @@ import React, { Component } from 'react'; import PropTypes from 'prop-types'; -import { withRouter } from 'react-router-dom'; +import { withRouter, Link } from 'react-router-dom'; import { NavExpandable, NavItem } from '@patternfly/react-core'; class NavExpandableGroup extends Component { @@ -41,9 +41,8 @@ class NavExpandableGroup extends Component { groupId={groupId} isActive={this.isActivePath(path)} key={path} - to={`/next/#${path}`} > - {title} + {title} ))} diff --git a/awx/ui_next/urls.py b/awx/ui_next/urls.py index 540651730f..bb288cf625 100644 --- a/awx/ui_next/urls.py +++ b/awx/ui_next/urls.py @@ -1,6 +1,7 @@ from django.conf.urls import url from django.views.generic.base import TemplateView + class IndexView(TemplateView): template_name = 'index.html' @@ -9,5 +10,5 @@ class IndexView(TemplateView): app_name = 'ui_next' urlpatterns = [ - url(r'^next/$', IndexView.as_view(), name='ui_next') + url(r'^next/*', IndexView.as_view(), name='ui_next') ]