diff --git a/pkg/coordinator/web/handlers/test_run.go b/pkg/coordinator/web/handlers/test_run.go index 0371646..911dd0f 100644 --- a/pkg/coordinator/web/handlers/test_run.go +++ b/pkg/coordinator/web/handlers/test_run.go @@ -197,16 +197,16 @@ func (fh *FrontendHandler) getTestRunPageData(runID int64) (*TestRunPage, error) taskData.GraphLevels[indentation-1] = 3 for i := idx - 1; i >= 0; i-- { - if len(pageData.Tasks[i].GraphLevels) < indentation { - continue + if pageData.Tasks[i].Index == taskData.ParentIndex { + break } - if pageData.Tasks[i].ParentIndex == taskData.ParentIndex { - pageData.Tasks[i].GraphLevels[indentation-1] = 2 + if len(pageData.Tasks[i].GraphLevels) < indentation { break } - if pageData.Tasks[i].Index == taskData.ParentIndex { + if pageData.Tasks[i].ParentIndex == taskData.ParentIndex { + pageData.Tasks[i].GraphLevels[indentation-1] = 2 break }