| 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="../lib/log.html"> | 7 <link rel="import" href="../lib/log.html"> |
| 8 <link rel="import" href="../lib/net.html"> | 8 <link rel="import" href="../lib/net.html"> |
| 9 <link rel="import" href="../lib/sugar.html"> | 9 <link rel="import" href="../lib/sugar.html"> |
| 10 | 10 |
| 11 <script> | 11 <script> |
| 12 function CQGraphItem(value, unit, issue, patchset, alertThreshold) { | 12 function CQGraphItem(value, unit, issue, patchset, alertThreshold) { |
| 13 this.value = value; | 13 this.value = value; |
| 14 this.unit = unit; | 14 this.unit = unit; |
| 15 this.issue = issue; | 15 this.issue = issue; |
| 16 this.patchset = patchset; | 16 this.patchset = patchset; |
| 17 this.alertThreshold = alertThreshold; | 17 this.alertThreshold = alertThreshold; |
| 18 | 18 |
| 19 var reviewHost = 'https://codereview.chromium.org'; | 19 var reviewHost = 'https://codereview.chromium.org'; |
| 20 this.reviewURL = '{1}/{2}#{3}'.assign(reviewHost, this.issue, this.patchset); | 20 this.reviewURL = '{1}/{2}#{3}'.assign(reviewHost, this.issue, this.patchset); |
| 21 this.reviewTitle = null; | 21 this.reviewTitle = null; |
| 22 var issueURL = '{1}/api/{2}'.assign(reviewHost, this.issue); | 22 var issueURL = '{1}/api/{2}'.assign(reviewHost, this.issue); |
| 23 var self = this; | 23 var self = this; |
| 24 net.json({url: issueURL, cache: true}).then(function(json) { | 24 net.json({url: issueURL, cache: true}).then(function(json) { |
| 25 self.reviewTitle = json.subject; | 25 self.reviewTitle = json.subject; |
| 26 }).catch(log); | 26 }).catch(log); |
| 27 } | 27 } |
| 28 </script> | 28 </script> |
| OLD | NEW |