Skip to content

Commit

Permalink
Test
Browse files Browse the repository at this point in the history
  • Loading branch information
beatrice-acasandrei committed Oct 31, 2023
1 parent 5a6a214 commit cf1e3cf
Show file tree
Hide file tree
Showing 6 changed files with 2,657 additions and 3,151 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"react-lazylog": "4.4.4",
"react-linkify": "0.2.2",
"react-redux": "8.0.7",
"react-router-dom": "5.1.2",
"react-router-dom": "6.17.0",
"react-split-pane": "0.1.92",
"react-table": "7.8.0",
"react-table-6": "6.11.0",
Expand Down
14 changes: 6 additions & 8 deletions ui/App.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { Suspense, lazy } from 'react';
import { Route, Switch } from 'react-router-dom';
import { Route, Routes } from 'react-router-dom';
import { hot } from 'react-hot-loader/root';
import { Helmet } from 'react-helmet';
import { ConnectedRouter } from 'connected-react-router';
Expand Down Expand Up @@ -116,14 +116,12 @@ const App = () => {
<Provider store={configureStore()}>
<ConnectedRouter history={history}>
<Suspense fallback={<LoadingSpinner />}>
<Switch>
<Routes>
<Route
exact
path="/login"
render={(props) => <LoginCallback {...props} />}
/>
<Route
exact
path="/taskcluster-auth"
render={(props) => <TaskclusterCallback {...props} />}
/>
Expand Down Expand Up @@ -152,13 +150,13 @@ const App = () => {
}
/>
<Route
path="/push-health"
path="push-health/*"
render={(props) =>
withFavicon(<PushHealthApp {...props} />, '/push-health')
}
/>
<Route
path="/intermittent-failures"
path="intermittent-failures/*"
render={(props) =>
withFavicon(
<IntermittentFailuresApp {...props} />,
Expand All @@ -167,7 +165,7 @@ const App = () => {
}
/>
<Route
path="/perfherder"
path="perfherder/*"
render={(props) =>
withFavicon(<PerfherderApp {...props} />, '/perfherder')
}
Expand All @@ -181,7 +179,7 @@ const App = () => {
/>
)}
/>
</Switch>
</Routes>
</Suspense>
</ConnectedRouter>
</Provider>
Expand Down
12 changes: 6 additions & 6 deletions ui/intermittent-failures/App.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { Route, Switch, Redirect } from 'react-router-dom';
import { Route, Routes, Navigate } from 'react-router-dom';
import { Container } from 'reactstrap';
import { hot } from 'react-hot-loader/root';

Expand Down Expand Up @@ -40,7 +40,7 @@ class IntermittentFailuresApp extends React.Component {
<ErrorMessages errorMessages={errorMessages} />
</Container>
)}
<Switch>
<Routes>
<Route
exact
path={`${path}/main`}
Expand Down Expand Up @@ -70,15 +70,15 @@ class IntermittentFailuresApp extends React.Component {
)}
/>
<Route
path={`${path}/bugdetails`}
path="bugdetails"
render={(props) => <BugDetailsView {...props} />}
/>
<Route
path={`${path}/bugdetails?startday=:startday&endday=:endday&tree=:tree&failurehash=:failurehash&bug=bug`}
path="bugdetails?startday=:startday&endday=:endday&tree=:tree&failurehash=:failurehash&bug=bug"
render={(props) => <BugDetailsView {...props} />}
/>
<Redirect from={`${path}/`} to={`${path}/main`} />
</Switch>
<Navigate replace from={`${path}/`} to={`${path}/main`} />
</Routes>
</main>
);
}
Expand Down
25 changes: 13 additions & 12 deletions ui/perfherder/App.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { Route, Switch, Redirect } from 'react-router-dom';
import { Route, Routes, Navigate } from 'react-router-dom';
import { hot } from 'react-hot-loader/root';
import { Container } from 'reactstrap';

Expand Down Expand Up @@ -87,9 +87,9 @@ class App extends React.Component {
<ErrorMessages errorMessages={errorMessages} />
</Container>
)}
<Switch>
<Routes>
<Route
path={`${path}/alerts`}
path="alerts"
render={(props) => (
<AlertsView
{...props}
Expand All @@ -101,7 +101,7 @@ class App extends React.Component {
)}
/>
<Route
path={`${path}/graphs`}
path="graphs"
render={(props) => (
<GraphsView
{...props}
Expand All @@ -112,7 +112,7 @@ class App extends React.Component {
)}
/>
<Route
path={`${path}/comparechooser`}
path="comparechooser"
render={(props) => (
<CompareSelectorView
{...props}
Expand All @@ -123,7 +123,7 @@ class App extends React.Component {
)}
/>
<Route
path={`${path}/compare`}
path="compare"
render={(props) => (
<CompareView
{...props}
Expand All @@ -136,7 +136,7 @@ class App extends React.Component {
)}
/>
<Route
path={`${path}/infracompare`}
path="infracompare"
render={(props) => (
<InfraCompareView
{...props}
Expand All @@ -149,7 +149,7 @@ class App extends React.Component {
)}
/>
<Route
path={`${path}/comparesubtest`}
path="comparesubtest"
render={(props) => (
<CompareSubtestsView
{...props}
Expand All @@ -160,7 +160,7 @@ class App extends React.Component {
)}
/>
<Route
path={`${path}/comparesubtestdistribution`}
path="comparesubtestdistribution"
render={(props) => (
<CompareSubtestDistributionView
{...props}
Expand All @@ -171,7 +171,7 @@ class App extends React.Component {
)}
/>
<Route
path={`${path}/tests`}
path="tests"
render={(props) => (
<TestsView
{...props}
Expand All @@ -182,11 +182,12 @@ class App extends React.Component {
/>
)}
/>
<Redirect
<Navigate
replace
from={`${path}/`}
to={`${path}/alerts?hideDwnToInv=1&page=1`}
/>
</Switch>
</Routes>
</main>
)}
</React.Fragment>
Expand Down
20 changes: 8 additions & 12 deletions ui/push-health/App.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import { hot } from 'react-hot-loader/root';
import { Route, Switch } from 'react-router-dom';
import { Route, Routes } from 'react-router-dom';

import {
clearNotificationAtIndex,
Expand Down Expand Up @@ -82,10 +82,9 @@ class App extends React.Component {
notifications={notifications}
clearNotification={this.clearNotification}
/>
<Switch>
<Routes>
<Route
exact
path={`${path}/`}
path="/"
render={(props) => (
<MyPushes
{...props}
Expand All @@ -96,24 +95,21 @@ class App extends React.Component {
)}
/>
<Route
path={`${path}/push`}
render={(props) =>
path="push"
children={({ props }) =>
hasProps(props.location.search) ? (
<Health
{...props}
notify={this.notify}
clearNotification={this.clearNotification}
/>
) : (
(<NotFound />)()
<NotFound />
)
}
/>
<Route
path={`${path}/usage`}
render={(props) => <Usage {...props} />}
/>
</Switch>
<Route path="usage" render={(props) => <Usage {...props} />} />
</Routes>
</ErrorBoundary>
);
}
Expand Down
Loading

0 comments on commit cf1e3cf

Please sign in to comment.