From c1d4654816848a6dbceb287ee35bea30652d732c Mon Sep 17 00:00:00 2001 From: Oleg Shuralev Date: Wed, 10 Mar 2021 23:16:06 +0300 Subject: [PATCH] Add cluster wrapper + cleanup --- kafka-ui-react-app/src/components/App.tsx | 30 +++---------------- .../src/components/Cluster/Cluster.tsx | 30 +++++++++++++++++++ .../Schemas/Details/__test__/Details.spec.tsx | 1 + .../__snapshots__/Details.spec.tsx.snap | 16 +++++++--- 4 files changed, 47 insertions(+), 30 deletions(-) create mode 100644 kafka-ui-react-app/src/components/Cluster/Cluster.tsx diff --git a/kafka-ui-react-app/src/components/App.tsx b/kafka-ui-react-app/src/components/App.tsx index a5fe4f6f89..66d77f6971 100644 --- a/kafka-ui-react-app/src/components/App.tsx +++ b/kafka-ui-react-app/src/components/App.tsx @@ -1,13 +1,10 @@ import React from 'react'; -import { Switch, Route, Redirect } from 'react-router-dom'; +import { Switch, Route } from 'react-router-dom'; import './App.scss'; -import BrokersContainer from './Brokers/BrokersContainer'; -import TopicsContainer from './Topics/TopicsContainer'; import NavContainer from './Nav/NavContainer'; import PageLoader from './common/PageLoader/PageLoader'; import Dashboard from './Dashboard/Dashboard'; -import ConsumersGroupsContainer from './ConsumerGroups/ConsumersGroupsContainer'; -import SchemasContainer from './Schemas/SchemasContainer'; +import Cluster from './Cluster/Cluster'; interface AppProps { isClusterListFetched: boolean; @@ -44,29 +41,10 @@ const App: React.FC = ({ path={['/', '/ui', '/ui/clusters']} component={Dashboard} /> - - - - - + ) : ( - + )} diff --git a/kafka-ui-react-app/src/components/Cluster/Cluster.tsx b/kafka-ui-react-app/src/components/Cluster/Cluster.tsx new file mode 100644 index 0000000000..6596f47d0f --- /dev/null +++ b/kafka-ui-react-app/src/components/Cluster/Cluster.tsx @@ -0,0 +1,30 @@ +import React from 'react'; +import { Switch, Route, Redirect } from 'react-router-dom'; +import BrokersContainer from 'components/Brokers/BrokersContainer'; +import TopicsContainer from 'components/Topics/TopicsContainer'; +import ConsumersGroupsContainer from 'components/ConsumerGroups/ConsumersGroupsContainer'; +import Schemas from 'components/Schemas/Schemas'; + +const Cluster: React.FC = () => ( + + + + + + + +); + +export default Cluster; diff --git a/kafka-ui-react-app/src/components/Schemas/Details/__test__/Details.spec.tsx b/kafka-ui-react-app/src/components/Schemas/Details/__test__/Details.spec.tsx index 816f20380c..bc407cdc2f 100644 --- a/kafka-ui-react-app/src/components/Schemas/Details/__test__/Details.spec.tsx +++ b/kafka-ui-react-app/src/components/Schemas/Details/__test__/Details.spec.tsx @@ -24,6 +24,7 @@ describe('Details', () => { describe('View', () => { const setupWrapper = (props: Partial = {}) => (
+ > + test +
+ > + test +
@@ -143,7 +147,9 @@ exports[`Details View when page with schema versions loaded when schema has vers }, ] } - /> + > + test +
+ > + test +