@@ -109,7 +109,7 @@ function TopLevelBuildTable(props) {
109109
110110 if ( buildInfo ) {
111111 // Define a function that renders a table cell for a 'FvTestBuild' object.
112- const renderFvTestBuild = ( value ) => {
112+ const renderTestBuild = ( value ) => {
113113 // If the provided 'value' argument is truthy and has a 'buildNum' property:
114114 if ( value && value . buildNum ) {
115115 // Call the 'setBuildsStatus' function to update the 'buildResult' property of the 'value' object.
@@ -130,60 +130,6 @@ function TopLevelBuildTable(props) {
130130 return null ;
131131 } ;
132132
133- // Define function to render build link
134- const renderBuild = ( value ) => {
135- // If value exists and has a buildNum property
136- if ( value && value . buildNum ) {
137- // Set the result variable to the build result
138- let result = value . buildResult ;
139- // If the value has tests and the length of the tests array is greater than 0
140- if ( value . tests && value . tests . length > 0 ) {
141- // Set the result variable to the test result of the first test in the tests array
142- result = value . tests [ 0 ] . testResult ;
143- // If the first test has an _id property
144- if ( value . tests [ 0 ] . _id ) {
145- // Return a link to the output test page for the first test
146- return (
147- < div >
148- < Link
149- to = { {
150- pathname : '/output/test' ,
151- search : params ( {
152- id : value . tests [ 0 ] . _id ,
153- } ) ,
154- } }
155- style = { {
156- color :
157- result === 'PASSED'
158- ? '#2cbe4e'
159- : result === 'FAILED'
160- ? '#f50'
161- : '#DAA520' ,
162- } }
163- >
164- Build #{ value . buildNum }
165- </ Link >
166- </ div >
167- ) ;
168- }
169- } else {
170- // Return a JSX element with a 'BuildStatus' and 'renderPublishName' component, passing in relevant props.
171- return (
172- < div >
173- < BuildStatus
174- status = { value . buildResult }
175- id = { value . _id }
176- buildNum = { value . buildNum }
177- />
178- { renderPublishName ( value ) }
179- </ div >
180- ) ;
181- }
182- }
183- // If value does not exist or does not have a buildNum property, return null
184- return null ;
185- } ;
186-
187133 // Define function to render Jenkins links
188134 const renderJenkinsLinks = ( { buildName, buildNum, buildUrl, url } ) => {
189135 // Temporarily support BlueOcean link under folders
@@ -330,7 +276,7 @@ function TopLevelBuildTable(props) {
330276 title : 'Build' ,
331277 dataIndex : 'build' ,
332278 key : 'build' ,
333- render : type === 'Perf' ? renderBuild : renderFvTestBuild ,
279+ render : renderTestBuild ,
334280 sorter : ( a , b ) => {
335281 return a . key . localeCompare ( b . key ) ;
336282 } ,
0 commit comments