Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(854)

Unified Diff: fuzzer/go/fuzzer-fe/main.go

Issue 1662373002: Add UI to filter fuzzes based on tags. (Closed) Base URL: https://skia.googlesource.com/buildbot@add-asan
Patch Set: remove conflicting status-sk elements Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « fuzzer/go/frontend/data/report.go ('k') | fuzzer/res/imp/README.md » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fuzzer/go/fuzzer-fe/main.go
diff --git a/fuzzer/go/fuzzer-fe/main.go b/fuzzer/go/fuzzer-fe/main.go
index 06308f781b5c6e4e3b5c1103f98b9a14b43127dd..a0a049fc7c42b215a84e146fec59386b621eeca9 100644
--- a/fuzzer/go/fuzzer-fe/main.go
+++ b/fuzzer/go/fuzzer-fe/main.go
@@ -102,7 +102,11 @@ func reloadTemplates() {
filepath.Join(*resourcesDir, "templates/overview.html"),
filepath.Join(*resourcesDir, "templates/header.html"),
))
- detailsTemplate = template.Must(template.ParseFiles(
+ detailsTemplate = template.New("details.html")
+ // Allows this template to have Polymer binding in it and go template markup. The go templates
+ // have been changed to be {%.Thing%} instead of {{.Thing}}
+ detailsTemplate.Delims("{%", "%}")
+ detailsTemplate = template.Must(detailsTemplate.ParseFiles(
filepath.Join(*resourcesDir, "templates/details.html"),
filepath.Join(*resourcesDir, "templates/header.html"),
))
@@ -210,7 +214,7 @@ func runServer() {
r.HandleFunc(OAUTH2_CALLBACK_PATH, login.OAuth2CallbackHandler)
r.HandleFunc("/", indexHandler)
- r.HandleFunc("/category/{category:[a-z_]+}", summaryPageHandler)
+ r.HandleFunc("/category/{category:[a-z_]+}", detailsPageHandler)
r.HandleFunc("/category/{category:[a-z_]+}/name/{name}", detailsPageHandler)
r.HandleFunc("/category/{category:[a-z_]+}/file/{file}", detailsPageHandler)
r.HandleFunc("/category/{category:[a-z_]+}/file/{file}/func/{function}", detailsPageHandler)
@@ -222,7 +226,7 @@ func runServer() {
r.HandleFunc("/json/details", detailsJSONHandler)
r.HandleFunc("/json/status", statusJSONHandler)
r.HandleFunc(`/fuzz/{category:[a-z_]+}/{name:[0-9a-f]+}`, fuzzHandler)
- r.HandleFunc(`/metadata/{category:[a-z_]+}/{name:[0-9a-f]+_(debug|release)\.(err|dump)}`, metadataHandler)
+ r.HandleFunc(`/metadata/{category:[a-z_]+}/{name:[0-9a-f]+_(debug|release)\.(err|dump|asan)}`, metadataHandler)
r.HandleFunc("/fuzz_count", fuzzCountHandler)
r.HandleFunc("/newBug", newBugHandler)
@@ -278,7 +282,7 @@ func summaryPageHandler(w http.ResponseWriter, r *http.Request) {
}
}
-type fuzzOverview struct {
+type countSummary struct {
Category string `json:"category"`
CategoryDisplay string `json:"categoryDisplay"`
TotalBad int `json:"totalBadCount"`
@@ -302,10 +306,10 @@ func summaryJSONHandler(w http.ResponseWriter, r *http.Request) {
}
}
-func getOverview() []fuzzOverview {
- overviews := make([]fuzzOverview, 0, len(fcommon.FUZZ_CATEGORIES))
+func getOverview() []countSummary {
+ overviews := make([]countSummary, 0, len(fcommon.FUZZ_CATEGORIES))
for _, cat := range fcommon.FUZZ_CATEGORIES {
- o := fuzzOverview{
+ o := countSummary{
CategoryDisplay: fcommon.PrettifyCategory(cat),
Category: cat,
}
@@ -350,7 +354,7 @@ func detailsJSONHandler(w http.ResponseWriter, r *http.Request) {
return
}
- var f data.FileFuzzReport
+ var f data.FuzzReportTree
if name != "" {
var err error
if f, err = data.FindFuzzDetailForFuzz(category, name); err != nil {
@@ -451,13 +455,15 @@ func statusJSONHandler(w http.ResponseWriter, r *http.Request) {
Pending: nil,
}
- s.Current.Hash = config.FrontEnd.SkiaVersion.Hash
- s.Current.Author = config.FrontEnd.SkiaVersion.Author
- if versionWatcher != nil {
- if pending := versionWatcher.PendingVersion; pending != nil {
- s.Pending = &commit{
- Hash: pending.Hash,
- Author: pending.Author,
+ if config.FrontEnd.SkiaVersion != nil {
+ s.Current.Hash = config.FrontEnd.SkiaVersion.Hash
+ s.Current.Author = config.FrontEnd.SkiaVersion.Author
+ if versionWatcher != nil {
+ if pending := versionWatcher.PendingVersion; pending != nil {
+ s.Pending = &commit{
+ Hash: pending.Hash,
+ Author: pending.Author,
+ }
}
}
}
« no previous file with comments | « fuzzer/go/frontend/data/report.go ('k') | fuzzer/res/imp/README.md » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698