| Index: milo/appengine/swarming/html.go
|
| diff --git a/milo/appengine/swarming/html.go b/milo/appengine/swarming/html.go
|
| index fa17ac78956229551da1ee66b9b1b11d197c5375..88b2774ce3c442a4add04e5d721ba705008bcf8e 100644
|
| --- a/milo/appengine/swarming/html.go
|
| +++ b/milo/appengine/swarming/html.go
|
| @@ -12,7 +12,6 @@ import (
|
| "golang.org/x/net/context"
|
| "google.golang.org/api/googleapi"
|
|
|
| - "github.com/luci/luci-go/milo/appengine/settings"
|
| "github.com/luci/luci-go/milo/common/miloerror"
|
| "github.com/luci/luci-go/server/templates"
|
| )
|
| @@ -50,9 +49,6 @@ func getSwarmingService(c context.Context, host string) (swarmingService, error)
|
| }
|
| }
|
|
|
| -// Log is for fetching logs from swarming.
|
| -type Log struct{}
|
| -
|
| // Build is for deciphering recipe builds from swarming based off of logs.
|
| type Build struct {
|
| // bl is the buildLoader to use. A zero value is suitable for production, but
|
| @@ -60,13 +56,8 @@ type Build struct {
|
| bl buildLoader
|
| }
|
|
|
| -// GetTemplateName for Log returns the template name for log pages.
|
| -func (l Log) GetTemplateName(t settings.Theme) string {
|
| - return "log.html"
|
| -}
|
| -
|
| -// Render writes the build log to the given response writer.
|
| -func (l Log) Render(c context.Context, r *http.Request, p httprouter.Params) (*templates.Args, error) {
|
| +// LogHandler writes the build log to the given response writer.
|
| +func LogHandler(c context.Context, r *http.Request, p httprouter.Params) (*templates.Args, error) {
|
| id := p.ByName("id")
|
| if id == "" {
|
| return nil, &miloerror.Error{
|
| @@ -99,13 +90,12 @@ func (l Log) Render(c context.Context, r *http.Request, p httprouter.Params) (*t
|
| return args, nil
|
| }
|
|
|
| -// GetTemplateName for Build returns the template name for build pages.
|
| -func (b Build) GetTemplateName(t settings.Theme) string {
|
| - return "build.html"
|
| +func BuildHandler(c context.Context, r *http.Request, p httprouter.Params) (*templates.Args, error) {
|
| + return (Build{}).handler(c, r, p)
|
| }
|
|
|
| // Render renders both the build page and the log.
|
| -func (b Build) Render(c context.Context, r *http.Request, p httprouter.Params) (*templates.Args, error) {
|
| +func (b Build) handler(c context.Context, r *http.Request, p httprouter.Params) (*templates.Args, error) {
|
| // Get the swarming ID
|
| id := p.ByName("id")
|
| if id == "" {
|
|
|