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

Unified Diff: milo/appengine/frontend/frontpage.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/frontend/frontpage.go
diff --git a/milo/appengine/frontend/frontpage.go b/milo/appengine/frontend/frontpage.go
index 6cf6e8edaa63733922e680bc4d57e70d3a1a9534..df90dc463a37f65191844f9972362f1e62b6eb15 100644
--- a/milo/appengine/frontend/frontpage.go
+++ b/milo/appengine/frontend/frontpage.go
@@ -19,13 +19,7 @@ import (
"github.com/luci/luci-go/milo/appengine/settings"
)
-type frontpage struct{}
-
-func (f frontpage) GetTemplateName(t settings.Theme) string {
- return "frontpage.html"
-}
-
-func (f frontpage) Render(c context.Context, r *http.Request, p httprouter.Params) (*templates.Args, error) {
+func frontpageHandler(c context.Context, r *http.Request, p httprouter.Params) (*templates.Args, error) {
fp := resp.FrontPage{}
var mBuildbot, mBuildbucket *resp.CIService
@@ -48,10 +42,7 @@ func (f frontpage) Render(c context.Context, r *http.Request, p httprouter.Param
fp.CIServices = append(fp.CIServices, *mBuildbot)
return &templates.Args{"frontpage": fp}, nil
}
-
-type testableFrontpage struct{ frontpage }
-
-func (l testableFrontpage) TestData() []settings.TestBundle {
+func frontpageTestData() []settings.TestBundle {
data := &templates.Args{
"frontpage": resp.FrontPage{
CIServices: []resp.CIService{

Powered by Google App Engine
This is Rietveld 408576698