| 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="../model/ct-failure.html"> | 7 <link rel="import" href="../model/ct-failure.html"> |
| 8 | 8 |
| 9 <polymer-element name="ct-failure-analyzer" attributes="failures builderLatestRe
visions"> | 9 <polymer-element name="ct-failure-analyzer" attributes="failures builderLatestRe
visions"> |
| 10 <script> | 10 <script> |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 // a failure group, then this will incorrectly overwrite one of the va
lues. | 73 // a failure group, then this will incorrectly overwrite one of the va
lues. |
| 74 failuresByReason[failureKey][failure.builder_name] = { | 74 failuresByReason[failureKey][failure.builder_name] = { |
| 75 // FIXME: Rename to failureType. | 75 // FIXME: Rename to failureType. |
| 76 actual: failureType, | 76 actual: failureType, |
| 77 lastFailingBuild: failure.last_failing_build, | 77 lastFailingBuild: failure.last_failing_build, |
| 78 masterUrl: failure.master_url, | 78 masterUrl: failure.master_url, |
| 79 }; | 79 }; |
| 80 }.bind(this)); | 80 }.bind(this)); |
| 81 | 81 |
| 82 var groupedFailures = []; | 82 var groupedFailures = []; |
| 83 | |
| 84 var oldestFailingRevision, newestPassingRevision; | |
| 85 // FIXME: This is a workaround for the backend's bogus data when the bli
nk | |
| 86 // regression ranges have no overlap. | |
| 87 if (group.merged_last_passing && group.merged_first_failing.blink > grou
p.merged_last_passing.blink) { | |
| 88 oldestFailingRevision = Number(group.merged_first_failing.blink); | |
| 89 newestPassingRevision = Number(group.merged_last_passing.blink); | |
| 90 } | |
| 91 | |
| 92 Object.keys(failuresByReason, function(failureKey, resultByBuilder) { | 83 Object.keys(failuresByReason, function(failureKey, resultByBuilder) { |
| 93 var failure = JSON.parse(failureKey); | 84 var failure = JSON.parse(failureKey); |
| 94 groupedFailures.push(new CTFailure(failure.step, failure.reason, resul
tByBuilder, oldestFailingRevision, newestPassingRevision)); | 85 groupedFailures.push(new CTFailure(failure.step, failure.reason, resul
tByBuilder, group.merged_first_failing, group.merged_last_passing)); |
| 95 }); | 86 }); |
| 96 | 87 |
| 97 // FIXME: Make this a model class intead of a dumb object. | 88 // FIXME: Make this a model class intead of a dumb object. |
| 98 groupedFailures.sort(this._failureComparator); | 89 groupedFailures.sort(this._failureComparator); |
| 99 | 90 |
| 100 if (groupedFailures.length) | 91 if (groupedFailures.length) |
| 101 this.failures.push(groupedFailures); | 92 this.failures.push(groupedFailures); |
| 102 }, | 93 }, |
| 103 }); | 94 }); |
| 104 </script> | 95 </script> |
| 105 </polymer-element> | 96 </polymer-element> |
| OLD | NEW |