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

Unified Diff: milo/appengine/console/html.go

Issue 2238883003: Milo: Use luci-cfg for defining projects and console view. (Closed) Base URL: https://chromium.googlesource.com/external/github.com/luci/luci-go@master
Patch Set: review Created 4 years, 4 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 | « milo/appengine/console/console.go ('k') | milo/appengine/frontend/app.yaml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: milo/appengine/console/html.go
diff --git a/milo/appengine/console/html.go b/milo/appengine/console/html.go
index e734b69989e1ffdb312c253d7b80259b33ea71f1..c482642d4d06e80b9ab394a23dae040f1a797b29 100644
--- a/milo/appengine/console/html.go
+++ b/milo/appengine/console/html.go
@@ -22,65 +22,18 @@ func (x Console) GetTemplateName(t settings.Theme) string {
return "console.html"
}
-type ConsoleDef struct {
- Name string
- Repository string
- Branch string
- // TODO(hinoka): Replace this with resp.BuilderRef when tmpBuilderRef is removed.
- Builders []tmpBuilderRef
-}
-
-// This is like a resp.BuilderRef, but the Categories are pipe deliminated strings.
-// This is so that it's easier to define inline here, and this will be deleted once
-// console definitions are moved to luci-cfg.
-type tmpBuilderRef struct {
- Module string
- Name string
- Category string
- ShortName string
-}
-
-// TODO(hinoka): Move all this into some sorta luci-config thing
-var chromiumConsoleDef = ConsoleDef{
- Name: "Chromium Main Waterfall",
- Repository: "https://chromium.googlesource.com/chromium/src",
- Branch: "master",
- Builders: []tmpBuilderRef{
- {"buildbot", "chromium/Android", "clobber", "an"},
- {"buildbot", "chromium/Linux x64", "clobber", "lx"},
- {"buildbot", "chromium/Mac", "clobber", "mc"},
- {"buildbot", "chromium/Win", "clobber|win", "32"},
- {"buildbot", "chromium/Win x64", "clobber|win", "64"},
- {"buildbot", "chromium.linux/Android Arm64 Builder (dbg)", "linux|android|arm", "db"},
- {"buildbot", "chromium.linux/Android Builder", "linux|android|x86", "rl"},
- {"buildbot", "chromium.linux/Android Builder (dbg)", "linux|android|x86", "db"},
- {"buildbot", "chromium.linux/Android Clang Builder (dbg)", "linux|android|clang", "db"},
- {"buildbot", "chromium.linux/Android Tests", "linux|android|tests", "db"},
- {"buildbot", "chromium.linux/Android Tests (dbg)", "linux|android|tests", "db"},
- {"buildbot", "chromium.linux/Blimp Linux (dbg)", "linux", "bl"},
- {"buildbot", "chromium.linux/Cast Android (dbg)", "linux|cast", "an"},
- {"buildbot", "chromium.linux/Cast Linux", "linux|cast", "lx"},
- {"buildbot", "chromium.linux/Linux Builder", "linux|build", "rl"},
- {"buildbot", "chromium.linux/Linux Builder (dbg)", "linux|build", "d6"},
- {"buildbot", "chromium.linux/Linux Builder (dbg)(32)", "linux|build", "d3"},
- {"buildbot", "chromium.linux/Linux Tests", "linux|test", "rl"},
- {"buildbot", "chromium.linux/Linux Tests (dbg)(1)", "linux|test", "d1"},
- {"buildbot", "chromium.linux/Linux Tests (dbg)(1)(32)", "linux|test", "d2"},
- },
-}
-
// Render renders the console page.
func (x Console) Render(c context.Context, r *http.Request, p httprouter.Params) (*templates.Args, error) {
- // Ignore, hardcoded for demo
- name := p.ByName("name")
- if name == "" {
+ project := p.ByName("project")
+ if project == "" {
return nil, &miloerror.Error{
- Message: "No name",
+ Message: "Missing project",
Code: http.StatusBadRequest,
}
}
+ name := p.ByName("name")
- result, err := console(c, &chromiumConsoleDef)
+ result, err := console(c, project, name)
if err != nil {
return nil, err
}
« no previous file with comments | « milo/appengine/console/console.go ('k') | milo/appengine/frontend/app.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698