Add HTTP API for getting the complete config, and add a page to Futon that displays the configuration.
git-svn-id: https://svn.apache.org/repos/asf/incubator/couchdb/trunk@696041 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/jquery.couch.js b/jquery.couch.js
index 8a777bd..4db8e9a 100644
--- a/jquery.couch.js
+++ b/jquery.couch.js
@@ -32,6 +32,23 @@
});
},
+ config: function(options, section, option, value) {
+ $.ajax({
+ type: "GET", url: "/_config/",
+ 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("An error occurred retrieving the server configuration: " +
+ resp.reason);
+ }
+ }
+ });
+ },
+
db: function(name) {
return {
name: name,