File tree Expand file tree Collapse file tree 3 files changed +12
-4
lines changed
src/Shared/Components/CICDHistory Expand file tree Collapse file tree 3 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -85,7 +85,8 @@ const LogStageAccordion = ({
8585 { isOpen && (
8686 < div className = "flexbox-col dc__gap-4" >
8787 { logs . map ( ( log : string , logsIndex : number ) => {
88- const doesLineContainSearchMatch = getLogSearchIndex ( stageIndex , logsIndex ) === searchIndex
88+ const doesLineContainSearchMatch =
89+ getLogSearchIndex ( { stageIndex, lineNumberInsideStage : logsIndex } ) === searchIndex
8990
9091 return (
9192 < LogsItemContainer
Original file line number Diff line number Diff line change @@ -385,7 +385,12 @@ const LogsRenderer = ({
385385
386386 searchKeyStatusMap [ lastStage . stage ] [ lastStage . startTime ] = true
387387
388- searchMatchResults . push ( getLogSearchIndex ( acc . length - 1 , lastStage . logs . length - 1 ) )
388+ searchMatchResults . push (
389+ getLogSearchIndex ( {
390+ stageIndex : acc . length - 1 ,
391+ lineNumberInsideStage : lastStage . logs . length - 1 ,
392+ } ) ,
393+ )
389394 }
390395 }
391396
Original file line number Diff line number Diff line change @@ -199,5 +199,7 @@ export const getTriggerStatusIcon = (triggerDetailStatus: string): JSX.Element =
199199 }
200200}
201201
202- export const getLogSearchIndex = ( stageIndex : number , lineNumberInsideStage : number ) =>
203- `${ stageIndex } -${ lineNumberInsideStage } `
202+ export const getLogSearchIndex = ( {
203+ stageIndex,
204+ lineNumberInsideStage,
205+ } : Record < 'stageIndex' | 'lineNumberInsideStage' , number > ) => `${ stageIndex } -${ lineNumberInsideStage } `
You can’t perform that action at this time.
0 commit comments