File tree Expand file tree Collapse file tree 4 files changed +11
-11
lines changed Expand file tree Collapse file tree 4 files changed +11
-11
lines changed Original file line number Diff line number Diff line change @@ -7,8 +7,8 @@ var SamplingMessageView = require('../sampling-message');
7
7
var MongoDBCollection = require ( '../models/mongodb-collection' ) ;
8
8
var SampledSchema = require ( '../models/sampled-schema' ) ;
9
9
var app = require ( 'ampersand-app' ) ;
10
-
11
10
var $ = require ( 'jquery' ) ;
11
+ var _ = require ( 'lodash' ) ;
12
12
var debug = require ( 'debug' ) ( 'scout:home:collection' ) ;
13
13
14
14
require ( 'bootstrap/js/modal' ) ;
@@ -102,9 +102,9 @@ var MongoDBCollectionView = View.extend({
102
102
this . schema . ns = this . model . _id = ns ;
103
103
debug ( 'updating namespace to `%s`' , ns ) ;
104
104
this . schema . reset ( ) ;
105
- this . schema . fetch ( {
105
+ this . schema . fetch ( _ . assign ( { } , app . volatileQueryOptions . serialize ( ) , {
106
106
message : 'Analyzing documents...'
107
- } ) ;
107
+ } ) ) ;
108
108
this . model . fetch ( ) ;
109
109
} ,
110
110
onQueryChanged : function ( ) {
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ var Query = require('mongodb-language-model').Query;
6
6
var DEFAULT_SORT = {
7
7
$natural : - 1
8
8
} ;
9
- var DEFAULT_LIMIT = 100 ;
9
+ var DEFAULT_SIZE = 100 ;
10
10
var DEFAULT_SKIP = 0 ;
11
11
12
12
var getDefaultQuery = function ( ) {
@@ -32,9 +32,9 @@ module.exports = Model.extend({
32
32
return DEFAULT_SORT ;
33
33
}
34
34
} ,
35
- limit : {
35
+ size : {
36
36
type : 'number' ,
37
- default : DEFAULT_LIMIT
37
+ default : DEFAULT_SIZE
38
38
} ,
39
39
skip : {
40
40
type : 'number' ,
@@ -59,7 +59,7 @@ module.exports = Model.extend({
59
59
this . set ( {
60
60
query : getDefaultQuery ( ) ,
61
61
sort : DEFAULT_SORT ,
62
- limit : DEFAULT_LIMIT ,
62
+ size : DEFAULT_SIZE ,
63
63
skip : DEFAULT_SKIP
64
64
} ) ;
65
65
this . trigger ( 'reset' , this ) ;
Original file line number Diff line number Diff line change @@ -64,11 +64,11 @@ module.exports = Schema.extend({
64
64
* Take another sample on top of what you currently have.
65
65
*
66
66
* @example
67
- * schema.fetch({limit : 100});
67
+ * schema.fetch({size : 100});
68
68
* // schema.documents.length is now 100
69
- * schema.more({limit : 100});
69
+ * schema.more({size : 100});
70
70
* // schema.documents.length is now 200
71
- * schema.more({limit : 10});
71
+ * schema.more({size : 10});
72
72
* // schema.documents.length is now 210
73
73
* @param {Object } options - Passthrough options.
74
74
*/
Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ var SamplingMessageView = View.extend({
44
44
is_sample : {
45
45
deps : [ 'schema_sample_size' ] ,
46
46
fn : function ( ) {
47
- return this . schema_sample_size === app . queryOptions . limit ;
47
+ return this . schema_sample_size === app . queryOptions . size ;
48
48
}
49
49
} ,
50
50
sample_size_message : {
You can’t perform that action at this time.
0 commit comments