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

Unified Diff: milo/appengine/settings/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/settings/html.go
diff --git a/milo/appengine/settings/html.go b/milo/appengine/settings/html.go
index 27755e59e0250192b98eb9f91af649a68dd25913..e1dcfe2e0d5379ab6623c2d667f3eb03f16fce9b 100644
--- a/milo/appengine/settings/html.go
+++ b/milo/appengine/settings/html.go
@@ -10,45 +10,11 @@ import (
"github.com/julienschmidt/httprouter"
"golang.org/x/net/context"
- "github.com/luci/luci-go/server/auth/xsrf"
"github.com/luci/luci-go/server/templates"
)
-// Settings - Container for html methods for settings.
-type Settings struct{}
-
-// GetTemplateName - Implements a Theme, template is constant.
-func (s Settings) GetTemplateName(t Theme) string {
- return "settings.html"
-}
-
-// Render renders both the build page and the log.
-func (s Settings) Render(c context.Context, r *http.Request, p httprouter.Params) (*templates.Args, error) {
- result, err := getSettings(c, r)
- if err != nil {
- return nil, err
- }
-
- token, err := xsrf.Token(c)
- if err != nil {
- return nil, err
- }
-
- args := &templates.Args{
- "Settings": result,
- "XsrfToken": token,
- }
- return args, nil
-}
-
-// ViewConfigs - Container for viewing the current set of luci-configs.
-type ViewConfigs struct{}
-
-func (s ViewConfigs) GetTemplateName(t Theme) string {
- return "configs.html"
-}
-
-func (s ViewConfigs) Render(c context.Context, r *http.Request, p httprouter.Params) (*templates.Args, error) {
+// ConfigsHandler renders the page showing the currently loaded set of luci-configs.
+func ConfigsHandler(c context.Context, r *http.Request, p httprouter.Params) (*templates.Args, error) {
projects, err := GetAllProjects(c)
if err != nil {
return nil, err

Powered by Google App Engine
This is Rietveld 408576698