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

Unified Diff: appengine/cmd/milo/buildbot/builder.go

Issue 2196453002: Milo: Console view prototype (Closed) Base URL: https://chromium.googlesource.com/external/github.com/luci/luci-go@master
Patch Set: Reviews Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « appengine/cmd/milo/Makefile ('k') | appengine/cmd/milo/buildbot/console.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: appengine/cmd/milo/buildbot/builder.go
diff --git a/appengine/cmd/milo/buildbot/builder.go b/appengine/cmd/milo/buildbot/builder.go
index 4487f69393b6af3cc995a97c1289a3f35f787cfe..845a16582f65223f2377dc8088cc8aadd735ea60 100644
--- a/appengine/cmd/milo/buildbot/builder.go
+++ b/appengine/cmd/milo/buildbot/builder.go
@@ -63,12 +63,12 @@ func getBuildSummary(b *buildbotBuild) *resp.BuildSummary {
}
// getBuilds fetches all of the recent builds from the datastore.
-func getBuilds(c context.Context, masterName, builderName string) ([]*resp.BuildSummary, error) {
+func getBuilds(c context.Context, masterName, builderName string, finished bool) ([]*resp.BuildSummary, error) {
// TODO(hinoka): Builder specific structs.
result := []*resp.BuildSummary{}
ds := datastore.Get(c)
q := datastore.NewQuery("buildbotBuild")
- q = q.Eq("finished", true)
+ q = q.Eq("finished", finished)
q = q.Eq("master", masterName)
q = q.Eq("builder", builderName)
q = q.Limit(25) // TODO(hinoka): This should be adjustable
@@ -149,7 +149,7 @@ func builderImpl(c context.Context, masterName, builderName string) (*resp.Build
builderName, masterName, avail)
}
- recentBuilds, err := getBuilds(c, masterName, builderName)
+ recentBuilds, err := getBuilds(c, masterName, builderName, true)
if err != nil {
return nil, err // Or maybe not?
}
« no previous file with comments | « appengine/cmd/milo/Makefile ('k') | appengine/cmd/milo/buildbot/console.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698