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-commit-list.html"> | 7 <link rel="import" href="ct-commit-list.html"> |
8 | 8 |
9 <script> | 9 <script> |
10 function CTFailureGroup(failures, commitList) { | 10 function CTFailureGroup(key, failures, commitList) { |
| 11 this.fingerprint = key; |
11 this.failures = failures; | 12 this.failures = failures; |
12 this.commitList = commitList; | 13 this.commitList = commitList; |
13 this._annotation = CTFailureGroup._mergeAnnotations(failures.map(function(fail
ure) { | 14 this._annotation = CTFailureGroup._mergeAnnotations(failures.map(function(fail
ure) { |
14 return failure.annotations(); | 15 return failure.annotations(); |
15 }).flatten()); | 16 }).flatten()); |
16 this._computeProperties(); | 17 this._computeProperties(); |
17 } | 18 } |
18 | 19 |
19 CTFailureGroup.prototype.snoozeUntil = function(time) { | 20 CTFailureGroup.prototype.snoozeUntil = function(time) { |
20 return this._annotate({ | 21 return this._annotate({ |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 }.bind(this)); | 114 }.bind(this)); |
114 }; | 115 }; |
115 | 116 |
116 CTFailureGroup.fetchAnnotations = function() { | 117 CTFailureGroup.fetchAnnotations = function() { |
117 // FIXME: Fetch annotations from frontend. | 118 // FIXME: Fetch annotations from frontend. |
118 var stored = localStorage.CTFailureGroupAnnotations; | 119 var stored = localStorage.CTFailureGroupAnnotations; |
119 var annotations = stored ? JSON.parse(stored) : {}; | 120 var annotations = stored ? JSON.parse(stored) : {}; |
120 return Promise.resolve(annotations); | 121 return Promise.resolve(annotations); |
121 }; | 122 }; |
122 </script> | 123 </script> |
OLD | NEW |