From 7b4f59d978aadf8899b52987e6e1878c87d388f7 Mon Sep 17 00:00:00 2001 From: Marco Antonio Ghiani Date: Thu, 21 Nov 2024 10:20:09 +0100 Subject: [PATCH] [Logs Shared] Update deprecated Kibana usages (#200973) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## 📓 Summary The `logs_shared` plugin was still relying on internal [deprecated kibana APIs](https://docs.elastic.dev/kibana-dev-docs/api-meta/deprecated-api-list-by-plugin#logsshared). These changes update the usage with the related recommendation. Co-authored-by: Marco Antonio Ghiani --- .../logs_shared/common/log_views/resolved_log_view.ts | 2 +- .../server/saved_objects/log_view/log_view_saved_object.ts | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/x-pack/plugins/observability_solution/logs_shared/common/log_views/resolved_log_view.ts b/x-pack/plugins/observability_solution/logs_shared/common/log_views/resolved_log_view.ts index 1521aa67e3d92..cd2354994db2c 100644 --- a/x-pack/plugins/observability_solution/logs_shared/common/log_views/resolved_log_view.ts +++ b/x-pack/plugins/observability_solution/logs_shared/common/log_views/resolved_log_view.ts @@ -106,7 +106,7 @@ const resolveDataViewReference = async ( }); return { - indices: dataView.title, + indices: dataView.getIndexPattern(), timestampField: dataView.timeFieldName ?? TIMESTAMP_FIELD, tiebreakerField: TIEBREAKER_FIELD, messageField: ['message'], diff --git a/x-pack/plugins/observability_solution/logs_shared/server/saved_objects/log_view/log_view_saved_object.ts b/x-pack/plugins/observability_solution/logs_shared/server/saved_objects/log_view/log_view_saved_object.ts index 246c398ea5a65..7d067993531e3 100644 --- a/x-pack/plugins/observability_solution/logs_shared/server/saved_objects/log_view/log_view_saved_object.ts +++ b/x-pack/plugins/observability_solution/logs_shared/server/saved_objects/log_view/log_view_saved_object.ts @@ -40,5 +40,4 @@ export const logViewSavedObjectType: SavedObjectsType = { }, }, }, - migrations: {}, };