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 <link href="../model/ct-builder-revisions.html" rel="import"> |
7 | 7 |
8 <link rel="import" href="../model/ct-failure.html"> | 8 <link rel="import" href="../model/ct-failure.html"> |
9 <link rel="import" href="../model/ct-failure-group.html"> | 9 <link rel="import" href="../model/ct-failure-group.html"> |
10 | 10 |
11 <polymer-element name="ct-failure-analyzer" attributes="failures builderLatestRe
visions"> | 11 <polymer-element name="ct-failure-analyzer" attributes="failures builderLatestRe
visions lastUpdateDate"> |
12 <script> | 12 <script> |
13 // FIXME: Don't use a polymer component for this. Instead use a Failures mod
el | 13 // FIXME: Don't use a polymer component for this. Instead use a Failures mod
el |
14 // object that knows how to do the XHR and process the data appropriately. | 14 // object that knows how to do the XHR and process the data appropriately. |
15 Polymer({ | 15 Polymer({ |
16 builderLatestRevisions: null, | 16 builderLatestRevisions: null, |
17 failures: null, | 17 failures: null, |
| 18 lastUpdateDate: null, |
18 | 19 |
19 // FIXME: Get this from https://chromium.googlesource.com/chromium/tools/b
uild/+/master/scripts/slave/gatekeeper_trees.json?format=text. | 20 // FIXME: Get this from https://chromium.googlesource.com/chromium/tools/b
uild/+/master/scripts/slave/gatekeeper_trees.json?format=text. |
20 _trees: { | 21 _trees: { |
21 blink: [ | 22 blink: [ |
22 "https://build.chromium.org/p/chromium.webkit", | 23 "https://build.chromium.org/p/chromium.webkit", |
23 ], | 24 ], |
24 chromium: [ | 25 chromium: [ |
25 "https://build.chromium.org/p/chromium", | 26 "https://build.chromium.org/p/chromium", |
26 "https://build.chromium.org/p/chromium.chrome", | 27 "https://build.chromium.org/p/chromium.chrome", |
27 "https://build.chromium.org/p/chromium.chromiumos", | 28 "https://build.chromium.org/p/chromium.chromiumos", |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 return 0; | 64 return 0; |
64 }, | 65 }, |
65 | 66 |
66 update: function() { | 67 update: function() { |
67 var annotationPromise = CTFailureGroup.fetchAnnotations(); | 68 var annotationPromise = CTFailureGroup.fetchAnnotations(); |
68 net.json('http://auto-sheriff.appspot.com/data').then(function(data) { | 69 net.json('http://auto-sheriff.appspot.com/data').then(function(data) { |
69 annotationPromise.then(function(annotations) { | 70 annotationPromise.then(function(annotations) { |
70 // FIXME: Don't special-case the blink master. | 71 // FIXME: Don't special-case the blink master. |
71 this.builderLatestRevisions = new CTBuilderRevisions(data.latest_rev
isions['chromium.webkit']); | 72 this.builderLatestRevisions = new CTBuilderRevisions(data.latest_rev
isions['chromium.webkit']); |
72 this.failures = {}; | 73 this.failures = {}; |
| 74 this.lastUpdateDate = new Date(data.date * 1000); |
73 data.range_groups.forEach(function(group) { | 75 data.range_groups.forEach(function(group) { |
74 this._processFailuresForGroup(group, data.alerts, annotations); | 76 this._processFailuresForGroup(group, data.alerts, annotations); |
75 }.bind(this)); | 77 }.bind(this)); |
76 Object.keys(this.failures, function (tree, failuresByTree) { | 78 Object.keys(this.failures, function (tree, failuresByTree) { |
77 this.failures[tree].sort(this._failureListComparator.bind(this, tr
ee)); | 79 this.failures[tree].sort(this._failureListComparator.bind(this, tr
ee)); |
78 }.bind(this)); | 80 }.bind(this)); |
79 }.bind(this)); | 81 }.bind(this)); |
80 }.bind(this)); | 82 }.bind(this)); |
81 }, | 83 }, |
82 | 84 |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 if (!this.failures[tree]) | 157 if (!this.failures[tree]) |
156 this.failures[tree] = []; | 158 this.failures[tree] = []; |
157 // FIXME: Need a better identifier for a failure group; | 159 // FIXME: Need a better identifier for a failure group; |
158 var key = group.sort_key; | 160 var key = group.sort_key; |
159 this.failures[tree].push(new CTFailureGroup(key, failures, annotations
[key])); | 161 this.failures[tree].push(new CTFailureGroup(key, failures, annotations
[key])); |
160 }.bind(this)); | 162 }.bind(this)); |
161 }, | 163 }, |
162 }); | 164 }); |
163 </script> | 165 </script> |
164 </polymer-element> | 166 </polymer-element> |
OLD | NEW |