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

Side by Side Diff: milo/job_source/buildbucket/html.go

Issue 2949783002: [milo] appengine/* -> * (Closed)
Patch Set: rebase Created 3 years, 6 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
OLDNEW
1 // Copyright 2016 The LUCI Authors. All rights reserved. 1 // Copyright 2016 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 buildbucket 5 package buildbucket
6 6
7 import ( 7 import (
8 "errors" 8 "errors"
9 "net/http" 9 "net/http"
10 10
11 "golang.org/x/net/context" 11 "golang.org/x/net/context"
12 12
13 "github.com/julienschmidt/httprouter" 13 "github.com/julienschmidt/httprouter"
14 » "github.com/luci/luci-go/milo/appengine/common" 14 » "github.com/luci/luci-go/milo/common"
15 "github.com/luci/luci-go/server/router" 15 "github.com/luci/luci-go/server/router"
16 "github.com/luci/luci-go/server/templates" 16 "github.com/luci/luci-go/server/templates"
17 ) 17 )
18 18
19 func parseBuilderQuery(c context.Context, r *http.Request, p httprouter.Params) ( 19 func parseBuilderQuery(c context.Context, r *http.Request, p httprouter.Params) (
20 query builderQuery, err error) { 20 query builderQuery, err error) {
21 21
22 query.Bucket = p.ByName("bucket") 22 query.Bucket = p.ByName("bucket")
23 if query.Bucket == "" { 23 if query.Bucket == "" {
24 err = errors.New("No bucket") 24 err = errors.New("No bucket")
(...skipping 25 matching lines...) Expand all
50 result, err := builderImpl(c.Context, query) 50 result, err := builderImpl(c.Context, query)
51 if err != nil { 51 if err != nil {
52 common.ErrorPage(c, http.StatusInternalServerError, err.Error()) 52 common.ErrorPage(c, http.StatusInternalServerError, err.Error())
53 return 53 return
54 } 54 }
55 55
56 templates.MustRender(c.Context, c.Writer, "pages/builder.html", template s.Args{ 56 templates.MustRender(c.Context, c.Writer, "pages/builder.html", template s.Args{
57 "Builder": result, 57 "Builder": result,
58 }) 58 })
59 } 59 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698