Chromium Code Reviews| Index: milo/appengine/common/html.go |
| diff --git a/milo/appengine/common/html.go b/milo/appengine/common/html.go |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..e734ac2395c02c085a0cabca6b8cc62089502c0f |
| --- /dev/null |
| +++ b/milo/appengine/common/html.go |
| @@ -0,0 +1,27 @@ |
| +// Copyright 2015 The LUCI Authors. All rights reserved. |
| +// Use of this source code is governed under the Apache License, Version 2.0 |
| +// that can be found in the LICENSE file. |
| + |
| +package common |
| + |
| +import ( |
| + "net/http" |
| + |
| + "github.com/luci/luci-go/server/router" |
| + "github.com/luci/luci-go/server/templates" |
| +) |
| + |
| +// ConfigsHandler renders the page showing the currently loaded set of luci-configs. |
| +func ConfigsHandler(c *router.Context) { |
|
nodir
2017/03/17 20:47:58
this code is not common. It is used only in fronte
hinoka
2017/03/17 22:04:55
Done.
|
| + projects, err := GetAllProjects(c.Context) |
| + if err != nil { |
| + ErrorPage( |
| + c, http.StatusInternalServerError, |
| + "Error while getting projects : "+err.Error()) |
|
nodir
2017/03/17 20:47:57
remove space after "projects" before colon?
hinoka
2017/03/17 22:04:55
Done.
|
| + return |
| + } |
| + |
| + templates.MustRender(c.Context, c.Writer, "pages/config.html", templates.Args{ |
| + "Projects": projects, |
| + }) |
| +} |