| 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 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 Loading... |
| 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 } |
| OLD | NEW |