couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gar...@apache.org
Subject [29/34] couchdb commit: updated refs/heads/paginate-api-options to b63c791
Date Mon, 03 Mar 2014 16:58:41 GMT
Invalid combination of query options causes the dashboard to hang


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

Branch: refs/heads/paginate-api-options
Commit: 747e0040b1c491db47b932c807aef1982f61f394
Parents: 77c06c2
Author: suelockwood <deathbear@apache.org>
Authored: Thu Feb 20 15:10:43 2014 -0500
Committer: Garren Smith <garren.smith@gmail.com>
Committed: Mon Mar 3 11:18:42 2014 +0200

----------------------------------------------------------------------
 src/fauxton/app/addons/documents/views.js | 20 ++++++++++++++++----
 1 file changed, 16 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/747e0040/src/fauxton/app/addons/documents/views.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/documents/views.js b/src/fauxton/app/addons/documents/views.js
index 78a2c09..5468948 100644
--- a/src/fauxton/app/addons/documents/views.js
+++ b/src/fauxton/app/addons/documents/views.js
@@ -439,6 +439,7 @@ function(app, FauxtonAPI, Components, Documents, Databases, pouchdb, resizeColum
     serialize: function () {
        var totalRows = 0,
           updateSeq = false,
+          recordStart = 0,
           pageStart = 0,
           pageEnd = 20;
 
@@ -586,10 +587,21 @@ function(app, FauxtonAPI, Components, Documents, Databases, pouchdb,
resizeColum
     establish: function() {
       if (this.newView) { return null; }
 
-      return this.collection.fetch({reset: true}).fail(function() {
-        // TODO: handle error requests that slip through
-        // This should just throw a notification, not break the page
-        console.log("ERROR: ", arguments);
+      return this.collection.fetch({
+        reset: true,
+        success:  function() { },
+        error: function(model, xhr, options){
+          // TODO: handle error requests that slip through
+          // This should just throw a notification, not break the page
+          FauxtonAPI.addNotification({
+            msg: "Bad Request",
+            type: "error"
+          });
+
+          //now redirect back to alldocs
+          FauxtonAPI.navigate(model.database.url("index") + "?limit=100");
+          console.log("ERROR: ", arguments);
+        }
       });
     },
 


Mime
View raw message