File tree Expand file tree Collapse file tree 7 files changed +49
-23
lines changed
app/[locale]/(authorized)/kafka/[kafkaId]
consumer-groups/[groupId] Expand file tree Collapse file tree 7 files changed +49
-23
lines changed Original file line number Diff line number Diff line change @@ -7,12 +7,22 @@ import { PageSection } from "@/libs/patternfly/react-core";
77import { Suspense } from "react" ;
88import { NoDataErrorState } from "@/components/NoDataErrorState" ;
99
10- export async function generateMetadata ( props : { params : Promise < { kafkaId : string , groupId : string } > } ) {
11- const params = await props . params ;
10+ export async function generateMetadata ( {
11+ params : paramsPromise ,
12+ } : {
13+ params : Promise < KafkaConsumerGroupMembersParams > ;
14+ } ) {
15+ const { kafkaId, groupId } = await paramsPromise ;
1216 const t = await getTranslations ( ) ;
17+ const consumerGroup = ( await getConsumerGroup ( kafkaId , groupId ) ) . payload ;
18+ let groupIdDisplay = "" ;
19+
20+ if ( consumerGroup ) {
21+ groupIdDisplay = consumerGroup . attributes . groupId ;
22+ }
1323
1424 return {
15- title : `${ t ( "ConsumerGroup.title" ) } ${ params . groupId } | ${ t ( "common.title" ) } ` ,
25+ title : `${ t ( "ConsumerGroup.title" ) } ${ groupIdDisplay } | ${ t ( "common.title" ) } ` ,
1626 } ;
1727}
1828
Original file line number Diff line number Diff line change @@ -7,12 +7,22 @@ import { Suspense } from "react";
77import { ResetConsumerOffset } from "./ResetConsumerOffset" ;
88import { NoDataErrorState } from "@/components/NoDataErrorState" ;
99
10- export async function generateMetadata ( props : { params : Promise < { kafkaId : string , groupId : string } > } ) {
11- const params = await props . params ;
10+ export async function generateMetadata ( {
11+ params : paramsPromise ,
12+ } : {
13+ params : Promise < KafkaConsumerGroupMembersParams > ;
14+ } ) {
15+ const { kafkaId, groupId } = await paramsPromise ;
1216 const t = await getTranslations ( ) ;
17+ const consumerGroup = ( await getConsumerGroup ( kafkaId , groupId ) ) . payload ;
18+ let groupIdDisplay = "" ;
19+
20+ if ( consumerGroup ) {
21+ groupIdDisplay = consumerGroup . attributes . groupId ;
22+ }
1323
1424 return {
15- title : `${ t ( "ConsumerGroupsTable.reset_offset" ) } ${ params . groupId } | ${ t ( "common.title" ) } ` ,
25+ title : `${ t ( "ConsumerGroupsTable.reset_offset" ) } ${ groupIdDisplay } | ${ t ( "common.title" ) } ` ,
1626 } ;
1727}
1828
Original file line number Diff line number Diff line change @@ -16,11 +16,12 @@ export async function generateMetadata() {
1616 } ;
1717}
1818
19- export default function TopicConfiguration ( {
20- params : { kafkaId , topicId } ,
19+ export default async function TopicConfiguration ( {
20+ params : paramsPromise ,
2121} : {
22- params : KafkaTopicParams ;
22+ params : Promise < KafkaTopicParams > ;
2323} ) {
24+ const { kafkaId, topicId } = await paramsPromise ;
2425 return (
2526 < PageSection isFilled = { true } >
2627 < Suspense
Original file line number Diff line number Diff line change @@ -14,18 +14,20 @@ export async function generateMetadata() {
1414 } ;
1515}
1616
17- export default function ConsumerGroupsPage ( {
18- params : { kafkaId , topicId } ,
19- searchParams,
17+ export default async function ConsumerGroupsPage ( {
18+ params : paramsPromise ,
19+ searchParams : searchParamsPromise ,
2020} : {
21- params : KafkaTopicParams ;
22- searchParams : {
21+ params : Promise < KafkaTopicParams > ;
22+ searchParams : Promise < {
2323 perPage : string | undefined ;
2424 sort : string | undefined ;
2525 sortDir : string | undefined ;
2626 page : string | undefined ;
27- } ;
27+ } > ;
2828} ) {
29+ const { kafkaId, topicId } = await paramsPromise ;
30+ const searchParams = await searchParamsPromise ;
2931 return (
3032 < PageSection >
3133 < Suspense
Original file line number Diff line number Diff line change @@ -18,12 +18,14 @@ export async function generateMetadata() {
1818}
1919
2020export default async function ConnectedMessagesPage ( {
21- params : { kafkaId , topicId } ,
22- searchParams,
21+ params : paramsPromise ,
22+ searchParams : searchParamsPromise ,
2323} : {
24- params : KafkaTopicParams ;
25- searchParams : MessagesSearchParams ;
24+ params : Promise < KafkaTopicParams > ;
25+ searchParams : Promise < MessagesSearchParams > ;
2626} ) {
27+ const { kafkaId, topicId } = await paramsPromise ;
28+ const searchParams = await searchParamsPromise ;
2729 const response = await getTopic ( kafkaId , topicId ) ;
2830
2931 if ( response . errors ) {
Original file line number Diff line number Diff line change @@ -13,11 +13,12 @@ export async function generateMetadata() {
1313 } ;
1414}
1515
16- export default function PartitionsPage ( {
17- params : { kafkaId , topicId } ,
16+ export default async function PartitionsPage ( {
17+ params : paramsPromise ,
1818} : {
19- params : KafkaTopicParams ;
19+ params : Promise < KafkaTopicParams > ;
2020} ) {
21+ const { kafkaId, topicId } = await paramsPromise ;
2122 return (
2223 < Suspense
2324 fallback = { < PartitionsTable kafkaId = { kafkaId } topic = { undefined } /> }
Original file line number Diff line number Diff line change 529529 "reseting_consumer_group_offsets_text" : " Resetting consumer group offsets. This might take a few moments" ,
530530 "run_and_show_result" : " Run and show result in console" ,
531531 "copy_dry_run_command" : " Copy Dry Run command to clipboard" ,
532- "reset_offset_submitted_successfully" : " Reset {consumerGroupName } offsets completed successfully" ,
532+ "reset_offset_submitted_successfully" : " Reset {groupId } offsets completed successfully" ,
533533 "custom_offset_error_message" : " The custom offset value is out of range. Enter a value between the earliest and latest offsets."
534534 },
535535 "CreateTopic" : {
You can’t perform that action at this time.
0 commit comments