| 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="ct-builder-grid.html"> | 7 <link rel="import" href="ct-builder-grid.html"> |
| 8 <link rel="import" href="ct-commit-list.html"> | 8 <link rel="import" href="ct-commit-list.html"> |
| 9 <link rel="import" href="ct-test-list.html"> | 9 <link rel="import" href="ct-test-list.html"> |
| 10 | 10 |
| 11 <polymer-element name="ct-failure-card" attributes="failures builderLatestRevisi
ons commits"> | 11 <polymer-element name="ct-failure-card" attributes="failures commits"> |
| 12 <template> | 12 <template> |
| 13 <style> | 13 <style> |
| 14 :host { | 14 :host { |
| 15 display: flex; | 15 display: flex; |
| 16 } | 16 } |
| 17 | 17 |
| 18 /* FIXME: All this paper-button styling should go in a cr-button component
so that | 18 /* FIXME: All this paper-button styling should go in a cr-button component
so that |
| 19 we can use buttons in different places and have them all look the same.
*/ | 19 we can use buttons in different places and have them all look the same.
*/ |
| 20 paper-button { | 20 paper-button { |
| 21 -webkit-user-select: none; | 21 -webkit-user-select: none; |
| (...skipping 26 matching lines...) Expand all Loading... |
| 48 } | 48 } |
| 49 | 49 |
| 50 .failure { | 50 .failure { |
| 51 flex: 1; | 51 flex: 1; |
| 52 } | 52 } |
| 53 | 53 |
| 54 #examine { | 54 #examine { |
| 55 align-self: flex-start; | 55 align-self: flex-start; |
| 56 } | 56 } |
| 57 </style> | 57 </style> |
| 58 <ct-builder-grid failures="{{failures}}" builderLatestRevisions="{{builderLa
testRevisions}}"></ct-builder-grid> | 58 <ct-builder-grid failures="{{failures}}"></ct-builder-grid> |
| 59 <div class="failure"> | 59 <div class="failure"> |
| 60 <ct-test-list tests="{{failures|testNames}}"></ct-test-list> | 60 <ct-test-list tests="{{failures|testNames}}"></ct-test-list> |
| 61 <ct-commit-list first="{{failures[0].newestPassingRevision + 1}}" | 61 <ct-commit-list first="{{failures[0].newestPassingRevision + 1}}" |
| 62 last="{{failures[0].oldestFailingRevision}}" | 62 last="{{failures[0].oldestFailingRevision}}" |
| 63 commits="{{commits}}"></ct-commit-list> | 63 commits="{{commits}}"></ct-commit-list> |
| 64 </div> | 64 </div> |
| 65 <paper-button id="examine" on-tap="{{examine}}">Examine</paper-button> | 65 <paper-button id="examine" on-tap="{{examine}}">Examine</paper-button> |
| 66 </template> | 66 </template> |
| 67 <script> | 67 <script> |
| 68 Polymer({ | 68 Polymer({ |
| 69 failures: [], | 69 failures: [], |
| 70 builderLatestRevisions: {}, | |
| 71 commits: {}, | 70 commits: {}, |
| 72 | 71 |
| 73 testNames: function(failures) { | 72 testNames: function(failures) { |
| 74 return failures.map(function(failureAnalysis) { return failureAnalysis.t
estName }).sort(); | 73 return failures.map(function(failureAnalysis) { return failureAnalysis.t
estName }).sort(); |
| 75 }, | 74 }, |
| 76 | 75 |
| 77 examine: function() { | 76 examine: function() { |
| 78 this.fire('ct-examine-failures', this.failures); | 77 this.fire('ct-examine-failures', this.failures); |
| 79 }, | 78 }, |
| 80 }); | 79 }); |
| 81 </script> | 80 </script> |
| 82 </polymer-element> | 81 </polymer-element> |
| OLD | NEW |