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