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

Side by Side Diff: milo/appengine/logdog/build.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 unified diff | Download patch
« no previous file with comments | « milo/appengine/frontend/frontpage.go ('k') | milo/appengine/logdog/logDogBuild.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 logdog 5 package logdog
6 6
7 import ( 7 import (
8 "errors" 8 "errors"
9 "fmt" 9 "fmt"
10 "time" 10 "time"
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 if server == "" { 196 if server == "" {
197 server = b.Host 197 server = b.Host
198 } 198 }
199 199
200 prefix := types.StreamName(ls.Prefix) 200 prefix := types.StreamName(ls.Prefix)
201 if prefix == "" { 201 if prefix == "" {
202 prefix = b.Prefix 202 prefix = b.Prefix
203 } 203 }
204 204
205 u := viewer.GetURL(server, b.Project, prefix.Join(types.StreamNa me(ls.Name))) 205 u := viewer.GetURL(server, b.Project, prefix.Join(types.StreamNa me(ls.Name)))
206 » » link := resp.Link{ 206 » » link := resp.NewLink(l.Label, u)
207 » » » Label: l.Label,
208 » » » URL: u,
209 » » }
210 if link.Label == "" { 207 if link.Label == "" {
211 link.Label = ls.Name 208 link.Label = ls.Name
212 } 209 }
213 » » return &link 210 » » return link
214 211
215 case *miloProto.Link_Url: 212 case *miloProto.Link_Url:
216 » » link := resp.Link{ 213 » » link := resp.NewLink(l.Label, t.Url)
217 » » » Label: l.Label,
218 » » » URL: t.Url,
219 » » }
220 if link.Label == "" { 214 if link.Label == "" {
221 link.Label = "unnamed" 215 link.Label = "unnamed"
222 } 216 }
223 » » return &link 217 » » return link
224 218
225 default: 219 default:
226 // Don't know how to render. 220 // Don't know how to render.
227 return nil 221 return nil
228 } 222 }
229 } 223 }
OLDNEW
« no previous file with comments | « milo/appengine/frontend/frontpage.go ('k') | milo/appengine/logdog/logDogBuild.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698