From 3097c1c27c156dde5dae8af2d6824c24f3f671fa Mon Sep 17 00:00:00 2001 From: Aleksandr Nogikh Date: Fri, 21 Apr 2023 15:11:17 +0200 Subject: dashbord: dispaly fix bisection attempts as a job list By displaying it as a table we're missing job logs, which are actually the most significant piece of information there. --- dashboard/app/bug.html | 1 - dashboard/app/main.go | 18 ++++++++++-------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/dashboard/app/bug.html b/dashboard/app/bug.html index 23f2c6689..141059358 100644 --- a/dashboard/app/bug.html +++ b/dashboard/app/bug.html @@ -49,7 +49,6 @@ Page with details about a single bug.
{{if eq $item.Type "bug_list"}}{{template "bug_list" $item.Value}}{{end}} {{if eq $item.Type "job_list"}}{{template "job_list" $item.Value}}{{end}} - {{if eq $item.Type "crash_list"}}{{template "crash_list" $item.Value}}{{end}} {{if eq $item.Type "discussion_list"}}{{template "discussion_list" $item.Value}}{{end}}
diff --git a/dashboard/app/main.go b/dashboard/app/main.go index 09cc0bb12..0f5d7d993 100644 --- a/dashboard/app/main.go +++ b/dashboard/app/main.go @@ -251,7 +251,6 @@ type uiBugPage struct { const ( sectionBugList = "bug_list" sectionJobList = "job_list" - sectionCrashList = "crash_list" sectionDiscussionList = "discussion_list" ) @@ -799,8 +798,11 @@ func handleBug(c context.Context, w http.ResponseWriter, r *http.Request) error if len(fixBisections) != 0 { data.Sections = append(data.Sections, &uiCollapsible{ Title: fmt.Sprintf("Fix bisection attempts (%d)", len(fixBisections)), - Type: sectionCrashList, - Value: &uiCrashTable{Crashes: fixBisections}, + Type: sectionJobList, + Value: &uiJobList{ + PerBug: true, + Jobs: fixBisections, + }, }) } } @@ -1577,14 +1579,14 @@ func linkifyReport(report []byte, repo, commit string) template.HTML { var sourceFileRe = regexp.MustCompile("( |\t|\n)([a-zA-Z0-9/_.-]+\\.(?:h|c|cc|cpp|s|S|go|rs)):([0-9]+)( |!|\\)|\t|\n)") -func loadFixBisectionsForBug(c context.Context, bug *Bug) ([]*uiCrash, error) { +func loadFixBisectionsForBug(c context.Context, bug *Bug) ([]*uiJob, error) { bugKey := bug.key(c) - jobs, _, err := queryJobsForBug(c, bugKey, JobBisectFix) + jobs, jobKeys, err := queryJobsForBug(c, bugKey, JobBisectFix) if err != nil { return nil, err } - var results []*uiCrash - for _, job := range jobs { + var results []*uiJob + for i, job := range jobs { crash, err := queryCrashForJob(c, job, bugKey) if err != nil { return nil, err @@ -1596,7 +1598,7 @@ func loadFixBisectionsForBug(c context.Context, bug *Bug) ([]*uiCrash, error) { if err != nil { return nil, err } - results = append(results, makeUICrash(crash, build)) + results = append(results, makeUIJob(job, jobKeys[i], bug, crash, build)) } return results, nil } -- cgit mrf-deployment