Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
5b86f7c
remove withRouter HOC from FiltersContainer
Mgrdich May 16, 2022
dcd0de9
remove withRouter HOC from Topics DetailsContainer
Mgrdich May 17, 2022
a5b5aab
remove withRouter HOC from Topics TopicsConsumerGroupsContainer
Mgrdich May 17, 2022
43a7c16
withRouter HOC from Topics TopicsConsumerGroupsContainer
Mgrdich May 17, 2022
c59dcc5
minor code refactor in the Details spec
Mgrdich May 17, 2022
cd10635
Routes code modifications to refactor strings representation to funct…
Mgrdich May 17, 2022
a2f0485
Settings and TopicsConsumer removal of HOC with Router
Mgrdich May 17, 2022
327d854
Remove withRouter HOC from Overview file
Mgrdich May 17, 2022
1ddf31c
Remove withRouter HOC from Edit file
Mgrdich May 17, 2022
4277241
replace Router path with functions instead of strings
Mgrdich May 18, 2022
707bfa1
delete CustomParamsContainer and use the simple component in the Topi…
Mgrdich May 18, 2022
104a148
remove HOC from DangerZone container
Mgrdich May 18, 2022
2b7e581
Remove withRouter HOC from Connect pages like Config , Overview , Tasks
Mgrdich May 18, 2022
7480988
Remove withRouter HOC from Connect pages like Actions, Details, Edit,…
Mgrdich May 18, 2022
7d2eced
Refactor Kafka Connect Codes
Mgrdich May 18, 2022
50ddc62
Refactor Topics pages
Mgrdich May 18, 2022
513af4f
Remove HOC from Diff component and minor code refactor
Mgrdich May 19, 2022
196a158
Route component migration into children instead of renderProps or com…
Mgrdich May 19, 2022
127f777
Route component migration into children instead of renderProps or com…
Mgrdich May 19, 2022
bf79c2c
Route component migration into children instead of renderProps or com…
Mgrdich May 19, 2022
e30e2af
Route component migration into children instead of renderProps or com…
Mgrdich May 19, 2022
57945b4
Route component migration into children instead of renderProps or com…
Mgrdich May 19, 2022
d4d22b0
minor bug fix in the Overview selector spread
Mgrdich May 19, 2022
85228f2
change Router from component Render to child render
Mgrdich May 19, 2022
5a4e7f0
change Router from component Render to child render
Mgrdich May 19, 2022
536ed4e
change Router from component Render to child render
Mgrdich May 19, 2022
e5b7373
change Router from component Render to child render
Mgrdich May 19, 2022
dcd1a96
change Router from component Render to child render
Mgrdich May 19, 2022
e1a73d9
Overview Details styling code modifications
Mgrdich May 19, 2022
4e90060
All written path to paths with functions
Mgrdich May 19, 2022
c962bcb
Route Parameters code fix with functions and params with variables
Mgrdich May 22, 2022
86aee44
Updating BreadCrumb Route
Mgrdich May 24, 2022
b4b3bea
Refactor Redirects
Mgrdich May 24, 2022
746d53e
WIP React Router v6 migration
Mgrdich May 27, 2022
db0a4bd
Remove unused imports from the file
Mgrdich May 27, 2022
c911b6d
Make KsqlDb pages work with relative Routes
Mgrdich May 27, 2022
c66b15d
WIP Make Connect pages work and fix the Schema page testing problem
Mgrdich May 27, 2022
2690c20
transforming consumer groups into relative path router
Mgrdich May 27, 2022
0d7cf62
Transform Topics pages into relative routes
Mgrdich May 27, 2022
ba0a568
Transform Topic pages into relative routes
Mgrdich May 27, 2022
5a1ccea
Minor changes in Connect and KsqlDb test suites relative routes
Mgrdich May 27, 2022
60a448a
Minor changes in Connect and KsqlDb test suites relative routes
Mgrdich May 27, 2022
19cca8b
change the Details into relative Routes
Mgrdich May 27, 2022
4648d2e
Topics List naviagtion and caching issue fixed in tests suites
Mgrdich May 27, 2022
b24487a
Topic New Naviagation issue fix + tests suites
Mgrdich May 27, 2022
9988558
Details navigate migrating into relative paths
Mgrdich May 27, 2022
845bf70
Send Message Submit Naviagttion with tests suites
Mgrdich May 27, 2022
2ab66a6
Topic Edit pages with working routes navigation
Mgrdich May 27, 2022
9eeab76
Topic Details and ResetOffsets Pages tests suites and navigations
Mgrdich May 27, 2022
28283f5
Messages Table Tests suites
Mgrdich May 27, 2022
4de796f
BreadCrumbs Routes fixes
Mgrdich May 27, 2022
d9df72c
ClusterMenu and Links styling minor code modifications
Mgrdich May 27, 2022
5886513
ClusterMenu and Links styling minor code modifications
Mgrdich May 27, 2022
47c4bd8
Minor Code modifications
Mgrdich May 29, 2022
0ccc779
Fix Lintter Problems
Mgrdich May 29, 2022
0d2fbea
fix Code Smells
Mgrdich May 30, 2022
302b225
create custom useParams hook
Mgrdich May 30, 2022
5550f41
Adding Path tests
Mgrdich May 30, 2022
343ba4c
minor code refactors
Mgrdich May 30, 2022
612feb5
Fix the Button Component redundant Props + transforming routes to rel…
Mgrdich May 30, 2022
528154d
Fix linter issues
Mgrdich May 30, 2022
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
117 changes: 31 additions & 86 deletions kafka-ui-react-app/package-lock.json

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

2 changes: 1 addition & 1 deletion kafka-ui-react-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"react-multi-select-component": "^4.0.6",
"react-redux": "^7.2.6",
"react-router": "^5.2.0",
"react-router-dom": "^5.3.1",
"react-router-dom": "^6.3.0",
"redux": "^4.1.1",
"redux-thunk": "^2.3.0",
"sass": "^1.43.4",
Expand Down
20 changes: 13 additions & 7 deletions kafka-ui-react-app/src/components/App.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React from 'react';
import { Switch, Route, useLocation } from 'react-router-dom';
import { Routes, Route, useLocation } from 'react-router-dom';
import { GIT_TAG, GIT_COMMIT } from 'lib/constants';
import { clusterPath, getNonExactPath } from 'lib/paths';
import Nav from 'components/Nav/Nav';
import PageLoader from 'components/common/PageLoader/PageLoader';
import Dashboard from 'components/Dashboard/Dashboard';
Expand Down Expand Up @@ -81,14 +82,19 @@ const App: React.FC = () => {
aria-label="Overlay"
/>
{areClustersFulfilled ? (
<Switch>
<Routes>
{['/', '/ui', '/ui/clusters'].map((path) => (
<Route
key="Home" // optional: avoid full re-renders on route changes
path={path}
element={<Dashboard />}
/>
))}
<Route
exact
path={['/', '/ui', '/ui/clusters']}
component={Dashboard}
path={getNonExactPath(clusterPath())}
element={<ClusterPage />}
/>
<Route path="/ui/clusters/:clusterName" component={ClusterPage} />
</Switch>
</Routes>
) : (
<PageLoader />
)}
Expand Down
6 changes: 3 additions & 3 deletions kafka-ui-react-app/src/components/Brokers/Brokers.tsx
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
import React from 'react';
import { ClusterName } from 'redux/interfaces';
import useInterval from 'lib/hooks/useInterval';
import BytesFormatted from 'components/common/BytesFormatted/BytesFormatted';
import { useParams } from 'react-router-dom';
import TableHeaderCell from 'components/common/table/TableHeaderCell/TableHeaderCell';
import { Table } from 'components/common/table/Table/Table.styled';
import PageHeading from 'components/common/PageHeading/PageHeading';
import * as Metrics from 'components/common/Metrics';
import { useAppDispatch, useAppSelector } from 'lib/hooks/redux';
import { ClusterNameRoute } from 'lib/paths';
import {
fetchBrokers,
fetchClusterStats,
selectStats,
} from 'redux/reducers/brokers/brokersSlice';
import useAppParams from 'lib/hooks/useAppParams';

const Brokers: React.FC = () => {
const dispatch = useAppDispatch();
const { clusterName } = useParams<{ clusterName: ClusterName }>();
const { clusterName } = useAppParams<ClusterNameRoute>();
const {
brokerCount,
activeControllers,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import React from 'react';
import Brokers from 'components/Brokers/Brokers';
import { render } from 'lib/testHelpers';
import { render, WithRoute } from 'lib/testHelpers';
import { screen, waitFor } from '@testing-library/dom';
import { Route } from 'react-router-dom';
import { clusterBrokersPath } from 'lib/paths';
import fetchMock from 'fetch-mock';
import { clusterStatsPayload } from 'redux/reducers/brokers/__test__/fixtures';
Expand All @@ -18,11 +17,11 @@ describe('Brokers Component', () => {

const renderComponent = () =>
render(
<Route path={clusterBrokersPath(':clusterName')}>
<WithRoute path={clusterBrokersPath()}>
<Brokers />
</Route>,
</WithRoute>,
{
pathname: clusterBrokersPath(clusterName),
initialEntries: [clusterBrokersPath(clusterName)],
}
);

Expand Down
Loading