mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 01:13:23 -04:00
Update default to string, remove check for getFormat in aggConfig
This commit is contained in:
parent
a5449701c3
commit
37e561c5a2
3 changed files with 3 additions and 3 deletions
|
@ -133,7 +133,7 @@ define(function (require) {
|
|||
*/
|
||||
AggType.prototype.getFormat = function (agg) {
|
||||
var field = agg.field();
|
||||
return field ? field.format : fieldFormats.getDefaultInstance('number');
|
||||
return field ? field.format : fieldFormats.getDefaultInstance('string');
|
||||
};
|
||||
|
||||
return AggType;
|
||||
|
|
|
@ -272,7 +272,7 @@ define(function (require) {
|
|||
var format = field && field.format;
|
||||
var strFormat = fieldFormats.getDefaultInstance('string');
|
||||
|
||||
if (this.type && this.type.getFormat) {
|
||||
if (this.type) {
|
||||
format = this.type.getFormat(this) || format;
|
||||
}
|
||||
|
||||
|
|
|
@ -102,7 +102,7 @@ define(function (require) {
|
|||
});
|
||||
aggConfig = vis.aggs.byTypeName.count[0];
|
||||
|
||||
expect(aggType.getFormat(aggConfig)).to.be(fieldFormat.getDefaultInstance('number'));
|
||||
expect(aggType.getFormat(aggConfig)).to.be(fieldFormat.getDefaultInstance('string'));
|
||||
});
|
||||
|
||||
it('can be overridden via config', function () {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue