Chromium Code Reviews| Index: Tools/GardeningServer/ui/ct-builder-grid.html |
| diff --git a/Tools/GardeningServer/ui/ct-builder-grid.html b/Tools/GardeningServer/ui/ct-builder-grid.html |
| index ab9a6d339cff79d73339a1de38c2d0d00c67f725..f7a383df6f3c20c91db362423245f0818f80e425 100644 |
| --- a/Tools/GardeningServer/ui/ct-builder-grid.html |
| +++ b/Tools/GardeningServer/ui/ct-builder-grid.html |
| @@ -7,7 +7,7 @@ found in the LICENSE file. |
| <link rel="import" href="ct-builder.html"> |
| <!-- Table of failure types, listing the failing builders for each type. --> |
| -<polymer-element name="ct-builder-grid" attributes="failures"> |
| +<polymer-element name="ct-builder-grid" attributes="failures builderLatestRevisions"> |
| <template> |
| <style> |
| table { |
| @@ -103,6 +103,7 @@ found in the LICENSE file. |
| <script> |
| Polymer({ |
| failures: [], |
| + builderLatestRevisions: {}, |
| resultTypes: {}, |
| keys: function(obj) { |
| @@ -127,15 +128,15 @@ found in the LICENSE file. |
| this.failures.forEach(function(failure) { |
| passingRevisions.push(failure.newestPassingRevision); |
| var results = failure.resultNodesByBuilder; |
| - Object.keys(results, (function(builderName) { |
| - var result = results[builderName]; |
| + Object.keys(results, (function(builder) { |
| + var result = results[builder]; |
| if (!result.is_unexpected) |
| return; |
| if (!Object.has(this.resultTypes, result.actual)) |
| this.resultTypes[result.actual] = {}; |
| - this.resultTypes[result.actual][builderName] = |
| - config.builders[builderName]; |
| + this.resultTypes[result.actual][builder] = |
| + config.builders[builder]; |
| }).bind(this)); |
| }, this); |
| @@ -144,19 +145,30 @@ found in the LICENSE file. |
| this.resultTypes['BUILDING'] = buildingType; |
| }, |
| + _buildersInFlightForRevision: function(revision) { |
| + var builders = {}; |
| + Object.keys(this.builderLatestRevisions, function(builder, revisions) { |
| + // FIXME: This should look at all chromium/v8/etc revisions as well. |
| + // Is this concept of "building" builders even useful as is? |
| + if (parseInt(revisions.blink, 10) < revision) |
| + builders[builder] = 1; |
| + }); |
| + return Object.keys(builders); |
|
michaelpg
2014/07/21 07:28:48
Can you simplify this? Something like:
return Obj
ojan
2014/07/21 19:58:04
Much better. Although, I got rid of the hard to re
|
| + }, |
| + |
| _getBuilding: function(revisions) { |
| var building = {}; |
| - var builderNames = []; |
| + var builders = []; |
| revisions.unique().forEach(function(revision) { |
| - builderNames.push.apply(builderNames, |
| - Object.keys(model.buildersInFlightForRevision(revision + 1))); |
| - }); |
| - builderNames.unique().forEach(function(builderName) { |
| - if (!config.builders[builderName]) |
| + builders.push.apply(builders, this._buildersInFlightForRevision(revision + 1)); |
|
michaelpg
2014/07/21 07:28:48
again, can we keep this to 80 chars? Or is that no
|
| + }.bind(this)); |
| + |
| + builders.unique().forEach(function(builder) { |
| + if (!config.builders[builder]) |
| return; |
| - building[builderName] = |
| - {'debug': config.builders[builderName].debug}; |
| + building[builder] = {'debug': config.builders[builder].debug}; |
| }); |
| + |
| return building; |
| }, |
| }); |