summaryrefslogtreecommitdiff
path: root/share/www/script/jquery.couch.js
diff options
context:
space:
mode:
Diffstat (limited to 'share/www/script/jquery.couch.js')
-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({