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-failure-analyzer.html"> | 9 <link rel="import" href="ct-failure-analyzer.html"> |
10 <link rel="import" href="ct-failure-grouper.html"> | 10 <link rel="import" href="ct-failure-grouper.html"> |
11 <link rel="import" href="ct-failure-stream.html"> | 11 <link rel="import" href="ct-failure-stream.html"> |
12 | 12 |
13 <polymer-element name="ct-unexpected-failures"> | 13 <polymer-element name="ct-unexpected-failures"> |
14 <template> | 14 <template> |
15 <style> | 15 <style> |
16 paper-toast { | 16 paper-toast { |
17 bottom: 40px; | 17 bottom: 40px; |
18 left: 10px; | 18 left: 10px; |
19 } | 19 } |
20 #update { | 20 paper-button { |
21 background: #4285f4; | 21 background: #4285f4; |
22 color: #fff; | 22 color: #fff; |
23 } | 23 } |
24 </style> | 24 </style> |
25 <ct-failure-analyzer id="analyzer" status="{{analyzerStatus}}" failures="{{f
ailures}}"></ct-failure-analyzer> | 25 <ct-failure-analyzer id="analyzer" status="{{analyzerStatus}}" failures="{{f
ailures}}"></ct-failure-analyzer> |
26 <ct-failure-grouper failures="{{failures}}" groups="{{failureGroups}}"></ct-
failure-grouper> | 26 <ct-failure-grouper failures="{{failures}}" groups="{{failureGroups}}"></ct-
failure-grouper> |
27 <paper-button id="update" on-tap="{{update}}">Update</paper-button> | 27 <paper-button on-tap="{{update}}">Update</paper-button> |
28 <ct-failure-stream groups="{{failureGroups}}"></ct-failure-stream> | 28 <ct-failure-stream groups="{{failureGroups}}"></ct-failure-stream> |
29 <paper-toast id="toast" text="{{analyzerStatus}}"></paper-toast> | 29 <paper-toast id="toast" text="{{analyzerStatus}}"></paper-toast> |
30 </template> | 30 </template> |
31 <script> | 31 <script> |
32 Polymer({ | 32 Polymer({ |
33 attached: function() { | 33 attached: function() { |
34 this.update(); | 34 this.update(); |
35 }, | 35 }, |
36 | 36 |
37 update: function() { | 37 update: function() { |
38 this.$.analyzer.update(); | 38 this.$.analyzer.update(); |
39 }, | 39 }, |
40 | 40 |
41 analyzerStatusChanged: function() { | 41 analyzerStatusChanged: function() { |
42 this.$.toast.show(); | 42 this.$.toast.show(); |
43 }, | 43 }, |
44 }); | 44 }); |
45 </script> | 45 </script> |
46 </polymer-element> | 46 </polymer-element> |
OLD | NEW |