You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by de...@apache.org on 2013/09/05 19:34:44 UTC
[01/17] git commit: updated refs/heads/1807-Replication to 80a5e6e
Updated Branches:
refs/heads/1807-Replication 4d9c5d354 -> 80a5e6efc (forced update)
Add empty line to LICENSE for readability.
Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/80775165
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/80775165
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/80775165
Branch: refs/heads/1807-Replication
Commit: 8077516584c79a9b9cf1a70eaa5d4d57b74c02d5
Parents: 771f468
Author: Dirkjan Ochtman <dj...@apache.org>
Authored: Wed Aug 7 17:57:18 2013 +0200
Committer: Dirkjan Ochtman <dj...@apache.org>
Committed: Fri Aug 23 16:32:02 2013 +0200
----------------------------------------------------------------------
LICENSE | 1 +
1 file changed, 1 insertion(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/couchdb/blob/80775165/LICENSE
----------------------------------------------------------------------
diff --git a/LICENSE b/LICENSE
index 9f9d856..5acc95e 100644
--- a/LICENSE
+++ b/LICENSE
@@ -895,6 +895,7 @@ For the src/couch_dbupdates component
2009-2012 (c) Benoît Chesneau <be...@e-engura.org>
Apache 2 License, see above.
+
For src/fauxton/test/mocha/mocha.js and src/fauxton/test/mocha/mocha.js
Copyright (c) 2011-2013 TJ Holowaychuk <tj...@vision-media.ca>
[13/17] git commit: updated refs/heads/1807-Replication to 80a5e6e
Posted by de...@apache.org.
Fixing table to wrap long words.
Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/473847d2
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/473847d2
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/473847d2
Branch: refs/heads/1807-Replication
Commit: 473847d2c2655903605c8287d11eff9214242449
Parents: 7069970
Author: suelockwood <de...@gmail.com>
Authored: Thu Sep 5 12:30:06 2013 -0400
Committer: suelockwood <de...@gmail.com>
Committed: Thu Sep 5 12:30:06 2013 -0400
----------------------------------------------------------------------
src/fauxton/assets/less/fauxton.less | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/couchdb/blob/473847d2/src/fauxton/assets/less/fauxton.less
----------------------------------------------------------------------
diff --git a/src/fauxton/assets/less/fauxton.less b/src/fauxton/assets/less/fauxton.less
index 8111f0f..02fcef6 100644
--- a/src/fauxton/assets/less/fauxton.less
+++ b/src/fauxton/assets/less/fauxton.less
@@ -371,6 +371,10 @@ a:hover{
/*dashboard content can be in multiple templates*/
#dashboard-content{
+ &.row-fluid{
+ /*remove gutter without rewriting variable*/
+ margin-left: 0px;
+ }
padding: 20px;
.with-sidebar &{
border-left: 1px solid #999;
@@ -619,6 +623,19 @@ footer#mainFooter{
}
/*TABLE STYLES*/
+table.table {
+ table-layout: fixed;
+}
+table {
+ tr{
+ td{
+ word-wrap: break-word;
+ &.select {
+ width: 20px;
+ }
+ }
+ }
+}
table.databases {clear: both;}
thead {border-bottom: 2px solid @redButton;}
tbody {padding-top: 10px;}
[11/17] git commit: updated refs/heads/1807-Replication to 80a5e6e
Posted by de...@apache.org.
Bootstrap CSS fixes for our theme.
Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/063e3992
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/063e3992
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/063e3992
Branch: refs/heads/1807-Replication
Commit: 063e3992749214bcceb8849080048a6ae54e6141
Parents: 125d06c
Author: suelockwood <de...@gmail.com>
Authored: Wed Sep 4 16:51:32 2013 -0400
Committer: suelockwood <de...@gmail.com>
Committed: Wed Sep 4 16:51:32 2013 -0400
----------------------------------------------------------------------
src/fauxton/assets/less/fauxton.less | 64 +++++++++++++++++++++++--------
1 file changed, 49 insertions(+), 15 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/couchdb/blob/063e3992/src/fauxton/assets/less/fauxton.less
----------------------------------------------------------------------
diff --git a/src/fauxton/assets/less/fauxton.less b/src/fauxton/assets/less/fauxton.less
index fcaf884..8111f0f 100644
--- a/src/fauxton/assets/less/fauxton.less
+++ b/src/fauxton/assets/less/fauxton.less
@@ -556,11 +556,12 @@ footer#mainFooter{
width: 100%;
margin-bottom: 10px;
}
-.navbar-form input{
- margin-top: -5px;
-}
+
.navbar-form.pull-right.database-search {
margin-right: 36px;
+ input[type=text]{
+ margin-top: -4px;
+ }
}
#db-views-tabs-nav{
@@ -648,7 +649,11 @@ tbody {padding-top: 10px;}
}
}
-
+.btn {
+ padding-top: 12px;
+ padding-bottom: 12px;
+ margin-top: 0px;
+}
.button{
.transition(all @transitionSpeed @transitionEaseType);
@@ -700,10 +705,10 @@ input[type=text], input[type=password],
.navbar-form input{
.border-radius(0);
padding: 12px;
- margin-top: -4px;
border: 1px solid #ccc;
height: auto;
font-size: 16px;
+ margin-top: 0;
}
@@ -733,6 +738,13 @@ label.fonticon-search {
}
}
+
+.form-inline {
+ input[type=password],
+ input[type=text]{
+ width: auto;
+ }
+}
*, *:before, *:after {
.box-sizing(border-box);
}
@@ -756,15 +768,28 @@ form.custom .hidden-field {
visibility: hidden;
}
-label{
- padding-left: 25px;
+
+.checkbox {
+ label{
+ display: inline-block;
+ padding-left:25px;
+ }
+}
+
+label{
margin-right: 15px;
- display: inline-block;
+ padding-left:0;
+ display: block;
cursor: pointer;
position: relative;
- font-size: 14px;
+ font-size: 14px;
+ &.inline{
+ display: inline-block;
+ }
+}
+.help-block{
+ font-size: 12px;
}
-
.custom-inputs{
input[type=radio],
@@ -841,12 +866,23 @@ label{
.input-append,
.input-prepend {
.add-on {
- font-size: 15px;
- padding: 7px 5px;
- margin-top: -5px;
+ font-size: 18px;
+ padding: 14px 5px 30px;
}
}
+.input-append .btn:last-child,
+.input-append .btn-group:last-child > .dropdown-toggle {
+ padding: 10px 5px 14px;
+}
+.input-append .btn{
+ padding: 10px 5px 14px;
+}
+.row-fluid .input-append [class*="span"],
+.input-prepend input[class*="span"]{
+ width: auto;
+}
+
/*pretty print*/
pre.prettyprint {
background: #E5E0DD;
@@ -914,14 +950,12 @@ div.spinner {
.input-append.input-prepend {
margin-bottom: 0px;
.add-on {
- margin-top: -4px;
background: none;
padding: 14px 12px 32px 12px;
border: none;
}
.btn:last-child{
margin-left: -1px;
- margin-top: -4px;
background: none;
padding: 13px 12px 11px 12px;
&:hover{
[04/17] git commit: updated refs/heads/1807-Replication to 80a5e6e
Posted by de...@apache.org.
Update version in documentation.
Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/008378a8
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/008378a8
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/008378a8
Branch: refs/heads/1807-Replication
Commit: 008378a8940765bfe8c285ee92b71807ce62105a
Parents: 2a0a4c3
Author: Dirkjan Ochtman <dj...@apache.org>
Authored: Fri Aug 23 16:55:42 2013 +0200
Committer: Dirkjan Ochtman <dj...@apache.org>
Committed: Fri Aug 23 17:29:20 2013 +0200
----------------------------------------------------------------------
share/doc/src/conf.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/couchdb/blob/008378a8/share/doc/src/conf.py
----------------------------------------------------------------------
diff --git a/share/doc/src/conf.py b/share/doc/src/conf.py
index 6fd9112..8c352d6 100644
--- a/share/doc/src/conf.py
+++ b/share/doc/src/conf.py
@@ -20,9 +20,9 @@ master_doc = "index"
nitpicky = True
-version = "1.3"
+version = "1.4"
-release = "1.3.0"
+release = "1.4.0"
project = u"Apache CouchDB"
[09/17] git commit: updated refs/heads/1807-Replication to 80a5e6e
Posted by de...@apache.org.
Fauxton: View test sandbox renders to DOM in hidden div
Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/ae17b8c3
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/ae17b8c3
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/ae17b8c3
Branch: refs/heads/1807-Replication
Commit: ae17b8c3a38247f14bf1427862233fec03065a8f
Parents: 64ac2d6
Author: Garren Smith <ga...@gmail.com>
Authored: Thu Aug 29 21:48:43 2013 +0200
Committer: Garren Smith <ga...@gmail.com>
Committed: Thu Aug 29 21:48:43 2013 +0200
----------------------------------------------------------------------
src/fauxton/test/mocha/testUtils.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/couchdb/blob/ae17b8c3/src/fauxton/test/mocha/testUtils.js
----------------------------------------------------------------------
diff --git a/src/fauxton/test/mocha/testUtils.js b/src/fauxton/test/mocha/testUtils.js
index 3eb1118..f9643e8 100644
--- a/src/fauxton/test/mocha/testUtils.js
+++ b/src/fauxton/test/mocha/testUtils.js
@@ -24,7 +24,7 @@ function(chai, sinonChai) {
_.extend(ViewSandbox.prototype, {
initialize: function () {
- this.$el = $('<div></div>');
+ this.$el = $('<div style="display:none"></div>').appendTo('body');
this.$ = this.$el.find;
},
views: [],
[16/17] git commit: updated refs/heads/1807-Replication to 80a5e6e
Posted by de...@apache.org.
Fixed Create target. Change swap to icon, added tooltips, made inputs wider.
Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/87321a36
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/87321a36
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/87321a36
Branch: refs/heads/1807-Replication
Commit: 87321a362be11d3e38647e380819f8319d63a7b0
Parents: 6ff89dc
Author: suelockwood <de...@gmail.com>
Authored: Mon Aug 26 12:32:37 2013 -0400
Committer: suelockwood <de...@gmail.com>
Committed: Thu Sep 5 13:34:32 2013 -0400
----------------------------------------------------------------------
.../replication/assets/less/replication.less | 82 +++++---------------
.../app/addons/replication/templates/form.html | 9 ++-
src/fauxton/app/addons/replication/views.js | 16 ++--
3 files changed, 39 insertions(+), 68 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/couchdb/blob/87321a36/src/fauxton/app/addons/replication/assets/less/replication.less
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/replication/assets/less/replication.less b/src/fauxton/app/addons/replication/assets/less/replication.less
index fe544ea..dafc086 100644
--- a/src/fauxton/app/addons/replication/assets/less/replication.less
+++ b/src/fauxton/app/addons/replication/assets/less/replication.less
@@ -13,26 +13,27 @@
position: relative;
.form_set{
- width: 300px;
+ width: 350px;
display: inline-block;
border: 1px solid @greyBrown;
- padding: 10px;
+ padding: 15px 10px 0;
margin-bottom: 20px;
&.middle{
- width: 200px;
+ width: 100px;
border: none;
position: relative;
height: 100px;
margin: 0;
}
input, select {
- margin: 0 0 16px 35px;
+ margin: 0 0 16px 5px;
height: 40px;
+ width: 318px;
}
.btn-group{
- margin: 0 0 16px 35px;
+ margin: 0 0 16px 5px;
.btn {
- padding: 10px 30px;
+ padding: 10px 57px;
}
}
&.local{
@@ -101,11 +102,9 @@
min-width: 130px;
padding-left: 0px;
}
- input[type=text],
input[type=radio],
- input[type=checkbox],
- select {
-
+ input[type=checkbox]{
+ margin: 0 0 2px 0;
}
}
@@ -113,7 +112,7 @@
z-index: 0;
position: absolute;
top: 20px;
- left: 63px;
+ left: 15px;
&:after {
width: 70px;
@@ -129,56 +128,17 @@
}
}
.swap {
- z-index: 30;
- cursor: pointer;
- position: absolute;
- font-size: 12px;
- width: 27px;
- height: 12px;
- display: block;
- border-top: 3px solid @greyBrown;
- border-bottom: 3px solid @greyBrown;
- top: 50px;
- left: 84px;
- &:hover {
- border-color: #2C2C2C;
- &:before {
- bottom: -8px;
- right: 23px;
- position: absolute;
- border-right: 7px solid #2C2C2C;
- border-top: 7px solid rgba(44, 44, 44, 0);
- border-bottom: 7px solid rgba(44, 44, 44, 0);
- content: "";
- }
- &:after {
- top: -8px;
- left: 23px;
- position: absolute;
- border-left: 7px solid #2C2C2C;
- border-top: 7px solid rgba(44, 44, 44, 0);
- border-bottom: 7px solid rgba(44, 44, 44, 0);
- content: "";
- }
- }
- &:before {
- bottom: -8px;
- right: 23px;
- position: absolute;
- border-right: 7px solid @greyBrown;
- border-top: 7px solid rgba(44, 44, 44, 0);
- border-bottom: 7px solid rgba(44, 44, 44, 0);
- content: "";
-
- }
- &:after {
- top: -8px;
- left: 23px;
- position: absolute;
- border-left: 7px solid @greyBrown;
- border-top: 7px solid rgba(44, 44, 44, 0);
- border-bottom: 7px solid rgba(44, 44, 44, 0);
- content: "";
+ text-decoration: none;
+ z-index: 30;
+ cursor: pointer;
+ position: absolute;
+ font-size: 40px;
+ width: 27px;
+ height: 12px;
+ top: 31px;
+ left: 30px;
+ &:hover {
+ color: @greyBrown;
}
}
http://git-wip-us.apache.org/repos/asf/couchdb/blob/87321a36/src/fauxton/app/addons/replication/templates/form.html
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/replication/templates/form.html b/src/fauxton/app/addons/replication/templates/form.html
index 2a70889..eeb3081 100644
--- a/src/fauxton/app/addons/replication/templates/form.html
+++ b/src/fauxton/app/addons/replication/templates/form.html
@@ -33,7 +33,9 @@ the License.
<div class="form_set middle">
<span class="circle "></span>
- <span class="swap">
+ <a href="#" title="Switch Target and Source" class="swap">
+ <span class="fonticon-swap-arrows"></span>
+ </a>
</span>
</div>
@@ -58,6 +60,11 @@ the License.
<input type="checkbox" name="continuous" value="true" id="continuous">
Continuous
</label>
+
+ <label for="createTarget">
+ <input type="checkbox" name="create_target" value="true" id="createTarget">
+ Create Target <i class="icon-question-sign " rel="tooltip" title="Create the target database"></i>
+ </label>
</div>
<button class="btn btn-success btn-large save" type="submit">Replicate</button>
http://git-wip-us.apache.org/repos/asf/couchdb/blob/87321a36/src/fauxton/app/addons/replication/views.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/replication/views.js b/src/fauxton/app/addons/replication/views.js
index ea87432..b2b8728 100644
--- a/src/fauxton/app/addons/replication/views.js
+++ b/src/fauxton/app/addons/replication/views.js
@@ -120,6 +120,14 @@ function(app, FauxtonAPI, replication) {
error = true;
}
}
+
+ if (this.$('input#to_name').is(':visible')){
+ var alreadyExists = this.collection.where({"name":this.$('input#to_name').val()});
+ if (alreadyExists.length === 0){
+ error = true;
+ }
+ }
+
return error;
},
serialize: function(){
@@ -166,21 +174,17 @@ function(app, FauxtonAPI, replication) {
var formJSON = {};
_.map(this.$(e.currentTarget).serializeArray(), function(formData){
if(formData.value !== ''){
- formJSON[formData.name] = (formData.value ==="true"? true: formData.value.replace(/\s/g, ''));
+ formJSON[formData.name] = (formData.value ==="true"? true: formData.value.replace(/\s/g, '').toLowerCase());
}
});
- var alreadyExists = this.collection.where({"name":$('input#to_name').val()});
-
- if (alreadyExists.length === 0){
- formJSON.create_target = true;
- }
console.log($(e.currentTarget).serializeArray(), formJSON);
this.updateButtonText(true);
this.startReplication(formJSON);
},
swapFields: function(e){
+ e.preventDefault();
//WALL O' VARIABLES
var $fromSelect = this.$('#from_name'),
$toSelect = this.$('#to_name'),
[02/17] git commit: updated refs/heads/1807-Replication to 80a5e6e
Posted by de...@apache.org.
Remove couchdb_updates files (content already in top-level LICENSE/NOTICE).
Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/2a5e100a
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/2a5e100a
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/2a5e100a
Branch: refs/heads/1807-Replication
Commit: 2a5e100a75e0b8c8026d7a7395313258a5a353c4
Parents: 8077516
Author: Dirkjan Ochtman <dj...@apache.org>
Authored: Wed Aug 7 18:00:37 2013 +0200
Committer: Dirkjan Ochtman <dj...@apache.org>
Committed: Fri Aug 23 16:32:19 2013 +0200
----------------------------------------------------------------------
src/couch_dbupdates/LICENSE | 22 ----------------------
src/couch_dbupdates/NOTICE | 6 ------
src/couch_dbupdates/README.md | 32 --------------------------------
3 files changed, 60 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/couchdb/blob/2a5e100a/src/couch_dbupdates/LICENSE
----------------------------------------------------------------------
diff --git a/src/couch_dbupdates/LICENSE b/src/couch_dbupdates/LICENSE
deleted file mode 100644
index a089916..0000000
--- a/src/couch_dbupdates/LICENSE
+++ /dev/null
@@ -1,22 +0,0 @@
-2009-2012 (c) Benoît Chesneau <be...@e-engura.org>
-
-Permission is hereby granted, free of charge, to any person
-obtaining a copy of this software and associated documentation
-files (the "Software"), to deal in the Software without
-restriction, including without limitation the rights to use,
-copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the
-Software is furnished to do so, subject to the following
-conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
-OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
http://git-wip-us.apache.org/repos/asf/couchdb/blob/2a5e100a/src/couch_dbupdates/NOTICE
----------------------------------------------------------------------
diff --git a/src/couch_dbupdates/NOTICE b/src/couch_dbupdates/NOTICE
deleted file mode 100644
index ee00a85..0000000
--- a/src/couch_dbupdates/NOTICE
+++ /dev/null
@@ -1,6 +0,0 @@
-couch_dbupdates
----------------
-
-2012 (c) Benoît Chesneau <be...@refuge.io>
-
-couch_dbupdates is released under the Apache License 2.
http://git-wip-us.apache.org/repos/asf/couchdb/blob/2a5e100a/src/couch_dbupdates/README.md
----------------------------------------------------------------------
diff --git a/src/couch_dbupdates/README.md b/src/couch_dbupdates/README.md
deleted file mode 100644
index c683102..0000000
--- a/src/couch_dbupdates/README.md
+++ /dev/null
@@ -1,32 +0,0 @@
-# couch_dbupdates
-
-`couch_dbupdates` is a simple couchdb modules to receive databases
-events in couchdb node.
-
-It's actually **supported by all the [refuge](http://refuge.io) projects**:
-
-- [refuge](https://github.com/refuge/refuge)
-- [rcouch](https://github.com/refuge/rcouch)
-- [rcouch_template](https://github.com/refuge/rcouch_template)
-
-
-## HTTP API
-
-To get db events, do a GET to `/_db_updates` .
-
-You can pass an optional query parameters:
-
-* `feed` The feed can be `longpoll` (default) for longpolling, `eventsource`
- for event stream or `continuous` for continuous feed.
-* `timeout`: timeout before the longpolling connection close or when the
- heartbeat is emitted.
-* `heartbeat`: true, or false. an empty line is emittend when the
- timeout occurs to maintain the connection active.
-
-
-## Example of usage
-
- $ curl http://127.0.0.1:5984/_db_updates?feed=continuous
- {"type":"created","db_name":"testdb"}
- {"type":"updated","db_name":"testdb"}
- {"type":"deleted","db_name":"testdb"}
[07/17] git commit: updated refs/heads/1807-Replication to 80a5e6e
Posted by de...@apache.org.
Fixed line wrapping in Vagrantfile.
Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/e41edf5e
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/e41edf5e
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/e41edf5e
Branch: refs/heads/1807-Replication
Commit: e41edf5e6263cb8b5cc81e837bfd41252f0c10bb
Parents: 5bdd87e
Author: nvdev <mo...@gmail.com>
Authored: Sat Aug 24 18:49:38 2013 +0300
Committer: nvdev <mo...@gmail.com>
Committed: Sat Aug 24 18:49:38 2013 +0300
----------------------------------------------------------------------
Vagrantfile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/couchdb/blob/e41edf5e/Vagrantfile
----------------------------------------------------------------------
diff --git a/Vagrantfile b/Vagrantfile
index 4b5eee1..d4e93d7 100644
--- a/Vagrantfile
+++ b/Vagrantfile
@@ -14,7 +14,7 @@ Vagrant::Config.run do |config|
# Install couchdb dependencies if deployment was not done
if Dir.glob("#{File.dirname(__FILE__)}/.vagrant/machines/default/*/id").empty?
# install build-essential
- pkg_cmd = "apt-get update -qq; apt-get install -q -y build-essential git "
+ pkg_cmd = "apt-get update -qq; apt-get install -q -y build-essential git " \
"autoconf autoconf-archive gnu-standards help2man texinfo; "
# Install erlang
[06/17] git commit: updated refs/heads/1807-Replication to 80a5e6e
Posted by de...@apache.org.
Merge branch 'vagrantfile_fix' of https://github.com/nvdev/couchdb
* 'vagrantfile_fix' of https://github.com/nvdev/couchdb:
Fixed typos in Vagrantfile
Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/5bdd87e6
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/5bdd87e6
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/5bdd87e6
Branch: refs/heads/1807-Replication
Commit: 5bdd87e669adeaacca8eac3e398836d5fd1b160a
Parents: 008378a 87ec5e7
Author: Jan Lehnardt <ja...@apache.org>
Authored: Fri Aug 23 18:11:03 2013 +0200
Committer: Jan Lehnardt <ja...@apache.org>
Committed: Fri Aug 23 18:11:03 2013 +0200
----------------------------------------------------------------------
Vagrantfile | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
[14/17] git commit: updated refs/heads/1807-Replication to 80a5e6e
Posted by de...@apache.org.
Fixed continuous, scrubbed whitepaces from db names, updated layout
Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/6ff89dc6
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/6ff89dc6
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/6ff89dc6
Branch: refs/heads/1807-Replication
Commit: 6ff89dc628db751ade32440989f48c27db012bcb
Parents: 0a6f74c
Author: suelockwood <de...@gmail.com>
Authored: Fri Aug 23 16:53:33 2013 -0400
Committer: suelockwood <de...@gmail.com>
Committed: Thu Sep 5 13:34:32 2013 -0400
----------------------------------------------------------------------
.../replication/assets/less/replication.less | 102 +++++++++++++++++--
.../app/addons/replication/templates/form.html | 53 ++++------
.../addons/replication/templates/progress.html | 4 +-
src/fauxton/app/addons/replication/views.js | 35 ++++---
4 files changed, 140 insertions(+), 54 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/couchdb/blob/6ff89dc6/src/fauxton/app/addons/replication/assets/less/replication.less
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/replication/assets/less/replication.less b/src/fauxton/app/addons/replication/assets/less/replication.less
index bcfdb56..fe544ea 100644
--- a/src/fauxton/app/addons/replication/assets/less/replication.less
+++ b/src/fauxton/app/addons/replication/assets/less/replication.less
@@ -1,6 +1,66 @@
+/**/
+
+@brown: #3A2C2B;
+@red: #E33F3B;
+@darkRed: #AF2D24;
+@linkRed: #DA4F49;
+@greyBrown: #A59D9D;
+@fontGrey: #808080;
+@secondarySidebar: #E4DFDC;
+
+
#replication {
position: relative;
+ .form_set{
+ width: 300px;
+ display: inline-block;
+ border: 1px solid @greyBrown;
+ padding: 10px;
+ margin-bottom: 20px;
+ &.middle{
+ width: 200px;
+ border: none;
+ position: relative;
+ height: 100px;
+ margin: 0;
+ }
+ input, select {
+ margin: 0 0 16px 35px;
+ height: 40px;
+ }
+ .btn-group{
+ margin: 0 0 16px 35px;
+ .btn {
+ padding: 10px 30px;
+ }
+ }
+ &.local{
+ .local_option{
+ display: block;
+ }
+ .remote_option{
+ display: none;
+ }
+ .local-btn{
+ background-color: @red;
+ color: #fff;
+ }
+ .remote-btn{
+ background-color: #f5f5f5;
+ color: @fontGrey;
+ }
+ }
+ .local_option{
+ display: none;
+ }
+ .remote-btn{
+ background-color: @red;
+ color: #fff;
+ }
+ }
+
+
.options {
position: relative;
&:after{
@@ -39,27 +99,47 @@
vertical-align: top;
padding-right: 5px;
min-width: 130px;
+ padding-left: 0px;
}
input[type=text],
input[type=radio],
input[type=checkbox],
select {
- margin-top: -2px;
+
}
}
+ .circle{
+ z-index: 0;
+ position: absolute;
+ top: 20px;
+ left: 63px;
+ &:after {
+ width: 70px;
+ height: 70px;
+ content: '';
+ display: block;
+ position: relative;
+ margin: 0 auto;
+ border: 1px solid @greyBrown;
+ -webkit-border-radius: 40px;
+ -moz-border-radius: 40px;
+ border-radius:40px;
+ }
+ }
.swap {
+ z-index: 30;
cursor: pointer;
position: absolute;
font-size: 12px;
width: 27px;
height: 12px;
display: block;
- border-top: 3px solid #8E9292;
- border-bottom: 3px solid #8E9292;
- top: 20%;
- left: 42%;
+ border-top: 3px solid @greyBrown;
+ border-bottom: 3px solid @greyBrown;
+ top: 50px;
+ left: 84px;
&:hover {
border-color: #2C2C2C;
&:before {
@@ -85,7 +165,7 @@
bottom: -8px;
right: 23px;
position: absolute;
- border-right: 7px solid #8E9292;
+ border-right: 7px solid @greyBrown;
border-top: 7px solid rgba(44, 44, 44, 0);
border-bottom: 7px solid rgba(44, 44, 44, 0);
content: "";
@@ -95,7 +175,7 @@
top: -8px;
left: 23px;
position: absolute;
- border-left: 7px solid #8E9292;
+ border-left: 7px solid @greyBrown;
border-top: 7px solid rgba(44, 44, 44, 0);
border-bottom: 7px solid rgba(44, 44, 44, 0);
content: "";
@@ -107,6 +187,10 @@
&.showHeader{
li.header{
display: block;
+ border: none;
+ }
+ ul {
+ border:1px solid @greyBrown;
}
}
li.header{
@@ -120,10 +204,10 @@
margin: 0px;
vertical-align: bottom;
}
- padding: 10px 0 ;
+ padding: 10px 10px;
margin: 0;
list-style: none;
- border-bottom: 1px solid #e3e3e3;
+ border-top: 1px solid @greyBrown;
}
}
}
http://git-wip-us.apache.org/repos/asf/couchdb/blob/6ff89dc6/src/fauxton/app/addons/replication/templates/form.html
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/replication/templates/form.html b/src/fauxton/app/addons/replication/templates/form.html
index c1711b5..2a70889 100644
--- a/src/fauxton/app/addons/replication/templates/form.html
+++ b/src/fauxton/app/addons/replication/templates/form.html
@@ -13,58 +13,49 @@ the License.
-->
<form id="replication" class="form-horizontal">
- <div class="row">
- <div class="span5 from form_set">
- <div class="control-group from_local">
- <label for="from_local">
- <input type="radio" id="from_local" name="from_type" value="local" checked="" class="setType">
- Local database:
- </label>
+ <div class="from form_set local">
+ <div class="btn-group">
+ <button class="btn local-btn" type="button" value="local">Local</button>
+ <button class="btn remote-btn" type="button" value="remote">Remote</button>
+ </div>
+
+ <div class="from_local local_option">
<select id="from_name" name="source">
<% _.each( databases, function( db, i ){ %>
<option value="<%=db.name%>"><%=db.name%></option>
<% }); %>
</select>
</div>
-
- <div class="control-group from_to_remote">
- <label for="from_to_remote">
- <input type="radio" id="from_to_remote" name="from_type" value="remote" class="setType">
- Remote database:
- </label>
- <input type="text" id="from_url" name="source" size="30" value="http://" disabled="true">
+ <div class="from_to_remote remote_option">
+ <input type="text" id="from_url" name="source" size="30" value="http://">
</div>
</div>
-
- <div class="span2">
+ <div class="form_set middle">
+ <span class="circle "></span>
<span class="swap">
</span>
</div>
- <div class="to form_set span5">
- <div class="to_local control-group">
- <label for="to_local">
- <input type="radio" id="to_local" name="to_type" value="local" checked="" class="setType">
- Local database:
- </label>
- <input type="text" id="to_name" name="target" size="30">
+ <div class="to form_set local">
+ <div class="btn-group">
+ <button class="btn local-btn" type="button" value="local">Local</button>
+ <button class="btn remote-btn" type="button" value="remote">Remote</button>
+ </div>
+ <div class="to_local local_option">
+ <input type="text" id="to_name" name="target" size="30" placeholder="database name">
</div>
- <div class="to_remote control-group">
- <label for="to_remote">
- <input type="radio" id="to_remote" name="to_type" value="remote" class="setType">
- Remote database:
- </label>
- <input type="text" id="to_url" name="target" size="30" value="http://" disabled="true">
+ <div class="to_remote remote_option">
+ <input type="text" id="to_url" name="target" size="30" value="http://">
</div>
</div>
- </div>
+
<div class="actions">
<div class="control-group">
<label for="continuous">
- <input type="checkbox" name="continuous" value="continuous" id="continuous">
+ <input type="checkbox" name="continuous" value="true" id="continuous">
Continuous
</label>
</div>
http://git-wip-us.apache.org/repos/asf/couchdb/blob/6ff89dc6/src/fauxton/app/addons/replication/templates/progress.html
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/replication/templates/progress.html b/src/fauxton/app/addons/replication/templates/progress.html
index d93db68..02c47f2 100644
--- a/src/fauxton/app/addons/replication/templates/progress.html
+++ b/src/fauxton/app/addons/replication/templates/progress.html
@@ -11,9 +11,9 @@ WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations under
the License.
-->
-<p class="span6">Replicating <%=source%> to <%=target%>. Please wait... :)</p>
+<p class="span6">Replicating <strong><%=source%></strong> to <strong><%=target%></strong></p>
-<div class="span5 progress progress-striped active">
+<div class="span4 progress progress-striped active">
<div class="bar" style="width: <%=progress || 0%>%;"><%=progress || "0"%>%</div>
</div>
http://git-wip-us.apache.org/repos/asf/couchdb/blob/6ff89dc6/src/fauxton/app/addons/replication/views.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/replication/views.js b/src/fauxton/app/addons/replication/views.js
index 30c642f..ea87432 100644
--- a/src/fauxton/app/addons/replication/views.js
+++ b/src/fauxton/app/addons/replication/views.js
@@ -45,7 +45,7 @@ function(app, FauxtonAPI, replication) {
template: "addons/replication/templates/form",
events: {
"submit #replication": "submit",
- "click input[type=radio]": "enableFields",
+ "click .btn-group .btn": "showFields",
"click .swap": "swapFields",
"click .options": "toggleAdvancedOptions"
},
@@ -89,22 +89,31 @@ function(app, FauxtonAPI, replication) {
cleanup: function(){
clearInterval(pollingInfo.intervalId);
},
- disableFields: function(){
- this.$('input[type=radio]').attr('disabled',true);
- this.$('.advancedOptions:hidden').find('input').attr('disabled',true);
+
+ disableFields: function(disable){
+ if(disable){
+ this.$el.find('input:hidden','select:hidden').attr('disabled',true);
+ }else{
+ this.$el.find('input','select').attr('disabled',false);
+ }
},
- enableFields: function(e){
- var $currentTarget = this.$(e.currentTarget);
- $currentTarget.parents(".form_set").find('input[type="text"], select').attr('disabled','true').addClass('disabled');
- $currentTarget.parents('.control-group').find('input[type="text"], select').removeAttr('disabled').removeClass('disabled');
+ showFields: function(e){
+ var $currentTarget = $(e.currentTarget),
+ targetVal = $currentTarget.val();
+
+ if (targetVal === "local"){
+ $currentTarget.parents('.form_set').addClass('local');
+ }else{
+ $currentTarget.parents('.form_set').removeClass('local');
+ }
},
establish: function(){
return [ this.collection.fetch(), this.status.fetch()];
},
formValidation: function(){
- var $remote = this.$el.find("[value='remote']:checked").parents('.control-group').find('input[type=text]'),
+ var $remote = this.$el.find('input:visible'),
error = false;
for(var i=0; i<$remote.length; i++){
if ($remote[i].value =="http://" || $remote[i].value ==" "){
@@ -140,6 +149,7 @@ function(app, FauxtonAPI, replication) {
that.updateButtonText(false);
}
});
+ this.disableFields(false);
},
updateButtonText: function(wait){
var $button = this.$('#replication button[type=submit]');
@@ -151,12 +161,13 @@ function(app, FauxtonAPI, replication) {
},
submit: function(e){
e.preventDefault();
- this.disableFields(); //disable fields not relevant to submitting
+ this.disableFields(true); //disable fields not relevant to submitting
var formJSON = {};
_.map(this.$(e.currentTarget).serializeArray(), function(formData){
if(formData.value !== ''){
- formJSON[formData.name] = formData.value;
+ formJSON[formData.name] = (formData.value ==="true"? true: formData.value.replace(/\s/g, ''));
+
}
});
@@ -194,7 +205,7 @@ View.ReplicationList = FauxtonAPI.View.extend({
initialize: function(){
Events.bind('update:tasks', this.establish, this);
this.listenTo(this.collection, "reset", this.render);
- this.$el.prepend("<li class='header'><h2>Active Replication Tasks</h2></li>");
+ this.$el.prepend("<li class='header'><h4>Active Replication Tasks</h4></li>");
},
establish: function(){
return [this.collection.fetch({reset: true})];
[10/17] git commit: updated refs/heads/1807-Replication to 80a5e6e
Posted by de...@apache.org.
Update minor version number for next release
Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/125d06cd
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/125d06cd
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/125d06cd
Branch: refs/heads/1807-Replication
Commit: 125d06cdcb2e7b81ae8dc950f5aa5c38aa996d00
Parents: ae17b8c
Author: Dirkjan Ochtman <dj...@apache.org>
Authored: Wed Sep 4 09:32:54 2013 +0200
Committer: Dirkjan Ochtman <dj...@apache.org>
Committed: Wed Sep 4 09:32:54 2013 +0200
----------------------------------------------------------------------
acinclude.m4.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/couchdb/blob/125d06cd/acinclude.m4.in
----------------------------------------------------------------------
diff --git a/acinclude.m4.in b/acinclude.m4.in
index 6423cfc..cdd931f 100644
--- a/acinclude.m4.in
+++ b/acinclude.m4.in
@@ -17,7 +17,7 @@ m4_define([LOCAL_PACKAGE_TARNAME], [apache-couchdb])
m4_define([LOCAL_PACKAGE_NAME], [Apache CouchDB])
m4_define([LOCAL_BUG_URI], [https://issues.apache.org/jira/browse/COUCHDB])
m4_define([LOCAL_VERSION_MAJOR], [1])
-m4_define([LOCAL_VERSION_MINOR], [4])
+m4_define([LOCAL_VERSION_MINOR], [5])
m4_define([LOCAL_VERSION_REVISION], [0])
m4_define([LOCAL_VERSION_STAGE], [+build])
m4_define([LOCAL_VERSION_RELEASE], [.%revision%])
[15/17] git commit: updated refs/heads/1807-Replication to 80a5e6e
Posted by de...@apache.org.
fixing CSS overrides on the form
Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/80a5e6ef
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/80a5e6ef
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/80a5e6ef
Branch: refs/heads/1807-Replication
Commit: 80a5e6efc4fe3974a046ee08559499279a13e3d1
Parents: 87321a3
Author: suelockwood <de...@gmail.com>
Authored: Thu Sep 5 09:55:41 2013 -0400
Committer: suelockwood <de...@gmail.com>
Committed: Thu Sep 5 13:34:32 2013 -0400
----------------------------------------------------------------------
src/fauxton/app/addons/replication/assets/less/replication.less | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/couchdb/blob/80a5e6ef/src/fauxton/app/addons/replication/assets/less/replication.less
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/replication/assets/less/replication.less b/src/fauxton/app/addons/replication/assets/less/replication.less
index dafc086..ec3b718 100644
--- a/src/fauxton/app/addons/replication/assets/less/replication.less
+++ b/src/fauxton/app/addons/replication/assets/less/replication.less
@@ -9,8 +9,10 @@
@secondarySidebar: #E4DFDC;
-#replication {
+form#replication {
position: relative;
+ max-width: none;
+ width: auto;
.form_set{
width: 350px;
[12/17] git commit: updated refs/heads/1807-Replication to 80a5e6e
Posted by de...@apache.org.
Cleaning up resize collumns to use a class selector instead of an ID. Also added cleanup method to remove callback.
Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/70699704
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/70699704
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/70699704
Branch: refs/heads/1807-Replication
Commit: 7069970495cfed91ca3eaa80946988864008df9d
Parents: 063e399
Author: suelockwood <de...@gmail.com>
Authored: Thu Sep 5 12:12:16 2013 -0400
Committer: suelockwood <de...@gmail.com>
Committed: Thu Sep 5 12:12:16 2013 -0400
----------------------------------------------------------------------
src/fauxton/app/resizeColumns.js | 6 +++++-
src/fauxton/app/templates/layouts/one_pane.html | 2 +-
src/fauxton/app/templates/layouts/with_right_sidebar.html | 2 +-
src/fauxton/app/templates/layouts/with_sidebar.html | 2 +-
src/fauxton/app/templates/layouts/with_tabs.html | 2 +-
src/fauxton/app/templates/layouts/with_tabs_sidebar.html | 2 +-
6 files changed, 10 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/couchdb/blob/70699704/src/fauxton/app/resizeColumns.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/resizeColumns.js b/src/fauxton/app/resizeColumns.js
index 0073690..687b9d3 100644
--- a/src/fauxton/app/resizeColumns.js
+++ b/src/fauxton/app/resizeColumns.js
@@ -25,7 +25,7 @@ function(mixins) {
var Resize = function(options){
this.options = options;
- this.options.selectorElements = options.selectorElements || "#dashboard-content";
+ this.options.selectorElements = options.selectorElements || ".window-resizeable";
};
Resize.prototype = {
@@ -49,10 +49,14 @@ function(mixins) {
updateOptions:function(options){
this.options = {};
this.options = options;
+ this.options.selectorElements = options.selectorElements || ".window-resizeable";
},
turnOff:function(){
mixins.removeWindowResize("animation");
},
+ cleanupCallback: function(){
+ this.callback = null;
+ },
onResizeHandler: function (){
//if there is an override, do that instead
if (this.options.onResizeHandler){
http://git-wip-us.apache.org/repos/asf/couchdb/blob/70699704/src/fauxton/app/templates/layouts/one_pane.html
----------------------------------------------------------------------
diff --git a/src/fauxton/app/templates/layouts/one_pane.html b/src/fauxton/app/templates/layouts/one_pane.html
index baafbf8..c7adf1f 100644
--- a/src/fauxton/app/templates/layouts/one_pane.html
+++ b/src/fauxton/app/templates/layouts/one_pane.html
@@ -22,7 +22,7 @@ the License.
<div class="row-fluid content-area">
<div id="tabs" class="row"></div>
- <div id="dashboard-content"></div>
+ <div id="dashboard-content" class="window-resizeable"></div>
</div>
</div>
http://git-wip-us.apache.org/repos/asf/couchdb/blob/70699704/src/fauxton/app/templates/layouts/with_right_sidebar.html
----------------------------------------------------------------------
diff --git a/src/fauxton/app/templates/layouts/with_right_sidebar.html b/src/fauxton/app/templates/layouts/with_right_sidebar.html
index 1923ced..ade5b82 100644
--- a/src/fauxton/app/templates/layouts/with_right_sidebar.html
+++ b/src/fauxton/app/templates/layouts/with_right_sidebar.html
@@ -20,7 +20,7 @@ the License.
</div>
<div class="with-sidebar-right content-area">
<div id="dashboard-content" class="list"></div>
- <div id="sidebar-content" class="sidebar pull-right"></div>
+ <div id="sidebar-content" class="sidebar pull-right window-resizeable"></div>
</div>
</div>
http://git-wip-us.apache.org/repos/asf/couchdb/blob/70699704/src/fauxton/app/templates/layouts/with_sidebar.html
----------------------------------------------------------------------
diff --git a/src/fauxton/app/templates/layouts/with_sidebar.html b/src/fauxton/app/templates/layouts/with_sidebar.html
index bd26e5b..0bba4a1 100644
--- a/src/fauxton/app/templates/layouts/with_sidebar.html
+++ b/src/fauxton/app/templates/layouts/with_sidebar.html
@@ -21,7 +21,7 @@ the License.
</header>
<div class="with-sidebar content-area">
<div id="sidebar-content" class="sidebar"></div>
- <div id="dashboard-content" class="list"></div>
+ <div id="dashboard-content" class="list window-resizeable"></div>
</div>
</div>
http://git-wip-us.apache.org/repos/asf/couchdb/blob/70699704/src/fauxton/app/templates/layouts/with_tabs.html
----------------------------------------------------------------------
diff --git a/src/fauxton/app/templates/layouts/with_tabs.html b/src/fauxton/app/templates/layouts/with_tabs.html
index bf63517..8bfc7e0 100644
--- a/src/fauxton/app/templates/layouts/with_tabs.html
+++ b/src/fauxton/app/templates/layouts/with_tabs.html
@@ -22,7 +22,7 @@ the License.
<div class="row-fluid content-area">
<div id="tabs" class="row-fluid"></div>
- <div id="dashboard-content" class="list span12"></div>
+ <div id="dashboard-content" class="list span12 window-resizeable"></div>
</div>
http://git-wip-us.apache.org/repos/asf/couchdb/blob/70699704/src/fauxton/app/templates/layouts/with_tabs_sidebar.html
----------------------------------------------------------------------
diff --git a/src/fauxton/app/templates/layouts/with_tabs_sidebar.html b/src/fauxton/app/templates/layouts/with_tabs_sidebar.html
index e7a524f..69d723b 100644
--- a/src/fauxton/app/templates/layouts/with_tabs_sidebar.html
+++ b/src/fauxton/app/templates/layouts/with_tabs_sidebar.html
@@ -27,7 +27,7 @@ the License.
<aside id="sidebar-content" class="sidebar"></aside>
- <section id="dashboard-content" class="list pull-right">
+ <section id="dashboard-content" class="list pull-right window-resizeable">
<div class="inner">
<div id="dashboard-upper-menu"></div>
<div id="dashboard-upper-content"></div>
[03/17] git commit: updated refs/heads/1807-Replication to 80a5e6e
Posted by de...@apache.org.
Add missing etap file.
Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/2a0a4c3f
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/2a0a4c3f
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/2a0a4c3f
Branch: refs/heads/1807-Replication
Commit: 2a0a4c3f2156da67a815cabb9c8225fbd71bdbfa
Parents: 2a5e100
Author: Dirkjan Ochtman <dj...@apache.org>
Authored: Wed Aug 7 18:04:05 2013 +0200
Committer: Dirkjan Ochtman <dj...@apache.org>
Committed: Fri Aug 23 16:32:33 2013 +0200
----------------------------------------------------------------------
test/etap/Makefile.am | 1 +
1 file changed, 1 insertion(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/couchdb/blob/2a0a4c3f/test/etap/Makefile.am
----------------------------------------------------------------------
diff --git a/test/etap/Makefile.am b/test/etap/Makefile.am
index 529cf27..66048a9 100644
--- a/test/etap/Makefile.am
+++ b/test/etap/Makefile.am
@@ -63,6 +63,7 @@ tap_files = \
074-doc-update-conflicts.t \
075-auth-cache.t \
076-file-compression.t \
+ 077-couch-db-fast-db-delete-create.t \
080-config-get-set.t \
081-config-override.1.ini \
081-config-override.2.ini \
[08/17] git commit: updated refs/heads/1807-Replication to 80a5e6e
Posted by de...@apache.org.
Fauxton: Factor disk size to own method
Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/64ac2d60
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/64ac2d60
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/64ac2d60
Branch: refs/heads/1807-Replication
Commit: 64ac2d60f6788a8e39a45f5ca69761a1b8677684
Parents: e41edf5
Author: Garren Smith <ga...@gmail.com>
Authored: Tue Aug 27 16:08:53 2013 +0200
Committer: Garren Smith <ga...@gmail.com>
Committed: Tue Aug 27 16:08:53 2013 +0200
----------------------------------------------------------------------
src/fauxton/Gruntfile.js | 1 +
src/fauxton/app/modules/databases/resources.js | 6 +++++-
2 files changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/couchdb/blob/64ac2d60/src/fauxton/Gruntfile.js
----------------------------------------------------------------------
diff --git a/src/fauxton/Gruntfile.js b/src/fauxton/Gruntfile.js
index a548a9d..29a70ba 100644
--- a/src/fauxton/Gruntfile.js
+++ b/src/fauxton/Gruntfile.js
@@ -245,6 +245,7 @@ module.exports = function(grunt) {
},
options: {
nospawn: true,
+ debounceDelay: 500
}
},
http://git-wip-us.apache.org/repos/asf/couchdb/blob/64ac2d60/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 04e6c1e..e019bdd 100644
--- a/src/fauxton/app/modules/databases/resources.js
+++ b/src/fauxton/app/modules/databases/resources.js
@@ -115,13 +115,17 @@ function(app, FauxtonAPI, Documents) {
// cribbed from http://stackoverflow.com/questions/10420352/converting-file-size-in-bytes-to-human-readable
var i = -1;
var byteUnits = [' kB', ' MB', ' GB', ' TB', 'PB', 'EB', 'ZB', 'YB'];
- var fileSizeInBytes = this.get("disk_size");
+ var fileSizeInBytes = this.diskSize();
do {
fileSizeInBytes = fileSizeInBytes / 1024;
i++;
} while (fileSizeInBytes > 1024);
return Math.max(fileSizeInBytes, 0.1).toFixed(1) + byteUnits[i];
+ },
+
+ diskSize: function () {
+ return this.get("disk_size");
}
});
[05/17] git commit: updated refs/heads/1807-Replication to 80a5e6e
Posted by de...@apache.org.
Fixed typos in Vagrantfile
Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/87ec5e7e
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/87ec5e7e
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/87ec5e7e
Branch: refs/heads/1807-Replication
Commit: 87ec5e7e01e526f2ff644c197e6bfff74b31af88
Parents: 771f468
Author: nvdev <mo...@gmail.com>
Authored: Fri Aug 23 18:57:56 2013 +0300
Committer: nvdev <mo...@gmail.com>
Committed: Fri Aug 23 18:57:56 2013 +0300
----------------------------------------------------------------------
Vagrantfile | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/couchdb/blob/87ec5e7e/Vagrantfile
----------------------------------------------------------------------
diff --git a/Vagrantfile b/Vagrantfile
index 465d5a6..4b5eee1 100644
--- a/Vagrantfile
+++ b/Vagrantfile
@@ -15,7 +15,7 @@ Vagrant::Config.run do |config|
if Dir.glob("#{File.dirname(__FILE__)}/.vagrant/machines/default/*/id").empty?
# install build-essential
pkg_cmd = "apt-get update -qq; apt-get install -q -y build-essential git "
- "autoconf autoconf-archive gnu-standards help2man textinfo; "
+ "autoconf autoconf-archive gnu-standards help2man texinfo; "
# Install erlang
pkg_cmd << "apt-get install -q -y erlang-base-hipe erlang-dev " \
@@ -26,8 +26,7 @@ Vagrant::Config.run do |config|
"curl libcurl4-gnutls-dev libtool; "
# doc dependencies
- pkg_cmd << "apt-get install -q -y apt-get install -q -y help2man " \
- "textinfo python-sphix python-pip; " \
+ pkg_cmd << "apt-get install -q -y help2man texinfo python-sphinx python-pip; " \
"pip install -U pygments; "
config.vm.provision :shell, :inline => pkg_cmd
[17/17] git commit: updated refs/heads/1807-Replication to 80a5e6e
Posted by de...@apache.org.
Replication addon sans tests
Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/0a6f74c7
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/0a6f74c7
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/0a6f74c7
Branch: refs/heads/1807-Replication
Commit: 0a6f74c7271732234e259f3e870a2f1b383cd34f
Parents: 473847d
Author: suelockwood <de...@gmail.com>
Authored: Thu Aug 22 15:26:20 2013 -0400
Committer: suelockwood <de...@gmail.com>
Committed: Thu Sep 5 13:34:32 2013 -0400
----------------------------------------------------------------------
.gitignore | 1 +
.../replication/assets/less/replication.less | 129 +++++++++
src/fauxton/app/addons/replication/base.js | 24 ++
src/fauxton/app/addons/replication/resources.js | 70 +++++
src/fauxton/app/addons/replication/route.js | 47 +++
.../app/addons/replication/templates/form.html | 76 +++++
.../addons/replication/templates/progress.html | 22 ++
.../addons/replication/tests/replicationSpec.js | 28 ++
src/fauxton/app/addons/replication/views.js | 290 +++++++++++++++++++
src/fauxton/settings.json.default | 1 +
10 files changed, 688 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/couchdb/blob/0a6f74c7/.gitignore
----------------------------------------------------------------------
diff --git a/.gitignore b/.gitignore
index a022b14..a4798c9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -91,6 +91,7 @@ src/fauxton/app/addons/*
!src/fauxton/app/addons/config
!src/fauxton/app/addons/logs
!src/fauxton/app/addons/stats
+!src/fauxton/app/addons/replication
!src/fauxton/app/addons/contribute
!src/fauxton/app/addons/auth
!src/fauxton/app/addons/exampleAuth
http://git-wip-us.apache.org/repos/asf/couchdb/blob/0a6f74c7/src/fauxton/app/addons/replication/assets/less/replication.less
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/replication/assets/less/replication.less b/src/fauxton/app/addons/replication/assets/less/replication.less
new file mode 100644
index 0000000..bcfdb56
--- /dev/null
+++ b/src/fauxton/app/addons/replication/assets/less/replication.less
@@ -0,0 +1,129 @@
+#replication {
+ position: relative;
+
+ .options {
+ position: relative;
+ &:after{
+ content: '';
+ display: block;
+ position: absolute;
+ right: -16px;
+ top: 9px;
+ width: 0;
+ height: 0;
+ border-left: 5px solid transparent;
+ border-right: 5px solid transparent;
+ border-bottom: 5px solid black;
+ border-top: none;
+ }
+ &.off {
+ &:after{
+ content: '';
+ display: block;
+ position: absolute;
+ right: -16px;
+ top: 9px;
+ width: 0;
+ height: 0;
+ border-left: 5px solid transparent;
+ border-right: 5px solid transparent;
+ border-bottom: none;
+ border-top: 5px solid black;
+ }
+ }
+ }
+ .control-group{
+ label{
+ float: left;
+ min-height: 30px;
+ vertical-align: top;
+ padding-right: 5px;
+ min-width: 130px;
+ }
+ input[type=text],
+ input[type=radio],
+ input[type=checkbox],
+ select {
+ margin-top: -2px;
+ }
+ }
+
+
+ .swap {
+ cursor: pointer;
+ position: absolute;
+ font-size: 12px;
+ width: 27px;
+ height: 12px;
+ display: block;
+ border-top: 3px solid #8E9292;
+ border-bottom: 3px solid #8E9292;
+ top: 20%;
+ left: 42%;
+ &:hover {
+ border-color: #2C2C2C;
+ &:before {
+ bottom: -8px;
+ right: 23px;
+ position: absolute;
+ border-right: 7px solid #2C2C2C;
+ border-top: 7px solid rgba(44, 44, 44, 0);
+ border-bottom: 7px solid rgba(44, 44, 44, 0);
+ content: "";
+ }
+ &:after {
+ top: -8px;
+ left: 23px;
+ position: absolute;
+ border-left: 7px solid #2C2C2C;
+ border-top: 7px solid rgba(44, 44, 44, 0);
+ border-bottom: 7px solid rgba(44, 44, 44, 0);
+ content: "";
+ }
+ }
+ &:before {
+ bottom: -8px;
+ right: 23px;
+ position: absolute;
+ border-right: 7px solid #8E9292;
+ border-top: 7px solid rgba(44, 44, 44, 0);
+ border-bottom: 7px solid rgba(44, 44, 44, 0);
+ content: "";
+
+ }
+ &:after {
+ top: -8px;
+ left: 23px;
+ position: absolute;
+ border-left: 7px solid #8E9292;
+ border-top: 7px solid rgba(44, 44, 44, 0);
+ border-bottom: 7px solid rgba(44, 44, 44, 0);
+ content: "";
+ }
+ }
+
+}
+#replicationStatus{
+ &.showHeader{
+ li.header{
+ display: block;
+ }
+ }
+ li.header{
+ display: none;
+ }
+ ul{
+ margin: 0;
+ li{
+ .progress,
+ p{
+ margin: 0px;
+ vertical-align: bottom;
+ }
+ padding: 10px 0 ;
+ margin: 0;
+ list-style: none;
+ border-bottom: 1px solid #e3e3e3;
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/couchdb/blob/0a6f74c7/src/fauxton/app/addons/replication/base.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/replication/base.js b/src/fauxton/app/addons/replication/base.js
new file mode 100644
index 0000000..93965c1
--- /dev/null
+++ b/src/fauxton/app/addons/replication/base.js
@@ -0,0 +1,24 @@
+// 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/replication/route"
+],
+
+function(app, FauxtonAPI, replication) {
+ replication.initialize = function() {
+ FauxtonAPI.addHeaderLink({title: "Replication", href: "#/replication", icon: "fonticon-replicate",});
+ };
+ return replication;
+});
http://git-wip-us.apache.org/repos/asf/couchdb/blob/0a6f74c7/src/fauxton/app/addons/replication/resources.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/replication/resources.js b/src/fauxton/app/addons/replication/resources.js
new file mode 100644
index 0000000..67b474a
--- /dev/null
+++ b/src/fauxton/app/addons/replication/resources.js
@@ -0,0 +1,70 @@
+// 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/activetasks/resources'
+],
+
+function (app, FauxtonAPI, ActiveTasks) {
+ var Replication = {};
+
+ //these are probably dupes from the database modules. I'm going to keep them seperate for now.
+ Replication.DBModel = Backbone.Model.extend({
+ label: function () {
+ //for autocomplete
+ return this.get("name");
+ }
+ });
+
+ Replication.DBList = Backbone.Collection.extend({
+ model: Replication.DBModel,
+ url: function() {
+ return app.host + "/_all_dbs";
+ },
+ parse: function(resp) {
+ // TODO: pagination!
+ return _.map(resp, function(database) {
+ return {
+ id: database,
+ name: database
+ };
+ });
+ }
+ });
+
+ Replication.Task = Backbone.Model.extend({});
+
+ Replication.Tasks = Backbone.Collection.extend({
+ model: Replication.Task,
+ url: function () {
+ return app.host + '/_active_tasks';
+ },
+ parse: function(resp){
+ //only want replication tasks to return
+ return _.map(resp, function(task){
+ if (task.type === "replication"){
+ return task;
+ }
+ });
+ }
+ });
+
+ Replication.Replicate = Backbone.Model.extend({
+ url: function(){
+ return app.host + "/_replicate";
+ }
+ });
+
+ return Replication;
+});
http://git-wip-us.apache.org/repos/asf/couchdb/blob/0a6f74c7/src/fauxton/app/addons/replication/route.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/replication/route.js b/src/fauxton/app/addons/replication/route.js
new file mode 100644
index 0000000..4002203
--- /dev/null
+++ b/src/fauxton/app/addons/replication/route.js
@@ -0,0 +1,47 @@
+// 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/replication/resources",
+ "addons/replication/views"
+],
+function(app, FauxtonAPI, Replication, Views) {
+ var RepRouteObject = FauxtonAPI.RouteObject.extend({
+ layout: "one_pane",
+ roles: ["_admin"],
+ routes: {
+ "replication": "defaultView"
+ },
+ selectedHeader: "Replication",
+ apiUrl: function() {
+ return app.host+"/_replication";
+ },
+ crumbs: [
+ {"name": "Replicate changes from: ", "link": "replication"}
+ ],
+ defaultView: function(){
+ this.databases = new Replication.DBList({});
+ this.tasks = new Replication.Tasks({id: "ReplicationTasks"}); //replace with with a call to active tasks when that is merged in
+ this.setView("#dashboard-content", new Views.ReplicationForm({
+ collection: this.databases,
+ status: this.tasks
+ }));
+ }
+ });
+
+
+ Replication.RouteObjects = [RepRouteObject];
+
+ return Replication;
+});
http://git-wip-us.apache.org/repos/asf/couchdb/blob/0a6f74c7/src/fauxton/app/addons/replication/templates/form.html
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/replication/templates/form.html b/src/fauxton/app/addons/replication/templates/form.html
new file mode 100644
index 0000000..c1711b5
--- /dev/null
+++ b/src/fauxton/app/addons/replication/templates/form.html
@@ -0,0 +1,76 @@
+<!--
+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.
+-->
+
+<form id="replication" class="form-horizontal">
+ <div class="row">
+ <div class="span5 from form_set">
+ <div class="control-group from_local">
+ <label for="from_local">
+ <input type="radio" id="from_local" name="from_type" value="local" checked="" class="setType">
+ Local database:
+ </label>
+ <select id="from_name" name="source">
+ <% _.each( databases, function( db, i ){ %>
+ <option value="<%=db.name%>"><%=db.name%></option>
+ <% }); %>
+ </select>
+ </div>
+
+ <div class="control-group from_to_remote">
+ <label for="from_to_remote">
+ <input type="radio" id="from_to_remote" name="from_type" value="remote" class="setType">
+ Remote database:
+ </label>
+ <input type="text" id="from_url" name="source" size="30" value="http://" disabled="true">
+ </div>
+ </div>
+
+
+ <div class="span2">
+ <span class="swap">
+ </span>
+ </div>
+
+ <div class="to form_set span5">
+ <div class="to_local control-group">
+ <label for="to_local">
+ <input type="radio" id="to_local" name="to_type" value="local" checked="" class="setType">
+ Local database:
+ </label>
+ <input type="text" id="to_name" name="target" size="30">
+ </div>
+
+ <div class="to_remote control-group">
+ <label for="to_remote">
+ <input type="radio" id="to_remote" name="to_type" value="remote" class="setType">
+ Remote database:
+ </label>
+ <input type="text" id="to_url" name="target" size="30" value="http://" disabled="true">
+ </div>
+ </div>
+ </div>
+
+ <div class="actions">
+ <div class="control-group">
+ <label for="continuous">
+ <input type="checkbox" name="continuous" value="continuous" id="continuous">
+ Continuous
+ </label>
+ </div>
+
+ <button class="btn btn-success btn-large save" type="submit">Replicate</button>
+ </div>
+</form>
+
+<div id="replicationStatus"></div>
http://git-wip-us.apache.org/repos/asf/couchdb/blob/0a6f74c7/src/fauxton/app/addons/replication/templates/progress.html
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/replication/templates/progress.html b/src/fauxton/app/addons/replication/templates/progress.html
new file mode 100644
index 0000000..d93db68
--- /dev/null
+++ b/src/fauxton/app/addons/replication/templates/progress.html
@@ -0,0 +1,22 @@
+<!--
+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.
+-->
+<p class="span6">Replicating <%=source%> to <%=target%>. Please wait... :)</p>
+
+<div class="span5 progress progress-striped active">
+ <div class="bar" style="width: <%=progress || 0%>%;"><%=progress || "0"%>%</div>
+</div>
+
+<span class="span1">
+ <button class="cancel btn btn-danger btn-large delete" data-source="<%=source%>" data-rep-id="<%=repid%>" data-continuous="<%=continuous%>" data-target="<%=target%>">Cancel</a>
+</span>
http://git-wip-us.apache.org/repos/asf/couchdb/blob/0a6f74c7/src/fauxton/app/addons/replication/tests/replicationSpec.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/replication/tests/replicationSpec.js b/src/fauxton/app/addons/replication/tests/replicationSpec.js
new file mode 100644
index 0000000..788b082
--- /dev/null
+++ b/src/fauxton/app/addons/replication/tests/replicationSpec.js
@@ -0,0 +1,28 @@
+// 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([
+ 'addons/replication/base',
+ 'chai'
+], function (Replication, chai) {
+ var expect = chai.expect;
+
+ describe('Replication Addon', function(){
+
+ describe('Replication DBList Collection', function () {
+ var rep;
+
+ beforeEach(function () {
+ rep = new rep.DBList(["foo","bar","baz","bo"]);
+ });
+ });
+ });
+});
http://git-wip-us.apache.org/repos/asf/couchdb/blob/0a6f74c7/src/fauxton/app/addons/replication/views.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/replication/views.js b/src/fauxton/app/addons/replication/views.js
new file mode 100644
index 0000000..30c642f
--- /dev/null
+++ b/src/fauxton/app/addons/replication/views.js
@@ -0,0 +1,290 @@
+// 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/replication/resources"
+],
+function(app, FauxtonAPI, replication) {
+ var View = {},
+ Events ={},
+ pollingInfo ={
+ rate: 5,
+ intervalId: null
+ };
+
+ _.extend(Events, Backbone.Events);
+
+// NOTES: http://wiki.apache.org/couchdb/Replication
+
+// Replication form view is huge
+// -----------------------------------
+// afterRender: autocomplete on the target input field
+// beforeRender: add the status table
+// disableFields: disable non active fields on submit
+// enableFields: enable field when radio btns are clicked
+// establish: get the DB list for autocomplete
+// formValidation: make sure fields aren't empty
+// showProgress: make a call to active_tasks model and show only replication types. Poll every 5 seconds. (make this it's own view)
+// startReplication: saves to the model, starts replication
+// submit: form submit handler
+// swapFields: change to and from target
+// toggleAdvancedOptions: toggle advanced
+
+ View.ReplicationForm = FauxtonAPI.View.extend({
+ template: "addons/replication/templates/form",
+ events: {
+ "submit #replication": "submit",
+ "click input[type=radio]": "enableFields",
+ "click .swap": "swapFields",
+ "click .options": "toggleAdvancedOptions"
+ },
+ initialize: function(){
+ this.status = this.options.status;
+ this.newRepModel = new replication.Replicate({});
+ },
+ afterRender: function(){
+ var dbLimit = 30;
+ var ajaxReq;
+ //re-using what we have on DB search
+ this.$el.find("input#to_name").typeahead({
+ source: function(query, process) {
+ var url = [
+ app.host,
+ "/_all_dbs?startkey=%22",
+ query,
+ "%22&endkey=%22",
+ query,
+ "\u9999%22&limit=",
+ dbLimit
+ ].join('');
+ if (ajaxReq) ajaxReq.abort();
+ ajaxReq = $.ajax({
+ url: url,
+ dataType: 'json',
+ success: function(data) {
+ process(data);
+ }
+ });
+ }
+ });
+
+ },
+
+ beforeRender: function(){
+ this.insertView("#replicationStatus", new View.ReplicationList({
+ collection: this.status
+ }));
+ },
+ cleanup: function(){
+ clearInterval(pollingInfo.intervalId);
+ },
+ disableFields: function(){
+ this.$('input[type=radio]').attr('disabled',true);
+ this.$('.advancedOptions:hidden').find('input').attr('disabled',true);
+ },
+
+ enableFields: function(e){
+ var $currentTarget = this.$(e.currentTarget);
+ $currentTarget.parents(".form_set").find('input[type="text"], select').attr('disabled','true').addClass('disabled');
+ $currentTarget.parents('.control-group').find('input[type="text"], select').removeAttr('disabled').removeClass('disabled');
+ },
+ establish: function(){
+ return [ this.collection.fetch(), this.status.fetch()];
+ },
+
+ formValidation: function(){
+ var $remote = this.$el.find("[value='remote']:checked").parents('.control-group').find('input[type=text]'),
+ error = false;
+ for(var i=0; i<$remote.length; i++){
+ if ($remote[i].value =="http://" || $remote[i].value ==" "){
+ error = true;
+ }
+ }
+ return error;
+ },
+ serialize: function(){
+ return {
+ databases: this.collection.toJSON()
+ };
+ },
+ startReplication: function(json){
+ var that = this;
+ this.newRepModel.save(json,{
+ success: function(resp){
+ var notification = FauxtonAPI.addNotification({
+ msg: "Replication from "+resp.get('source')+" to "+ resp.get('target')+" has begun.",
+ type: "success",
+ clear: true
+ });
+ that.updateButtonText(false);
+ Events.trigger('update:tasks');
+ },
+ error: function(model, xhr, options){
+ var errorMessage = JSON.parse(xhr.responseText);
+ var notification = FauxtonAPI.addNotification({
+ msg: errorMessage.reason,
+ type: "error",
+ clear: true
+ });
+ that.updateButtonText(false);
+ }
+ });
+ },
+ updateButtonText: function(wait){
+ var $button = this.$('#replication button[type=submit]');
+ if(wait){
+ $button.text('Starting replication...').attr('disabled', true);
+ } else {
+ $button.text('Replication').attr('disabled', false);
+ }
+ },
+ submit: function(e){
+ e.preventDefault();
+ this.disableFields(); //disable fields not relevant to submitting
+
+ var formJSON = {};
+ _.map(this.$(e.currentTarget).serializeArray(), function(formData){
+ if(formData.value !== ''){
+ formJSON[formData.name] = formData.value;
+ }
+ });
+
+ var alreadyExists = this.collection.where({"name":$('input#to_name').val()});
+
+ if (alreadyExists.length === 0){
+ formJSON.create_target = true;
+ }
+ console.log($(e.currentTarget).serializeArray(), formJSON);
+ this.updateButtonText(true);
+ this.startReplication(formJSON);
+ },
+ swapFields: function(e){
+ //WALL O' VARIABLES
+ var $fromSelect = this.$('#from_name'),
+ $toSelect = this.$('#to_name'),
+ $toInput = this.$('#to_url'),
+ $fromInput = this.$('#from_url'),
+ fromSelectVal = $fromSelect.val(),
+ fromInputVal = $fromInput.val(),
+ toSelectVal = $toSelect.val(),
+ toInputVal = $toInput.val();
+
+ $fromSelect.val(toSelectVal);
+ $toSelect.val(fromSelectVal);
+
+ $fromInput.val(toInputVal);
+ $toInput.val(fromInputVal);
+ }
+ });
+
+
+View.ReplicationList = FauxtonAPI.View.extend({
+ tagName: "ul",
+ initialize: function(){
+ Events.bind('update:tasks', this.establish, this);
+ this.listenTo(this.collection, "reset", this.render);
+ this.$el.prepend("<li class='header'><h2>Active Replication Tasks</h2></li>");
+ },
+ establish: function(){
+ return [this.collection.fetch({reset: true})];
+ },
+ setPolling: function(){
+ var that = this;
+ this.cleanup();
+ pollingInfo.intervalId = setInterval(function() {
+ that.establish();
+ }, pollingInfo.rate*1000);
+ },
+ cleanup: function(){
+ clearInterval(pollingInfo.intervalId);
+ },
+ beforeRender: function(){
+ var that = this;
+ this.collection.forEach(function(item) {
+ this.insertView(new View.replicationItem({
+ model: item
+ }));
+ }, this);
+ },
+ showHeader: function(){
+ if (this.collection.length > 0){
+ this.$el.parent().addClass('showHeader');
+ } else {
+ this.$el.parent().removeClass('showHeader');
+ }
+ },
+ afterRender: function(){
+ this.showHeader();
+ this.setPolling();
+ }
+});
+
+ //make this a table row item.
+ View.replicationItem = FauxtonAPI.View.extend({
+ tagName: "li",
+ className: "row",
+ template: "addons/replication/templates/progress",
+ events: {
+ "click .cancel": "cancelReplication"
+ },
+ initialize: function(){
+ this.newRepModel = new replication.Replicate({});
+ },
+ establish: function(){
+ return [this.model.fetch()];
+ },
+ cancelReplication: function(e){
+ //need to pass "cancel": true with source & target
+ var $currentTarget = $(e.currentTarget),
+ repID = $currentTarget.attr('data-rep-id');
+ this.newRepModel.save({
+ "replication_id": repID,
+ "cancel": true
+ },
+ {
+ success: function(model, xhr, options){
+ var notification = FauxtonAPI.addNotification({
+ msg: "Replication stopped.",
+ type: "success",
+ clear: true
+ });
+ },
+ error: function(model, xhr, options){
+ var errorMessage = JSON.parse(xhr.responseText);
+ var notification = FauxtonAPI.addNotification({
+ msg: errorMessage.reason,
+ type: "error",
+ clear: true
+ });
+ }
+ });
+ },
+ afterRender: function(){
+ if (this.model.get('continuous')){
+ this.$el.addClass('continuous');
+ }
+ },
+ serialize: function(){
+ return {
+ progress: this.model.get('progress'),
+ target: this.model.get('target'),
+ source: this.model.get('source'),
+ continuous: this.model.get('continuous'),
+ repid: this.model.get('replication_id')
+ };
+ }
+ });
+
+ return View;
+});
http://git-wip-us.apache.org/repos/asf/couchdb/blob/0a6f74c7/src/fauxton/settings.json.default
----------------------------------------------------------------------
diff --git a/src/fauxton/settings.json.default b/src/fauxton/settings.json.default
index 2b7fe89..81cb4cb 100644
--- a/src/fauxton/settings.json.default
+++ b/src/fauxton/settings.json.default
@@ -4,6 +4,7 @@
{ "name": "config" },
{ "name": "logs" },
{ "name": "stats" },
+ { "name": "replication" },
{ "name": "contribute" },
{ "name": "auth" }
],