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
diff --git a/jquery.couch.js b/jquery.couch.js
index 57983da..39824dd 100644
--- a/jquery.couch.js
+++ b/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({