You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ga...@apache.org on 2013/10/22 17:24:11 UTC
[01/15] git commit: updated refs/heads/1809-compact-and-clean to
489a6c2
Updated Branches:
refs/heads/1809-compact-and-clean 6f9661e7f -> 489a6c289 (forced update)
Allow databases with / in the names
Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/6b158a2f
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/6b158a2f
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/6b158a2f
Branch: refs/heads/1809-compact-and-clean
Commit: 6b158a2f2fa75e15fa2fc4a1f200b386280c9e76
Parents: a3822a9
Author: suelockwood <de...@gmail.com>
Authored: Wed Oct 16 16:41:28 2013 -0400
Committer: suelockwood <de...@gmail.com>
Committed: Wed Oct 16 16:42:01 2013 -0400
----------------------------------------------------------------------
src/fauxton/app/modules/databases/views.js | 3 ++-
src/fauxton/app/modules/documents/routes.js | 4 ++--
src/fauxton/app/templates/databases/item.html | 2 +-
3 files changed, 5 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/couchdb/blob/6b158a2f/src/fauxton/app/modules/databases/views.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/modules/databases/views.js b/src/fauxton/app/modules/databases/views.js
index 749f79c..0f67d36 100644
--- a/src/fauxton/app/modules/databases/views.js
+++ b/src/fauxton/app/modules/databases/views.js
@@ -26,6 +26,7 @@ function(app, Components, FauxtonAPI) {
serialize: function() {
return {
+ encoded: encodeURIComponent(this.model.get("name")),
database: this.model
};
}
@@ -59,7 +60,7 @@ function(app, Components, FauxtonAPI) {
// TODO: switch to using a model, or Databases.databaseUrl()
// Neither of which are in scope right now
// var db = new Database.Model({id: dbname});
- var url = ["/database/", dbname, "/_all_docs?limit=10"].join('');
+ var url = ["/database/", encodeURIComponent(dbname), "/_all_docs?limit=10"].join('');
FauxtonAPI.navigate(url);
}
},
http://git-wip-us.apache.org/repos/asf/couchdb/blob/6b158a2f/src/fauxton/app/modules/documents/routes.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/modules/documents/routes.js b/src/fauxton/app/modules/documents/routes.js
index 13b2bc9..df8c07d 100644
--- a/src/fauxton/app/modules/documents/routes.js
+++ b/src/fauxton/app/modules/documents/routes.js
@@ -167,7 +167,7 @@ function(app, FauxtonAPI, Documents, Databases) {
var docOptions = app.getParams();
docOptions.include_docs = true;
- this.databaseName = options[0];
+ this.databaseName = encodeURIComponent(options[0]);
this.data = {
database: new Databases.Model({id:this.databaseName})
@@ -379,7 +379,7 @@ function(app, FauxtonAPI, Documents, Databases) {
},
initialize: function (route, masterLayout, options) {
- this.databaseName = options[0];
+ this.databaseName = encodeURIComponent(options[0]);
this.database = new Databases.Model({id: this.databaseName});
var docOptions = app.getParams();
http://git-wip-us.apache.org/repos/asf/couchdb/blob/6b158a2f/src/fauxton/app/templates/databases/item.html
----------------------------------------------------------------------
diff --git a/src/fauxton/app/templates/databases/item.html b/src/fauxton/app/templates/databases/item.html
index 8740242..a8801b0 100644
--- a/src/fauxton/app/templates/databases/item.html
+++ b/src/fauxton/app/templates/databases/item.html
@@ -13,7 +13,7 @@ the License.
-->
<td>
- <a href="#/database/<%= database.get("name") %>/_all_docs?limit=100"><%= database.get("name") %></a>
+ <a href="#/database/<%=encoded%>/_all_docs?limit=100"><%= database.get("name") %></a>
</td>
<td><%= database.status.humanSize() %></td>
<td><%= database.status.numDocs() %></td>
[06/15] git commit: updated refs/heads/1809-compact-and-clean to
489a6c2
Posted by ga...@apache.org.
Fix for Delete view
Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/7b95e2e1
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/7b95e2e1
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/7b95e2e1
Branch: refs/heads/1809-compact-and-clean
Commit: 7b95e2e1d0c4b81551579a3101b446ccfa2b1180
Parents: db36103
Author: suelockwood <de...@gmail.com>
Authored: Thu Oct 17 16:17:25 2013 -0400
Committer: suelockwood <de...@gmail.com>
Committed: Thu Oct 17 16:17:25 2013 -0400
----------------------------------------------------------------------
src/fauxton/app/modules/documents/views.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/couchdb/blob/7b95e2e1/src/fauxton/app/modules/documents/views.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/modules/documents/views.js b/src/fauxton/app/modules/documents/views.js
index 2f3b694..8cd1384 100644
--- a/src/fauxton/app/modules/documents/views.js
+++ b/src/fauxton/app/modules/documents/views.js
@@ -1106,7 +1106,7 @@ function(app, FauxtonAPI, Components, Documents, pouchdb, Codemirror, JSHint, re
events: {
"click button.save": "saveView",
- "click button.cancel-button": "deleteView",
+ "click button.delete": "deleteView",
"change select#reduce-function-selector": "updateReduce",
"change select#ddoc": "updateDesignDoc",
"click #db-views-tabs-nav": 'toggleIndexNav'
[02/15] git commit: updated refs/heads/1809-compact-and-clean to
489a6c2
Posted by ga...@apache.org.
Remove the animation transitions
Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/a3822a92
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/a3822a92
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/a3822a92
Branch: refs/heads/1809-compact-and-clean
Commit: a3822a927f3057a9d6c4e9e0f464a8a52d822338
Parents: a61b47e
Author: suelockwood <de...@gmail.com>
Authored: Wed Oct 16 11:41:24 2013 -0400
Committer: suelockwood <de...@gmail.com>
Committed: Wed Oct 16 16:42:01 2013 -0400
----------------------------------------------------------------------
src/fauxton/assets/less/fauxton.less | 1 -
1 file changed, 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/couchdb/blob/a3822a92/src/fauxton/assets/less/fauxton.less
----------------------------------------------------------------------
diff --git a/src/fauxton/assets/less/fauxton.less b/src/fauxton/assets/less/fauxton.less
index 56d1453..30d872d 100644
--- a/src/fauxton/assets/less/fauxton.less
+++ b/src/fauxton/assets/less/fauxton.less
@@ -294,7 +294,6 @@ a:hover{
#dashboard {
max-width: 1500px;
- .customTransition(left, 1s, 0.805, 0.005, 0.165, 0.985); // alt 0.730, -0.425, 0.000, 0.960 or... 0.645, -0.295, 0.000, 0.960
.box-shadow(-6px 0 rgba(0, 0, 0, 0.1));
border-left: 1px solid #999;
position: absolute;
[15/15] git commit: updated refs/heads/1809-compact-and-clean to
489a6c2
Posted by ga...@apache.org.
Finish view compaction
Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/489a6c28
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/489a6c28
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/489a6c28
Branch: refs/heads/1809-compact-and-clean
Commit: 489a6c289326909343eb6907db1c4974dd9b0dc7
Parents: d35a9b1
Author: Garren Smith <ga...@gmail.com>
Authored: Tue Oct 22 17:17:58 2013 +0200
Committer: Garren Smith <ga...@gmail.com>
Committed: Tue Oct 22 17:23:18 2013 +0200
----------------------------------------------------------------------
src/fauxton/app/addons/compaction/base.js | 2 +
src/fauxton/app/addons/compaction/resources.js | 10 ++++
src/fauxton/app/addons/compaction/routes.js | 10 ++--
.../compaction/templates/compact_view.html | 14 +++++
.../app/addons/compaction/templates/layout.html | 8 ---
src/fauxton/app/addons/compaction/views.js | 57 ++++++++++++++++++--
src/fauxton/app/modules/documents/views.js | 22 ++++++--
.../templates/documents/advanced_options.html | 2 +-
src/fauxton/extensions.md | 17 ++++++
9 files changed, 124 insertions(+), 18 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/couchdb/blob/489a6c28/src/fauxton/app/addons/compaction/base.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/compaction/base.js b/src/fauxton/app/addons/compaction/base.js
index 8d93016..de0f124 100644
--- a/src/fauxton/app/addons/compaction/base.js
+++ b/src/fauxton/app/addons/compaction/base.js
@@ -23,6 +23,8 @@ function(app, FauxtonAPI, Compaction) {
url: "compact",
icon: "icon-cogs"
});
+
+ FauxtonAPI.registerExtension('advancedOptions:ViewButton', new Compaction.CompactView({}));
};
return Compaction;
http://git-wip-us.apache.org/repos/asf/couchdb/blob/489a6c28/src/fauxton/app/addons/compaction/resources.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/compaction/resources.js b/src/fauxton/app/addons/compaction/resources.js
index e7c97cf..6633677 100644
--- a/src/fauxton/app/addons/compaction/resources.js
+++ b/src/fauxton/app/addons/compaction/resources.js
@@ -34,5 +34,15 @@ function (app, FauxtonAPI) {
});
};
+
+ Compaction.compactView = function (db, designDoc) {
+ // /some_database/_compact/designname
+ return $.ajax({
+ url: db.url() + '/_compact/' + designDoc.replace('_design/','') ,
+ contentType: 'application/json',
+ type: 'POST'
+ });
+ };
+
return Compaction;
});
http://git-wip-us.apache.org/repos/asf/couchdb/blob/489a6c28/src/fauxton/app/addons/compaction/routes.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/compaction/routes.js b/src/fauxton/app/addons/compaction/routes.js
index e04d386..b7a2ee3 100644
--- a/src/fauxton/app/addons/compaction/routes.js
+++ b/src/fauxton/app/addons/compaction/routes.js
@@ -25,9 +25,13 @@ function(app, FauxtonAPI, Compaction, Databases) {
var CompactionRouteObject = FauxtonAPI.RouteObject.extend({
layout: "one_pane",
- crumbs: [
- {"name": "Compact & Clean", "link": "compact"}
- ],
+ crumbs: function () {
+ return [
+ {"name": "Databases", "link": "/_all_dbs"},
+ {"name": this.database.id, "link": Databases.databaseUrl(this.database)},
+ {"name": "Compact & Clean", "link": "compact"}
+ ];
+ },
routes: {
"database/:database/compact": "compaction"
http://git-wip-us.apache.org/repos/asf/couchdb/blob/489a6c28/src/fauxton/app/addons/compaction/templates/compact_view.html
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/compaction/templates/compact_view.html b/src/fauxton/app/addons/compaction/templates/compact_view.html
new file mode 100644
index 0000000..8a0b7ec
--- /dev/null
+++ b/src/fauxton/app/addons/compaction/templates/compact_view.html
@@ -0,0 +1,14 @@
+<!--
+Licensed under the Apache License, Version 2.0 (the "License"); you may not
+use this file except in compliance with the License. You may obtain a copy of
+the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+License for the specific language governing permissions and limitations under
+the License.
+-->
+Compact View
http://git-wip-us.apache.org/repos/asf/couchdb/blob/489a6c28/src/fauxton/app/addons/compaction/templates/layout.html
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/compaction/templates/layout.html b/src/fauxton/app/addons/compaction/templates/layout.html
index 08a2078..5125892 100644
--- a/src/fauxton/app/addons/compaction/templates/layout.html
+++ b/src/fauxton/app/addons/compaction/templates/layout.html
@@ -21,14 +21,6 @@ the License.
<div class="row">
<div class="span12 compaction-option">
- <h3> Compact Views </h3>
- <p>View compaction will affect all views in this design document. This operation may take some time to complete. Your views will still operate normally during compaction.</p>
- <button id="compact-view" class="btn btn-large btn-primary"> Run </button>
- </div>
-</div>
-
-<div class="row">
- <div class="span12 compaction-option">
<h3> Cleanup Views </h3>
<p>Cleaning up views in a database removes old view files still stored on the filesystem. It is an irreversible operation.</p>
<button id="cleanup-views" class="btn btn-large btn-primary"> Run </button>
http://git-wip-us.apache.org/repos/asf/couchdb/blob/489a6c28/src/fauxton/app/addons/compaction/views.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/compaction/views.js b/src/fauxton/app/addons/compaction/views.js
index ff6037a..06a1300 100644
--- a/src/fauxton/app/addons/compaction/views.js
+++ b/src/fauxton/app/addons/compaction/views.js
@@ -49,7 +49,7 @@ function (app, FauxtonAPI, Compaction) {
Compaction.compactDB(this.model).then(function () {
FauxtonAPI.addNotification({
type: 'success',
- msg: 'Database compaction has started.'
+ msg: 'Database compaction has started. Visit <a href="#activetasks">Active Tasks</a> to view the compaction progress.',
});
}, function (xhr, error, reason) {
console.log(arguments);
@@ -71,10 +71,9 @@ function (app, FauxtonAPI, Compaction) {
Compaction.cleanupViews(this.model).then(function () {
FauxtonAPI.addNotification({
type: 'success',
- msg: 'View cleanup has started.'
+ msg: 'View cleanup has started. Visit <a href="#activetasks">Active Tasks</a> to view progress.'
});
}, function (xhr, error, reason) {
- console.log(arguments);
FauxtonAPI.addNotification({
type: 'error',
msg: 'Error: ' + JSON.parse(xhr.responseText).reason
@@ -85,5 +84,57 @@ function (app, FauxtonAPI, Compaction) {
}
});
+ Compaction.CompactView = FauxtonAPI.View.extend({
+ template: 'addons/compaction/templates/compact_view',
+ className: 'btn btn-info btn-large pull-right',
+ tagName: 'button',
+
+ initialize: function () {
+ _.bindAll(this);
+ },
+
+ events: {
+ "click": "compact"
+ },
+
+ disableButton: function () {
+ this.$el.attr('disabled', 'disabled').text('Compacting...');
+ },
+
+ enableButton: function () {
+ this.$el.removeAttr('disabled').text('Compact View');
+ },
+
+
+ update: function (database, designDoc, viewName) {
+ this.database = database;
+ this.designDoc = designDoc;
+ this.viewName = viewName;
+ },
+
+ compact: function (event) {
+ event.preventDefault();
+ var enableButton = this.enableButton;
+
+ this.disableButton();
+
+ Compaction.compactView(this.database, this.designDoc).then(function () {
+ FauxtonAPI.addNotification({
+ type: 'success',
+ msg: 'View compaction has started. Visit <a href="#activetasks">Active Tasks</a> to view progress.'
+ });
+ }, function (xhr, error, reason) {
+ FauxtonAPI.addNotification({
+ type: 'error',
+ msg: 'Error: ' + JSON.parse(xhr.responseText).reason
+ });
+ }).always(function () {
+ enableButton();
+ });
+
+ }
+
+ });
+
return Compaction;
});
http://git-wip-us.apache.org/repos/asf/couchdb/blob/489a6c28/src/fauxton/app/modules/documents/views.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/modules/documents/views.js b/src/fauxton/app/modules/documents/views.js
index 31cab66..74db218 100644
--- a/src/fauxton/app/modules/documents/views.js
+++ b/src/fauxton/app/modules/documents/views.js
@@ -479,7 +479,8 @@ function(app, FauxtonAPI, Components, Documents, pouchdb, Codemirror, JSHint, re
updateViewFn: this.updateView,
previewFn: this.previewView,
hasReduce: false,
- showPreview: false
+ showPreview: false,
+ database: this.database
}));
this.$('#query').hide();
@@ -970,6 +971,9 @@ function(app, FauxtonAPI, Components, Documents, pouchdb, Codemirror, JSHint, re
className: "advanced-options well",
initialize: function (options) {
+ this.database = options.database;
+ this.ddocName = options.ddocName;
+ this.viewName = options.viewName;
this.updateViewFn = options.updateViewFn;
this.previewFn = options.previewFn;
this.hadReduce = options.hasReduce || true;
@@ -994,6 +998,16 @@ function(app, FauxtonAPI, Components, Documents, pouchdb, Codemirror, JSHint, re
"click button.preview": "previewView"
},
+ beforeRender: function () {
+ if (this.viewName && this.ddocName) {
+ var buttonViews = FauxtonAPI.getExtensions('advancedOptions:ViewButton');
+ _.each(buttonViews, function (view) {
+ this.insertView('#button-options', view);
+ view.update(this.database, this.ddocName, this.viewName);
+ }, this);
+ }
+ },
+
queryParams: function () {
var $form = this.$(".view-query-update");
// Ignore params without a value
@@ -1495,7 +1509,10 @@ function(app, FauxtonAPI, Components, Documents, pouchdb, Codemirror, JSHint, re
this.advancedOptions = this.insertView('#query', new Views.AdvancedOptions({
updateViewFn: this.updateView,
- previewFn: this.previewView
+ previewFn: this.previewView,
+ database: this.database,
+ viewName: this.viewName,
+ ddocName: this.model.id
}));
},
@@ -1634,7 +1651,6 @@ function(app, FauxtonAPI, Components, Documents, pouchdb, Codemirror, JSHint, re
serialize: function() {
var docLinks = FauxtonAPI.getExtensions('docLinks');
- console.log(docLinks);
return {
changes_url: '#' + this.database.url('changes'),
permissions_url: '#' + this.database.url('app') + '/permissions',
http://git-wip-us.apache.org/repos/asf/couchdb/blob/489a6c28/src/fauxton/app/templates/documents/advanced_options.html
----------------------------------------------------------------------
diff --git a/src/fauxton/app/templates/documents/advanced_options.html b/src/fauxton/app/templates/documents/advanced_options.html
index aee2f65..c0bf44a 100644
--- a/src/fauxton/app/templates/documents/advanced_options.html
+++ b/src/fauxton/app/templates/documents/advanced_options.html
@@ -81,7 +81,7 @@ the License.
</div>
<div class="controls-group">
<div class="row-fluid">
- <div class="controls controls-row">
+ <div id="button-options" class="controls controls-row">
<button type="submit" class="btn btn-primary btn-large">Query</button>
<% if (showPreview) { %>
<button class="btn btn-info btn-large preview">Preview</button>
http://git-wip-us.apache.org/repos/asf/couchdb/blob/489a6c28/src/fauxton/extensions.md
----------------------------------------------------------------------
diff --git a/src/fauxton/extensions.md b/src/fauxton/extensions.md
new file mode 100644
index 0000000..13fcf8d
--- /dev/null
+++ b/src/fauxton/extensions.md
@@ -0,0 +1,17 @@
+#Extensions
+
+Extensions allow Fauxton views to be have extra functionality.
+
+A module registers an extension by
+
+ FauxtonAPI.registerExtension('extensionName', myObjectToRegister);
+
+Any other module wanting to use that extension can then get
+all objects registered for an extension by:
+
+ var extensions = FauxtonAPI.getExtensions('extensionName');
+ // extensions will always be an array
+
+The module can then use those extensions to extend its functionality.
+An example of extensions in the compaction module (app/addons/compaction/base.js)
+and in documents module (app/modules/documents/views line 1003)
[07/15] git commit: updated refs/heads/1809-compact-and-clean to
489a6c2
Posted by ga...@apache.org.
Remove {} chars from API reference links.
While browsers shows them correctly JIRA, StackOverflow and others
in-form URL parsers aren't likes them and breaks the referencing.
Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/dc9980c1
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/dc9980c1
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/dc9980c1
Branch: refs/heads/1809-compact-and-clean
Commit: dc9980c121747fd4b66b169fb7d5e068a4b175c1
Parents: 7b95e2e
Author: Alexander Shorin <kx...@apache.org>
Authored: Fri Oct 18 23:35:27 2013 +0400
Committer: Alexander Shorin <kx...@apache.org>
Committed: Fri Oct 18 23:35:27 2013 +0400
----------------------------------------------------------------------
share/doc/ext/httpdomain.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/couchdb/blob/dc9980c1/share/doc/ext/httpdomain.py
----------------------------------------------------------------------
diff --git a/share/doc/ext/httpdomain.py b/share/doc/ext/httpdomain.py
index d5d5652..d5df2b7 100644
--- a/share/doc/ext/httpdomain.py
+++ b/share/doc/ext/httpdomain.py
@@ -214,7 +214,7 @@ def sort_by_method(entries):
def http_resource_anchor(method, path):
- path = re.sub(r'[<>:/]', '-', path)
+ path = re.sub(r'[{}]', '', re.sub(r'[<>:/]', '-', path))
return method.lower() + '-' + path
[14/15] git commit: updated refs/heads/1809-compact-and-clean to
489a6c2
Posted by ga...@apache.org.
improvements
Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/d35a9b14
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/d35a9b14
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/d35a9b14
Branch: refs/heads/1809-compact-and-clean
Commit: d35a9b14a7aa4cc0cf108ac900b8a419973ee0f1
Parents: 1213c8a
Author: Garren Smith <ga...@gmail.com>
Authored: Wed Oct 16 15:26:48 2013 +0200
Committer: Garren Smith <ga...@gmail.com>
Committed: Tue Oct 22 14:25:30 2013 +0200
----------------------------------------------------------------------
src/fauxton/app/addons/compaction/resources.js | 2 +-
src/fauxton/app/addons/compaction/views.js | 5 -----
2 files changed, 1 insertion(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/couchdb/blob/d35a9b14/src/fauxton/app/addons/compaction/resources.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/compaction/resources.js b/src/fauxton/app/addons/compaction/resources.js
index b6fa4bc..e7c97cf 100644
--- a/src/fauxton/app/addons/compaction/resources.js
+++ b/src/fauxton/app/addons/compaction/resources.js
@@ -32,7 +32,7 @@ function (app, FauxtonAPI) {
contentType: 'application/json',
type: 'POST'
});
- }
+ };
return Compaction;
});
http://git-wip-us.apache.org/repos/asf/couchdb/blob/d35a9b14/src/fauxton/app/addons/compaction/views.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/compaction/views.js b/src/fauxton/app/addons/compaction/views.js
index 457e5f6..ff6037a 100644
--- a/src/fauxton/app/addons/compaction/views.js
+++ b/src/fauxton/app/addons/compaction/views.js
@@ -14,7 +14,6 @@ define([
"app",
"api",
-
// Modules
"addons/compaction/resources"
],
@@ -84,11 +83,7 @@ function (app, FauxtonAPI, Compaction) {
enableButton('#cleanup-views', 'Run');
});
}
-
-
});
-
-
return Compaction;
});
[04/15] git commit: updated refs/heads/1809-compact-and-clean to
489a6c2
Posted by ga...@apache.org.
View Delete was broken
Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/cc94a0d2
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/cc94a0d2
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/cc94a0d2
Branch: refs/heads/1809-compact-and-clean
Commit: cc94a0d21092ecfcbf3347004873b3a65b417a0f
Parents: 4ecb639
Author: suelockwood <de...@gmail.com>
Authored: Thu Oct 17 13:05:24 2013 -0400
Committer: suelockwood <de...@gmail.com>
Committed: Thu Oct 17 13:05:24 2013 -0400
----------------------------------------------------------------------
src/fauxton/app/modules/documents/views.js | 4 +++-
src/fauxton/app/templates/documents/view_editor.html | 2 +-
2 files changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/couchdb/blob/cc94a0d2/src/fauxton/app/modules/documents/views.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/modules/documents/views.js b/src/fauxton/app/modules/documents/views.js
index 9f665e5..2f3b694 100644
--- a/src/fauxton/app/modules/documents/views.js
+++ b/src/fauxton/app/modules/documents/views.js
@@ -1106,7 +1106,7 @@ function(app, FauxtonAPI, Components, Documents, pouchdb, Codemirror, JSHint, re
events: {
"click button.save": "saveView",
- "click button.delete": "deleteView",
+ "click button.cancel-button": "deleteView",
"change select#reduce-function-selector": "updateReduce",
"change select#ddoc": "updateDesignDoc",
"click #db-views-tabs-nav": 'toggleIndexNav'
@@ -1575,6 +1575,8 @@ function(app, FauxtonAPI, Components, Documents, pouchdb, Codemirror, JSHint, re
this.ddocID = options.ddocInfo.id;
this.currView = options.ddocInfo.currView;
}
+ // this.listenTo(this.collection, "add", this.render);
+ // this.listenTo(this.collection, "remove", this.render);
},
deleteDatabase: function (event) {
http://git-wip-us.apache.org/repos/asf/couchdb/blob/cc94a0d2/src/fauxton/app/templates/documents/view_editor.html
----------------------------------------------------------------------
diff --git a/src/fauxton/app/templates/documents/view_editor.html b/src/fauxton/app/templates/documents/view_editor.html
index 64f0f98..f75edc5 100644
--- a/src/fauxton/app/templates/documents/view_editor.html
+++ b/src/fauxton/app/templates/documents/view_editor.html
@@ -91,7 +91,7 @@ the License.
<div class="control-group">
<button class="button green save fonticon-circle-check">Save</button>
<% if (!this.newView) { %>
- <button class="button cancel-button outlineGray fonticon-circle-x">Delete</button>
+ <button class="button delete outlineGray fonticon-circle-x">Delete</button>
<% } %>
</div>
<div class="clearfix"></div>
[10/15] git commit: updated refs/heads/1809-compact-and-clean to
489a6c2
Posted by ga...@apache.org.
Fauxton: add web-index url for database model
Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/12af14b8
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/12af14b8
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/12af14b8
Branch: refs/heads/1809-compact-and-clean
Commit: 12af14b8f54997bdcc89419f61a9880632d0535a
Parents: e1f5d8d
Author: Garren Smith <ga...@gmail.com>
Authored: Mon Oct 21 17:10:43 2013 +0200
Committer: Garren Smith <ga...@gmail.com>
Committed: Mon Oct 21 17:10:43 2013 +0200
----------------------------------------------------------------------
src/fauxton/app/modules/databases/resources.js | 2 ++
1 file changed, 2 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/couchdb/blob/12af14b8/src/fauxton/app/modules/databases/resources.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/modules/databases/resources.js b/src/fauxton/app/modules/databases/resources.js
index 6678d49..237c4ce 100644
--- a/src/fauxton/app/modules/databases/resources.js
+++ b/src/fauxton/app/modules/databases/resources.js
@@ -50,6 +50,8 @@ function(app, FauxtonAPI, Documents) {
url: function(context) {
if (context === "index") {
return "/database/" + this.id + "/_all_docs";
+ } else if (context === "web-index") {
+ return "#/database/"+ encodeURIComponent(this.get("name")) + "/_all_docs?limit=100";
} else if (context === "changes") {
return "/database/" + this.id + "/_changes?descending=true&limit=100&include_docs=true";
} else if (context === "app") {
[13/15] git commit: updated refs/heads/1809-compact-and-clean to
489a6c2
Posted by ga...@apache.org.
started
Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/5a9e7fdf
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/5a9e7fdf
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/5a9e7fdf
Branch: refs/heads/1809-compact-and-clean
Commit: 5a9e7fdf9c7ca41fe57a73ea44e7b0b9fe9dfd94
Parents: cee2210
Author: Garren Smith <ga...@gmail.com>
Authored: Tue Oct 15 18:16:05 2013 +0200
Committer: Garren Smith <ga...@gmail.com>
Committed: Tue Oct 22 14:25:30 2013 +0200
----------------------------------------------------------------------
.gitignore | 1 +
src/fauxton/app/addons/compaction/base.js | 29 +++++++++
src/fauxton/app/addons/compaction/resources.js | 21 +++++++
src/fauxton/app/addons/compaction/routes.js | 62 ++++++++++++++++++++
.../app/addons/compaction/templates/layout.html | 27 +++++++++
src/fauxton/app/addons/compaction/views.js | 40 +++++++++++++
src/fauxton/app/api.js | 23 ++++++++
src/fauxton/app/modules/documents/views.js | 6 +-
.../app/templates/documents/sidebar.html | 3 +
src/fauxton/app/templates/documents/tabs.html | 21 -------
src/fauxton/settings.json.default | 3 +-
11 files changed, 213 insertions(+), 23 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/couchdb/blob/5a9e7fdf/.gitignore
----------------------------------------------------------------------
diff --git a/.gitignore b/.gitignore
index 95cf2f3..2d6a17b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -101,6 +101,7 @@ src/fauxton/app/addons/*
!src/fauxton/app/addons/exampleAuth
!src/fauxton/app/addons/permissions
!src/fauxton/app/addons/verifyinstall
+!src/fauxton/app/addons/compaction
src/fauxton/settings.json*
!src/fauxton/settings.json.default
src/ibrowse/ibrowse.app
http://git-wip-us.apache.org/repos/asf/couchdb/blob/5a9e7fdf/src/fauxton/app/addons/compaction/base.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/compaction/base.js b/src/fauxton/app/addons/compaction/base.js
new file mode 100644
index 0000000..8d93016
--- /dev/null
+++ b/src/fauxton/app/addons/compaction/base.js
@@ -0,0 +1,29 @@
+// Licensed under the Apache License, Version 2.0 (the "License"); you may not
+// use this file except in compliance with the License. You may obtain a copy of
+// the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+// License for the specific language governing permissions and limitations under
+// the License.
+
+define([
+ "app",
+ "api",
+ "addons/compaction/routes"
+],
+
+function(app, FauxtonAPI, Compaction) {
+ Compaction.initialize = function() {
+ FauxtonAPI.registerExtension('docLinks', {
+ title: "Compact & Clean",
+ url: "compact",
+ icon: "icon-cogs"
+ });
+ };
+
+ return Compaction;
+});
http://git-wip-us.apache.org/repos/asf/couchdb/blob/5a9e7fdf/src/fauxton/app/addons/compaction/resources.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/compaction/resources.js b/src/fauxton/app/addons/compaction/resources.js
new file mode 100644
index 0000000..d0180ef
--- /dev/null
+++ b/src/fauxton/app/addons/compaction/resources.js
@@ -0,0 +1,21 @@
+// Licensed under the Apache License, Version 2.0 (the "License"); you may not
+// use this file except in compliance with the License. You may obtain a copy of
+// the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+// License for the specific language governing permissions and limitations under
+// the License.
+
+define([
+ "app",
+ "api"
+],
+
+function (app, FauxtonAPI) {
+ var Compaction = FauxtonAPI.addon();
+ return Compaction;
+});
http://git-wip-us.apache.org/repos/asf/couchdb/blob/5a9e7fdf/src/fauxton/app/addons/compaction/routes.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/compaction/routes.js b/src/fauxton/app/addons/compaction/routes.js
new file mode 100644
index 0000000..e04d386
--- /dev/null
+++ b/src/fauxton/app/addons/compaction/routes.js
@@ -0,0 +1,62 @@
+// Licensed under the Apache License, Version 2.0 (the "License"); you may not
+// use this file except in compliance with the License. You may obtain a copy of
+// the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+// License for the specific language governing permissions and limitations under
+// the License.
+
+define([
+ "app",
+
+ "api",
+
+ // Modules
+ "addons/compaction/views",
+ "modules/databases/resources"
+],
+
+function(app, FauxtonAPI, Compaction, Databases) {
+
+ var CompactionRouteObject = FauxtonAPI.RouteObject.extend({
+ layout: "one_pane",
+
+ crumbs: [
+ {"name": "Compact & Clean", "link": "compact"}
+ ],
+
+ routes: {
+ "database/:database/compact": "compaction"
+ },
+
+ initialize: function(route, masterLayout, options) {
+ var databaseName = options[0];
+
+ this.database = this.database || new Databases.Model({id: databaseName});
+ },
+
+ compaction: function () {
+ this.setView('#dashboard-content', new Compaction.Layout({model: this.database}));
+ },
+
+ establish: function () {
+ return this.database.fetch();
+ }
+
+ /*apiUrl: function() {
+ return [this.compactions.url(), this.compactions.documentation];
+ },*/
+
+ });
+
+ Compaction.RouteObjects = [CompactionRouteObject];
+
+ return Compaction;
+
+});
+
+
http://git-wip-us.apache.org/repos/asf/couchdb/blob/5a9e7fdf/src/fauxton/app/addons/compaction/templates/layout.html
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/compaction/templates/layout.html b/src/fauxton/app/addons/compaction/templates/layout.html
new file mode 100644
index 0000000..56bcbc2
--- /dev/null
+++ b/src/fauxton/app/addons/compaction/templates/layout.html
@@ -0,0 +1,27 @@
+<!--
+Licensed under the Apache License, Version 2.0 (the "License"); you may not
+use this file except in compliance with the License. You may obtain a copy of
+the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+License for the specific language governing permissions and limitations under
+the License.
+-->
+
+<table class="table table-striped table-bordered">
+ <tbody>
+ <tr>
+ <td>
+ <h3> Compact Database </h3>
+ <p>Compacting a database removes deleted documents and previous revisions. It is an irreversible operation and may take a while to complete for large databases.</p>
+ <button id="compact-db" class="btn btn-large btn-primary"> Run </button>
+ </td>
+ </tr>
+ </tbody>
+
+</table>
+
http://git-wip-us.apache.org/repos/asf/couchdb/blob/5a9e7fdf/src/fauxton/app/addons/compaction/views.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/compaction/views.js b/src/fauxton/app/addons/compaction/views.js
new file mode 100644
index 0000000..67afd5e
--- /dev/null
+++ b/src/fauxton/app/addons/compaction/views.js
@@ -0,0 +1,40 @@
+// Licensed under the Apache License, Version 2.0 (the "License"); you may not
+// use this file except in compliance with the License. You may obtain a copy of
+// the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+// License for the specific language governing permissions and limitations under
+// the License.
+
+define([
+ "app",
+
+ "api",
+
+ // Modules
+ "addons/compaction/resources"
+],
+function (app, FauxtonAPI, Compaction) {
+
+ Compaction.Layout = FauxtonAPI.View.extend({
+ template: 'addons/compaction/templates/layout',
+
+ events: {
+ "click compact-db": "compactDB"
+ },
+
+ compactDB: function (event) {
+ event.preventDefault();
+ }
+
+
+ });
+
+
+
+ return Compaction;
+});
http://git-wip-us.apache.org/repos/asf/couchdb/blob/5a9e7fdf/src/fauxton/app/api.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/api.js b/src/fauxton/app/api.js
index d9f66fe..96d4586 100644
--- a/src/fauxton/app/api.js
+++ b/src/fauxton/app/api.js
@@ -452,6 +452,29 @@ function(app, Fauxton) {
});
+ var extensions = _.extend({}, Backbone.Events);
+ // Can look at a remove function later.
+ FauxtonAPI.registerExtension = function (name, view) {
+ if (!extensions[name]) {
+ extensions[name] = [];
+ }
+
+ extensions.trigger('add:' + name, view);
+ extensions[name].push(view);
+ };
+
+ FauxtonAPI.getExtensions = function (name) {
+ var views = extensions[name];
+
+ if (!views) {
+ views = [];
+ }
+
+ return views;
+ };
+
+ FauxtonAPI.extensions = extensions;
+
app.fauxtonAPI = FauxtonAPI;
return app.fauxtonAPI;
});
http://git-wip-us.apache.org/repos/asf/couchdb/blob/5a9e7fdf/src/fauxton/app/modules/documents/views.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/modules/documents/views.js b/src/fauxton/app/modules/documents/views.js
index 5122921..31cab66 100644
--- a/src/fauxton/app/modules/documents/views.js
+++ b/src/fauxton/app/modules/documents/views.js
@@ -1633,13 +1633,17 @@ function(app, FauxtonAPI, Components, Documents, pouchdb, Codemirror, JSHint, re
},
serialize: function() {
+ var docLinks = FauxtonAPI.getExtensions('docLinks');
+ console.log(docLinks);
return {
changes_url: '#' + this.database.url('changes'),
permissions_url: '#' + this.database.url('app') + '/permissions',
db_url: '#' + this.database.url('index') + '?limit=100',
index: [1,2,3],
view: [1,2],
- database: this.collection.database
+ database: this.collection.database,
+ database_url: '#' + this.database.url('app'),
+ docLinks: docLinks
};
},
http://git-wip-us.apache.org/repos/asf/couchdb/blob/5a9e7fdf/src/fauxton/app/templates/documents/sidebar.html
----------------------------------------------------------------------
diff --git a/src/fauxton/app/templates/documents/sidebar.html b/src/fauxton/app/templates/documents/sidebar.html
index eb01942..881309f 100644
--- a/src/fauxton/app/templates/documents/sidebar.html
+++ b/src/fauxton/app/templates/documents/sidebar.html
@@ -25,6 +25,9 @@ the License.
<li><a class="icon-file" href="<%= db_url %>">Docs</a></li>
<li><a class="icon-lock" href="<%= permissions_url %>">Permissions</a></li>
<li><a class="icon-forward" href="<%= changes_url %>">Changes</a></li>
+ <% _.each(docLinks, function (link) { %>
+ <li><a class="<%= link.icon %>" href="<%= database_url + '/' + link.url %>"><%= link.title %></a></li>
+ <% }); %>
</ul>
</div>
</div>
http://git-wip-us.apache.org/repos/asf/couchdb/blob/5a9e7fdf/src/fauxton/app/templates/documents/tabs.html
----------------------------------------------------------------------
diff --git a/src/fauxton/app/templates/documents/tabs.html b/src/fauxton/app/templates/documents/tabs.html
index 57e6cb1..f8b0c4b 100644
--- a/src/fauxton/app/templates/documents/tabs.html
+++ b/src/fauxton/app/templates/documents/tabs.html
@@ -14,26 +14,5 @@ the License.
<ul class="nav nav-tabs">
<li class="active"><a href="<%= db_url %>">Docs</a></li>
- <!-- TODO::REENABLE
- <li><a href="#">Permissions</a></li>
- <li><a href="#">Stats</a></li>
- -->
<li id="changes"><a href="<%= changes_url %>">Changes</a></li>
- <!-- TODO::REENABLE
- <div id="search" class="navbar-search span4 nav pull-right input-prepend" style="height:20px;"></div>
- <!-- TODO: put this styling into less --//>
- <ul class="nav pull-right" style="margin:5px 10px 0px 10px;">
- <li>
- <div class="btn-group">
- <a class="btn btn-small dropdown-toggle" data-toggle="dropdown" href="#">
- <i class="icon icon-cog"></i> Database actions <span class="caret"></span>
- </a>
- <ul class="dropdown-menu">
- <li><a class=""><i class="icon-repeat"></i> Replicate database</a></li>
- <li><a id="delete-database" class=""><i class="icon-trash"></i> Delete database</a></li>
- </ul>
- </div>
- </li>
- </ul>
- -->
</ul>
http://git-wip-us.apache.org/repos/asf/couchdb/blob/5a9e7fdf/src/fauxton/settings.json.default
----------------------------------------------------------------------
diff --git a/src/fauxton/settings.json.default b/src/fauxton/settings.json.default
index ce45e26..54cc0ce 100644
--- a/src/fauxton/settings.json.default
+++ b/src/fauxton/settings.json.default
@@ -8,8 +8,9 @@
{ "name": "plugins" },
{ "name": "contribute" },
{ "name": "permissions" },
- { "name": "auth" },
{ "name": "verifyinstall" }
+ { "name": "compaction" },
+ { "name": "auth" }
],
"template": {
"development": {
[11/15] git commit: updated refs/heads/1809-compact-and-clean to
489a6c2
Posted by ga...@apache.org.
Fauxton disable pagination links
Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/cee22107
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/cee22107
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/cee22107
Branch: refs/heads/1809-compact-and-clean
Commit: cee22107146b68d14d233bb1b760777bce3ebb55
Parents: 12af14b
Author: Garren Smith <ga...@gmail.com>
Authored: Tue Oct 22 14:21:21 2013 +0200
Committer: Garren Smith <ga...@gmail.com>
Committed: Tue Oct 22 14:21:21 2013 +0200
----------------------------------------------------------------------
src/fauxton/app/modules/fauxton/components.js | 2 ++
1 file changed, 2 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/couchdb/blob/cee22107/src/fauxton/app/modules/fauxton/components.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/modules/fauxton/components.js b/src/fauxton/app/modules/fauxton/components.js
index 03fea87..30a57d8 100644
--- a/src/fauxton/app/modules/fauxton/components.js
+++ b/src/fauxton/app/modules/fauxton/components.js
@@ -67,12 +67,14 @@ function(app, FauxtonAPI) {
previousClicked: function (event) {
event.preventDefault();
+ if (!this.canShowPreviousfn()) { return; }
FauxtonAPI.navigate(this.previousUrlfn(), {trigger: false});
FauxtonAPI.triggerRouteEvent('paginate', 'previous');
},
nextClicked: function (event) {
event.preventDefault();
+ if (!this.canShowNextfn()) { return; }
var doc = this.collection.first();
if (doc) {
[05/15] git commit: updated refs/heads/1809-compact-and-clean to
489a6c2
Posted by ga...@apache.org.
Eventually we should clean up these layout files to see which ones actually use tabs
Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/db361036
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/db361036
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/db361036
Branch: refs/heads/1809-compact-and-clean
Commit: db3610361fdb0f9089de7cdb9047d401f9221446
Parents: cc94a0d
Author: suelockwood <de...@gmail.com>
Authored: Thu Oct 17 13:17:32 2013 -0400
Committer: suelockwood <de...@gmail.com>
Committed: Thu Oct 17 13:17:32 2013 -0400
----------------------------------------------------------------------
.../app/templates/layouts/one_pane_notabs.html | 27 ++++++++++++++++++++
1 file changed, 27 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/couchdb/blob/db361036/src/fauxton/app/templates/layouts/one_pane_notabs.html
----------------------------------------------------------------------
diff --git a/src/fauxton/app/templates/layouts/one_pane_notabs.html b/src/fauxton/app/templates/layouts/one_pane_notabs.html
new file mode 100644
index 0000000..f58661f
--- /dev/null
+++ b/src/fauxton/app/templates/layouts/one_pane_notabs.html
@@ -0,0 +1,27 @@
+<!--
+Licensed under the Apache License, Version 2.0 (the "License"); you may not
+use this file except in compliance with the License. You may obtain a copy of
+the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+License for the specific language governing permissions and limitations under
+the License.
+-->
+
+<div id="primary-navbar"></div>
+<div id="dashboard" class="container-fluid one-pane">
+ <div class="fixed-header">
+ <div id="breadcrumbs"></div>
+ <div id="api-navbar"></div>
+ </div>
+
+
+ <div class="row-fluid content-area">
+ <div id="dashboard-content" class="window-resizeable"></div>
+ </div>
+</div>
+
[03/15] git commit: updated refs/heads/1809-compact-and-clean to
489a6c2
Posted by ga...@apache.org.
Add Cancel button to the edit form
Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/4ecb639f
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/4ecb639f
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/4ecb639f
Branch: refs/heads/1809-compact-and-clean
Commit: 4ecb639f593e9f55f934ad69fa2186d55bfa6c9e
Parents: 6b158a2
Author: suelockwood <de...@gmail.com>
Authored: Thu Oct 17 12:38:47 2013 -0400
Committer: suelockwood <de...@gmail.com>
Committed: Thu Oct 17 12:38:47 2013 -0400
----------------------------------------------------------------------
src/fauxton/app/modules/documents/views.js | 6 +++++-
src/fauxton/app/templates/documents/doc.html | 3 ++-
2 files changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/couchdb/blob/4ecb639f/src/fauxton/app/modules/documents/views.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/modules/documents/views.js b/src/fauxton/app/modules/documents/views.js
index 6c39044..9f665e5 100644
--- a/src/fauxton/app/modules/documents/views.js
+++ b/src/fauxton/app/modules/documents/views.js
@@ -684,12 +684,16 @@ function(app, FauxtonAPI, Components, Documents, pouchdb, Codemirror, JSHint, re
"click button.save-doc": "saveDoc",
"click button.delete": "destroy",
"click button.duplicate": "duplicate",
- "click button.upload": "upload"
+ "click button.upload": "upload",
+ "click button.cancel-button": "goback"
},
disableLoader: true,
initialize: function (options) {
this.database = options.database;
},
+ goback: function(){
+ window.history.back();
+ },
destroy: function(event) {
if (this.model.isNewDoc()) {
FauxtonAPI.addNotification({
http://git-wip-us.apache.org/repos/asf/couchdb/blob/4ecb639f/src/fauxton/app/templates/documents/doc.html
----------------------------------------------------------------------
diff --git a/src/fauxton/app/templates/documents/doc.html b/src/fauxton/app/templates/documents/doc.html
index 6d4c8e5..8c8fc7b 100644
--- a/src/fauxton/app/templates/documents/doc.html
+++ b/src/fauxton/app/templates/documents/doc.html
@@ -44,7 +44,8 @@ the License.
<textarea class="doc-code"><%- JSON.stringify(doc.attributes, null, " ") %></textarea>
<br />
<p>
- <button class="save-doc btn btn-success btn-large save" type="button">Save</button>
+ <button class="save-doc button green btn-success btn-large save fonticon-circle-check" type="button">Save</button>
+ <button class="button gray btn-large cancel-button outlineGray fonticon-circle-x" type="button">Cancel</button>
</p>
</div>
[08/15] git commit: updated refs/heads/1809-compact-and-clean to
489a6c2
Posted by ga...@apache.org.
Remove "API method" things. Fix header for /_session endpoint.
Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/309a569e
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/309a569e
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/309a569e
Branch: refs/heads/1809-compact-and-clean
Commit: 309a569ef8d3d4ca0a3060d62edc5dc8ce407f51
Parents: dc9980c
Author: Alexander Shorin <kx...@apache.org>
Authored: Fri Oct 18 23:35:44 2013 +0400
Committer: Alexander Shorin <kx...@apache.org>
Committed: Fri Oct 18 23:35:44 2013 +0400
----------------------------------------------------------------------
share/doc/src/api/server/authn.rst | 2 +-
share/doc/src/api/server/configuration.rst | 13 ++++++-------
share/doc/src/api/server/index.rst | 6 +++---
3 files changed, 10 insertions(+), 11 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/couchdb/blob/309a569e/share/doc/src/api/server/authn.rst
----------------------------------------------------------------------
diff --git a/share/doc/src/api/server/authn.rst b/share/doc/src/api/server/authn.rst
index 27b1dc6..98d6f62 100644
--- a/share/doc/src/api/server/authn.rst
+++ b/share/doc/src/api/server/authn.rst
@@ -84,7 +84,7 @@ To obtain the first token and thus authenticate a user for the first time, the
.. _api/auth/session:
-``_session``
+``/_session``
------------
.. http:post:: /_session
http://git-wip-us.apache.org/repos/asf/couchdb/blob/309a569e/share/doc/src/api/server/configuration.rst
----------------------------------------------------------------------
diff --git a/share/doc/src/api/server/configuration.rst b/share/doc/src/api/server/configuration.rst
index 46a4e78..643b8ec 100644
--- a/share/doc/src/api/server/configuration.rst
+++ b/share/doc/src/api/server/configuration.rst
@@ -12,13 +12,12 @@
.. _api/config:
-=====================
-Configuration Methods
-=====================
+=============
+Configuration
+=============
-The CouchDB API Server Configuration Methods provide an interface to
-query and update the various configuration values within a running
-CouchDB instance.
+The CouchDB Server Configuration API provide an interface to query and update
+the various configuration values within a running CouchDB instance.
``/_config``
============
@@ -152,7 +151,7 @@ CouchDB instance.
"algorithm": "utc_random"
}
}
-
+
.. _api/config/section:
http://git-wip-us.apache.org/repos/asf/couchdb/blob/309a569e/share/doc/src/api/server/index.rst
----------------------------------------------------------------------
diff --git a/share/doc/src/api/server/index.rst b/share/doc/src/api/server/index.rst
index 1151bea..c2e8d9a 100644
--- a/share/doc/src/api/server/index.rst
+++ b/share/doc/src/api/server/index.rst
@@ -13,9 +13,9 @@
.. _api/server:
-==============
-Server Methods
-==============
+======
+Server
+======
The CouchDB server interface provides the basic interface to a
CouchDB server for obtaining CouchDB information and getting and setting
[12/15] git commit: updated refs/heads/1809-compact-and-clean to
489a6c2
Posted by ga...@apache.org.
compact and clean up working
Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/1213c8ad
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/1213c8ad
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/1213c8ad
Branch: refs/heads/1809-compact-and-clean
Commit: 1213c8addf9514c15328970ac751033d66125454
Parents: 5a9e7fd
Author: Garren Smith <ga...@gmail.com>
Authored: Wed Oct 16 13:24:09 2013 +0200
Committer: Garren Smith <ga...@gmail.com>
Committed: Tue Oct 22 14:25:30 2013 +0200
----------------------------------------------------------------------
.../compaction/assets/less/compaction.less | 8 +++
src/fauxton/app/addons/compaction/resources.js | 17 ++++++
.../app/addons/compaction/templates/layout.html | 33 +++++++-----
src/fauxton/app/addons/compaction/views.js | 56 +++++++++++++++++++-
src/fauxton/settings.json.default | 4 +-
5 files changed, 103 insertions(+), 15 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/couchdb/blob/1213c8ad/src/fauxton/app/addons/compaction/assets/less/compaction.less
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/compaction/assets/less/compaction.less b/src/fauxton/app/addons/compaction/assets/less/compaction.less
new file mode 100644
index 0000000..c197d9a
--- /dev/null
+++ b/src/fauxton/app/addons/compaction/assets/less/compaction.less
@@ -0,0 +1,8 @@
+
+.compaction-option {
+ background-color: #F7F7F7;
+ border: 1px solid #DDD;
+ margin-bottom: 30px;
+ padding: 10px;
+
+}
http://git-wip-us.apache.org/repos/asf/couchdb/blob/1213c8ad/src/fauxton/app/addons/compaction/resources.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/compaction/resources.js b/src/fauxton/app/addons/compaction/resources.js
index d0180ef..b6fa4bc 100644
--- a/src/fauxton/app/addons/compaction/resources.js
+++ b/src/fauxton/app/addons/compaction/resources.js
@@ -17,5 +17,22 @@ define([
function (app, FauxtonAPI) {
var Compaction = FauxtonAPI.addon();
+
+ Compaction.compactDB = function (db) {
+ return $.ajax({
+ url: db.url() + '/_compact',
+ contentType: 'application/json',
+ type: 'POST'
+ });
+ };
+
+ Compaction.cleanupViews = function (db) {
+ return $.ajax({
+ url: db.url() + '/_view_cleanup',
+ contentType: 'application/json',
+ type: 'POST'
+ });
+ }
+
return Compaction;
});
http://git-wip-us.apache.org/repos/asf/couchdb/blob/1213c8ad/src/fauxton/app/addons/compaction/templates/layout.html
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/compaction/templates/layout.html b/src/fauxton/app/addons/compaction/templates/layout.html
index 56bcbc2..08a2078 100644
--- a/src/fauxton/app/addons/compaction/templates/layout.html
+++ b/src/fauxton/app/addons/compaction/templates/layout.html
@@ -11,17 +11,26 @@ WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations under
the License.
-->
+<div class="row">
+ <div class="span12 compaction-option">
+ <h3> Compact Database </h3>
+ <p>Compacting a database removes deleted documents and previous revisions. It is an irreversible operation and may take a while to complete for large databases.</p>
+ <button id="compact-db" class="btn btn-large btn-primary"> Run </button>
+ </div>
+</div>
-<table class="table table-striped table-bordered">
- <tbody>
- <tr>
- <td>
- <h3> Compact Database </h3>
- <p>Compacting a database removes deleted documents and previous revisions. It is an irreversible operation and may take a while to complete for large databases.</p>
- <button id="compact-db" class="btn btn-large btn-primary"> Run </button>
- </td>
- </tr>
- </tbody>
-
-</table>
+<div class="row">
+ <div class="span12 compaction-option">
+ <h3> Compact Views </h3>
+ <p>View compaction will affect all views in this design document. This operation may take some time to complete. Your views will still operate normally during compaction.</p>
+ <button id="compact-view" class="btn btn-large btn-primary"> Run </button>
+ </div>
+</div>
+<div class="row">
+ <div class="span12 compaction-option">
+ <h3> Cleanup Views </h3>
+ <p>Cleaning up views in a database removes old view files still stored on the filesystem. It is an irreversible operation.</p>
+ <button id="cleanup-views" class="btn btn-large btn-primary"> Run </button>
+ </div>
+</div>
http://git-wip-us.apache.org/repos/asf/couchdb/blob/1213c8ad/src/fauxton/app/addons/compaction/views.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/compaction/views.js b/src/fauxton/app/addons/compaction/views.js
index 67afd5e..457e5f6 100644
--- a/src/fauxton/app/addons/compaction/views.js
+++ b/src/fauxton/app/addons/compaction/views.js
@@ -23,12 +23,66 @@ function (app, FauxtonAPI, Compaction) {
Compaction.Layout = FauxtonAPI.View.extend({
template: 'addons/compaction/templates/layout',
+ initialize: function () {
+ _.bindAll(this);
+ },
+
events: {
- "click compact-db": "compactDB"
+ "click #compact-db": "compactDB",
+ "click #compact-view": "compactDB",
+ "click #cleanup-views": "cleanupViews"
+ },
+
+ disableButton: function (selector, text) {
+ this.$(selector).attr('disabled', 'disabled').text(text);
+ },
+
+ enableButton: function (selector, text) {
+ this.$(selector).removeAttr('disabled').text(text);
},
compactDB: function (event) {
+ var enableButton = this.enableButton;
event.preventDefault();
+
+ this.disableButton('#compact-db', 'Compacting...');
+
+ Compaction.compactDB(this.model).then(function () {
+ FauxtonAPI.addNotification({
+ type: 'success',
+ msg: 'Database compaction has started.'
+ });
+ }, function (xhr, error, reason) {
+ console.log(arguments);
+ FauxtonAPI.addNotification({
+ type: 'error',
+ msg: 'Error: ' + JSON.parse(xhr.responseText).reason
+ });
+ }).always(function () {
+ enableButton('#compact-db', 'Run');
+ });
+ },
+
+ cleanupViews: function (event) {
+ var enableButton = this.enableButton;
+ event.preventDefault();
+
+ this.disableButton('#cleanup-view', 'Cleaning...');
+
+ Compaction.cleanupViews(this.model).then(function () {
+ FauxtonAPI.addNotification({
+ type: 'success',
+ msg: 'View cleanup has started.'
+ });
+ }, function (xhr, error, reason) {
+ console.log(arguments);
+ FauxtonAPI.addNotification({
+ type: 'error',
+ msg: 'Error: ' + JSON.parse(xhr.responseText).reason
+ });
+ }).always(function () {
+ enableButton('#cleanup-views', 'Run');
+ });
}
http://git-wip-us.apache.org/repos/asf/couchdb/blob/1213c8ad/src/fauxton/settings.json.default
----------------------------------------------------------------------
diff --git a/src/fauxton/settings.json.default b/src/fauxton/settings.json.default
index 54cc0ce..1b68911 100644
--- a/src/fauxton/settings.json.default
+++ b/src/fauxton/settings.json.default
@@ -8,9 +8,9 @@
{ "name": "plugins" },
{ "name": "contribute" },
{ "name": "permissions" },
- { "name": "verifyinstall" }
{ "name": "compaction" },
- { "name": "auth" }
+ { "name": "auth" },
+ { "name": "verifyinstall" }
],
"template": {
"development": {
[09/15] git commit: updated refs/heads/1809-compact-and-clean to
489a6c2
Posted by ga...@apache.org.
Fauxton: Fix issue cannot delete new view
Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/e1f5d8db
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/e1f5d8db
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/e1f5d8db
Branch: refs/heads/1809-compact-and-clean
Commit: e1f5d8dbce37460419f406bf87284dbd7712f82b
Parents: 309a569
Author: Garren Smith <ga...@gmail.com>
Authored: Mon Oct 21 16:09:09 2013 +0200
Committer: Garren Smith <ga...@gmail.com>
Committed: Mon Oct 21 16:09:09 2013 +0200
----------------------------------------------------------------------
src/fauxton/app/modules/documents/resources.js | 1 -
src/fauxton/app/modules/documents/views.js | 98 +++++++++++++-------
.../documents/design_doc_selector.html | 35 +++++++
.../app/templates/documents/view_editor.html | 22 -----
4 files changed, 100 insertions(+), 56 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/couchdb/blob/e1f5d8db/src/fauxton/app/modules/documents/resources.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/modules/documents/resources.js b/src/fauxton/app/modules/documents/resources.js
index 8df2e6f..5512add 100644
--- a/src/fauxton/app/modules/documents/resources.js
+++ b/src/fauxton/app/modules/documents/resources.js
@@ -167,7 +167,6 @@ function(app, FauxtonAPI) {
if (resp.ok) {
delete resp.ok;
}
-
return resp;
},
http://git-wip-us.apache.org/repos/asf/couchdb/blob/e1f5d8db/src/fauxton/app/modules/documents/views.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/modules/documents/views.js b/src/fauxton/app/modules/documents/views.js
index 8cd1384..5122921 100644
--- a/src/fauxton/app/modules/documents/views.js
+++ b/src/fauxton/app/modules/documents/views.js
@@ -1099,7 +1099,60 @@ function(app, FauxtonAPI, Components, Documents, pouchdb, Codemirror, JSHint, re
}
});
- //TODO split this into two smaller views, one for advance query options and other for index editing
+ Views.DesignDocSelector = FauxtonAPI.View.extend({
+ template: "templates/documents/design_doc_selector",
+
+ events: {
+ "change select#ddoc": "updateDesignDoc"
+ },
+
+ initialize: function (options) {
+ this.ddocName = options.ddocName;
+ this.database = options.database;
+ this.listenTo(this.collection, 'add', this.ddocAdded);
+ },
+
+ ddocAdded: function (ddoc) {
+ this.ddocName = ddoc.id;
+ this.render();
+ },
+
+ serialize: function () {
+ return {
+ ddocName: this.ddocName,
+ ddocs: this.collection
+ };
+ },
+
+ updateDesignDoc: function () {
+ if (this.$('#ddoc :selected').prop('id') === 'new-doc') {
+ this.$('#new-ddoc-section').show();
+ } else {
+ this.$('#new-ddoc-section').hide();
+ }
+ },
+
+ newDesignDoc: function () {
+ return this.$('#ddoc :selected').prop('id') === 'new-doc';
+ },
+
+ getCurrentDesignDoc: function () {
+ if (this.newDesignDoc()) {
+ var doc = {
+ _id: '_design/' + this.$('#new-ddoc').val(),
+ views: {},
+ language: "javascript"
+ };
+ return new Documents.Doc(doc, {database: this.database});
+ } else {
+ var ddocName = this.$('#ddoc').val();
+ return this.collection.find(function (ddoc) {
+ return ddoc.id === ddocName;
+ }).dDocModel();
+ }
+ }
+ });
+
Views.ViewEditor = FauxtonAPI.View.extend({
template: "templates/documents/view_editor",
builtinReduces: ['_sum', '_count', '_stats'],
@@ -1108,7 +1161,7 @@ function(app, FauxtonAPI, Components, Documents, pouchdb, Codemirror, JSHint, re
"click button.save": "saveView",
"click button.delete": "deleteView",
"change select#reduce-function-selector": "updateReduce",
- "change select#ddoc": "updateDesignDoc",
+
"click #db-views-tabs-nav": 'toggleIndexNav'
},
@@ -1143,17 +1196,7 @@ function(app, FauxtonAPI, Components, Documents, pouchdb, Codemirror, JSHint, re
}
},
- updateDesignDoc: function () {
-
- if (this.$('#ddoc :selected').prop('id') === 'new-doc') {
- this.$('#new-ddoc-section').show();
-
- } else {
- this.$('#new-ddoc-section').hide();
- }
-
- },
-
+
updateValues: function() {
var notification;
if (this.model.changedAttributes()) {
@@ -1335,26 +1378,9 @@ function(app, FauxtonAPI, Components, Documents, pouchdb, Codemirror, JSHint, re
},
getCurrentDesignDoc: function () {
- if (this.newDesignDoc()) {
- var doc = {
- _id: '_design/' + this.$('#new-ddoc').val(),
- views: {},
- language: "javascript"
- };
- return new Documents.Doc(doc, {database: this.database});
- } else {
- var ddocName = this.$('#ddoc').val();
- return this.ddocs.find(function (ddoc) {
- return ddoc.id === ddocName;
- }).dDocModel();
- }
-
+ return this.designDocSelector.getCurrentDesignDoc();
},
-
- newDesignDoc: function () {
- return this.$('#ddoc :selected').prop('id') === 'new-doc';
- },
-
+
isCustomReduceEnabled: function() {
return $("#reduce-function-selector").val() == "CUSTOM";
},
@@ -1461,6 +1487,12 @@ function(app, FauxtonAPI, Components, Documents, pouchdb, Codemirror, JSHint, re
this.setView('#ddoc-info', new Views.DdocInfo({model: this.ddocInfo }));
}
+ this.designDocSelector = this.setView('.design-doc-group', new Views.DesignDocSelector({
+ collection: this.ddocs,
+ ddocName: this.model.id,
+ database: this.database
+ }));
+
this.advancedOptions = this.insertView('#query', new Views.AdvancedOptions({
updateViewFn: this.updateView,
previewFn: this.previewView
@@ -1480,7 +1512,7 @@ function(app, FauxtonAPI, Components, Documents, pouchdb, Codemirror, JSHint, re
this.$('#index-nav').parent().removeClass('active');
}
- this.updateDesignDoc();
+ this.designDocSelector.updateDesignDoc();
// This is a hack around a bug in backbone.layoutmanager with grunt dev
// When in grunt dev mode we load templates asynchronously
// and this can cause a double render which then gives us two
http://git-wip-us.apache.org/repos/asf/couchdb/blob/e1f5d8db/src/fauxton/app/templates/documents/design_doc_selector.html
----------------------------------------------------------------------
diff --git a/src/fauxton/app/templates/documents/design_doc_selector.html b/src/fauxton/app/templates/documents/design_doc_selector.html
new file mode 100644
index 0000000..0cd6bdf
--- /dev/null
+++ b/src/fauxton/app/templates/documents/design_doc_selector.html
@@ -0,0 +1,35 @@
+<!--
+Licensed under the Apache License, Version 2.0 (the "License"); you may not
+use this file except in compliance with the License. You may obtain a copy of
+the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+License for the specific language governing permissions and limitations under
+the License.
+-->
+<div class="span3">
+ <label for="ddoc">Design document <a href="<%=getDocUrl('design_doc')%>" target="_blank"><i class="icon-question-sign"></i></a></label>
+ <select id="ddoc">
+ <optgroup label="Select a document">
+ <option id="new-doc">New document</option>
+ <% ddocs.each(function(ddoc) { %>
+ <% if (ddoc.id === ddocName) { %>
+ <option selected="selected"><%= ddoc.id %></option>
+ <% } else { %>
+ <option><%= ddoc.id %></option>
+ <% } %>
+ <% }); %>
+ </optgroup>
+ </select>
+</div>
+
+<div id="new-ddoc-section" class="span5" style="display:none">
+ <label class="control-label" for="new-ddoc"> _design/ </label>
+ <div class="controls">
+ <input type="text" id="new-ddoc" placeholder="newDesignDoc">
+ </div>
+</div>
http://git-wip-us.apache.org/repos/asf/couchdb/blob/e1f5d8db/src/fauxton/app/templates/documents/view_editor.html
----------------------------------------------------------------------
diff --git a/src/fauxton/app/templates/documents/view_editor.html b/src/fauxton/app/templates/documents/view_editor.html
index f75edc5..76265e0 100644
--- a/src/fauxton/app/templates/documents/view_editor.html
+++ b/src/fauxton/app/templates/documents/view_editor.html
@@ -25,28 +25,6 @@ the License.
<form class="form-horizontal view-query-save">
<div class="control-group design-doc-group">
- <div class="span3">
- <label for="ddoc">Design document <a href="<%=getDocUrl('design_doc')%>" target="_blank"><i class="icon-question-sign"></i></a></label>
- <select id="ddoc">
- <optgroup label="Select a document">
- <option id="new-doc">New document</option>
- <% ddocs.each(function(ddoc) { %>
- <% if (ddoc.id === ddocName) { %>
- <option selected="selected"><%= ddoc.id %></option>
- <% } else { %>
- <option><%= ddoc.id %></option>
- <% } %>
- <% }); %>
- </optgroup>
- </select>
- </div>
-
- <div id="new-ddoc-section" class="span5" style="display:none">
- <label class="control-label" for="new-ddoc"> _design/ </label>
- <div class="controls">
- <input type="text" id="new-ddoc" placeholder="newDesignDoc">
- </div>
- </div>
</div>
<div class="control-group">