| OLD | NEW |
| 1 // Copyright 2015 The LUCI Authors. All rights reserved. | 1 // Copyright 2015 The LUCI Authors. All rights reserved. |
| 2 // Use of this source code is governed under the Apache License, Version 2.0 | 2 // Use of this source code is governed under the Apache License, Version 2.0 |
| 3 // that can be found in the LICENSE file. | 3 // that can be found in the LICENSE file. |
| 4 | 4 |
| 5 package ui | 5 package ui |
| 6 | 6 |
| 7 import ( | 7 import ( |
| 8 "net/http" | |
| 9 | |
| 10 "github.com/julienschmidt/httprouter" | |
| 11 "golang.org/x/net/context" | |
| 12 | |
| 13 "github.com/luci/luci-go/common/clock" | 8 "github.com/luci/luci-go/common/clock" |
| 9 "github.com/luci/luci-go/server/router" |
| 14 "github.com/luci/luci-go/server/templates" | 10 "github.com/luci/luci-go/server/templates" |
| 15 ) | 11 ) |
| 16 | 12 |
| 17 func projectPage(c context.Context, w http.ResponseWriter, r *http.Request, p ht
tprouter.Params) { | 13 func projectPage(c *router.Context) { |
| 18 » projectID := p.ByName("ProjectID") | 14 » projectID := c.Params.ByName("ProjectID") |
| 19 » jobs, err := config(c).Engine.GetProjectCronJobs(c, projectID) | 15 » jobs, err := config(c.Context).Engine.GetProjectCronJobs(c.Context, proj
ectID) |
| 20 if err != nil { | 16 if err != nil { |
| 21 panic(err) | 17 panic(err) |
| 22 } | 18 } |
| 23 » templates.MustRender(c, w, "pages/project.html", map[string]interface{}{ | 19 » templates.MustRender(c.Context, c.Writer, "pages/project.html", map[stri
ng]interface{}{ |
| 24 "ProjectID": projectID, | 20 "ProjectID": projectID, |
| 25 » » "Jobs": convertToSortedCronJobs(jobs, clock.Now(c).UTC()), | 21 » » "Jobs": convertToSortedCronJobs(jobs, clock.Now(c.Context).
UTC()), |
| 26 }) | 22 }) |
| 27 } | 23 } |
| OLD | NEW |