From 108504b9f9eadb6d18741baab2d0d122197f97a9 Mon Sep 17 00:00:00 2001 From: Annika Hannig Date: Mon, 20 Nov 2023 12:28:11 +0100 Subject: [PATCH] use neighbors instead of protocols in url --- ui/src/app/Main.js | 54 +++++++++++-------- .../neighbors/LocalRelatedPeersTabs.js | 2 +- .../components/neighbors/NeighborsTable.js | 2 +- .../components/neighbors/RelatedPeersCard.js | 2 +- 4 files changed, 36 insertions(+), 24 deletions(-) diff --git a/ui/src/app/Main.js b/ui/src/app/Main.js index 86600a4..78e5348 100644 --- a/ui/src/app/Main.js +++ b/ui/src/app/Main.js @@ -37,6 +37,38 @@ import SearchGlobalPage import NotFoundPage from 'app/pages/NotFoundPage'; + +const Routing = () => ( + + } /> + + {/* RouteServers */} + }> + + } /> + + {/* Neighbors */} + } /> + {/* DEPRECATION NOTICE: The 'protocols' route will be */} + {/* removed and is only here for backwards compatibility */} + } /> + + + + {/* Search */} + } /> + + {/* Fallback */} + } /> + +); + const Main = () => { return ( @@ -45,27 +77,7 @@ const Main = () => { - - } /> - - {/* RouteServers */} - }> - - } /> - } /> - - - - {/* Search */} - } /> - - {/* Fallback */} - } /> - + diff --git a/ui/src/app/components/neighbors/LocalRelatedPeersTabs.js b/ui/src/app/components/neighbors/LocalRelatedPeersTabs.js index 58c14b8..97bb9ef 100644 --- a/ui/src/app/components/neighbors/LocalRelatedPeersTabs.js +++ b/ui/src/app/components/neighbors/LocalRelatedPeersTabs.js @@ -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) => (
  • { if (!isUpState(neighbor.state)) { return <>{children}; }; - const url = `/routeservers/${routeServerId}/protocols/${neighbor.id}/routes`; + const url = `/routeservers/${routeServerId}/neighbors/${neighbor.id}/routes`; return ( {children} ); diff --git a/ui/src/app/components/neighbors/RelatedPeersCard.js b/ui/src/app/components/neighbors/RelatedPeersCard.js index e644725..42745ed 100644 --- a/ui/src/app/components/neighbors/RelatedPeersCard.js +++ b/ui/src/app/components/neighbors/RelatedPeersCard.js @@ -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`; }