Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1698)

Unified Diff: Tools/GardeningServer/model/tree-status.html

Issue 443243002: Move treestatus.js to a model class. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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>
« no previous file with comments | « no previous file | Tools/GardeningServer/model/tree-status-tests.html » ('j') | Tools/GardeningServer/ui/ct-tree-status.html » ('J')

Powered by Google App Engine
This is Rietveld 408576698