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