| 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 buildbot | 5 package buildbot |
| 6 | 6 |
| 7 import ( | 7 import ( |
| 8 "errors" | 8 "errors" |
| 9 "fmt" | 9 "fmt" |
| 10 "sort" | 10 "sort" |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 if len(result) > 1 { | 57 if len(result) > 1 { |
| 58 switch result[0] { | 58 switch result[0] { |
| 59 case "failed steps", "exception steps": | 59 case "failed steps", "exception steps": |
| 60 result = result[1:] | 60 result = result[1:] |
| 61 } | 61 } |
| 62 } | 62 } |
| 63 return result | 63 return result |
| 64 } | 64 } |
| 65 | 65 |
| 66 func getBuildSummary(b *buildbotBuild) *resp.BuildSummary { | 66 func getBuildSummary(b *buildbotBuild) *resp.BuildSummary { |
| 67 » started, finished, duration := parseTimes(b.Times) | 67 » started, finished, duration := parseTimes(nil, b.Times) |
| 68 return &resp.BuildSummary{ | 68 return &resp.BuildSummary{ |
| 69 Link: &resp.Link{ | 69 Link: &resp.Link{ |
| 70 URL: fmt.Sprintf("%d", b.Number), | 70 URL: fmt.Sprintf("%d", b.Number), |
| 71 Label: fmt.Sprintf("#%d", b.Number), | 71 Label: fmt.Sprintf("#%d", b.Number), |
| 72 }, | 72 }, |
| 73 Status: b.toStatus(), | 73 Status: b.toStatus(), |
| 74 ExecutionTime: resp.Interval{ | 74 ExecutionTime: resp.Interval{ |
| 75 Started: started, | 75 Started: started, |
| 76 Finished: finished, | 76 Finished: finished, |
| 77 Duration: duration, | 77 Duration: duration, |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 } | 181 } |
| 182 result.CurrentBuilds = currentBuilds | 182 result.CurrentBuilds = currentBuilds |
| 183 | 183 |
| 184 for _, fb := range finishedBuilds { | 184 for _, fb := range finishedBuilds { |
| 185 if fb != nil { | 185 if fb != nil { |
| 186 result.FinishedBuilds = append(result.FinishedBuilds, fb
) | 186 result.FinishedBuilds = append(result.FinishedBuilds, fb
) |
| 187 } | 187 } |
| 188 } | 188 } |
| 189 return result, nil | 189 return result, nil |
| 190 } | 190 } |
| OLD | NEW |