Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

react-router-dom-updated to 7.x #2533

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
185 changes: 70 additions & 115 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 5 additions & 6 deletions packages/jaeger-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@
"@testing-library/react": "^15.0.7",
"@types/deep-freeze": "^0.1.1",
"@types/lodash": "^4.17.0",
"@types/object-hash": "^3.0.2",
"@types/react": "^18.3.11",
"@types/react-window": "^1.8.0",
"@types/redux-form": "^8.3.10",
"@types/react-helmet": "^6.1.5",
"@types/react-router-dom": "^5.1.0",
"@types/react-router-dom": "^5.3.3",
"@types/react-window": "^1.8.0",
"@types/redux-actions": "2.2.1",
"@types/object-hash": "^3.0.2",
"@types/redux-form": "^8.3.10",
"@vitejs/plugin-legacy": "^5.4.1",
"@vitejs/plugin-react": "^4.3.1",
"@wojtekmaj/enzyme-adapter-react-17": "^0.8.0",
Expand Down Expand Up @@ -77,8 +77,7 @@
"react-is": "^18.2.0",
"react-json-view-lite": "2.0.1",
"react-redux": "^8.1.2",
"react-router-dom": "5.3.4",
"react-router-dom-v5-compat": "^6.24.0",
"react-router-dom": "^7.1.1",
"react-vis": "1.11.12",
"react-vis-force": "^0.3.1",
"react-window": "^1.8.10",
Expand Down
60 changes: 18 additions & 42 deletions packages/jaeger-ui/src/components/App/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

import React, { Component } from 'react';
import { Provider } from 'react-redux';
import { Route, Redirect, Switch, Router } from 'react-router-dom';
import { Routes, Route, Navigate } from 'react-router-dom';

import { ConfigProvider } from 'antd';
import { defaultTheme } from '@ant-design/compatible';
Expand Down Expand Up @@ -89,47 +89,23 @@ export default class JaegerUIApp extends Component {
<ConfigProvider theme={jaegerTheme}>
<Provider store={store}>
<HistoryProvider history={history}>
<Router history={history}>
<Page>
<Switch>
<Route path={searchPath}>
<SearchTracePage />
</Route>
<Route path={traceDiffPath}>
<TraceDiff />
</Route>
<Route path={tracePath}>
<TracePage />
</Route>
<Route path={dependenciesPath}>
<DependencyGraph />
</Route>
<Route path={deepDependenciesPath}>
<DeepDependencies />
</Route>
<Route path={qualityMetricsPath}>
<QualityMetrics />
</Route>
<Route path={monitorATMPath}>
<MonitorATMPage />
</Route>

<Route exact path="/">
<Redirect to={searchPath} />
</Route>
<Route exact path={prefixUrl()}>
<Redirect to={searchPath} />
</Route>
<Route exact path={prefixUrl('/')}>
<Redirect to={searchPath} />
</Route>

<Route>
<NotFound />
</Route>
</Switch>
</Page>
</Router>
<Routes>
<Route path={searchPath} element={<SearchTracePage />} />
<Route path={traceDiffPath} element={<TraceDiff />} />
<Route path={tracePath} element={<TracePage />} />
<Route path={dependenciesPath} element={<DependencyGraph />} />
<Route path={deepDependenciesPath} element={<DeepDependencies />} />
<Route path={qualityMetricsPath} element={<QualityMetrics />} />
<Route path={monitorATMPath} element={<MonitorATMPage />} />

{/* Redirect Routes */}
<Route path="/" element={<Navigate to={searchPath} />} />
<Route path={prefixUrl()} element={<Navigate to={searchPath} />} />
<Route path={prefixUrl('/')} element={<Navigate to={searchPath} />} />

{/* 404 Not Found */}
<Route path="*" element={<NotFound />} />
</Routes>
</HistoryProvider>
</Provider>
</ConfigProvider>
Expand Down
Loading
Loading