diff --git a/frontend/src/components/Brokers/Brokers.tsx b/frontend/src/components/Brokers/Brokers.tsx index b272cd9f77800f6f612e642ca96a6ae4ecea137a..3c947ff2fa143f2cfdd50955b95fa9994dba3b0c 100644 --- a/frontend/src/components/Brokers/Brokers.tsx +++ b/frontend/src/components/Brokers/Brokers.tsx @@ -5,6 +5,7 @@ import formatBytes from 'lib/utils/formatBytes'; import cx from 'classnames'; import MetricsWrapper from 'components/common/Dashboard/MetricsWrapper'; import Indicator from 'components/common/Dashboard/Indicator'; +import Breadcrumb from 'components/common/Breadcrumb/Breadcrumb'; interface Props extends BrokerMetrics { clusterId: string; @@ -49,7 +50,7 @@ const Topics: React.FC = ({ return (
-

Brokers overview

+ Brokers overview @@ -94,7 +95,7 @@ const Topics: React.FC = ({ {minDiskUsageValue} - {minDiskUsageValue} + {minDiskUsageSize} diff --git a/frontend/src/components/Topics/Details/Details.tsx b/frontend/src/components/Topics/Details/Details.tsx index 7e2c1513fd5ac543f292d2f16fb25efbe82dc0ca..c0281dae43d7aec030a9940e4c3edaa2008c9b1f 100644 --- a/frontend/src/components/Topics/Details/Details.tsx +++ b/frontend/src/components/Topics/Details/Details.tsx @@ -1,19 +1,35 @@ import React from 'react'; +import { ClusterId, Topic } from 'types'; +import MetricsWrapper from 'components/common/Dashboard/MetricsWrapper'; +import Indicator from 'components/common/Dashboard/Indicator'; +import Breadcrumb from 'components/common/Breadcrumb/Breadcrumb'; -const Details: React.FC = ({ +interface Props extends Topic { + clusterId: ClusterId; +} + +const Details: React.FC = ({ + clusterId, + name, + partitions, + internal, }) => { return (
-
- -
+ + {name} + + + + + 0 + + + 0 + +
); } diff --git a/frontend/src/components/Topics/Details/DetailsContainer.ts b/frontend/src/components/Topics/Details/DetailsContainer.ts index cb745f6b53167eb2c751207000e1abc1a5e54492..d984e1f39c0927e72f1e68d4a7c20eaa069da11c 100644 --- a/frontend/src/components/Topics/Details/DetailsContainer.ts +++ b/frontend/src/components/Topics/Details/DetailsContainer.ts @@ -8,13 +8,15 @@ import { getTopicByName } from 'redux/reducers/topics/selectors'; import { withRouter, RouteComponentProps } from 'react-router-dom'; interface RouteProps { + clusterId: string; topicName: string; } interface OwnProps extends RouteComponentProps { } -const mapStateToProps = (state: RootState, { match: { params: { topicName } } }: OwnProps) => ({ - topic: getTopicByName(state, topicName), +const mapStateToProps = (state: RootState, { match: { params: { topicName, clusterId } } }: OwnProps) => ({ + clusterId, + ...getTopicByName(state, topicName), }); const mapDispatchToProps = { diff --git a/frontend/src/components/Topics/List/List.tsx b/frontend/src/components/Topics/List/List.tsx index ab414ca00eb621f5896195e758cbcd3c2dd6525f..811f6bfee67a7a94839f2cd6c7a4e82d8d8306ac 100644 --- a/frontend/src/components/Topics/List/List.tsx +++ b/frontend/src/components/Topics/List/List.tsx @@ -1,6 +1,7 @@ import React from 'react'; import { Topic } from 'types'; import ListItem from './ListItem'; +import Breadcrumb from 'components/common/Breadcrumb/Breadcrumb'; interface Props { topics: Topic[]; @@ -19,6 +20,8 @@ const List: React.FC = ({ return (
+ All Topics +
= ({ + links, + children, +}) => { + return ( + + ); +} + +export default Breadcrumb; diff --git a/frontend/src/redux/reducers/topics/thunks.ts b/frontend/src/redux/reducers/topics/thunks.ts index 3af05f4e8f36ac58a74a9b8aca93fc705bfcac74..a580dc3b55510ec927ed7e45a5f78a5eedb4cd61 100644 --- a/frontend/src/redux/reducers/topics/thunks.ts +++ b/frontend/src/redux/reducers/topics/thunks.ts @@ -4,10 +4,8 @@ import { PromiseThunk, ClusterId } from 'types'; export const fetchTopicList = (clusterId: ClusterId): PromiseThunk => async (dispatch) => { dispatch(fetchTopicListAction.request()); - try { const topics = await getTopics(clusterId); - dispatch(fetchTopicListAction.success(topics)); } catch (e) { dispatch(fetchTopicListAction.failure());