couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From deathb...@apache.org
Subject git commit: updated refs/heads/master to c185f85
Date Tue, 10 Sep 2013 15:48:45 GMT
Updated Branches:
  refs/heads/master 4d557a008 -> c185f8580


Add actions to all DBs, only replication available now


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/c185f858
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/c185f858
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/c185f858

Branch: refs/heads/master
Commit: c185f8580013d65a2f683982b5b8588c1f9f5400
Parents: 4d557a0
Author: suelockwood <deathbearbrown@gmail.com>
Authored: Tue Sep 10 11:48:35 2013 -0400
Committer: suelockwood <deathbearbrown@gmail.com>
Committed: Tue Sep 10 11:48:35 2013 -0400

----------------------------------------------------------------------
 src/fauxton/app/addons/replication/route.js            |  6 ++++--
 src/fauxton/app/addons/replication/templates/form.html |  2 +-
 src/fauxton/app/addons/replication/views.js            |  4 +++-
 src/fauxton/app/templates/databases/item.html          | 11 +++++++++++
 src/fauxton/app/templates/databases/list.html          |  1 +
 5 files changed, 20 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/c185f858/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
index 8c45d6f..7ea318c 100644
--- a/src/fauxton/app/addons/replication/route.js
+++ b/src/fauxton/app/addons/replication/route.js
@@ -21,7 +21,8 @@ function(app, FauxtonAPI, Replication, Views) {
     layout: "one_pane",
     roles: ["_admin"],
     routes: {
-      "replication": "defaultView"
+      "replication": "defaultView",
+      "replication/:dbname": "defaultView"
     },
     selectedHeader: "Replication",
     apiUrl: function() {
@@ -30,10 +31,11 @@ function(app, FauxtonAPI, Replication, Views) {
     crumbs: [
       {"name": "Replicate changes from: ", "link": "replication"}
     ],
-    defaultView: function(){
+    defaultView: function(dbname){
 			this.databases = new Replication.DBList({});
       this.tasks = new Replication.Tasks({id: "ReplicationTasks"});
 			this.setView("#dashboard-content", new Views.ReplicationForm({
+        selectedDB: dbname ||"",
 				collection: this.databases,
         status:  this.tasks
 			}));  

http://git-wip-us.apache.org/repos/asf/couchdb/blob/c185f858/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 eeb3081..2c09b76 100644
--- a/src/fauxton/app/addons/replication/templates/form.html
+++ b/src/fauxton/app/addons/replication/templates/form.html
@@ -22,7 +22,7 @@ the License.
 			<div class="from_local local_option">
 				<select id="from_name" name="source">
 					<% _.each( databases, function( db, i ){ %>
-					   <option value="<%=db.name%>"><%=db.name%></option>
+					   <option value="<%=db.name%>" <% if(selectedDB == db.name){%>selected<%}%>
><%=db.name%></option>
 					<% }); %>
 				</select>
 			</div>

http://git-wip-us.apache.org/repos/asf/couchdb/blob/c185f858/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 4b55030..bd3daa1 100644
--- a/src/fauxton/app/addons/replication/views.js
+++ b/src/fauxton/app/addons/replication/views.js
@@ -51,6 +51,7 @@ function(app, FauxtonAPI, replication) {
 		},
 		initialize: function(options){
 			this.status = options.status;
+			this.selectedDB = options.selectedDB;
 			this.newRepModel = new replication.Replicate({});
 		},
 		afterRender: function(){
@@ -142,7 +143,8 @@ function(app, FauxtonAPI, replication) {
 		},
 		serialize: function(){
 			return {
-				databases:  this.collection.toJSON()
+				databases:  this.collection.toJSON(),
+				selectedDB: this.selectedDB
 			};
 		},
 		startReplication: function(json){

http://git-wip-us.apache.org/repos/asf/couchdb/blob/c185f858/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 32a749a..2f4ed68 100644
--- a/src/fauxton/app/templates/databases/item.html
+++ b/src/fauxton/app/templates/databases/item.html
@@ -18,3 +18,14 @@ the License.
 <td><%= database.status.humanSize() %></td>
 <td><%= database.status.numDocs() %></td>
 <td><%= database.status.updateSeq() %></td>
+<td>
+  <div class="dropdown">
+    <a class="dropdown-toggle fonticon-cog"
+       data-toggle="dropdown"
+       href="#">
+    </a>
+    <ul class="dropdown-menu">
+	    <li><a class="set-replication-start" href="#/replication/<%= database.get("name")
%>">replicate</a></li>
+    </ul>
+  </div>
+</td>

http://git-wip-us.apache.org/repos/asf/couchdb/blob/c185f858/src/fauxton/app/templates/databases/list.html
----------------------------------------------------------------------
diff --git a/src/fauxton/app/templates/databases/list.html b/src/fauxton/app/templates/databases/list.html
index 6c4cbbd..2e5d78d 100644
--- a/src/fauxton/app/templates/databases/list.html
+++ b/src/fauxton/app/templates/databases/list.html
@@ -26,6 +26,7 @@ the License.
     <th>Size</th>
     <th># of Docs</th>
     <th>Update Seq</th>
+    <th>Actions</th>
   </thead>
   <tbody>
   </tbody>


Mime
View raw message