Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(135)

Side by Side Diff: milo/frontend/view_build.go

Issue 2977863002: [milo] Refactor all html knowledge out of backends. (Closed)
Patch Set: now with case insensitivity Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « milo/frontend/routes_test.go ('k') | milo/frontend/view_builder.go » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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 // BuildHandler is responsible for taking a universal build ID and rendering the
14 // build page (defined in ./appengine/templates/pages/build.html).
15 func BuildHandler(c *router.Context, buildID buildsource.ID) {
16 build, err := buildID.Get(c.Context)
17 // TODO(iannucci, hinoka): make MiloBuild refer to annotation stream by
18 // host/prefix/path instead of by directly pulling it. Do all annotation
19 // stream rendering in the frontend.
20 if err != nil {
21 ErrorHandler(c, err)
22 } else {
23 templates.MustRender(c.Context, c.Writer, "pages/build.html", te mplates.Args{
24 "Build": build,
25 })
26 }
27 }
OLDNEW
« no previous file with comments | « milo/frontend/routes_test.go ('k') | milo/frontend/view_builder.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698