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

Unified Diff: appengine/chromium_build_stats/default/app.go

Issue 561633002: chromium-build-stats: show ninja_log in table format (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: fix typo Created 6 years, 3 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 | « no previous file | appengine/chromium_build_stats/default/ninja_log.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: appengine/chromium_build_stats/default/app.go
diff --git a/appengine/chromium_build_stats/default/app.go b/appengine/chromium_build_stats/default/app.go
index a10e070fd511595c47d81252bdc3f55c70c08e0f..10366d2583b82ad9b2a62ceb2f98c8de69ca2993 100644
--- a/appengine/chromium_build_stats/default/app.go
+++ b/appengine/chromium_build_stats/default/app.go
@@ -8,14 +8,42 @@ package chromiumbuildstats
import (
"fmt"
"net/http"
+ "strings"
+)
+
+const (
+ topHTML = `
+<html>
+<head><title>chromium-build-stats</title></head>
+<body>
+<h1>chromium-build-stats</h1>
+<form action="/">
+<label for="gsuri">gs URI:</label><input type="text" name="gsuri" />
+<input type="submit" value="submit"><input type="reset">
+</form>
+
+<hr />
+See <a href="https://docs.google.com/a/chromium.org/document/d/16TdPTIIZbtAarXZIMJdiT9CePG5WYCrdxm5u9UuHXNY/edit?pli=1#heading=h.xgjl2srtytjt">design doc</a>
+</body>
+</html>
+`
)
func init() {
http.HandleFunc("/", handler)
+
}
-func handler(w http.ResponseWriter, r *http.Request) {
+func handler(w http.ResponseWriter, req *http.Request) {
+ gsuri := req.FormValue("gsuri")
+ if gsuri != "" {
+ if strings.HasPrefix(gsuri, "gs://chrome-goma-log") {
+ http.Redirect(w, req, "/ninja_log"+strings.TrimPrefix(gsuri, "gs://chrome-goma-log"), http.StatusSeeOther)
+ return
+ }
+ http.NotFound(w, req)
+ return
+ }
w.Header().Set("Content-Type", "text/html")
- fmt.Fprintf(w, `<p>Under construction.
-See <a href="https://docs.google.com/a/chromium.org/document/d/16TdPTIIZbtAarXZIMJdiT9CePG5WYCrdxm5u9UuHXNY/edit?pli=1#heading=h.xgjl2srtytjt">design doc</a>`)
+ fmt.Fprintf(w, topHTML)
}
« no previous file with comments | « no previous file | appengine/chromium_build_stats/default/ninja_log.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698