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 |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 flex-direction: column; | 58 flex-direction: column; |
59 } | 59 } |
60 | 60 |
61 .snoozed { | 61 .snoozed { |
62 opacity: 0.5; | 62 opacity: 0.5; |
63 } | 63 } |
64 </style> | 64 </style> |
65 <ct-builder-grid failures="{{ group.failures }}"></ct-builder-grid> | 65 <ct-builder-grid failures="{{ group.failures }}"></ct-builder-grid> |
66 <div id="failure" class="{{ { snoozed: group.isSnoozed } | tokenList }}"> | 66 <div id="failure" class="{{ { snoozed: group.isSnoozed } | tokenList }}"> |
67 <ct-test-list tests="{{ group.failures }}" tree="{{ tree }}"></ct-test-lis
t> | 67 <ct-test-list tests="{{ group.failures }}" tree="{{ tree }}"></ct-test-lis
t> |
68 <ct-commit-list first="{{ group.failures[0].lastPassingRevisions }}" | 68 <ct-commit-list commitList="{{ _commits() }}"></ct-commit-list> |
69 last="{{ group.failures[0].firstFailingRevisions }}" | |
70 commits="{{ commits }}"></ct-commit-list> | |
71 </div> | 69 </div> |
72 <div id="buttons"> | 70 <div id="buttons"> |
73 <paper-button id="examine" on-tap="{{ examine }}" label="Examine"></paper-
button> | 71 <paper-button id="examine" on-tap="{{ examine }}" label="Examine"></paper-
button> |
74 <template if="{{ !group.isSnoozed }}"> | 72 <template if="{{ !group.isSnoozed }}"> |
75 <paper-button id="snooze" on-tap="{{ snooze }}" label="Snooze"></paper-b
utton> | 73 <paper-button id="snooze" on-tap="{{ snooze }}" label="Snooze"></paper-b
utton> |
76 </template> | 74 </template> |
77 <template if="{{ group.isSnoozed }}"> | 75 <template if="{{ group.isSnoozed }}"> |
78 <paper-button id="snooze" on-tap="{{ unsnooze }}" label="Unsnooze"></pap
er-button> | 76 <paper-button id="snooze" on-tap="{{ unsnooze }}" label="Unsnooze"></pap
er-button> |
79 </template> | 77 </template> |
80 </div> | 78 </div> |
81 </template> | 79 </template> |
82 <script> | 80 <script> |
83 Polymer({ | 81 Polymer({ |
84 group: null, | 82 group: null, |
85 commits: {}, | 83 commits: null, |
86 tree: '', | 84 tree: '', |
87 | 85 |
88 examine: function() { | 86 examine: function() { |
89 this.fire('ct-examine-failures', this.group); | 87 this.fire('ct-examine-failures', this.group); |
90 }, | 88 }, |
91 | 89 |
92 snooze: function() { | 90 snooze: function() { |
93 this.group.snoozeUntil(Date.now() + 60 * 60 * 1000); | 91 this.group.snoozeUntil(Date.now() + 60 * 60 * 1000); |
94 }, | 92 }, |
95 | 93 |
96 unsnooze: function() { | 94 unsnooze: function() { |
97 this.group.unsnooze(); | 95 this.group.unsnooze(); |
98 }, | 96 }, |
| 97 |
| 98 _commits: function() { |
| 99 if (!this.group) |
| 100 return undefined; |
| 101 return this.group.commitList(this.commits); |
| 102 } |
99 }); | 103 }); |
100 </script> | 104 </script> |
101 </polymer-element> | 105 </polymer-element> |
OLD | NEW |