From 7d2eeb4026f84d92e43856080ac3dbad6da41817 Mon Sep 17 00:00:00 2001 From: Christopher Lenz Date: Mon, 26 Jan 2009 20:38:52 +0000 Subject: 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 --- share/www/script/jquery.couch.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'share/www/script/jquery.couch.js') 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({ -- cgit v1.2.3