couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gar...@apache.org
Subject fauxton commit: updated refs/heads/master to 87a02b0
Date Tue, 28 Oct 2014 09:11:36 GMT
Repository: couchdb-fauxton
Updated Branches:
  refs/heads/master 5555127a1 -> 87a02b0eb


Fix for group_level not being explicitly passed.

Closes COUCHDB-2412


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

Branch: refs/heads/master
Commit: 87a02b0eb4cf7e3d7febd0e5406e9ae64eb25d42
Parents: 5555127
Author: Benjamin Keen <ben.keen@gmail.com>
Authored: Mon Oct 27 14:28:33 2014 -0700
Committer: Garren Smith <garren.smith@gmail.com>
Committed: Tue Oct 28 11:11:20 2014 +0200

----------------------------------------------------------------------
 .../documents/templates/query_options_main_fields.html    |  2 +-
 app/addons/documents/views-queryoptions.js                | 10 +++++++++-
 2 files changed, 10 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/87a02b0e/app/addons/documents/templates/query_options_main_fields.html
----------------------------------------------------------------------
diff --git a/app/addons/documents/templates/query_options_main_fields.html b/app/addons/documents/templates/query_options_main_fields.html
index 606763a..81b8ee9 100644
--- a/app/addons/documents/templates/query_options_main_fields.html
+++ b/app/addons/documents/templates/query_options_main_fields.html
@@ -47,7 +47,7 @@ the License.
         <option value="7">7</option>
         <option value="8">8</option>
         <option value="9">9</option>
-        <option value="999" selected="selected">Exact</option>
+        <option value="exact" selected="selected">Exact</option>
       </select>
     </label>
     <% } %>

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/87a02b0e/app/addons/documents/views-queryoptions.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/views-queryoptions.js b/app/addons/documents/views-queryoptions.js
index e3817e2..1b459df 100644
--- a/app/addons/documents/views-queryoptions.js
+++ b/app/addons/documents/views-queryoptions.js
@@ -42,7 +42,7 @@ define([
         inclusive_end: "true",
         reduce: "false",
         stale: "",
-        group_level: "999"
+        group_level: "exact"
       }
     };
 
@@ -285,6 +285,14 @@ define([
             params[this.name] = this.value;
           }
         });
+
+        // this is weird, but necessary. ?group_level=exact used to work in older version
of couchDB but no longer.
+        // Instead, to specify exact, you need to pass group=true instead. Since group_level=999
(exact) was the default
+        // value, it won't be in params
+        if (_.has(params, 'reduce') && !_.has(params, 'group_level')) {
+          params.group = 'true';
+        }
+
         return params;
       },
 


Mime
View raw message