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

Side by Side Diff: milo/appengine/buildbot/html.go

Issue 2328733002: Milo: Add ?limit= support to builders (Closed)
Patch Set: Regenerate Created 4 years, 1 month 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/appengine/buildbot/builder.go ('k') | milo/appengine/buildbucket/html.go » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 buildbot 5 package buildbot
6 6
7 import ( 7 import (
8 "fmt" 8 "fmt"
9 "net/http" 9 "net/http"
10 "os" 10 "os"
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 Code: http.StatusBadRequest, 87 Code: http.StatusBadRequest,
88 } 88 }
89 } 89 }
90 builder := p.ByName("builder") 90 builder := p.ByName("builder")
91 if builder == "" { 91 if builder == "" {
92 return nil, &miloerror.Error{ 92 return nil, &miloerror.Error{
93 Message: "No builder", 93 Message: "No builder",
94 Code: http.StatusBadRequest, 94 Code: http.StatusBadRequest,
95 } 95 }
96 } 96 }
97 97 » limit, err := settings.GetLimit(r)
98 » result, err := builderImpl(c, master, builder)
99 if err != nil { 98 if err != nil {
100 return nil, err 99 return nil, err
101 } 100 }
101 if limit < 0 {
102 limit = 25
103 }
104
105 result, err := builderImpl(c, master, builder, limit)
106 if err != nil {
107 return nil, err
108 }
102 109
103 // Render into the template 110 // Render into the template
104 args := &templates.Args{ 111 args := &templates.Args{
105 "Builder": result, 112 "Builder": result,
106 } 113 }
107 return args, nil 114 return args, nil
108 } 115 }
OLDNEW
« no previous file with comments | « milo/appengine/buildbot/builder.go ('k') | milo/appengine/buildbucket/html.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698