aboutsummaryrefslogtreecommitdiffstats
path: root/dashboard/api/api.go
diff options
context:
space:
mode:
authorAleksandr Nogikh <nogikh@google.com>2025-11-28 18:08:15 +0100
committerAleksandr Nogikh <nogikh@google.com>2025-12-29 10:47:28 +0000
commit4086874033ecb76c219de0caf61b4c285c6d0e95 (patch)
tree5e31e73c15a0e390aaf7dc51e865bc7071457c2e /dashboard/api/api.go
parentba994aabc89d9006610a4c6e1752eeb0b639242c (diff)
dashboard: extend bug's JSON representation
Add status, crash, fix, close and commit dates.
Diffstat (limited to 'dashboard/api/api.go')
-rw-r--r--dashboard/api/api.go28
1 files changed, 18 insertions, 10 deletions
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"`
}