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/net.html"> |
| 8 |
7 <script> | 9 <script> |
8 function TreeStatus(project) { | 10 function TreeStatus(project) { |
9 this.project = project; | 11 this.project = project; |
10 this.message = ''; | 12 this.message = ''; |
11 this.status = 'unknown'; | 13 this.status = 'unknown'; |
12 | 14 |
13 this.url = "http://{1}-status.appspot.com/".assign(project); | 15 this.url = "http://{1}-status.appspot.com/".assign(project); |
14 } | 16 } |
15 | 17 |
16 TreeStatus.prototype.update = function() { | 18 TreeStatus.prototype.update = function() { |
(...skipping 14 matching lines...) Expand all Loading... |
31 var responseLowerCase = status.message.toLowerCase(); | 33 var responseLowerCase = status.message.toLowerCase(); |
32 if (responseLowerCase.indexOf('throttled') != -1) { | 34 if (responseLowerCase.indexOf('throttled') != -1) { |
33 this.status = 'throttled'; | 35 this.status = 'throttled'; |
34 } else if (responseLowerCase.indexOf("closed") != -1) { | 36 } else if (responseLowerCase.indexOf("closed") != -1) { |
35 this.status = 'closed'; | 37 this.status = 'closed'; |
36 } else { | 38 } else { |
37 this.status = 'unknown'; | 39 this.status = 'unknown'; |
38 } | 40 } |
39 }; | 41 }; |
40 </script> | 42 </script> |
OLD | NEW |