| OLD | NEW |
| 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 "net/http" | 10 "net/http" |
| (...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 295 } | 295 } |
| 296 | 296 |
| 297 var ( | 297 var ( |
| 298 build resp.MiloBuild | 298 build resp.MiloBuild |
| 299 ub = logDogURLBuilder{ | 299 ub = logDogURLBuilder{ |
| 300 project: as.project, | 300 project: as.project, |
| 301 host: as.host, | 301 host: as.host, |
| 302 prefix: prefix, | 302 prefix: prefix, |
| 303 } | 303 } |
| 304 ) | 304 ) |
| 305 » AddLogDogToBuild(c, &ub, &streams, &build) | 305 » AddLogDogToBuild(c, &ub, streams.MainStream.Data, &build) |
| 306 return &build | 306 return &build |
| 307 } | 307 } |
| 308 | 308 |
| 309 type logDogURLBuilder struct { | 309 type logDogURLBuilder struct { |
| 310 host string | 310 host string |
| 311 prefix types.StreamName | 311 prefix types.StreamName |
| 312 project config.ProjectName | 312 project config.ProjectName |
| 313 } | 313 } |
| 314 | 314 |
| 315 func (b *logDogURLBuilder) BuildLink(l *miloProto.Link) *resp.Link { | 315 func (b *logDogURLBuilder) BuildLink(l *miloProto.Link) *resp.Link { |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 354 if link.Label == "" { | 354 if link.Label == "" { |
| 355 link.Label = "unnamed" | 355 link.Label = "unnamed" |
| 356 } | 356 } |
| 357 return &link | 357 return &link |
| 358 | 358 |
| 359 default: | 359 default: |
| 360 // Don't know how to render. | 360 // Don't know how to render. |
| 361 return nil | 361 return nil |
| 362 } | 362 } |
| 363 } | 363 } |
| OLD | NEW |