Chromium Code Reviews| 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{ |