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

Side by Side Diff: Tools/GardeningServer/model/ct-sheriff-failure-group-data.html

Issue 565523002: [Sheriff-o-matic] Refactor cards and get rid of ct-failure-cards (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: ToT-ed Created 6 years, 3 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 | Annotate | Revision Log
OLDNEW
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
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>
OLDNEW
« no previous file with comments | « Tools/GardeningServer/model/ct-builder-failure-group-data.html ('k') | Tools/GardeningServer/test/unit-tests.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698