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 2014/03/03 17:58:41 UTC

[29/34] couchdb commit: updated refs/heads/paginate-api-options to b63c791

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 <de...@apache.org>
Authored: Thu Feb 20 15:10:43 2014 -0500
Committer: Garren Smith <ga...@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);
+        }
       });
     },