| 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"> |
| 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 }}" commits="{{ revisionLog }}"></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(), |
| 41 | 40 |
| 42 attached: function() { | 41 attached: function() { |
| 43 this.update(); | 42 this.update(); |
| 44 setInterval(this.update.bind(this), kUpdateFrequency); | 43 setInterval(this.update.bind(this), kUpdateFrequency); |
| 45 }, | 44 }, |
| 46 | 45 |
| 47 update: function() { | 46 update: function() { |
| 48 // FIXME: These shouldn't update if there's already an update in progres
s. | 47 // FIXME: These shouldn't update if there's already an update in progres
s. |
| 49 this.revisionLog.update(); | 48 this.revisionLog.update(); |
| 50 this.$.analyzer.update(); | 49 this.$.analyzer.update(); |
| 51 var treeStatuses = this.shadowRoot.querySelectorAll("ct-tree-status"); | 50 var treeStatuses = this.shadowRoot.querySelectorAll("ct-tree-status"); |
| 52 for (var i = 0; i < treeStatuses.length; i++) | 51 for (var i = 0; i < treeStatuses.length; i++) |
| 53 treeStatuses[i].update(); | 52 treeStatuses[i].update(); |
| 54 }, | 53 }, |
| 55 }); | 54 }); |
| 56 })(); | 55 })(); |
| 57 </script> | 56 </script> |
| 58 </polymer-element> | 57 </polymer-element> |
| OLD | NEW |