| OLD | NEW |
| 1 <!-- | 1 <!-- |
| 2 Copyright 2015 The Chromium Authors. All rights reserved. | 2 Copyright 2015 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 --><html><head><link rel="import" href="ct-alert-card.html"> |
| 6 | 6 |
| 7 <link rel="import" href="ct-alert-card.html"> | 7 <dom-module id="ct-alerts"> |
| 8 | 8 <style> |
| 9 <polymer-element name="ct-alerts" attributes="alerts tree" noscript> | |
| 10 <template> | |
| 11 <style> | |
| 12 .main { | 9 .main { |
| 13 margin: 1em; | 10 margin: 1em; |
| 14 } | 11 } |
| 15 </style> | 12 </style> |
| 16 <div class='main' style=''> | 13 <template> |
| 17 <template repeat="{{ alert in alerts[tree].alerts }}"> | 14 <div class="main" style=""> |
| 15 <template is="dom-repeat" items="{{computeItems(alerts, tree)}}" as="alert
"> |
| 18 <ct-alert-card alert="{{ alert }}" tree="{{ tree }}"></ct-alert-card> | 16 <ct-alert-card alert="{{ alert }}" tree="{{ tree }}"></ct-alert-card> |
| 19 </template> | 17 </template> |
| 20 </div> | 18 </div> |
| 21 </template> | 19 </template> |
| 22 </polymer-element> | 20 <script> |
| 21 Polymer({ |
| 22 is: 'ct-alerts', |
| 23 properties: { |
| 24 alerts: { notify: true }, |
| 25 tree: { notify: true } |
| 26 }, |
| 27 computeItems: function (alerts, tree) { |
| 28 return alerts[tree].alerts; |
| 29 } |
| 30 }); |
| 31 </script> |
| 32 </dom-module> |
| OLD | NEW |