| 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 "strconv" | 10 "strconv" |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 return | 73 return |
| 74 } | 74 } |
| 75 limit, err := common.GetLimit(c.Request) | 75 limit, err := common.GetLimit(c.Request) |
| 76 if err != nil { | 76 if err != nil { |
| 77 common.ErrorPage(c, http.StatusBadRequest, err.Error()) | 77 common.ErrorPage(c, http.StatusBadRequest, err.Error()) |
| 78 return | 78 return |
| 79 } | 79 } |
| 80 if limit < 0 { | 80 if limit < 0 { |
| 81 limit = 25 | 81 limit = 25 |
| 82 } | 82 } |
| 83 cursor := c.Request.FormValue("cursor") |
| 83 | 84 |
| 84 » result, err := builderImpl(c.Context, master, builder, limit) | 85 » result, err := builderImpl(c.Context, master, builder, limit, cursor) |
| 85 if err != nil { | 86 if err != nil { |
| 86 common.ErrorPage(c, http.StatusInternalServerError, err.Error()) | 87 common.ErrorPage(c, http.StatusInternalServerError, err.Error()) |
| 87 return | 88 return |
| 88 } | 89 } |
| 89 | 90 |
| 90 // Render into the template | 91 // Render into the template |
| 91 templates.MustRender(c.Context, c.Writer, "pages/builder.html", template
s.Args{ | 92 templates.MustRender(c.Context, c.Writer, "pages/builder.html", template
s.Args{ |
| 92 "Builder": result, | 93 "Builder": result, |
| 93 }) | 94 }) |
| 94 } | 95 } |
| OLD | NEW |