diff options
| author | Taras Madan <tarasmadan@google.com> | 2024-06-18 11:43:54 +0200 |
|---|---|---|
| committer | Taras Madan <tarasmadan@google.com> | 2024-06-20 09:22:00 +0000 |
| commit | 99e56cfbc20592aa8bc1bd010d73eba241351b8d (patch) | |
| tree | f9713a8309a3a4c169b98302c046bf54dd1938af | |
| parent | da7439a87ada53c4aa2ce9da7c20f827d842ffe1 (diff) | |
dashboard/app/graph: generalize histogram
| -rw-r--r-- | dashboard/app/graph_histogram.html (renamed from dashboard/app/graph_found_bugs.html) | 2 | ||||
| -rw-r--r-- | dashboard/app/graphs.go | 8 |
2 files changed, 6 insertions, 4 deletions
diff --git a/dashboard/app/graph_found_bugs.html b/dashboard/app/graph_histogram.html index 4bf29434b..930d7b912 100644 --- a/dashboard/app/graph_found_bugs.html +++ b/dashboard/app/graph_histogram.html @@ -8,7 +8,7 @@ Number of found bugs per month. <!doctype html> <html> <head> - <title>{{.Header.Namespace}} bugs found per month</title> + <title>{{.Title}}</title> {{template "head" .Header}} <script type="text/javascript" src="https://www.google.com/jsapi"></script> diff --git a/dashboard/app/graphs.go b/dashboard/app/graphs.go index e5d9412f8..f2c991db7 100644 --- a/dashboard/app/graphs.go +++ b/dashboard/app/graphs.go @@ -26,7 +26,8 @@ type uiBugLifetimesPage struct { Lifetimes []uiBugLifetime } -type uiReportedBugsPage struct { +type uiHistogramPage struct { + Title string Header *uiHeader Graph *uiGraph } @@ -178,11 +179,12 @@ func handleFoundBugsGraph(c context.Context, w http.ResponseWriter, r *http.Requ if err != nil { return err } - data := &uiReportedBugsPage{ + data := &uiHistogramPage{ + Title: hdr.Namespace + " bugs found per month", Header: hdr, Graph: createFoundBugs(c, bugs), } - return serveTemplate(w, "graph_found_bugs.html", data) + return serveTemplate(w, "graph_histogram.html", data) } func loadGraphBugs(c context.Context, ns string) ([]*Bug, error) { |
