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"> |
| 29 No results to display. |
| 30 </div> |
| 31 </template> |
| 32 <template if="{{failures.length}}"> |
| 33 <core-menu selected="{{selected}}"> |
| 34 <template repeat="{{failure in failures}}"> |
| 35 <paper-item label="{{failure.testName}}"></paper-item> |
| 36 </template> |
| 37 </core-menu> |
| 38 <ct-results-by-builder failure="{{failures[selected]}}"></ct-results-by-bu
ilder> |
| 39 </template> |
| 40 </template> |
| 41 <script> |
| 42 Polymer({ |
| 43 failures: [], |
| 44 selected: 0, |
| 45 |
| 46 failuresChanged: function() { |
| 47 this.selected = 0; |
| 48 }, |
| 49 }); |
| 50 </script> |
| 51 </polymer-element> |
OLD | NEW |