From 327212cbddb126071f253444d91e6748502d23de Mon Sep 17 00:00:00 2001 From: Josh Romero Date: Tue, 1 Nov 2022 19:31:19 +0000 Subject: [PATCH 01/10] [Chore] Update timeline default expression Update default expression from `.es(*)` to `opensearch(*)`. Both work, but we'd prefer the latter Signed-off-by: Josh Romero --- .../vis_type_timeline/public/__snapshots__/to_ast.test.ts.snap | 2 +- src/plugins/vis_type_timeline/public/timeline_vis_fn.ts | 2 +- src/plugins/vis_type_timeline/public/timeline_vis_type.tsx | 2 +- src/plugins/vis_type_timeline/public/to_ast.test.ts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/plugins/vis_type_timeline/public/__snapshots__/to_ast.test.ts.snap b/src/plugins/vis_type_timeline/public/__snapshots__/to_ast.test.ts.snap index 2befab651964..a5440895a619 100644 --- a/src/plugins/vis_type_timeline/public/__snapshots__/to_ast.test.ts.snap +++ b/src/plugins/vis_type_timeline/public/__snapshots__/to_ast.test.ts.snap @@ -6,7 +6,7 @@ Object { Object { "arguments": Object { "expression": Array [ - ".es(*)", + ".opensearch(*)", ], "interval": Array [ "auto", diff --git a/src/plugins/vis_type_timeline/public/timeline_vis_fn.ts b/src/plugins/vis_type_timeline/public/timeline_vis_fn.ts index cd735bf2bc09..e56d6fd37af2 100644 --- a/src/plugins/vis_type_timeline/public/timeline_vis_fn.ts +++ b/src/plugins/vis_type_timeline/public/timeline_vis_fn.ts @@ -78,7 +78,7 @@ export const getTimelineVisualizationConfig = ( expression: { types: ['string'], aliases: ['_'], - default: '".es(*)"', + default: '".opensearch(*)"', help: '', }, interval: { diff --git a/src/plugins/vis_type_timeline/public/timeline_vis_type.tsx b/src/plugins/vis_type_timeline/public/timeline_vis_type.tsx index d3a076add8a5..7a5f515b7f5e 100644 --- a/src/plugins/vis_type_timeline/public/timeline_vis_type.tsx +++ b/src/plugins/vis_type_timeline/public/timeline_vis_type.tsx @@ -57,7 +57,7 @@ export function getTimelineVisDefinition(dependencies: TimelineVisDependencies) }), visConfig: { defaults: { - expression: '.es(*)', + expression: '.opensearch(*)', interval: 'auto', }, }, diff --git a/src/plugins/vis_type_timeline/public/to_ast.test.ts b/src/plugins/vis_type_timeline/public/to_ast.test.ts index c5d8dace30a9..a32a299f5ba7 100644 --- a/src/plugins/vis_type_timeline/public/to_ast.test.ts +++ b/src/plugins/vis_type_timeline/public/to_ast.test.ts @@ -38,7 +38,7 @@ describe('timeline vis toExpressionAst function', () => { beforeEach(() => { vis = { params: { - expression: '.es(*)', + expression: '.opensearch(*)', interval: 'auto', }, } as any; From 47303cf0864ff3b98bd82b63b52dfb0f2a74f0ad Mon Sep 17 00:00:00 2001 From: Josh Romero Date: Fri, 18 Nov 2022 23:21:25 +0000 Subject: [PATCH 02/10] [Chore] Update other timeline `es()` examples and test usage Signed-off-by: Josh Romero --- src/plugins/timeline/public/app.js | 2 +- .../directives/timeline_expression_input.html | 4 +-- .../timeline_help/timeline_help.html | 32 +++++++++---------- .../timeline/public/services/_saved_sheet.ts | 2 +- .../public/__snapshots__/to_ast.test.ts.snap | 2 +- .../vis_type_timeline/public/to_ast.test.ts | 2 +- .../server/handlers/lib/parse_sheet.test.js | 6 ++-- .../vis_type_timeline/server/plugin.ts | 4 +-- .../management/exports/_import_too_big.ndjson | 4 +-- .../apps/timeline/_expression_typeahead.js | 10 +++--- 10 files changed, 34 insertions(+), 34 deletions(-) diff --git a/src/plugins/timeline/public/app.js b/src/plugins/timeline/public/app.js index 6680e5518dcd..d0e940b9dded 100644 --- a/src/plugins/timeline/public/app.js +++ b/src/plugins/timeline/public/app.js @@ -169,7 +169,7 @@ export function initTimelineApp(app, deps) { const savedVisualizations = deps.plugins.visualizations.savedVisualizationsLoader; const timezone = getTimezone(deps.core.uiSettings); - const defaultExpression = '.es(*)'; + const defaultExpression = '.opensearch(*)'; $scope.topNavMenu = getTopNavMenu(); diff --git a/src/plugins/timeline/public/directives/timeline_expression_input.html b/src/plugins/timeline/public/directives/timeline_expression_input.html index e2e73706621f..b565e6643fc6 100644 --- a/src/plugins/timeline/public/directives/timeline_expression_input.html +++ b/src/plugins/timeline/public/directives/timeline_expression_input.html @@ -4,7 +4,7 @@ For some reasons it doesn't work without it (even though the default role of the element is textbox anyway). -->