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

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

Issue 2748073006: Milo Refactor: Remove theme support (Closed)
Patch Set: Fix tests Created 3 years, 9 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
Index: milo/appengine/buildbot/html.go
diff --git a/milo/appengine/buildbot/html.go b/milo/appengine/buildbot/html.go
index b884e914f156b162c537d4492cd87209c343c3a4..9a49c0265ef360a05d6f838f7fdbb1c43a42821b 100644
--- a/milo/appengine/buildbot/html.go
+++ b/milo/appengine/buildbot/html.go
@@ -18,19 +18,8 @@ import (
"github.com/luci/luci-go/server/templates"
)
-// Build is the container struct for methods related to buildbot build pages.
-type Build struct{}
-
-// Builder is the container struct for methods related to buildbot builder pages.
-type Builder struct{}
-
-// GetTemplateName returns the template name for build pages.
-func (b Build) GetTemplateName(t settings.Theme) string {
- return "build.html"
-}
-
-// Render Render the buildbot build page.
-func (b Build) Render(c context.Context, r *http.Request, p httprouter.Params) (*templates.Args, error) {
+// BuildHandler Render the buildbot build page.
nodir 2017/03/16 17:42:51 renders?
hinoka 2017/03/17 20:00:21 Now it does
+func BuildHandler(c context.Context, r *http.Request, p httprouter.Params) (*templates.Args, error) {
master := p.ByName("master")
if master == "" {
return nil, &miloerror.Error{
@@ -73,15 +62,10 @@ func (b Build) Render(c context.Context, r *http.Request, p httprouter.Params) (
return args, nil
nodir 2017/03/16 17:42:51 without templates, I don't see why not render temp
hinoka 2017/03/17 20:00:21 Done.
}
-// GetTemplateName returns the template name for builder pages.
-func (b Builder) GetTemplateName(t settings.Theme) string {
- return "builder.html"
-}
-
-// Render renders the buildbot builder page.
+// BuilderHandler renders the buildbot builder page.
// Note: The builder html template contains self links to "?limit=123", which could
// potentially override any other request parameters set.
-func (b Builder) Render(c context.Context, r *http.Request, p httprouter.Params) (*templates.Args, error) {
+func BuilderHandler(c context.Context, r *http.Request, p httprouter.Params) (*templates.Args, error) {
master := p.ByName("master")
if master == "" {
return nil, &miloerror.Error{

Powered by Google App Engine
This is Rietveld 408576698