-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Consumer group reset offset Signed-off-by: hemahg <[email protected]> * Add bootstarp url Signed-off-by: hemahg <[email protected]> * handle bootstrap server Signed-off-by: hemahg <[email protected]> * remove delete button Signed-off-by: hemahg <[email protected]> * Add more states to consumer group state schema Signed-off-by: hemahg <[email protected]> * Minor refactor Signed-off-by: hemahg <[email protected]> --------- Signed-off-by: hemahg <[email protected]>
- Loading branch information
Showing
27 changed files
with
4,089 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
54 changes: 54 additions & 0 deletions
54
...thorized)/kafka/[kafkaId]/@header/consumer-groups/[groupId]/ConsumerGroupActionButton.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
"use client"; | ||
|
||
import { Button, Tooltip } from "@/libs/patternfly/react-core"; | ||
import { useTranslations } from "next-intl"; | ||
import { useRouter } from "next/navigation"; | ||
|
||
export function ConsumerGroupActionButton({ | ||
disabled, | ||
kafkaId, | ||
consumerGroupName, | ||
}: { | ||
disabled: boolean; | ||
kafkaId: string; | ||
consumerGroupName: string; | ||
}) { | ||
const t = useTranslations(); | ||
const router = useRouter(); | ||
|
||
const onClickResetOffset = () => { | ||
router.push( | ||
`/kafka/${kafkaId}/consumer-groups/${consumerGroupName}/reset-offset`, | ||
); | ||
}; | ||
|
||
return ( | ||
<Tooltip | ||
key={"reset"} | ||
content={ | ||
"It is possible to reset the offset only on stopped consumer groups" | ||
} | ||
> | ||
<Button | ||
isDisabled={disabled} | ||
aria-disabled={disabled} | ||
id={"reset"} | ||
onClick={onClickResetOffset} | ||
> | ||
{t("ConsumerGroup.reset_offset")} | ||
</Button> | ||
</Tooltip> | ||
// <Tooltip | ||
// key={"delete"} | ||
// content={"It is possible to delete only stopped consumer groups"} | ||
// > | ||
// <Button | ||
// variant={"danger"} | ||
// aria-disabled={disabled} | ||
// isDisabled={disabled} | ||
// > | ||
// {t("ConsumerGroup.delete")} | ||
// </Button> | ||
// </Tooltip>, | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.