removing indexPattern from vega/tsvb/timelion request handler (#26007)
This commit is contained in:
parent
7e57c107ab
commit
42feaaa5af
|
@ -28,7 +28,7 @@ const MetricsRequestHandlerProvider = function (Private, Notifier, config, $http
|
|||
|
||||
return {
|
||||
name: 'metrics',
|
||||
handler: function ({ aggs, uiState, timeRange, filters, query, visParams }) {
|
||||
handler: function ({ uiState, timeRange, filters, query, visParams }) {
|
||||
const timezone = Private(timezoneProvider)();
|
||||
return new Promise((resolve) => {
|
||||
const panel = visParams;
|
||||
|
@ -39,7 +39,7 @@ const MetricsRequestHandlerProvider = function (Private, Notifier, config, $http
|
|||
if (panel && panel.id) {
|
||||
const params = {
|
||||
timerange: { timezone, ...parsedTimeRange },
|
||||
filters: [buildEsQuery(aggs.indexPattern, [query], filters)],
|
||||
filters: [buildEsQuery(undefined, [query], filters)],
|
||||
panels: [panel],
|
||||
state: uiStateObj
|
||||
};
|
||||
|
|
|
@ -31,7 +31,7 @@ const TimelionRequestHandlerProvider = function (Private, Notifier, $http) {
|
|||
|
||||
return {
|
||||
name: 'timelion',
|
||||
handler: function ({ aggs, timeRange, filters, query, visParams }) {
|
||||
handler: function ({ timeRange, filters, query, visParams }) {
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
const expression = visParams.expression;
|
||||
|
@ -41,7 +41,7 @@ const TimelionRequestHandlerProvider = function (Private, Notifier, $http) {
|
|||
sheet: [expression],
|
||||
extended: {
|
||||
es: {
|
||||
filter: buildEsQuery(aggs.indexPattern, [query], filters)
|
||||
filter: buildEsQuery(undefined, [query], filters)
|
||||
}
|
||||
},
|
||||
time: _.extend(timeRange, {
|
||||
|
|
|
@ -33,9 +33,9 @@ export function VegaRequestHandlerProvider(Private, es, serviceSettings) {
|
|||
|
||||
name: 'vega',
|
||||
|
||||
handler({ aggs, timeRange, filters, query, visParams }) {
|
||||
handler({ timeRange, filters, query, visParams }) {
|
||||
timeCache.setTimeRange(timeRange);
|
||||
const filtersDsl = buildEsQuery(aggs.indexPattern, [query], filters);
|
||||
const filtersDsl = buildEsQuery(undefined, [query], filters);
|
||||
const vp = new VegaParser(visParams.spec, searchCache, timeCache, filtersDsl, serviceSettings);
|
||||
return vp.parseAsync();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue