OLD | NEW |
(Empty) | |
| 1 <!-- |
| 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 |
| 4 found in the LICENSE file. |
| 5 --> |
| 6 |
| 7 <link rel="import" href="../bower_components/core-menu/core-menu.html"> |
| 8 <link rel="import" href="../bower_components/paper-item/paper-item.html"> |
| 9 <link rel="import" href="ct-results-by-builder.html"> |
| 10 |
| 11 <polymer-element name="ct-results-panel" attributes="failures"> |
| 12 <template> |
| 13 <style> |
| 14 :host { |
| 15 display: block; |
| 16 } |
| 17 |
| 18 paper-item.core-selected { |
| 19 font-weight: bold; |
| 20 } |
| 21 |
| 22 .message { |
| 23 text-align: center; |
| 24 margin: 20px; |
| 25 } |
| 26 </style> |
| 27 <template if="{{!failures.length}}"> |
| 28 <div class="message">No results to display.</div> |
| 29 </template> |
| 30 <template if="{{failures.length}}"> |
| 31 <core-menu selected="{{selected}}"> |
| 32 <template repeat="{{failure in failures}}"> |
| 33 <paper-item label="{{failure.testName}}"></paper-item> |
| 34 </template> |
| 35 </core-menu> |
| 36 <ct-results-by-builder failure="{{failures[selected]}}"></ct-results-by-bu
ilder> |
| 37 </template> |
| 38 </template> |
| 39 <script> |
| 40 Polymer({ |
| 41 failures: [], |
| 42 selected: 0, |
| 43 |
| 44 failuresChanged: function() { |
| 45 this.selected = 0; |
| 46 }, |
| 47 }); |
| 48 </script> |
| 49 </polymer-element> |
OLD | NEW |