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 <link href="../model/ct-builder-revisions.html" rel="import"> |
6 | 7 |
7 <link rel="import" href="../model/ct-failure.html"> | 8 <link rel="import" href="../model/ct-failure.html"> |
8 | 9 |
9 <polymer-element name="ct-failure-analyzer" attributes="failures builderLatestRe
visions"> | 10 <polymer-element name="ct-failure-analyzer" attributes="failures builderLatestRe
visions"> |
10 <script> | 11 <script> |
11 // FIXME: Don't use a polymer component for this. Instead use a Failures mod
el | 12 // 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. | 13 // object that knows how to do the XHR and process the data appropriately. |
13 Polymer({ | 14 Polymer({ |
14 builderLatestRevisions: null, | 15 builderLatestRevisions: null, |
15 failures: null, | 16 failures: null, |
(...skipping 11 matching lines...) Expand all Loading... |
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 = new CTBuilderRevisions(data.latest_revis
ions['chromium.webkit']); |
38 // FIXME: Make this a model class intead of a dumb object. | |
39 this.failures = {}; | 39 this.failures = {}; |
40 data.range_groups.forEach(function(group) { | 40 data.range_groups.forEach(function(group) { |
41 this._processFailuresForGroup(group, data.alerts); | 41 this._processFailuresForGroup(group, data.alerts); |
42 }.bind(this)); | 42 }.bind(this)); |
43 // FIXME: Sort this.failures by severity of regression, then by oldest
FailingRevision. | 43 // FIXME: Sort this.failures by severity of regression, then by oldest
FailingRevision. |
44 }.bind(this)); | 44 }.bind(this)); |
45 }, | 45 }, |
46 | 46 |
47 _failureComparator: function(a, b) { | 47 _failureComparator: function(a, b) { |
48 if (a.step > b.step) | 48 if (a.step > b.step) |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 failures.sort(this._failureComparator); | 117 failures.sort(this._failureComparator); |
118 | 118 |
119 if (!this.failures[tree]) | 119 if (!this.failures[tree]) |
120 this.failures[tree] = []; | 120 this.failures[tree] = []; |
121 this.failures[tree].push(failures); | 121 this.failures[tree].push(failures); |
122 }.bind(this)); | 122 }.bind(this)); |
123 }, | 123 }, |
124 }); | 124 }); |
125 </script> | 125 </script> |
126 </polymer-element> | 126 </polymer-element> |
OLD | NEW |