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-failing-builders.html"> | 9 <link rel="import" href="ct-failing-builders.html"> |
10 <link rel="import" href="ct-failure-analyzer.html"> | 10 <link rel="import" href="ct-failure-analyzer.html"> |
(...skipping 18 matching lines...) Expand all Loading... |
29 | 29 |
30 ct-tree-status[status=open] { | 30 ct-tree-status[status=open] { |
31 margin: 0; | 31 margin: 0; |
32 padding: 0; | 32 padding: 0; |
33 } | 33 } |
34 </style> | 34 </style> |
35 <ct-failure-analyzer id="analyzer" failures="{{ failures }}" builderLatestRe
visions="{{ builderLatestRevisions }}"></ct-failure-analyzer> | 35 <ct-failure-analyzer id="analyzer" failures="{{ failures }}" builderLatestRe
visions="{{ builderLatestRevisions }}"></ct-failure-analyzer> |
36 <ct-tree-status project="chromium"></ct-tree-status> | 36 <ct-tree-status project="chromium"></ct-tree-status> |
37 <ct-tree-status project="blink"></ct-tree-status> | 37 <ct-tree-status project="blink"></ct-tree-status> |
38 <ct-failing-builders builders="{{ failures.builders }}"></ct-failing-builder
s> | 38 <ct-failing-builders builders="{{ failures.builders }}"></ct-failing-builder
s> |
39 <ct-failure-stream groups="{{ failures.unexpected }}" builderLatestRevisions
="{{ builderLatestRevisions }}" commits="{{revisionLog.commits}}"></ct-failure-s
tream> | 39 <ct-failure-stream groups="{{ failures.unexpected }}" commits="{{revisionLog
.commits}}"></ct-failure-stream> |
40 </template> | 40 </template> |
41 <script> | 41 <script> |
| 42 (function() { |
| 43 var kUpdateFrequency = 1000 * 30; |
| 44 |
42 Polymer({ | 45 Polymer({ |
43 revisionLog: new CTCommitLog(), | 46 revisionLog: new CTCommitLog(), |
44 | 47 |
45 attached: function() { | 48 attached: function() { |
46 this.update(); | 49 this.update(); |
47 setInterval(this.update.bind(this), config.kUpdateFrequency); | 50 setInterval(this.update.bind(this), kUpdateFrequency); |
48 }, | 51 }, |
49 | 52 |
50 update: function() { | 53 update: function() { |
51 // FIXME: These shouldn't update if there's already an update in progres
s. | 54 // FIXME: These shouldn't update if there's already an update in progres
s. |
52 this.revisionLog.update(); | 55 this.revisionLog.update(); |
53 this.$.analyzer.update(); | 56 this.$.analyzer.update(); |
54 var treeStatuses = this.shadowRoot.querySelectorAll("ct-tree-status"); | 57 var treeStatuses = this.shadowRoot.querySelectorAll("ct-tree-status"); |
55 for (var i = 0; i < treeStatuses.length; i++) | 58 for (var i = 0; i < treeStatuses.length; i++) |
56 treeStatuses[i].update(); | 59 treeStatuses[i].update(); |
57 }, | 60 }, |
58 }); | 61 }); |
| 62 })(); |
59 </script> | 63 </script> |
60 </polymer-element> | 64 </polymer-element> |
OLD | NEW |