Skip to content

Commit 737fc8f

Browse files
committed
Show Koji build submission logs
1 parent 8c72fb7 commit 737fc8f

File tree

2 files changed

+34
-0
lines changed

2 files changed

+34
-0
lines changed

frontend/src/apiDefinitions.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,7 @@ export interface KojiBuild {
178178
status: string; // TODO: @Venefilyn - Probably an enum right? Change to be one if so
179179
task_id: string;
180180
web_url: string;
181+
build_submission_stdout: string | null;
181182
}
182183

183184
// /api/koji-tag-requests

frontend/src/components/koji/KojiBuild.tsx

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,11 @@ import {
1212
Label,
1313
PageSection,
1414
Title,
15+
Toolbar,
16+
ToolbarContent,
17+
ToolbarItem,
1518
} from "@patternfly/react-core";
19+
import { LogViewer, LogViewerSearch } from "@patternfly/react-log-viewer";
1620
import { Table, Tbody, Td, Tr } from "@patternfly/react-table";
1721
import { useQuery } from "@tanstack/react-query";
1822
import { Link } from "@tanstack/react-router";
@@ -56,6 +60,34 @@ export const KojiBuild = () => {
5660
</PageSection>
5761
);
5862
}
63+
64+
const logs = data.build_submission_stdout ? (
65+
<PageSection hasBodyWrapper={false}>
66+
<Card>
67+
<CardBody>
68+
<LogViewer
69+
data={data.build_submission_stdout}
70+
toolbar={
71+
<Toolbar>
72+
<ToolbarContent>
73+
<ToolbarItem>
74+
<LogViewerSearch
75+
placeholder="Search value"
76+
minSearchChars={3}
77+
/>
78+
</ToolbarItem>
79+
</ToolbarContent>
80+
</Toolbar>
81+
}
82+
hasLineNumbers={false}
83+
/>
84+
</CardBody>
85+
</Card>
86+
</PageSection>
87+
) : (
88+
""
89+
);
90+
5991
return (
6092
<>
6193
<PageSection hasBodyWrapper={false}>
@@ -146,6 +178,7 @@ export const KojiBuild = () => {
146178
</CardBody>
147179
</Card>
148180
</PageSection>
181+
{logs}
149182
</>
150183
);
151184
};

0 commit comments

Comments
 (0)