Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[6.x] dont use schemas in aggconfigs to output dsl (#26010) #26065

Merged
merged 1 commit into from
Nov 22, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/core_plugins/kibana/public/visualize/editor/editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -436,6 +436,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');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,8 @@ uiModules
self.visState
);

self.vis.savedSearchId = self.savedSearchId;

return self.vis;
};

Expand All @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/ui/public/agg_types/__tests__/buckets/_geo_hash.js
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down
5 changes: 5 additions & 0 deletions src/ui/public/agg_types/buckets/geo_hash.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,11 @@ export const geoHashBucketAgg = new BucketAggType({
default: [0, 0],
write: _.noop
},
{
name: 'mapBounds',
default: null,
write: _.noop
},
{
name: 'precision',
editor: precisionTemplate,
Expand Down
4 changes: 2 additions & 2 deletions src/ui/public/vis/agg_configs.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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';
})
Expand Down