diff options
| author | Aleksandr Nogikh <nogikh@google.com> | 2025-03-11 21:38:10 +0100 |
|---|---|---|
| committer | Aleksandr Nogikh <nogikh@google.com> | 2025-03-11 21:04:55 +0000 |
| commit | ee70e6dbc377b7957fe85c173da580f033ee93a3 (patch) | |
| tree | b5b30a5a6af477b1de5c4775f51e9efcef71d4ed /syz-cluster/dashboard | |
| parent | f9a86f79173ee73cd60ab4b2ff04d49764e53644 (diff) | |
syz-cluster: display and filter by Cc list
For each series, display the Cc'd email list and let users filter the
patch series list by those addresses.
Diffstat (limited to 'syz-cluster/dashboard')
| -rw-r--r-- | syz-cluster/dashboard/handler.go | 11 | ||||
| -rw-r--r-- | syz-cluster/dashboard/templates/index.html | 1 | ||||
| -rw-r--r-- | syz-cluster/dashboard/templates/series.html | 8 |
3 files changed, 17 insertions, 3 deletions
diff --git a/syz-cluster/dashboard/handler.go b/syz-cluster/dashboard/handler.go index 2df0ed37f..c20d2225f 100644 --- a/syz-cluster/dashboard/handler.go +++ b/syz-cluster/dashboard/handler.go @@ -79,11 +79,16 @@ func (h *dashboardHandler) seriesList(w http.ResponseWriter, r *http.Request) er type MainPageData struct { // It's probably not the best idea to expose db entities here, // but so far redefining the entity would just duplicate the code. - List []*db.SeriesWithSession + List []*db.SeriesWithSession + Filter db.SeriesFilter + } + data := MainPageData{ + Filter: db.SeriesFilter{ + Cc: r.FormValue("cc"), + }, } - var data MainPageData var err error - data.List, err = h.seriesRepo.ListLatest(r.Context(), time.Time{}, 0) + data.List, err = h.seriesRepo.ListLatest(r.Context(), data.Filter, time.Time{}, 0) if err != nil { return fmt.Errorf("failed to query the list: %w", err) } diff --git a/syz-cluster/dashboard/templates/index.html b/syz-cluster/dashboard/templates/index.html index d3e60cfce..fb8fde0f3 100644 --- a/syz-cluster/dashboard/templates/index.html +++ b/syz-cluster/dashboard/templates/index.html @@ -1,4 +1,5 @@ {{define "content"}} + {{if .Filter.Cc}}<div class="alert alert-dark"><b>Filter: Cc={{.Filter.Cc}}</b></div>{{end}} <table class="table"> <thead class="thead-light"> <tr> diff --git a/syz-cluster/dashboard/templates/series.html b/syz-cluster/dashboard/templates/series.html index c160c0a71..5d7ba6693 100644 --- a/syz-cluster/dashboard/templates/series.html +++ b/syz-cluster/dashboard/templates/series.html @@ -55,6 +55,14 @@ <th>Version</th> <td>{{.Version}}</td> </tr> + <tr> + <th>Cc</th> + <td> + {{range .Cc}} + <a href="/?cc={{.}}">{{.}}</a> + {{end}} + </td> + </tr> </tbody> </table> |
