From 76821f5baf47294314823eb4df0e05ceb8242d74 Mon Sep 17 00:00:00 2001 From: Aleksandr Nogikh Date: Wed, 10 May 2023 19:35:52 +0200 Subject: dashboard: move job info to dashapi This is a quite generic information that can be useful not just for templating, but also for API calls. Reuse the already existing dashapi.Commit structure. --- dashboard/dashapi/dashapi.go | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) (limited to 'dashboard/dashapi/dashapi.go') diff --git a/dashboard/dashapi/dashapi.go b/dashboard/dashapi/dashapi.go index 4d5df7e9a..91b6a4a0d 100644 --- a/dashboard/dashapi/dashapi.go +++ b/dashboard/dashapi/dashapi.go @@ -113,6 +113,7 @@ type Commit struct { Recipients Recipients BugIDs []string // ID's extracted from Reported-by tags Date time.Time + Link string // set if the commit is a part of a reply } func (dash *Dashboard) UploadBuild(build *Build) error { @@ -833,6 +834,39 @@ const ( ReportBisectFix // Fix bisection result for an already reported bug. ) +type JobInfo struct { + Type JobType + Flags JobDoneFlags + Created time.Time + BugLink string + ExternalLink string + User string + Reporting string + Namespace string + Manager string + BugTitle string + BugID string + KernelAlias string + KernelCommit string + KernelCommitLink string + PatchLink string + Attempts int + Started time.Time + Finished time.Time + Duration time.Duration + CrashTitle string + CrashLogLink string + CrashReportLink string + LogLink string + ErrorLink string + ReproCLink string + ReproSyzLink string + Commit *Commit // for conclusive bisection + Commits []*Commit // for inconclusive bisection + Reported bool + TreeOrigin bool +} + func (dash *Dashboard) Query(method string, req, reply interface{}) error { if dash.logger != nil { dash.logger("API(%v): %#v", method, req) -- cgit mrf-deployment