dont use schemas in aggconfigs to output dsl (#26010)
This commit is contained in:
parent
854757cb6f
commit
8f880918c9
|
@ -423,6 +423,7 @@ function VisEditor(
|
|||
const searchSourceGrandparent = searchSourceParent.getParent();
|
||||
|
||||
delete savedVis.savedSearchId;
|
||||
delete vis.savedSearchId;
|
||||
searchSourceParent.setField('filter', _.union(searchSource.getOwnField('filter'), searchSourceParent.getOwnField('filter')));
|
||||
|
||||
$state.query = searchSourceParent.getField('query');
|
||||
|
|
|
@ -141,6 +141,8 @@ uiModules
|
|||
self.visState
|
||||
);
|
||||
|
||||
self.vis.savedSearchId = self.savedSearchId;
|
||||
|
||||
return self.vis;
|
||||
};
|
||||
|
||||
|
@ -150,6 +152,7 @@ uiModules
|
|||
self.vis.indexPattern = self.searchSource.getField('index');
|
||||
self.visState.title = self.title;
|
||||
self.vis.setState(self.visState);
|
||||
self.vis.savedSearchId = self.savedSearchId;
|
||||
};
|
||||
|
||||
return SavedVis;
|
||||
|
|
|
@ -94,7 +94,7 @@ describe('Geohash Agg', () => {
|
|||
|
||||
describe('precision parameter', () => {
|
||||
|
||||
const PRECISION_PARAM_INDEX = 6;
|
||||
const PRECISION_PARAM_INDEX = 7;
|
||||
let precisionParam;
|
||||
beforeEach(() => {
|
||||
precisionParam = geoHashBucketAgg.params[PRECISION_PARAM_INDEX];
|
||||
|
|
|
@ -100,6 +100,11 @@ export const geoHashBucketAgg = new BucketAggType({
|
|||
default: [0, 0],
|
||||
write: _.noop
|
||||
},
|
||||
{
|
||||
name: 'mapBounds',
|
||||
default: null,
|
||||
write: _.noop
|
||||
},
|
||||
{
|
||||
name: 'precision',
|
||||
editor: precisionTemplate,
|
||||
|
|
|
@ -52,7 +52,7 @@ class AggConfigs extends IndexedArray {
|
|||
|
||||
super({
|
||||
index: ['id'],
|
||||
group: ['schema.group', 'type.name', 'schema.name'],
|
||||
group: ['schema.group', 'type.name', 'type.type', 'schema.name'],
|
||||
});
|
||||
|
||||
this.indexPattern = indexPattern;
|
||||
|
@ -152,7 +152,7 @@ class AggConfigs extends IndexedArray {
|
|||
|
||||
if (hierarchical) {
|
||||
// collect all metrics, and filter out the ones that we won't be copying
|
||||
nestedMetrics = _(this.bySchemaGroup.metrics)
|
||||
nestedMetrics = _(this.byTypeType.metrics)
|
||||
.filter(function (agg) {
|
||||
return agg.type.name !== 'count';
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue