Commit 7c1dc244 by Dhia MOAKHAR

change size in raw_document from text to number

update query builder and specs
parent 045f5e11
......@@ -74,7 +74,7 @@
</div>
<div class="gf-form offset-width-7" ng-if="agg.type === 'raw_document'">
<label class="gf-form-label width-10">Size</label>
<input type="text" class="gf-form-input max-width-12" ng-model="agg.settings.size" ng-blur="onChange()"></input>
<input type="number" class="gf-form-input max-width-12" ng-model="agg.settings.size" ng-blur="onChange()"></input>
</div>
......
......@@ -110,7 +110,7 @@ function (queryDef) {
};
ElasticQueryBuilder.prototype.documentQuery = function(query, size) {
query.size = size === undefined ? 500 : parseInt(size , 10);
query.size = size === undefined ? 500 : size;
query.sort = {};
query.sort[this.timeField] = {order: 'desc', unmapped_type: 'boolean'};
......
......@@ -165,7 +165,7 @@ describe('ElasticQueryBuilder', function() {
});
it('with raw_document metric size set', function() {
var query = builder.build({
metrics: [{type: 'raw_document', id: '1',settings: {size: '1337'}}],
metrics: [{type: 'raw_document', id: '1',settings: {size: 1337}}],
timeField: '@timestamp',
bucketAggs: [],
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment