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="../model/ct-failure.html"> | 7 <link rel="import" href="../model/ct-failure.html"> |
8 | 8 |
9 <polymer-element name="ct-failure-analyzer" attributes="failures builderLatestRe visions"> | 9 <polymer-element name="ct-failure-analyzer" attributes="failures builderLatestRe visions date"> |
10 <script> | 10 <script> |
11 // FIXME: Don't use a polymer component for this. Instead use a Failures mod el | 11 // FIXME: Don't use a polymer component for this. Instead use a Failures mod el |
12 // object that knows how to do the XHR and process the data appropriately. | 12 // object that knows how to do the XHR and process the data appropriately. |
13 Polymer({ | 13 Polymer({ |
14 builderLatestRevisions: null, | 14 builderLatestRevisions: null, |
15 failures: null, | 15 failures: null, |
16 date: null, | |
ojan
2014/08/08 06:05:12
Lets call this lastUpdateDate to be more explicit.
teravest
2014/08/08 22:21:27
Done.
| |
16 | 17 |
17 // FIXME: Get this from https://chromium.googlesource.com/chromium/tools/b uild/+/master/scripts/slave/gatekeeper_trees.json?format=text. | 18 // FIXME: Get this from https://chromium.googlesource.com/chromium/tools/b uild/+/master/scripts/slave/gatekeeper_trees.json?format=text. |
18 _trees: { | 19 _trees: { |
19 blink: [ | 20 blink: [ |
20 "https://build.chromium.org/p/chromium.webkit", | 21 "https://build.chromium.org/p/chromium.webkit", |
21 ], | 22 ], |
22 chromium: [ | 23 chromium: [ |
23 "https://build.chromium.org/p/chromium", | 24 "https://build.chromium.org/p/chromium", |
24 "https://build.chromium.org/p/chromium.chrome", | 25 "https://build.chromium.org/p/chromium.chrome", |
25 "https://build.chromium.org/p/chromium.chromiumos", | 26 "https://build.chromium.org/p/chromium.chromiumos", |
26 "https://build.chromium.org/p/chromium.gpu", | 27 "https://build.chromium.org/p/chromium.gpu", |
27 "https://build.chromium.org/p/chromium.linux", | 28 "https://build.chromium.org/p/chromium.linux", |
28 "https://build.chromium.org/p/chromium.mac", | 29 "https://build.chromium.org/p/chromium.mac", |
29 "https://build.chromium.org/p/chromium.memory", | 30 "https://build.chromium.org/p/chromium.memory", |
30 "https://build.chromium.org/p/chromium.win" | 31 "https://build.chromium.org/p/chromium.win" |
31 ], | 32 ], |
32 }, | 33 }, |
33 | 34 |
34 update: function() { | 35 update: function() { |
35 net.json('http://auto-sheriff.appspot.com/data').then(function(data) { | 36 net.json('http://auto-sheriff.appspot.com/data').then(function(data) { |
36 // FIXME: Don't special-case the blink master. | 37 // FIXME: Don't special-case the blink master. |
37 this.builderLatestRevisions = data.latest_revisions['chromium.webkit'] ; | 38 this.builderLatestRevisions = data.latest_revisions['chromium.webkit'] ; |
39 this.date = data.date; | |
ojan
2014/08/08 06:05:12
Lets store an actual Date object instead of a time
teravest
2014/08/08 22:21:27
Done.
| |
38 // FIXME: Make this a model class intead of a dumb object. | 40 // FIXME: Make this a model class intead of a dumb object. |
39 this.failures = {}; | 41 this.failures = {}; |
40 data.range_groups.forEach(function(group) { | 42 data.range_groups.forEach(function(group) { |
41 this._processFailuresForGroup(group, data.alerts); | 43 this._processFailuresForGroup(group, data.alerts); |
42 }.bind(this)); | 44 }.bind(this)); |
43 // FIXME: Sort this.failures by severity of regression, then by oldest FailingRevision. | 45 // FIXME: Sort this.failures by severity of regression, then by oldest FailingRevision. |
44 }.bind(this)); | 46 }.bind(this)); |
45 }, | 47 }, |
46 | 48 |
47 _failureComparator: function(a, b) { | 49 _failureComparator: function(a, b) { |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
116 failures.sort(this._failureComparator); | 118 failures.sort(this._failureComparator); |
117 | 119 |
118 if (!this.failures[tree]) | 120 if (!this.failures[tree]) |
119 this.failures[tree] = []; | 121 this.failures[tree] = []; |
120 this.failures[tree].push(failures); | 122 this.failures[tree].push(failures); |
121 }.bind(this)); | 123 }.bind(this)); |
122 }, | 124 }, |
123 }); | 125 }); |
124 </script> | 126 </script> |
125 </polymer-element> | 127 </polymer-element> |
OLD | NEW |