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

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

Issue 406523004: Sheriff-o-matic: Move BUILDING builder row to end (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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
« no previous file with comments | « no previous file | Tools/GardeningServer/ui/ct-builder-grid-tests.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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">
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 tr { 20 tbody tr {
21 border-top: 1px solid #eee; 21 border-top: 1px solid #eee;
22 } 22 }
23 23
24 tbody td:first-child { 24 tbody td:first-child {
25 width: 20%; 25 width: 20%;
26 } 26 }
27 27
28 tbody td { 28 tbody td {
29 padding: 2px; 29 padding: 2px;
30 vertical-align: top;
30 width: 40%; 31 width: 40%;
31 } 32 }
32 33
33 tbody tr td:first-child {
34 vertical-align: top;
35 }
36
37 tr :first-child span { 34 tr :first-child span {
38 padding: 0 2px; 35 padding: 0 2px;
39 } 36 }
40 37
41 .TIMEOUT span { 38 .TIMEOUT span {
42 background-color: #fffc6c; 39 background-color: #fffc6c;
43 } 40 }
44 41
45 .TEXT span { 42 .TEXT span {
46 background-color: #e98080; 43 background-color: #e98080;
(...skipping 25 matching lines...) Expand all
72 </style> 69 </style>
73 <table> 70 <table>
74 <thead> 71 <thead>
75 <tr> 72 <tr>
76 <td>type</td> 73 <td>type</td>
77 <td>release</td> 74 <td>release</td>
78 <td>debug</td> 75 <td>debug</td>
79 </tr> 76 </tr>
80 </thead> 77 </thead>
81 <tbody> 78 <tbody>
82 <template repeat="{{ type in resultTypes|keys }}"> 79 <template repeat="{{ type in resultTypes|resultTypeKeys }}">
83 <tr> 80 <tr>
84 <td class="{{ type }}"> 81 <td class="{{ type }}">
85 <span>{{ type }}</span> 82 <span>{{ type }}</span>
86 </td> 83 </td>
87 <td> 84 <td>
88 <template repeat="{{ builder in resultTypes[type]|keys }}"> 85 <template repeat="{{ builder in resultTypes[type]|keys }}">
89 <template if="{{ !resultTypes[type][builder].debug }}"> 86 <template if="{{ !resultTypes[type][builder].debug }}">
90 <ct-builder builderName="{{ builder }}"></ct-builder> 87 <ct-builder builderName="{{ builder }}"></ct-builder>
91 </template> 88 </template>
92 </template> 89 </template>
(...skipping 12 matching lines...) Expand all
105 </template> 102 </template>
106 <script> 103 <script>
107 Polymer({ 104 Polymer({
108 failures: [], 105 failures: [],
109 resultTypes: {}, 106 resultTypes: {},
110 107
111 keys: function(obj) { 108 keys: function(obj) {
112 return Object.keys(obj).sort(); 109 return Object.keys(obj).sort();
113 }, 110 },
114 111
112 resultTypeKeys: function(obj) {
113 // Get the keys, but the BUILDING type should be last.
114 var keys = this.keys(obj);
115 var index = keys.indexOf('BUILDING');
116 if (index != -1) {
117 var buildingResult = keys.splice(index, 1);
118 keys.push(buildingResult[0]);
119 }
120 return keys;
121 },
122
115 failuresChanged: function() { 123 failuresChanged: function() {
116 // Create a set of builders for each result type (e.g., text, crash). 124 // Create a set of builders for each result type (e.g., text, crash).
117 this.resultTypes = {}; 125 this.resultTypes = {};
118 var passingRevisions = []; 126 var passingRevisions = [];
119 this.failures.forEach(function(failure) { 127 this.failures.forEach(function(failure) {
120 passingRevisions.push(failure.newestPassingRevision); 128 passingRevisions.push(failure.newestPassingRevision);
121 var results = failure.resultNodesByBuilder; 129 var results = failure.resultNodesByBuilder;
122 Object.keys(results, (function(builderName) { 130 Object.keys(results, (function(builderName) {
123 var result = results[builderName]; 131 var result = results[builderName];
124 if (!result.is_unexpected) 132 if (!result.is_unexpected)
125 return; 133 return;
126 134
127 if (!Object.has(this.resultTypes, result.actual)) 135 if (!Object.has(this.resultTypes, result.actual))
128 this.resultTypes[result.actual] = {}; 136 this.resultTypes[result.actual] = {};
129 this.resultTypes[result.actual][builderName] = 137 this.resultTypes[result.actual][builderName] =
130 config.builders[builderName]; 138 config.builders[builderName];
131 }).bind(this)); 139 }).bind(this));
132 }, this); 140 }, this);
133 141
134 // BUILDING builders should appear last.
135 var buildingType = this._getBuilding(passingRevisions); 142 var buildingType = this._getBuilding(passingRevisions);
136 if (!Object.isEmpty(buildingType)) 143 if (!Object.isEmpty(buildingType))
137 this.resultTypes['BUILDING'] = buildingType; 144 this.resultTypes['BUILDING'] = buildingType;
138 }, 145 },
139 146
140 _getBuilding: function(revisions) { 147 _getBuilding: function(revisions) {
141 var building = {}; 148 var building = {};
142 var builderNames = []; 149 var builderNames = [];
143 revisions.unique().forEach(function(revision) { 150 revisions.unique().forEach(function(revision) {
144 builderNames.push.apply(builderNames, 151 builderNames.push.apply(builderNames,
145 Object.keys(model.buildersInFlightForRevision(revision + 1))); 152 Object.keys(model.buildersInFlightForRevision(revision + 1)));
146 }); 153 });
147 builderNames.unique().forEach(function(builderName) { 154 builderNames.unique().forEach(function(builderName) {
148 if (!config.builders[builderName]) 155 if (!config.builders[builderName])
149 return; 156 return;
150 building[builderName] = 157 building[builderName] =
151 {'debug': config.builders[builderName].debug}; 158 {'debug': config.builders[builderName].debug};
152 }); 159 });
153 return building; 160 return building;
154 }, 161 },
155 }); 162 });
156 </script> 163 </script>
157 </polymer-element> 164 </polymer-element>
OLDNEW
« no previous file with comments | « no previous file | Tools/GardeningServer/ui/ct-builder-grid-tests.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698