OLD | NEW |
1 <!-- | 1 <!-- |
2 Copyright 2014 The Chromium Authors. All rights reserved. | 2 Copyright 2014 The Chromium Authors. All rights reserved. |
3 Use of this source code is governed by a BSD-style license that can be | 3 Use of this source code is governed by a BSD-style license that can be |
4 found in the LICENSE file. | 4 found in the LICENSE file. |
5 --> | 5 --> |
6 | 6 |
| 7 <link rel="import" href="ct-builder-list.html"> |
7 <link rel="import" href="ct-commit-list.html"> | 8 <link rel="import" href="ct-commit-list.html"> |
8 | 9 |
9 <script> | 10 <script> |
10 function CTSheriffFailureGroupData(failures, commitList) { | 11 function CTSheriffFailureGroupData(failures, commitList) { |
11 this.failures = failures; | 12 this.failures = failures; |
12 this.commitList = commitList; | 13 this.commitList = commitList; |
| 14 this.builderList = new CTBuilderList(failures); |
13 this.category = 'sheriff'; | 15 this.category = 'sheriff'; |
14 }; | 16 }; |
15 | 17 |
16 CTSheriffFailureGroupData.prototype.getAnnotations = function() { | 18 CTSheriffFailureGroupData.prototype.getAnnotations = function() { |
17 return this.failures.map(function(failure) { | 19 return this.failures.map(function(failure) { |
18 return failure.annotations(); | 20 return failure.annotations(); |
19 }).flatten(); | 21 }).flatten(); |
20 }; | 22 }; |
21 | 23 |
22 CTSheriffFailureGroupData.prototype.dataToExamine = function() { | 24 CTSheriffFailureGroupData.prototype.dataToExamine = function() { |
(...skipping 10 matching lines...) Expand all Loading... |
33 var totalFailures = 0; | 35 var totalFailures = 0; |
34 for (var i = 0; i < this.failures.length; i++) { | 36 for (var i = 0; i < this.failures.length; i++) { |
35 var resultNodes = this.failures[i].resultNodesByBuilder; | 37 var resultNodes = this.failures[i].resultNodesByBuilder; |
36 for (var r in resultNodes) { | 38 for (var r in resultNodes) { |
37 totalFailures += resultNodes[r].failingBuildCount; | 39 totalFailures += resultNodes[r].failingBuildCount; |
38 if (totalFailures > 1) | 40 if (totalFailures > 1) |
39 return false; | 41 return false; |
40 } | 42 } |
41 } | 43 } |
42 return totalFailures == 1; | 44 return totalFailures == 1; |
43 } | 45 }; |
44 </script> | 46 </script> |
OLD | NEW |