OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 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 frontend |
| 6 |
| 7 import ( |
| 8 "github.com/luci/luci-go/milo/buildsource" |
| 9 "github.com/luci/luci-go/server/router" |
| 10 "github.com/luci/luci-go/server/templates" |
| 11 ) |
| 12 |
| 13 // LogHandler is responsible for taking a universal build ID and rendering the |
| 14 // build page (defined in ./appengine/templates/pages/log.html). |
| 15 func LogHandler(c *router.Context, buildID buildsource.ID, logname string) { |
| 16 log, closed, err := buildID.GetLog(c.Context, logname) |
| 17 if err != nil { |
| 18 ErrorHandler(c, err) |
| 19 } else { |
| 20 templates.MustRender(c.Context, c.Writer, "pages/log.html", temp
lates.Args{ |
| 21 "Log": log, |
| 22 "Closed": closed, |
| 23 }) |
| 24 } |
| 25 } |
OLD | NEW |