Chromium Code Reviews| Index: appengine/cmd/cron/ui/index.go |
| diff --git a/appengine/cmd/cron/ui/index.go b/appengine/cmd/cron/ui/index.go |
| index da80ad745253df7f24037d73bb05dea153663316..c22ba660b2af0e50c5187a1f45b9261c9651aafb 100644 |
| --- a/appengine/cmd/cron/ui/index.go |
| +++ b/appengine/cmd/cron/ui/index.go |
| @@ -5,21 +5,17 @@ |
| package ui |
| import ( |
| - "net/http" |
| - |
| - "github.com/julienschmidt/httprouter" |
| - "golang.org/x/net/context" |
| - |
| "github.com/luci/luci-go/common/clock" |
| + "github.com/luci/luci-go/server/router" |
| "github.com/luci/luci-go/server/templates" |
| ) |
| -func indexPage(c context.Context, w http.ResponseWriter, r *http.Request, p httprouter.Params) { |
| - jobs, err := config(c).Engine.GetAllCronJobs(c) |
| +func indexPage(c *router.Context) { |
| + jobs, err := config(c.Context).Engine.GetAllCronJobs(c.Context) |
|
iannucci
2016/06/13 19:23:28
wdyt about making router.Context embed context.Con
|
| if err != nil { |
| panic(err) |
| } |
| - templates.MustRender(c, w, "pages/index.html", map[string]interface{}{ |
| - "Jobs": convertToSortedCronJobs(jobs, clock.Now(c).UTC()), |
| + templates.MustRender(c.Context, c.Writer, "pages/index.html", map[string]interface{}{ |
| + "Jobs": convertToSortedCronJobs(jobs, clock.Now(c.Context).UTC()), |
| }) |
| } |