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