Chromium Code Reviews| Index: Tools/GardeningServer/model/tree-status.html |
| diff --git a/Tools/GardeningServer/model/tree-status.html b/Tools/GardeningServer/model/tree-status.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..0ef6c9aa32b382b0f090e9e4c945404c897cc1c2 |
| --- /dev/null |
| +++ b/Tools/GardeningServer/model/tree-status.html |
| @@ -0,0 +1,27 @@ |
| +<!-- |
| +Copyright 2014 The Chromium Authors. All rights reserved. |
| +Use of this source code is governed by a BSD-style license that can be |
| +found in the LICENSE file. |
| +--> |
| + |
| +<script> |
| +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.
|
| +} |
| + |
| +TreeStatus.prototype.urlByName = function(name) { |
| + if (name == 'blink') |
| + return "http://blink-status.appspot.com/"; |
| + if (name == 'chromium') |
| + return "http://chromium-status.appspot.com/"; |
| + return null; |
| +} |
| + |
| +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.
|
| + return net.json(statusURL).then(function(statusJSON) { |
| + if (statusJSON.can_commit_freely) |
| + resultSpan.textContent = "OPEN"; |
| + else |
| + resultSpan.textContent = statusJSON.message + " by " + statusJSON.username; |
| + }); |
| +}; |
| +</script> |