From 70155ce87a85a5b70a225f350863e7ed50097345 Mon Sep 17 00:00:00 2001 From: Christopher Lenz Date: Tue, 16 Sep 2008 20:24:48 +0000 Subject: 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 --- share/www/config.html | 84 ++++++++++++++++++++++++++++++++++++++++ share/www/index.html | 1 + share/www/script/jquery.couch.js | 17 ++++++++ share/www/style/layout.css | 12 ++++++ 4 files changed, 114 insertions(+) create mode 100644 share/www/config.html (limited to 'share') diff --git a/share/www/config.html b/share/www/config.html new file mode 100644 index 00000000..d811fe1f --- /dev/null +++ b/share/www/config.html @@ -0,0 +1,84 @@ + + + + + Configuration + + + + + + + + + +

+ Overview + Configuration +

+
+ + + + + + + + + +
Configuration
SectionOptionValue
+ +
+
+ + diff --git a/share/www/index.html b/share/www/index.html index d0cc4786..54cc9e15 100644 --- a/share/www/index.html +++ b/share/www/index.html @@ -88,6 +88,7 @@ specific language governing permissions and limitations under the License.
  • Tools
  • Databases diff --git a/share/www/script/jquery.couch.js b/share/www/script/jquery.couch.js index 2121cf0c..bd77bf80 100644 --- a/share/www/script/jquery.couch.js +++ b/share/www/script/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, diff --git a/share/www/style/layout.css b/share/www/style/layout.css index ec13b27d..7b0aeb04 100644 --- a/share/www/style/layout.css +++ b/share/www/style/layout.css @@ -459,6 +459,18 @@ ul.suggest-dropdown li.selected { cursor: pointer; background: Highlight; background-image: url(../image/test_failure.gif); color: #c00; } +/* Configuration */ + +table#config tbody th { background: #e6e6e6; border-right: none; + border-top: 1px solid #d9d9d9; +} +table#config tbody td.name { border-left: 1px solid #d9d9d9; color: #333; + font-weight: bold; +} +table#config tbody td.value { + font-family: "DejaVu Sans Mono",Monaco,monospace; +} + /* Replication */ form#replicator { background: #f4f4f4; border: 1px solid; -- cgit v1.2.3