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

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

Issue 2931773004: Milo: Add machine pool info for buildbot builder view. (Closed)
Patch Set: Review 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 unified diff | Download patch
« no previous file with comments | « milo/api/resp/builder.go ('k') | milo/appengine/buildbot/builder.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 2016 The LUCI Authors. All rights reserved. 1 // Copyright 2016 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 "encoding/json" 8 "encoding/json"
9 "errors" 9 "errors"
10 "fmt" 10 "fmt"
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 if b.Currentstep != nil { 139 if b.Currentstep != nil {
140 status = resp.Running 140 status = resp.Running
141 } else { 141 } else {
142 status = result2Status(b.Results) 142 status = result2Status(b.Results)
143 } 143 }
144 144
145 // Timing info 145 // Timing info
146 started, ended, duration := parseTimes(nil, b.Times) 146 started, ended, duration := parseTimes(nil, b.Times)
147 147
148 // Link to bot and original build. 148 // Link to bot and original build.
149 server := "build.chromium.org/p"
150 if b.Internal {
151 server = "uberchromegw.corp.google.com/i"
152 }
153 bot := &resp.Link{
154 Label: b.Slave,
155 URL: fmt.Sprintf("https://%s/%s/buildslaves/%s", server, b.Mas ter, b.Slave),
156 }
157 host := "build.chromium.org/p" 149 host := "build.chromium.org/p"
158 if b.Internal { 150 if b.Internal {
159 host = "uberchromegw.corp.google.com/i" 151 host = "uberchromegw.corp.google.com/i"
160 } 152 }
153 bot := &resp.Link{
154 Label: b.Slave,
155 URL: fmt.Sprintf("https://%s/%s/buildslaves/%s", host, b.Maste r, b.Slave),
156 }
161 source := &resp.Link{ 157 source := &resp.Link{
162 Label: fmt.Sprintf("%s/%s/%d", b.Master, b.Buildername, b.Number ), 158 Label: fmt.Sprintf("%s/%s/%d", b.Master, b.Buildername, b.Number ),
163 URL: fmt.Sprintf( 159 URL: fmt.Sprintf(
164 "https://%s/%s/builders/%s/builds/%d", 160 "https://%s/%s/builders/%s/builds/%d",
165 host, b.Master, b.Buildername, b.Number), 161 host, b.Master, b.Buildername, b.Number),
166 } 162 }
167 163
168 // The link to the builder page. 164 // The link to the builder page.
169 parent := &resp.Link{ 165 parent := &resp.Link{
170 Label: b.Buildername, 166 Label: b.Buildername,
(...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after
643 var newAliases map[string][]*buildbotLinkAlias 639 var newAliases map[string][]*buildbotLinkAlias
644 if l := remainingAliases.Len(); l > 0 { 640 if l := remainingAliases.Len(); l > 0 {
645 newAliases = make(map[string][]*buildbotLinkAlias, l) 641 newAliases = make(map[string][]*buildbotLinkAlias, l)
646 remainingAliases.Iter(func(v string) bool { 642 remainingAliases.Iter(func(v string) bool {
647 newAliases[v] = s.Aliases[v] 643 newAliases[v] = s.Aliases[v]
648 return true 644 return true
649 }) 645 })
650 } 646 }
651 s.Aliases = newAliases 647 s.Aliases = newAliases
652 } 648 }
OLDNEW
« no previous file with comments | « milo/api/resp/builder.go ('k') | milo/appengine/buildbot/builder.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698