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

Side by Side Diff: Tools/GardeningServer/ui/ct-builder-grid.html

Issue 404463003: Move commit list and builder latest revisions up to ct-unexpected-failures (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: address review comments Created 6 years, 5 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.html"> 7 <link rel="import" href="ct-builder.html">
8 8
9 <!-- Table of failure types, listing the failing builders for each type. --> 9 <!-- Table of failure types, listing the failing builders for each type. -->
10 <polymer-element name="ct-builder-grid" attributes="failures"> 10 <polymer-element name="ct-builder-grid" attributes="failures builderLatestRevisi ons">
11 <template> 11 <template>
12 <style> 12 <style>
13 table { 13 table {
14 border-collapse: collapse; 14 border-collapse: collapse;
15 font-size: 11px; 15 font-size: 11px;
16 table-layout: fixed; 16 table-layout: fixed;
17 width: 350px; 17 width: 350px;
18 } 18 }
19 19
20 tbody td:first-child { 20 tbody td:first-child {
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 </template> 92 </template>
93 </td> 93 </td>
94 </tr> 94 </tr>
95 </template> 95 </template>
96 </tbody> 96 </tbody>
97 </table> 97 </table>
98 </template> 98 </template>
99 <script> 99 <script>
100 Polymer({ 100 Polymer({
101 failures: [], 101 failures: [],
102 builderLatestRevisions: {},
102 resultTypes: {}, 103 resultTypes: {},
103 104
104 keys: function(obj) { 105 keys: function(obj) {
105 return Object.keys(obj).sort(); 106 return Object.keys(obj).sort();
106 }, 107 },
107 108
108 resultTypeKeys: function(obj) { 109 resultTypeKeys: function(obj) {
109 // Get the keys, but the BUILDING type should be last. 110 // Get the keys, but the BUILDING type should be last.
110 var keys = this.keys(obj); 111 var keys = this.keys(obj);
111 var index = keys.indexOf('BUILDING'); 112 var index = keys.indexOf('BUILDING');
112 if (index != -1) { 113 if (index != -1) {
113 var buildingResult = keys.splice(index, 1); 114 var buildingResult = keys.splice(index, 1);
114 keys.push(buildingResult[0]); 115 keys.push(buildingResult[0]);
115 } 116 }
116 return keys; 117 return keys;
117 }, 118 },
118 119
119 failuresChanged: function() { 120 failuresChanged: function() {
120 // Create a set of builders for each result type (e.g., text, crash). 121 // Create a set of builders for each result type (e.g., text, crash).
121 this.resultTypes = {}; 122 this.resultTypes = {};
122 var passingRevisions = []; 123 var passingRevisions = [];
123 this.failures.forEach(function(failure) { 124 this.failures.forEach(function(failure) {
124 passingRevisions.push(failure.newestPassingRevision); 125 passingRevisions.push(failure.newestPassingRevision);
125 var results = failure.resultNodesByBuilder; 126 var results = failure.resultNodesByBuilder;
126 Object.keys(results, (function(builderName) { 127 Object.keys(results, (function(builder) {
127 var result = results[builderName]; 128 var result = results[builder];
128 if (!result.is_unexpected) 129 if (!result.is_unexpected)
129 return; 130 return;
130 131
131 if (!Object.has(this.resultTypes, result.actual)) 132 if (!Object.has(this.resultTypes, result.actual))
132 this.resultTypes[result.actual] = {}; 133 this.resultTypes[result.actual] = {};
133 this.resultTypes[result.actual][builderName] = 134 this.resultTypes[result.actual][builder] =
134 config.builders[builderName]; 135 config.builders[builder];
135 }).bind(this)); 136 }).bind(this));
136 }, this); 137 }, this);
137 138
138 var buildingType = this._getBuilding(passingRevisions); 139 var buildingType = this._getBuilding(passingRevisions);
139 if (!Object.isEmpty(buildingType)) 140 if (!Object.isEmpty(buildingType))
140 this.resultTypes['BUILDING'] = buildingType; 141 this.resultTypes['BUILDING'] = buildingType;
141 }, 142 },
142 143
144 _buildersInFlightForRevision: function(revision) {
145 return Object.keys(this.builderLatestRevisions).filter(function(builder) {
146 // FIXME: This should look at all chromium/v8/etc revisions as well.
147 // Is this concept of "building" builders even useful as is?
148 return parseInt(this.builderLatestRevisions[builder].blink, 10) < revi sion;
149 }.bind(this));
150 },
151
143 _getBuilding: function(revisions) { 152 _getBuilding: function(revisions) {
144 var building = {}; 153 var building = {};
145 var builderNames = []; 154 var builders = [];
146 revisions.unique().forEach(function(revision) { 155 revisions.unique().forEach(function(revision) {
147 builderNames.push.apply(builderNames, 156 builders.push.apply(builders, this._buildersInFlightForRevision(revisi on + 1));
148 Object.keys(model.buildersInFlightForRevision(revision + 1))); 157 }.bind(this));
158
159 builders.unique().forEach(function(builder) {
160 if (!config.builders[builder])
161 return;
162 building[builder] = {'debug': config.builders[builder].debug};
149 }); 163 });
150 builderNames.unique().forEach(function(builderName) { 164
151 if (!config.builders[builderName])
152 return;
153 building[builderName] =
154 {'debug': config.builders[builderName].debug};
155 });
156 return building; 165 return building;
157 }, 166 },
158 }); 167 });
159 </script> 168 </script>
160 </polymer-element> 169 </polymer-element>
OLDNEW
« no previous file with comments | « Tools/GardeningServer/run-unittests.html ('k') | Tools/GardeningServer/ui/ct-builder-grid-tests.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698