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