Skip to content

Commit 650505b

Browse files
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
1 parent 859d041 commit 650505b

4 files changed

Lines changed: 3 additions & 28 deletions

File tree

src/plugins/vis_type_timelion/server/routes/run.ts

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -31,30 +31,6 @@ import { ConfigManager } from '../lib/config_manager';
3131

3232
const timelionDefaults = getNamespacesSettings();
3333

34-
export interface TimelionRequestQuery {
35-
payload: {
36-
sheet: string[];
37-
extended?: {
38-
es: {
39-
filter: {
40-
bool: {
41-
filter: string[] | object;
42-
must: string[];
43-
should: string[];
44-
must_not: string[];
45-
};
46-
};
47-
};
48-
};
49-
};
50-
time?: {
51-
from?: string;
52-
interval: string;
53-
timezone: string;
54-
to?: string;
55-
};
56-
}
57-
5834
export function runRoute(
5935
router: IRouter,
6036
{

src/plugins/vis_type_timelion/server/series_functions/es/es.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ describe('es', () => {
239239
to: 5,
240240
},
241241
request: {
242-
payload: {
242+
body: {
243243
extended: {
244244
es: {
245245
filter: {
@@ -258,7 +258,7 @@ describe('es', () => {
258258
});
259259
});
260260

261-
it('adds the contents of payload.extended.es.filter to a filter clause of the bool', () => {
261+
it('adds the contents of body.extended.es.filter to a filter clause of the bool', () => {
262262
config.kibana = true;
263263
const request = fn(config, tlConfig, emptyScriptedFields);
264264
const filter = request.body.query.bool.filter.bool;

src/plugins/vis_type_timelion/server/series_functions/es/lib/build_request.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export default function buildRequest(config, tlConfig, scriptedFields, timeout)
3838

3939
// Use the kibana filter bar filters
4040
if (config.kibana) {
41-
bool.filter = _.get(tlConfig, 'request.payload.extended.es.filter');
41+
bool.filter = _.get(tlConfig, 'request.body.extended.es.filter');
4242
}
4343

4444
const aggs = {

src/plugins/vis_type_timelion/server/types.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,3 @@
1818
*/
1919

2020
export { TimelionFunctionInterface, TimelionFunctionConfig } from './lib/classes/timelion_function';
21-
export { TimelionRequestQuery } from './routes/run';

0 commit comments

Comments
 (0)