@@ -26,6 +26,7 @@ import { Timestamp } from "../shared/Timestamp";
2626import { StatusLabel } from "../statusLabels/StatusLabel" ;
2727import { TriggerLink , TriggerSuffix } from "../trigger/TriggerLink" ;
2828import { CoprDataListItem } from "./CoprDataListItem" ;
29+ import { KojiDataListItem } from "./KojiDataListItem" ;
2930
3031export const TestingFarmRun = ( ) => {
3132 const { id } = TestingFarmRoute . useParams ( ) ;
@@ -34,11 +35,15 @@ export const TestingFarmRun = () => {
3435 testingFarmRunQueryOptions ( { id } ) ,
3536 ) ;
3637 const [ coprBuildIds , setCoprBuildIds ] = useState < number [ ] > ( [ ] ) ;
38+ const [ kojiBuildIds , setKojiBuildIds ] = useState < number [ ] > ( [ ] ) ;
3739
3840 useEffect ( ( ) => {
3941 if ( data && "copr_build_ids" in data ) {
4042 setCoprBuildIds ( data ?. copr_build_ids . filter ( ( copr ) => copr !== null ) ) ;
4143 }
44+ if ( data && "koji_build_ids" in data ) {
45+ setKojiBuildIds ( data ?. koji_build_ids . filter ( ( koji ) => koji !== null ) ) ;
46+ }
4247 } , [ data ] ) ;
4348
4449 // If backend API is down
@@ -129,20 +134,38 @@ export const TestingFarmRun = () => {
129134 </ DescriptionListGroup >
130135 </ DescriptionList >
131136 </ CardBody >
132- < CardBody >
133- < DescriptionList >
134- < DescriptionListGroup >
135- < DescriptionListTerm > Copr Build(s)</ DescriptionListTerm >
136- < DescriptionListDescription >
137- < DataList aria-label = "Copr builds" >
138- { coprBuildIds . map ( ( coprId ) => (
139- < CoprDataListItem id = { coprId } key = { coprId } />
140- ) ) }
141- </ DataList >
142- </ DescriptionListDescription >
143- </ DescriptionListGroup >
144- </ DescriptionList >
145- </ CardBody >
137+ { coprBuildIds . length > 0 && (
138+ < CardBody >
139+ < DescriptionList >
140+ < DescriptionListGroup >
141+ < DescriptionListTerm > Copr Build(s)</ DescriptionListTerm >
142+ < DescriptionListDescription >
143+ < DataList aria-label = "Copr builds" >
144+ { coprBuildIds . map ( ( coprId ) => (
145+ < CoprDataListItem id = { coprId } key = { coprId } />
146+ ) ) }
147+ </ DataList >
148+ </ DescriptionListDescription >
149+ </ DescriptionListGroup >
150+ </ DescriptionList >
151+ </ CardBody >
152+ ) }
153+ { kojiBuildIds . length > 0 && (
154+ < CardBody >
155+ < DescriptionList >
156+ < DescriptionListGroup >
157+ < DescriptionListTerm > Koji build(s)</ DescriptionListTerm >
158+ < DescriptionListDescription >
159+ < DataList aria-label = "Koji builds" >
160+ { kojiBuildIds . map ( ( kojiId ) => (
161+ < KojiDataListItem id = { kojiId } key = { kojiId } />
162+ ) ) }
163+ </ DataList >
164+ </ DescriptionListDescription >
165+ </ DescriptionListGroup >
166+ </ DescriptionList >
167+ </ CardBody >
168+ ) }
146169 </ >
147170 ) }
148171 </ Card >
0 commit comments