From be3ff75b8d5142504739b73df7b21374906f97c2 Mon Sep 17 00:00:00 2001 From: Patrik Korytar Date: Mon, 22 Apr 2024 14:27:33 +0200 Subject: [PATCH] NCL-8674 Add Push-to-brew action to Group Build detail page --- .../GroupBuildDetailPage.tsx | 26 +++++++++++++++---- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/src/components/GroupBuildDetailPage/GroupBuildDetailPage.tsx b/src/components/GroupBuildDetailPage/GroupBuildDetailPage.tsx index 00223b44..6e1fdd76 100644 --- a/src/components/GroupBuildDetailPage/GroupBuildDetailPage.tsx +++ b/src/components/GroupBuildDetailPage/GroupBuildDetailPage.tsx @@ -19,6 +19,8 @@ import { useTitle } from 'hooks/useTitle'; import { Attributes } from 'components/Attributes/Attributes'; import { AttributesItem } from 'components/Attributes/AttributesItem'; +import { BrewPushModal } from 'components/BrewPushModal/BrewPushModal'; +import { BrewPushModalButton } from 'components/BrewPushModal/BrewPushModalButton'; import { calculateLongBuildName } from 'components/BuildName/BuildName'; import { BuildStatus } from 'components/BuildStatus/BuildStatus'; import { BuildStatusIcon } from 'components/BuildStatusIcon/BuildStatusIcon'; @@ -63,9 +65,11 @@ export const GroupBuildDetailPage = ({ componentId = 'gb2' }: IGroupBuildDetailP const serviceContainerDependencyGraphSetter = serviceContainerDependencyGraph.setData; const [isCancelGroupBuildModalOpen, setIsCancelGroupBuildModalOpen] = useState(false); + const [isBrewPushModalOpen, setIsBrewPushModalOpen] = useState(false); const toggleCancelGroupBuildModal = () => setIsCancelGroupBuildModalOpen((isCancelGroupBuildModalOpen) => !isCancelGroupBuildModalOpen); + const toggleBrewPushModal = () => setIsBrewPushModalOpen((isBrewPushModalOpen) => !isBrewPushModalOpen); const longGroupBuildName = serviceContainerGroupBuild.data ? calculateLongBuildName(serviceContainerGroupBuild.data) @@ -136,11 +140,14 @@ export const GroupBuildDetailPage = ({ componentId = 'gb2' }: IGroupBuildDetailP title={} breadcrumbs={[{ entity: breadcrumbData.groupBuild.id, title: serviceContainerGroupBuild.data?.id }]} actions={ - + <> + + + } > @@ -203,6 +210,15 @@ export const GroupBuildDetailPage = ({ componentId = 'gb2' }: IGroupBuildDetailP variant="Group Build" /> )} + + {isBrewPushModalOpen && ( + + )} ); };