| 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="group commits tree"> | 11 <polymer-element name="ct-failure-card" attributes="group commitList tree"> |
| 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 opacity: 0.5; | 56 opacity: 0.5; |
| 57 } | 57 } |
| 58 | 58 |
| 59 #examine, #snooze { | 59 #examine, #snooze { |
| 60 align-self: flex-start; | 60 align-self: flex-start; |
| 61 } | 61 } |
| 62 </style> | 62 </style> |
| 63 <ct-builder-grid failures="{{ group.failures }}"></ct-builder-grid> | 63 <ct-builder-grid failures="{{ group.failures }}"></ct-builder-grid> |
| 64 <div class="{{ { failure: true, snoozed: group.isSnoozed } | tokenList }}"> | 64 <div class="{{ { failure: true, snoozed: group.isSnoozed } | tokenList }}"> |
| 65 <ct-test-list tests="{{ group.failures }}" tree="{{ tree }}"></ct-test-lis
t> | 65 <ct-test-list tests="{{ group.failures }}" tree="{{ tree }}"></ct-test-lis
t> |
| 66 <ct-commit-list first="{{ group.failures[0].lastPassingRevisions }}" | 66 <ct-commit-list commitList="{{ commitList }}"></ct-commit-list> |
| 67 last="{{ group.failures[0].firstFailingRevisions }}" | |
| 68 commits="{{ commits }}"></ct-commit-list> | |
| 69 </div> | 67 </div> |
| 70 <paper-button id="examine" on-tap="{{ examine }}">Examine</paper-button> | 68 <paper-button id="examine" on-tap="{{ examine }}">Examine</paper-button> |
| 71 <template if="{{ !group.isSnoozed }}"> | 69 <template if="{{ !group.isSnoozed }}"> |
| 72 <paper-button id="snooze" on-tap="{{ snooze }}">Snooze</paper-button> | 70 <paper-button id="snooze" on-tap="{{ snooze }}">Snooze</paper-button> |
| 73 </template> | 71 </template> |
| 74 <template if="{{ group.isSnoozed }}"> | 72 <template if="{{ group.isSnoozed }}"> |
| 75 <paper-button id="snooze" on-tap="{{ unsnooze }}">Unsnooze</paper-button> | 73 <paper-button id="snooze" on-tap="{{ unsnooze }}">Unsnooze</paper-button> |
| 76 </template> | 74 </template> |
| 77 </template> | 75 </template> |
| 78 <script> | 76 <script> |
| 79 Polymer({ | 77 Polymer({ |
| 80 group: null, | 78 group: null, |
| 81 commits: {}, | 79 commitList: null, |
| 82 tree: '', | 80 tree: '', |
| 83 | 81 |
| 84 examine: function() { | 82 examine: function() { |
| 85 this.fire('ct-examine-failures', this.group); | 83 this.fire('ct-examine-failures', this.group); |
| 86 }, | 84 }, |
| 87 | 85 |
| 88 snooze: function() { | 86 snooze: function() { |
| 89 this.group.snoozeUntil(Date.now() + 60 * 60 * 1000); | 87 this.group.snoozeUntil(Date.now() + 60 * 60 * 1000); |
| 90 }, | 88 }, |
| 91 | 89 |
| 92 unsnooze: function() { | 90 unsnooze: function() { |
| 93 this.group.unsnooze(); | 91 this.group.unsnooze(); |
| 94 }, | 92 }, |
| 95 }); | 93 }); |
| 96 </script> | 94 </script> |
| 97 </polymer-element> | 95 </polymer-element> |
| OLD | NEW |