use neighbors instead of protocols in url
This commit is contained in:
parent
085640170d
commit
108504b9f9
@ -37,6 +37,38 @@ import SearchGlobalPage
|
||||
import NotFoundPage
|
||||
from 'app/pages/NotFoundPage';
|
||||
|
||||
|
||||
const Routing = () => (
|
||||
<Routes>
|
||||
<Route index element={<StartPage />} />
|
||||
|
||||
{/* RouteServers */}
|
||||
<Route
|
||||
path="routeservers/:routeServerId"
|
||||
element={<RouteServerPage />}>
|
||||
|
||||
<Route index element={<NeighborsPage />} />
|
||||
|
||||
{/* Neighbors */}
|
||||
<Route
|
||||
path="neighbors/:neighborId/routes"
|
||||
element={<RoutesPage />} />
|
||||
{/* DEPRECATION NOTICE: The 'protocols' route will be */}
|
||||
{/* removed and is only here for backwards compatibility */}
|
||||
<Route
|
||||
path="protocols/:neighborId/routes"
|
||||
element={<RoutesPage />} />
|
||||
|
||||
</Route>
|
||||
|
||||
{/* Search */}
|
||||
<Route path="search" element={<SearchGlobalPage />} />
|
||||
|
||||
{/* Fallback */}
|
||||
<Route path="*" element={<NotFoundPage />} />
|
||||
</Routes>
|
||||
);
|
||||
|
||||
const Main = () => {
|
||||
return (
|
||||
<ErrorsProvider>
|
||||
@ -45,27 +77,7 @@ const Main = () => {
|
||||
<ContentProvider>
|
||||
<BrowserRouter>
|
||||
<Layout>
|
||||
<Routes>
|
||||
<Route index element={<StartPage />} />
|
||||
|
||||
{/* RouteServers */}
|
||||
<Route path="routeservers/:routeServerId"
|
||||
element={<RouteServerPage />}>
|
||||
|
||||
<Route index
|
||||
element={<NeighborsPage />} />
|
||||
<Route path="protocols/:neighborId/routes"
|
||||
element={<RoutesPage />} />
|
||||
|
||||
</Route>
|
||||
|
||||
{/* Search */}
|
||||
<Route path="search"
|
||||
element={<SearchGlobalPage />} />
|
||||
|
||||
{/* Fallback */}
|
||||
<Route path="*" element={<NotFoundPage />} />
|
||||
</Routes>
|
||||
<Routing />
|
||||
</Layout>
|
||||
</BrowserRouter>
|
||||
</ContentProvider>
|
||||
|
@ -19,7 +19,7 @@ const LocalRelatedPeersTabs = () => {
|
||||
}
|
||||
|
||||
const peerUrl = (n) =>
|
||||
`/routeservers/${routeServerId}/protocols/${n.id}/routes`;
|
||||
`/routeservers/${routeServerId}/neighbors/${n.id}/routes`;
|
||||
|
||||
const relatedPeers = peers.map((p) => (
|
||||
<li key={p.id}
|
||||
|
@ -143,7 +143,7 @@ const RoutesLink = ({neighbor, children}) => {
|
||||
if (!isUpState(neighbor.state)) {
|
||||
return <>{children}</>;
|
||||
};
|
||||
const url = `/routeservers/${routeServerId}/protocols/${neighbor.id}/routes`;
|
||||
const url = `/routeservers/${routeServerId}/neighbors/${neighbor.id}/routes`;
|
||||
return (
|
||||
<Link to={url}>{children}</Link>
|
||||
);
|
||||
|
@ -49,7 +49,7 @@ const PeerLink = ({to, children}) => {
|
||||
|
||||
let peerUrl;
|
||||
if (isUpState(neighbor.state)) {
|
||||
peerUrl = `/routeservers/${rid}/protocols/${pid}/routes`;
|
||||
peerUrl = `/routeservers/${rid}/neighbors/${pid}/routes`;
|
||||
} else {
|
||||
peerUrl = `/routeservers/${rid}#sessions-down`;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user