@@ -26,14 +26,15 @@ export const JobTimeline = ({ pipelineRunResult }: JobTimelineProps) => {
2626
2727 // Format duration
2828 const formatDuration = ( ms : number ) => {
29- const minutes = Math . floor ( ms / ( 1000 * 60 ) ) ;
30- const hours = Math . floor ( minutes / 60 ) ;
31- const remainingMinutes = minutes % 60 ;
29+ const totalSeconds = Math . floor ( ms / 1000 ) ;
30+ const hours = Math . floor ( totalSeconds / 3600 ) ;
31+ const minutes = Math . floor ( ( totalSeconds % 3600 ) / 60 ) ;
32+ const seconds = totalSeconds % 60 ;
3233
3334 if ( hours > 0 ) {
34- return `${ hours } h ${ remainingMinutes } m ` ;
35+ return `${ hours } h ${ minutes } m ${ seconds } s ` ;
3536 }
36- return `${ minutes } m` ;
37+ return `${ minutes } m ${ seconds } s ` ;
3738 } ;
3839
3940 return (
@@ -151,16 +152,32 @@ export const JobTimeline = ({ pipelineRunResult }: JobTimelineProps) => {
151152
152153 { /* Connecting line to next event */ }
153154 { index < MOCK_TIMELINE_EVENTS . length - 1 && (
154- < div
155- style = { {
156- width : '3px' ,
157- height : '1.5rem' ,
158- backgroundColor : colors . light ( 0.2 ) ,
159- marginLeft : 'calc(50% - 1px)' ,
160- position : 'relative' ,
161- zIndex : 0 ,
162- } }
163- />
155+ < div style = { { position : 'relative' , display : 'flex' , justifyContent : 'center' } } >
156+ < div
157+ style = { {
158+ width : '3px' ,
159+ height : '1.5rem' ,
160+ backgroundColor : colors . light ( 0.2 ) ,
161+ position : 'relative' ,
162+ zIndex : 0 ,
163+ } }
164+ />
165+ { /* Empty circle in the middle of the line */ }
166+ < div
167+ style = { {
168+ position : 'absolute' ,
169+ top : '50%' ,
170+ left : '50%' ,
171+ transform : 'translate(-50%, -50%)' ,
172+ width : '8px' ,
173+ height : '8px' ,
174+ backgroundColor : 'white' ,
175+ border : `2px solid ${ colors . light ( 0.4 ) } ` ,
176+ borderRadius : '50%' ,
177+ zIndex : 1 ,
178+ } }
179+ />
180+ </ div >
164181 ) }
165182 </ div >
166183 ) ) }
0 commit comments