2828 return `https://storage.googleapis.com/minikube-builds/logs/master/${ jobId } /${ environment } .html${ testName ? `#${ status } _${ testName } ` : `` } ` ;
2929}
3030
31+ function sortByID ( a , b ) {
32+ return a . id - b . id ;
33+ }
34+
3135// Parse URL search `query` into [{key, value}].
3236function parseUrlQuery ( query ) {
3337 if ( query [ 0 ] === '?' ) {
188192 <b>Date:</b> ${ groupData . startOfDate . toLocaleString ( [ ] , { dateStyle : 'medium' } ) } <br>
189193 <b>Flake Percentage:</b> ${ groupData . flakePercentage . toFixed ( 2 ) } %<br>
190194 <b>Jobs:</b><br>
191- ${ resultArr . map ( ( { id, status } ) => ` - <a href="${ testGopoghLink ( id , query . env , query . test , status ) } ">${ id } </a> (${ status } )` ) . join ( "<br>" ) }
195+ ${ resultArr . sort ( sortByID ) . map ( ( { id, status } ) => ` - <a href="${ testGopoghLink ( id , query . env , query . test , status ) } ">${ id } </a> (${ status } )` ) . join ( "<br>" ) }
192196 </div>` ,
193197 groupData . avgDuration ,
194198 `<div style="padding: 1rem; font-family: 'Arial'; font-size: 14">
195199 <b>Date:</b> ${ groupData . startOfDate . toLocaleString ( [ ] , { dateStyle : 'medium' } ) } <br>
196200 <b>Average Duration:</b> ${ groupData . avgDuration . toFixed ( 2 ) } s<br>
197201 <b>Jobs:</b><br>
198- ${ durationArr . map ( ( { id, duration, status } ) => ` - <a href="${ testGopoghLink ( id , query . env , query . test , status ) } ">${ id } </a> (${ duration } s)` ) . join ( "<br>" ) }
202+ ${ durationArr . sort ( sortByID ) . map ( ( { id, duration, status } ) => ` - <a href="${ testGopoghLink ( id , query . env , query . test , status ) } ">${ id } </a> (${ duration } s)` ) . join ( "<br>" ) }
199203 </div>` ,
200204 ]
201205 } )
280284 <b>Date:</b> ${ groupData . startOfDate . toLocaleString ( [ ] , { dateStyle : 'medium' } ) } <br>
281285 <b>Flake Percentage:</b> ${ groupData . flakePercentage . toFixed ( 2 ) } %<br>
282286 <b>Jobs:</b><br>
283- ${ resultArr . map ( ( { id, status } ) => ` - <a href="${ testGopoghLink ( id , query . env , query . test , status ) } ">${ id } </a> (${ status } )` ) . join ( "<br>" ) }
287+ ${ resultArr . sort ( sortByID ) . map ( ( { id, status } ) => ` - <a href="${ testGopoghLink ( id , query . env , query . test , status ) } ">${ id } </a> (${ status } )` ) . join ( "<br>" ) }
284288 </div>` ,
285289 groupData . avgDuration ,
286290 `<div style="padding: 1rem; font-family: 'Arial'; font-size: 14">
287291 <b>Date:</b> ${ groupData . startOfDate . toLocaleString ( [ ] , { dateStyle : 'medium' } ) } <br>
288292 <b>Average Duration:</b> ${ groupData . avgDuration . toFixed ( 2 ) } s<br>
289293 <b>Jobs:</b><br>
290- ${ durationArr . map ( ( { id, duration, status } ) => ` - <a href="${ testGopoghLink ( id , query . env , query . test , status ) } ">${ id } </a> (${ duration } s)` ) . join ( "<br>" ) }
294+ ${ durationArr . sort ( sortByID ) . map ( ( { id, duration, status } ) => ` - <a href="${ testGopoghLink ( id , query . env , query . test , status ) } ">${ id } </a> (${ duration } s)` ) . join ( "<br>" ) }
291295 </div>` ,
292296 ]
293297 } )
372376 <b>Date:</b> ${ groupData . startOfDate . toLocaleString ( [ ] , { dateStyle : 'medium' } ) } <br>
373377 <b>Flake Percentage:</b> ${ groupData . flakePercentage . toFixed ( 2 ) } %<br>
374378 <b>Jobs:</b><br>
375- ${ resultArr . map ( ( { id, status } ) => ` - <a href="${ testGopoghLink ( id , query . env , query . test , status ) } ">${ id } </a> (${ status } )` ) . join ( "<br>" ) }
379+ ${ resultArr . sort ( sortByID ) . map ( ( { id, status } ) => ` - <a href="${ testGopoghLink ( id , query . env , query . test , status ) } ">${ id } </a> (${ status } )` ) . join ( "<br>" ) }
376380 </div>` ,
377381 groupData . avgDuration ,
378382 `<div style="padding: 1rem; font-family: 'Arial'; font-size: 14">
379383 <b>Date:</b> ${ groupData . startOfDate . toLocaleString ( [ ] , { dateStyle : 'medium' } ) } <br>
380384 <b>Average Duration:</b> ${ groupData . avgDuration . toFixed ( 2 ) } s<br>
381385 <b>Jobs:</b><br>
382- ${ durationArr . map ( ( { id, duration, status } ) => ` - <a href="${ testGopoghLink ( id , query . env , query . test , status ) } ">${ id } </a> (${ duration } s)` ) . join ( "<br>" ) }
386+ ${ durationArr . sort ( sortByID ) . map ( ( { id, duration, status } ) => ` - <a href="${ testGopoghLink ( id , query . env , query . test , status ) } ">${ id } </a> (${ duration } s)` ) . join ( "<br>" ) }
383387 </div>` ,
384388 ]
385389 } )
629633 <b>Date:</b> ${ dateTime . toLocaleString ( [ ] , { dateStyle : 'medium' } ) } <br>
630634 <b>Flake Percentage:</b> ${ + fp . toFixed ( 2 ) } %<br>
631635 <b>Jobs:</b><br>
632- ${ commitArr . map ( ( { id, status } ) => ` - <a href="${ testGopoghLink ( id , query . env , name , status ) } ">${ id } </a> (${ status } )` ) . join ( "<br>" ) }
636+ ${ commitArr . sort ( sortByID ) . map ( ( { id, status } ) => ` - <a href="${ testGopoghLink ( id , query . env , name , status ) } ">${ id } </a> (${ status } )` ) . join ( "<br>" ) }
633637 </div>`
634638 ]
635639 }
726730 <b>Date:</b> ${ dateTime . toLocaleString ( [ ] , { dateStyle : 'medium' } ) } <br>
727731 <b>Flake Percentage:</b> ${ + fp . toFixed ( 2 ) } %<br>
728732 <b>Jobs:</b><br>
729- ${ commitArr . map ( ( { id, status } ) => ` - <a href="${ testGopoghLink ( id , query . env , name , status ) } ">${ id } </a> (${ status } )` ) . join ( "<br>" ) }
733+ ${ commitArr . sort ( sortByID ) . map ( ( { id, status } ) => ` - <a href="${ testGopoghLink ( id , query . env , name , status ) } ">${ id } </a> (${ status } )` ) . join ( "<br>" ) }
730734 </div>`
731735 ] ;
732736 }
975979 < div id ="chart_div "> </ div >
976980 < div id ="version_div "> </ div >
977981 </ body >
978- </ html >
982+ </ html >
0 commit comments