summaryrefslogtreecommitdiff
path: root/share/www/script
diff options
context:
space:
mode:
authorChristopher Lenz <cmlenz@apache.org>2009-01-26 20:38:52 +0000
committerChristopher Lenz <cmlenz@apache.org>2009-01-26 20:38:52 +0000
commit7d2eeb4026f84d92e43856080ac3dbad6da41817 (patch)
treeacd6dd7353396075a7db967bc14a5b49599fa50c /share/www/script
parent60be7c2a8f3d88f47be7eef5cf0a973c868cfcbc (diff)
Add a page to Futon that shows the currently active tasks (compaction, view indexing, etc).
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@737829 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'share/www/script')
-rw-r--r--share/www/script/jquery.couch.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/share/www/script/jquery.couch.js b/share/www/script/jquery.couch.js
index f3547b8d..c92be220 100644
--- a/share/www/script/jquery.couch.js
+++ b/share/www/script/jquery.couch.js
@@ -14,6 +14,24 @@
$.couch = $.couch || {};
$.extend($.couch, {
+ activeTasks: function(options) {
+ options = options || {};
+ $.ajax({
+ type: "GET", url: "/_active_tasks", dataType: "json",
+ complete: function(req) {
+ var resp = $.httpData(req, "json");
+ if (req.status == 200) {
+ if (options.success) options.success(resp);
+ } else if (options.error) {
+ options.error(req.status, resp.error, resp.reason);
+ } else {
+ alert("Active task status could not be retrieved: " +
+ resp.reason);
+ }
+ }
+ });
+ },
+
allDbs: function(options) {
options = options || {};
$.ajax({