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="../bower_components/paper-button/paper-button.html"> | 7 <link rel="import" href="../bower_components/paper-button/paper-button.html"> |
8 <link rel="import" href="../model/ct-commit-log.html"> | 8 <link rel="import" href="../model/ct-commit-log.html"> |
9 <link rel="import" href="ct-failure-analyzer.html"> | 9 <link rel="import" href="ct-failure-analyzer.html"> |
10 <link rel="import" href="ct-failure-stream.html"> | 10 <link rel="import" href="ct-failure-stream.html"> |
11 <link rel="import" href="ct-tree-status.html"> | 11 <link rel="import" href="ct-tree-status.html"> |
12 | 12 |
13 <polymer-element name="ct-unexpected-failures"> | 13 <polymer-element name="ct-unexpected-failures" attributes="tree"> |
14 <template> | 14 <template> |
15 <style> | 15 <style> |
16 ct-tree-status { | 16 ct-tree-status { |
17 white-space: nowrap; | 17 white-space: nowrap; |
18 overflow: hidden; | 18 overflow: hidden; |
19 text-overflow: ellipsis; | 19 text-overflow: ellipsis; |
20 margin: 5px; | 20 margin: 5px; |
21 padding: 3px; | 21 padding: 3px; |
22 } | 22 } |
23 | 23 |
24 ct-tree-status[status=open] { | 24 ct-tree-status[status=open] { |
25 margin: 0; | 25 margin: 0; |
26 padding: 0; | 26 padding: 0; |
27 } | 27 } |
28 </style> | 28 </style> |
29 <ct-failure-analyzer id="analyzer" failures="{{ failures }}" builderLatestRe
visions="{{ builderLatestRevisions }}"></ct-failure-analyzer> | 29 <ct-failure-analyzer id="analyzer" failures="{{ failures }}" builderLatestRe
visions="{{ builderLatestRevisions }}"></ct-failure-analyzer> |
30 <ct-tree-status project="chromium"></ct-tree-status> | 30 <ct-tree-status project="chromium"></ct-tree-status> |
31 <ct-tree-status project="blink"></ct-tree-status> | 31 <ct-tree-status project="blink"></ct-tree-status> |
32 <ct-failure-stream groups="{{ failures }}" commits="{{ revisionLog }}"></ct-
failure-stream> | 32 <ct-failure-stream groups="{{ failures[tree] }}" commits="{{ revisionLog }}"
tree="{{ tree }}"></ct-failure-stream> |
33 </template> | 33 </template> |
34 <script> | 34 <script> |
35 (function() { | 35 (function() { |
36 var kUpdateFrequency = 1000 * 30; | 36 var kUpdateFrequency = 1000 * 30; |
37 | 37 |
38 Polymer({ | 38 Polymer({ |
39 revisionLog: new CTCommitLog(), | 39 revisionLog: new CTCommitLog(), |
| 40 tree: '', |
40 | 41 |
41 attached: function() { | 42 attached: function() { |
42 this.update(); | 43 this.update(); |
43 setInterval(this.update.bind(this), kUpdateFrequency); | 44 setInterval(this.update.bind(this), kUpdateFrequency); |
44 }, | 45 }, |
45 | 46 |
46 update: function() { | 47 update: function() { |
47 // FIXME: These shouldn't update if there's already an update in progres
s. | 48 // FIXME: These shouldn't update if there's already an update in progres
s. |
48 this.revisionLog.update(); | 49 this.revisionLog.update(); |
49 this.$.analyzer.update(); | 50 this.$.analyzer.update(); |
50 var treeStatuses = this.shadowRoot.querySelectorAll("ct-tree-status"); | 51 var treeStatuses = this.shadowRoot.querySelectorAll("ct-tree-status"); |
51 for (var i = 0; i < treeStatuses.length; i++) | 52 for (var i = 0; i < treeStatuses.length; i++) |
52 treeStatuses[i].update(); | 53 treeStatuses[i].update(); |
53 }, | 54 }, |
54 }); | 55 }); |
55 })(); | 56 })(); |
56 </script> | 57 </script> |
57 </polymer-element> | 58 </polymer-element> |
OLD | NEW |