Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add link to the reset offset learning resource page #1048

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
StackItem,
Text,
} from "@/libs/patternfly/react-core";
import { isProductizedBuild } from "@/utils/env";
import { useTranslations } from "next-intl";
import { useRouter } from "next/navigation";

Expand Down Expand Up @@ -69,11 +70,13 @@ export function ResetOffsetModal({
<StackItem>
<Text>{t("shutdown_active_members")}</Text>
</StackItem>
<StackItem>
<ExternalLink testId={"learn_to_shutdown_members"} href={""}>
{t("learn_to_shutdown_members")}
</ExternalLink>
</StackItem>
{isProductizedBuild && (
<StackItem>
<ExternalLink testId={"learn_to_shutdown_consumers"} href={"learn_to_shutdown_consumers_link"}>
{t("learn_to_shutdown_consumers")}
</ExternalLink>
</StackItem>
)}
</Stack>
</Modal>
);
Expand Down
26 changes: 26 additions & 0 deletions ui/app/[locale]/(public)/(home)/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,32 @@ export default async function Home() {
/>
</DataListItemRow>
</DataListItem>
<DataListItem aria-labelledby="gs-5-1">
<DataListItemRow>
<DataListItemCells
dataListCells={[
<DataListCell key="gs-5-1" width={2}>
<span id="gs-5-1">
{t("learning.labels.shut_down_consumers")}
</span>
</DataListCell>,
<DataListCell key="gs-5-2">
<Label isCompact={true} color={"orange"}>
{t("homepage.documentation")}
</Label>
</DataListCell>,
<DataListCell key="gs-5-3">
<ExternalLink
testId={"gs-5-3"}
href={t("learning.links.shut_down_consumers")}
>
{t("homepage.view_documentation")}
</ExternalLink>
</DataListCell>,
]}
/>
</DataListItemRow>
</DataListItem>
</DataList>
</CardBody>
</ExpandableCard>
Expand Down
9 changes: 6 additions & 3 deletions ui/messages/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,15 @@
"overview": "Strimzi Overview",
"gettingStarted": "Getting Started with StreamsHub",
"connecting": "Connect to a Kafka cluster from an application",
"topicOperatorUse": "Using the Topic Operator to manage Kafka topics"
"topicOperatorUse": "Using the Topic Operator to manage Kafka topics",
"shut_down_consumers": "Learn how to stop consumers"
},
"links": {
"overview": "https://strimzi.io/docs/operators/latest/overview",
"gettingStarted": "",
"connecting": "",
"topicOperatorUse": "https://strimzi.io/docs/operators/latest/overview#overview-concepts-topic-operator-str"
"topicOperatorUse": "https://strimzi.io/docs/operators/latest/overview#overview-concepts-topic-operator-str",
"shut_down_consumers": "https://docs.redhat.com/en/documentation/red_hat_streams_for_apache_kafka/2.7/html-single/kafka_configuration_tuning/index#managing_offset_policy"
}
},
"login-in-page": {
Expand Down Expand Up @@ -390,7 +392,8 @@
"reset_offset_description": "Consumer group must be empty to reset offsets.",
"member_shutdown_helper_text": "To reset the consumer group offsets, all the active members must be shut down.",
"shutdown_active_members": "Shut down active members before proceeding",
"learn_to_shutdown_members": "Learn how to shut down members",
"learn_to_shutdown_consumers": "Learn how to shut down consumers",
"learn_to_shutdown_consumers_link": "https://docs.redhat.com/en/documentation/red_hat_streams_for_apache_kafka/2.7/html-single/kafka_configuration_tuning/index#managing_offset_policy",
"reset_consumer_offset": "Reset consumer offset",
"consumer_name": "Consumer group: <b>{consumerGroupName}</b>",
"target": "Target",
Expand Down