Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2015 The LUCI Authors. All rights reserved. | |
| 2 // Use of this source code is governed under the Apache License, Version 2.0 | |
| 3 // that can be found in the LICENSE file. | |
| 4 | |
| 5 package common | |
| 6 | |
| 7 import ( | |
| 8 "net/http" | |
| 9 | |
| 10 "github.com/luci/luci-go/server/router" | |
| 11 "github.com/luci/luci-go/server/templates" | |
| 12 ) | |
| 13 | |
| 14 // ConfigsHandler renders the page showing the currently loaded set of luci-conf igs. | |
| 15 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.
| |
| 16 projects, err := GetAllProjects(c.Context) | |
| 17 if err != nil { | |
| 18 ErrorPage( | |
| 19 c, http.StatusInternalServerError, | |
| 20 "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.
| |
| 21 return | |
| 22 } | |
| 23 | |
| 24 templates.MustRender(c.Context, c.Writer, "pages/config.html", templates .Args{ | |
| 25 "Projects": projects, | |
| 26 }) | |
| 27 } | |
| OLD | NEW |