From 4086874033ecb76c219de0caf61b4c285c6d0e95 Mon Sep 17 00:00:00 2001 From: Aleksandr Nogikh Date: Fri, 28 Nov 2025 18:08:15 +0100 Subject: dashboard: extend bug's JSON representation Add status, crash, fix, close and commit dates. --- dashboard/api/api.go | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) (limited to 'dashboard/api/api.go') diff --git a/dashboard/api/api.go b/dashboard/api/api.go index 09dcf7690..cafdd170e 100644 --- a/dashboard/api/api.go +++ b/dashboard/api/api.go @@ -5,6 +5,8 @@ // All structures in this package are backwards compatible. package api +import "time" + const Version = 1 type BugGroup struct { @@ -20,11 +22,16 @@ type BugSummary struct { } type Bug struct { - Version int `json:"version"` - Title string `json:"title,omitempty"` - ID string `json:"id"` - FixCommits []Commit `json:"fix-commits,omitempty"` - CauseCommit *Commit `json:"cause-commit,omitempty"` + Version int `json:"version"` + Title string `json:"title,omitempty"` + ID string `json:"id"` + Status string `json:"status"` + FirstCrash time.Time `json:"first-crash"` + LastCrash time.Time `json:"last-crash"` + FixTime *time.Time `json:"fix-time,omitempty"` + CloseTime *time.Time `json:"close-time,omitempty"` + FixCommits []Commit `json:"fix-commits,omitempty"` + CauseCommit *Commit `json:"cause-commit,omitempty"` // Links to the discussions. Discussions []string `json:"discussions,omitempty"` Crashes []Crash `json:"crashes,omitempty"` @@ -45,9 +52,10 @@ type Crash struct { } type Commit struct { - Title string `json:"title"` - Link string `json:"link,omitempty"` - Hash string `json:"hash,omitempty"` - Repo string `json:"repo,omitempty"` - Branch string `json:"branch,omitempty"` + Title string `json:"title"` + Link string `json:"link,omitempty"` + Hash string `json:"hash,omitempty"` + Repo string `json:"repo,omitempty"` + Branch string `json:"branch,omitempty"` + Date *time.Time `json:"date,omitempty"` } -- cgit mrf-deployment