mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
Adding global filters
This commit is contained in:
parent
09b6ada25d
commit
985ec1c02c
1 changed files with 3 additions and 8 deletions
|
@ -26,7 +26,7 @@ export default (req) => {
|
|||
const { server } = req;
|
||||
const { callWithRequest } = server.plugins.elasticsearch.getCluster('data');
|
||||
const config = server.config();
|
||||
const globalFilter = req.payload.global_filter;
|
||||
const globalFilters = req.payload.filters;
|
||||
const from = moment.utc(req.payload.timerange.min);
|
||||
const to = moment.utc(req.payload.timerange.max);
|
||||
|
||||
|
@ -71,13 +71,8 @@ export default (req) => {
|
|||
};
|
||||
params.body.query.bool.must.push(timerange);
|
||||
|
||||
if (globalFilter && !panel.ignore_global_filter) {
|
||||
params.body.query.bool.must.push({
|
||||
query_string: {
|
||||
query: globalFilter,
|
||||
analyze_wildcard: true
|
||||
}
|
||||
});
|
||||
if (globalFilters && !panel.ignore_global_filter) {
|
||||
params.body.query.bool.must = params.body.query.bool.must.concat(globalFilters);
|
||||
}
|
||||
|
||||
if (panel.filter) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue