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 <script> | |
8 function TreeStatus() { | |
ojan
2014/08/06 22:34:17
Lets pass in the project name as a constructor on
dsinclair
2014/08/07 18:09:23
Done.
| |
9 } | |
10 | |
11 TreeStatus.prototype.urlByName = function(name) { | |
12 if (name == 'blink') | |
13 return "http://blink-status.appspot.com/"; | |
14 if (name == 'chromium') | |
15 return "http://chromium-status.appspot.com/"; | |
16 return null; | |
17 } | |
18 | |
19 TreeStatus.prototype.fetchTreeStatus = function(statusURL, resultSpan) { | |
ojan
2014/08/06 22:34:17
This method appears to be unused. Delete it? I thi
dsinclair
2014/08/07 18:09:23
Done.
| |
20 return net.json(statusURL).then(function(statusJSON) { | |
21 if (statusJSON.can_commit_freely) | |
22 resultSpan.textContent = "OPEN"; | |
23 else | |
24 resultSpan.textContent = statusJSON.message + " by " + statusJSON.username ; | |
25 }); | |
26 }; | |
27 </script> | |
OLD | NEW |