diff --git a/frontend/src/components/Brokers/Brokers.tsx b/frontend/src/components/Brokers/Brokers.tsx index b272cd9f77..3c947ff2fa 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 7e2c1513fd..c0281dae43 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 cb745f6b53..d984e1f39c 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 ab414ca00e..811f6bfee6 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 3af05f4e8f..a580dc3b55 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());