Timelion graph is not refreshing content after searching or filtering (#67023)
* Timelion graph is not refreshing content after searching or filtering in Kibana Closes #66560 * Change test beforeEach configuration to match request body * Remove unused TimelionRequestQuery
This commit is contained in:
parent
dd09c0da9b
commit
7a6aec5a33
|
@ -31,30 +31,6 @@ import { ConfigManager } from '../lib/config_manager';
|
|||
|
||||
const timelionDefaults = getNamespacesSettings();
|
||||
|
||||
export interface TimelionRequestQuery {
|
||||
payload: {
|
||||
sheet: string[];
|
||||
extended?: {
|
||||
es: {
|
||||
filter: {
|
||||
bool: {
|
||||
filter: string[] | object;
|
||||
must: string[];
|
||||
should: string[];
|
||||
must_not: string[];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
time?: {
|
||||
from?: string;
|
||||
interval: string;
|
||||
timezone: string;
|
||||
to?: string;
|
||||
};
|
||||
}
|
||||
|
||||
export function runRoute(
|
||||
router: IRouter,
|
||||
{
|
||||
|
|
|
@ -239,7 +239,7 @@ describe('es', () => {
|
|||
to: 5,
|
||||
},
|
||||
request: {
|
||||
payload: {
|
||||
body: {
|
||||
extended: {
|
||||
es: {
|
||||
filter: {
|
||||
|
@ -258,7 +258,7 @@ describe('es', () => {
|
|||
});
|
||||
});
|
||||
|
||||
it('adds the contents of payload.extended.es.filter to a filter clause of the bool', () => {
|
||||
it('adds the contents of body.extended.es.filter to a filter clause of the bool', () => {
|
||||
config.kibana = true;
|
||||
const request = fn(config, tlConfig, emptyScriptedFields);
|
||||
const filter = request.body.query.bool.filter.bool;
|
||||
|
|
|
@ -38,7 +38,7 @@ export default function buildRequest(config, tlConfig, scriptedFields, timeout)
|
|||
|
||||
// Use the kibana filter bar filters
|
||||
if (config.kibana) {
|
||||
bool.filter = _.get(tlConfig, 'request.payload.extended.es.filter');
|
||||
bool.filter = _.get(tlConfig, 'request.body.extended.es.filter');
|
||||
}
|
||||
|
||||
const aggs = {
|
||||
|
|
|
@ -18,4 +18,3 @@
|
|||
*/
|
||||
|
||||
export { TimelionFunctionInterface, TimelionFunctionConfig } from './lib/classes/timelion_function';
|
||||
export { TimelionRequestQuery } from './routes/run';
|
||||
|
|
Loading…
Reference in a new issue