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:
Diana Derevyankina 2020-05-20 15:25:00 +03:00 committed by GitHub
parent dd09c0da9b
commit 7a6aec5a33
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 3 additions and 28 deletions

View file

@ -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,
{

View file

@ -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;

View file

@ -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 = {

View file

@ -18,4 +18,3 @@
*/
export { TimelionFunctionInterface, TimelionFunctionConfig } from './lib/classes/timelion_function';
export { TimelionRequestQuery } from './routes/run';