switch back to "x to y" format for ranges
This commit is contained in:
parent
cf45558130
commit
0bbfc6c38a
|
@ -49,9 +49,9 @@ describe('Range Agg', function () {
|
|||
var format = function (val) {
|
||||
return agg.fieldFormatter()(agg.getKey(val));
|
||||
};
|
||||
expect(format(buckets[0])).to.be('[-∞, 1 KB)');
|
||||
expect(format(buckets[1])).to.be('[1 KB, 2.5 KB)');
|
||||
expect(format(buckets[2])).to.be('[2.5 KB, +∞)');
|
||||
expect(format(buckets[0])).to.be('-∞ to 1 KB');
|
||||
expect(format(buckets[1])).to.be('1 KB to 2.5 KB');
|
||||
expect(format(buckets[2])).to.be('2.5 KB to +∞');
|
||||
|
||||
});
|
||||
});
|
||||
|
|
|
@ -26,7 +26,7 @@ define(function (require) {
|
|||
|
||||
var RangeFormat = FieldFormat.from(function (range) {
|
||||
var format = agg.fieldOwnFormatter();
|
||||
return `[${format(range.gte)}, ${format(range.lt)})`;
|
||||
return `${format(range.gte)} to ${format(range.lt)}`;
|
||||
});
|
||||
|
||||
return (this.$$rangeAggTypeFormat = new RangeFormat());
|
||||
|
|
|
@ -46,7 +46,7 @@ describe('Filter Bar Directive', function () {
|
|||
expect(results[2].meta).to.have.property('key', 'query');
|
||||
expect(results[2].meta).to.have.property('value', 'foo:bar');
|
||||
expect(results[3].meta).to.have.property('key', 'bytes');
|
||||
expect(results[3].meta).to.have.property('value', '[1,024, 2,048)');
|
||||
expect(results[3].meta).to.have.property('value', '1,024 to 2,048');
|
||||
expect(results[4].meta).to.have.property('key', '_type');
|
||||
expect(results[4].meta).to.have.property('value', 'apache');
|
||||
done();
|
||||
|
|
|
@ -24,7 +24,7 @@ describe('Filter Bar Directive', function () {
|
|||
var filter = { meta: { index: 'logstash-*' }, range: { bytes: { lt: 2048, gt: 1024 } } };
|
||||
mapRange(filter).then(function (result) {
|
||||
expect(result).to.have.property('key', 'bytes');
|
||||
expect(result).to.have.property('value', '[1,024, 2,048)');
|
||||
expect(result).to.have.property('value', '1,024 to 2,048');
|
||||
done();
|
||||
});
|
||||
$rootScope.$apply();
|
||||
|
@ -34,7 +34,7 @@ describe('Filter Bar Directive', function () {
|
|||
var filter = { meta: { index: 'logstash-*' }, range: { bytes: { lte: 2048, gte: 1024 } } };
|
||||
mapRange(filter).then(function (result) {
|
||||
expect(result).to.have.property('key', 'bytes');
|
||||
expect(result).to.have.property('value', '[1,024, 2,048)');
|
||||
expect(result).to.have.property('value', '1,024 to 2,048');
|
||||
done();
|
||||
});
|
||||
$rootScope.$apply();
|
||||
|
|
|
@ -20,7 +20,7 @@ define(function (require) {
|
|||
|
||||
return {
|
||||
key: key,
|
||||
value: `[${convert(left)}, ${convert(right)})`
|
||||
value: `${convert(left)} to ${convert(right)}`
|
||||
};
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue