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

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

Issue 2944633003: [milo] Add BuildSummary and common models. (Closed)
Patch Set: add comments 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « milo/appengine/buildbot/build.go ('k') | milo/appengine/buildbot/console.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: milo/appengine/buildbot/builder.go
diff --git a/milo/appengine/buildbot/builder.go b/milo/appengine/buildbot/builder.go
index 2993b1b80154c705726e6bf49dc31ed3d7335170..96fb8b82c139b03858f32cfc643b95c72b1747a1 100644
--- a/milo/appengine/buildbot/builder.go
+++ b/milo/appengine/buildbot/builder.go
@@ -69,10 +69,7 @@ func mergeText(text []string) []string {
func getBuildSummary(b *buildbotBuild) *resp.BuildSummary {
started, finished, duration := parseTimes(nil, b.Times)
return &resp.BuildSummary{
- Link: &resp.Link{
- URL: fmt.Sprintf("%d", b.Number),
- Label: fmt.Sprintf("#%d", b.Number),
- },
+ Link: resp.NewLink(fmt.Sprintf("#%d", b.Number), fmt.Sprintf("%d", b.Number)),
Status: b.toStatus(),
ExecutionTime: resp.Interval{
Started: started,
@@ -174,10 +171,10 @@ func summarizeSlavePool(
for _, slaveName := range slaves {
slave, ok := slaveMap[slaveName]
bot := resp.Bot{
- Name: resp.Link{
- Label: slaveName,
- URL: fmt.Sprintf("%s/buildslaves/%s", baseURL, slaveName),
- },
+ Name: *resp.NewLink(
+ slaveName,
+ fmt.Sprintf("%s/buildslaves/%s", baseURL, slaveName),
+ ),
}
switch {
case !ok:
« no previous file with comments | « milo/appengine/buildbot/build.go ('k') | milo/appengine/buildbot/console.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698