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