From 737fc8f2ab30a39d6da27789bff6fbae19aaaf81 Mon Sep 17 00:00:00 2001 From: Laura Barcziova Date: Wed, 27 Nov 2024 15:51:44 +0100 Subject: [PATCH] Show Koji build submission logs --- frontend/src/apiDefinitions.ts | 1 + frontend/src/components/koji/KojiBuild.tsx | 33 ++++++++++++++++++++++ 2 files changed, 34 insertions(+) diff --git a/frontend/src/apiDefinitions.ts b/frontend/src/apiDefinitions.ts index f789cfe0..2d503efb 100644 --- a/frontend/src/apiDefinitions.ts +++ b/frontend/src/apiDefinitions.ts @@ -178,6 +178,7 @@ export interface KojiBuild { status: string; // TODO: @Venefilyn - Probably an enum right? Change to be one if so task_id: string; web_url: string; + build_submission_stdout: string | null; } // /api/koji-tag-requests diff --git a/frontend/src/components/koji/KojiBuild.tsx b/frontend/src/components/koji/KojiBuild.tsx index 4fd02521..48342f04 100644 --- a/frontend/src/components/koji/KojiBuild.tsx +++ b/frontend/src/components/koji/KojiBuild.tsx @@ -12,7 +12,11 @@ import { Label, PageSection, Title, + Toolbar, + ToolbarContent, + ToolbarItem, } from "@patternfly/react-core"; +import { LogViewer, LogViewerSearch } from "@patternfly/react-log-viewer"; import { Table, Tbody, Td, Tr } from "@patternfly/react-table"; import { useQuery } from "@tanstack/react-query"; import { Link } from "@tanstack/react-router"; @@ -56,6 +60,34 @@ export const KojiBuild = () => { ); } + + const logs = data.build_submission_stdout ? ( + + + + + + + + + + + } + hasLineNumbers={false} + /> + + + + ) : ( + "" + ); + return ( <> @@ -146,6 +178,7 @@ export const KojiBuild = () => { + {logs} ); };