diff options
| author | Desmond Cheong Zhi Xi <desmondcheongzx@gmail.com> | 2021-06-16 19:24:11 +0800 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2021-06-24 09:13:34 +0200 |
| commit | 61aa77c4973dad8a2c275ce52a554889e9c31a01 (patch) | |
| tree | 3b728d12300fc18b589fb2f9642bd791220aeab5 | |
| parent | fe4ab389eae32291227364d90a057178ae96ac56 (diff) | |
dashboard/app: add last activity info to bug list
Last activity information is only added to the bug list on the main
page. This allows users to quickly scan the bug list to identify bugs
that are receiving attention and those that are neglected.
| -rw-r--r-- | CONTRIBUTORS | 1 | ||||
| -rw-r--r-- | dashboard/app/main.go | 6 | ||||
| -rw-r--r-- | dashboard/app/templates.html | 6 |
3 files changed, 13 insertions, 0 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS index ac6f8695d..e22345915 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -92,3 +92,4 @@ Microsoft Corporation Mickaël Salaün ANSSI Vincent Dagonneau +Desmond Cheong Zhi Xi
\ No newline at end of file diff --git a/dashboard/app/main.go b/dashboard/app/main.go index e531b808a..b7d2ed69f 100644 --- a/dashboard/app/main.go +++ b/dashboard/app/main.go @@ -136,6 +136,7 @@ type uiBugGroup struct { ShowStatus bool ShowIndex int Bugs []*uiBug + DispLastAct bool } type uiJobList struct { @@ -164,6 +165,7 @@ type uiBug struct { PatchedOn []string MissingOn []string NumManagers int + LastActivity time.Time } type uiCrash struct { @@ -230,6 +232,9 @@ func handleMain(c context.Context, w http.ResponseWriter, r *http.Request) error if err != nil { return err } + for _, group := range groups { + group.DispLastAct = true + } data := &uiMainPage{ Header: hdr, Decommissioned: config.Namespaces[hdr.Namespace].Decommissioned, @@ -846,6 +851,7 @@ func createUIBug(c context.Context, bug *Bug, state *ReportingState, managers [] ExternalLink: link, CreditEmail: creditEmail, NumManagers: len(managers), + LastActivity: bug.LastActivity, } updateBugBadness(c, uiBug) if len(bug.Commits) != 0 { diff --git a/dashboard/app/templates.html b/dashboard/app/templates.html index 7a26bb275..dc9e8869d 100644 --- a/dashboard/app/templates.html +++ b/dashboard/app/templates.html @@ -98,6 +98,9 @@ Use of this source code is governed by Apache 2 LICENSE that can be found in the <th><a onclick="return sortTable(this, 'Count', numSort)" href="#">Count</a></th> <th><a onclick="return sortTable(this, 'Last', timeSort)" href="#">Last</a></th> <th><a onclick="return sortTable(this, 'Reported', timeSort)" href="#">Reported</a></th> + {{if $.DispLastAct}} + <th><a onclick="return sortTable(this, 'Last activity', timeSort, desc=true)" href="#">Last activity</a></th> + {{end}} {{if $.ShowPatch}} <th><a onclick="return sortTable(this, 'Closed', timeSort)" href="#">Closed</a></th> <th><a onclick="return sortTable(this, 'Patch', textSort)" href="#">Patch</a></th> @@ -127,6 +130,9 @@ Use of this source code is governed by Apache 2 LICENSE that can be found in the {{formatLateness $.Now $b.ReportedTime}} {{end}} </td> + {{if $.DispLastAct}} + <td class="stat">{{formatLateness $.Now $b.LastActivity}}</td> + {{end}} {{if $.ShowPatch}} <td class="stat">{{formatLateness $.Now $b.ClosedTime}}</td> <td class="commit_list">{{template "fix_commits" $b.Commits}}</td> |
