mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
[Vega] Add Filter custom label for kibanaAddFilter (#124498)
* [Vega] Add Filter custom label for kibanaAddFilter * extend documentation Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Joe Reuter <johannes.reuter@elastic.co>
This commit is contained in:
parent
51856f9194
commit
164eaf27f2
2 changed files with 5 additions and 3 deletions
|
@ -429,8 +429,9 @@ To keep signal values set `restoreSignalValuesOnRefresh: true` in the Vega confi
|
|||
/**
|
||||
* @param {object} query Elastic Query DSL snippet, as used in the query DSL editor
|
||||
* @param {string} [index] as defined in Kibana, or default if missing
|
||||
* @param {string} Custom label of the filter shown in the filter bar
|
||||
*/
|
||||
kibanaAddFilter(query, index)
|
||||
kibanaAddFilter(query, index, alias)
|
||||
|
||||
/**
|
||||
* @param {object} query Elastic Query DSL snippet, as used in the query DSL editor
|
||||
|
|
|
@ -340,10 +340,11 @@ export class VegaBaseView {
|
|||
/**
|
||||
* @param {object} query Elastic Query DSL snippet, as used in the query DSL editor
|
||||
* @param {string} [index] as defined in Kibana, or default if missing
|
||||
* @param {string} Elastic Query DSL's Custom label for kibanaAddFilter, as used in '+ Add Filter'
|
||||
*/
|
||||
async addFilterHandler(query, index) {
|
||||
async addFilterHandler(query, index, alias) {
|
||||
const indexId = await this.findIndex(index);
|
||||
const filter = esFilters.buildQueryFilter(query, indexId);
|
||||
const filter = esFilters.buildQueryFilter(query, indexId, alias);
|
||||
|
||||
this._fireEvent({ name: 'applyFilter', data: { filters: [filter] } });
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue