From 90277c37d0c57de7d995effb9bf57c42b136877a Mon Sep 17 00:00:00 2001 From: Giorgos Bamparopoulos Date: Thu, 19 Dec 2024 11:07:46 +0000 Subject: [PATCH] Disable log stream and settings pages (#203996) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Release note Logs Stream and the logs settings page in Observability are removed. Use the [Discover](https://www.elastic.co/guide/en/kibana/current/discover.html) application, which now offers a contextual experience for logs, to explore your logs. The logs stream panel in dashboards is removed, use Discover sessions instead. ## 📓 Summary The Logs Stream app in Observability and the log stream panel available in dashboards were hidden behind an advanced setting as part of https://github.com/elastic/kibana/pull/194519 in `8.16.0`. At the same time, a link was added to the left navigation for the logs settings page. This PR which targets `9.0.0` disables these pages as well as the dashboard panel: - Removes the navigation item for the logs settings page and the corresponding route - Removes the `observability:enableLogsStream` setting and keeps the redirects to logs explorer. The locators will be updated to point to Discover as part of https://github.com/elastic/kibana/issues/182229. Removing the code that renders the logs stream and the settings pages will be done in a [follow-up issue](https://github.com/elastic/kibana/issues/204005). ### Left navigation #### Classic image #### Solution image ### Navigating to /app/logs/settings image Closes https://github.com/elastic/observability-dev/issues/4156 --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Elastic Machine --- .../settings/setting_ids/index.ts | 1 - .../server/collectors/management/schema.ts | 4 -- .../server/collectors/management/types.ts | 1 - src/plugins/telemetry/schema/oss_plugins.json | 6 -- .../group1/create_and_add_embeddables.ts | 5 +- test/tsconfig.json | 1 - .../translations/translations/fr-FR.json | 6 -- .../translations/translations/ja-JP.json | 6 -- .../translations/translations/zh-CN.json | 6 -- .../infra/common/ui_settings.ts | 37 ------------- .../infra/public/pages/logs/page_content.tsx | 43 +++++---------- .../infra/public/pages/logs/routes.ts | 24 +------- .../infra/public/plugin.ts | 55 +------------------ .../infra/server/plugin.ts | 4 -- .../infra/tsconfig.json | 3 - .../observability/public/navigation_tree.ts | 12 ---- .../functional/apps/infra/logs/log_stream.ts | 6 +- .../apps/infra/logs/log_stream_date_nano.ts | 6 +- .../infra/logs/logs_source_configuration.ts | 5 +- .../functional/apps/infra/page_not_found.ts | 12 +--- 20 files changed, 23 insertions(+), 220 deletions(-) delete mode 100644 x-pack/plugins/observability_solution/infra/common/ui_settings.ts diff --git a/packages/kbn-management/settings/setting_ids/index.ts b/packages/kbn-management/settings/setting_ids/index.ts index 0a1b3e2bcdade..58024e2ae31f3 100644 --- a/packages/kbn-management/settings/setting_ids/index.ts +++ b/packages/kbn-management/settings/setting_ids/index.ts @@ -137,7 +137,6 @@ export const OBSERVABILITY_LOGS_EXPLORER_ALLOWED_DATA_VIEWS_ID = export const OBSERVABILITY_LOGS_SHARED_NEW_LOGS_OVERVIEW_ID = 'observability:newLogsOverview'; export const OBSERVABILITY_ENTITY_CENTRIC_EXPERIENCE = 'observability:entityCentricExperience'; export const OBSERVABILITY_LOGS_DATA_ACCESS_LOG_SOURCES_ID = 'observability:logSources'; -export const OBSERVABILITY_ENABLE_LOGS_STREAM = 'observability:enableLogsStream'; export const OBSERVABILITY_AI_ASSISTANT_SIMULATED_FUNCTION_CALLING = 'observability:aiAssistantSimulatedFunctionCalling'; export const OBSERVABILITY_AI_ASSISTANT_SEARCH_CONNECTOR_INDEX_PATTERN = diff --git a/src/plugins/kibana_usage_collection/server/collectors/management/schema.ts b/src/plugins/kibana_usage_collection/server/collectors/management/schema.ts index f04e8cc62022a..475f81d9be536 100644 --- a/src/plugins/kibana_usage_collection/server/collectors/management/schema.ts +++ b/src/plugins/kibana_usage_collection/server/collectors/management/schema.ts @@ -502,10 +502,6 @@ export const stackManagementSchema: MakeSchemaFrom = { _meta: { description: 'Non-default value of setting.' }, }, }, - 'observability:enableLogsStream': { - type: 'boolean', - _meta: { description: 'Non-default value of setting.' }, - }, 'banners:placement': { type: 'keyword', _meta: { description: 'Non-default value of setting.' }, diff --git a/src/plugins/kibana_usage_collection/server/collectors/management/types.ts b/src/plugins/kibana_usage_collection/server/collectors/management/types.ts index 0182f688f5ecf..6614d08442c08 100644 --- a/src/plugins/kibana_usage_collection/server/collectors/management/types.ts +++ b/src/plugins/kibana_usage_collection/server/collectors/management/types.ts @@ -51,7 +51,6 @@ export interface UsageStats { 'observability:apmEnableServiceInventoryTableSearchBar': boolean; 'observability:logsExplorer:allowedDataViews': string[]; 'observability:logSources': string[]; - 'observability:enableLogsStream': boolean; 'observability:newLogsOverview': boolean; 'observability:aiAssistantSimulatedFunctionCalling': boolean; 'observability:aiAssistantSearchConnectorIndexPattern': string; diff --git a/src/plugins/telemetry/schema/oss_plugins.json b/src/plugins/telemetry/schema/oss_plugins.json index 8ba1367641679..2fb6314a348b9 100644 --- a/src/plugins/telemetry/schema/oss_plugins.json +++ b/src/plugins/telemetry/schema/oss_plugins.json @@ -11010,12 +11010,6 @@ } } }, - "observability:enableLogsStream": { - "type": "boolean", - "_meta": { - "description": "Non-default value of setting." - } - }, "banners:placement": { "type": "keyword", "_meta": { diff --git a/test/functional/apps/dashboard/group1/create_and_add_embeddables.ts b/test/functional/apps/dashboard/group1/create_and_add_embeddables.ts index 34e78f3e68632..84afd3885f987 100644 --- a/test/functional/apps/dashboard/group1/create_and_add_embeddables.ts +++ b/test/functional/apps/dashboard/group1/create_and_add_embeddables.ts @@ -8,7 +8,6 @@ */ import expect from '@kbn/expect'; -import { OBSERVABILITY_ENABLE_LOGS_STREAM } from '@kbn/management-settings-ids'; import { VisualizeConstants } from '@kbn/visualizations-plugin/common/constants'; import { FtrProviderContext } from '../../../ftr_provider_context'; @@ -28,12 +27,10 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await kibanaServer.uiSettings.replace({ defaultIndex: '0bf35f60-3dc9-11e8-8660-4d65aa086b3c', }); - await kibanaServer.uiSettings.update({ [OBSERVABILITY_ENABLE_LOGS_STREAM]: true }); }); after(async () => { await kibanaServer.savedObjects.cleanStandardList(); - await kibanaServer.uiSettings.update({ [OBSERVABILITY_ENABLE_LOGS_STREAM]: false }); }); it('ensure toolbar popover closes on add', async () => { @@ -41,7 +38,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await dashboard.clickNewDashboard(); await dashboard.switchToEditMode(); await dashboardAddPanel.clickEditorMenuButton(); - await dashboardAddPanel.clickAddNewPanelFromUIActionLink('Log stream (deprecated)'); + await dashboardAddPanel.clickAddNewPanelFromUIActionLink('Monitors stats'); await dashboardAddPanel.expectEditorMenuClosed(); }); diff --git a/test/tsconfig.json b/test/tsconfig.json index 1ba594b8ecbdb..10fdefbb7b6ac 100644 --- a/test/tsconfig.json +++ b/test/tsconfig.json @@ -75,7 +75,6 @@ "@kbn/default-nav-management", "@kbn/default-nav-devtools", "@kbn/core-saved-objects-import-export-server-internal", - "@kbn/management-settings-ids", "@kbn/core-deprecations-common", ] } diff --git a/x-pack/platform/plugins/private/translations/translations/fr-FR.json b/x-pack/platform/plugins/private/translations/translations/fr-FR.json index 98ea70111ef56..458e4ab1e73e5 100644 --- a/x-pack/platform/plugins/private/translations/translations/fr-FR.json +++ b/x-pack/platform/plugins/private/translations/translations/fr-FR.json @@ -23883,8 +23883,6 @@ "xpack.infra.durationUnits.weeks.singular": "semaine", "xpack.infra.durationUnits.years.plural": "années", "xpack.infra.durationUnits.years.singular": "an", - "xpack.infra.enableLogsStream": "Flux de logs", - "xpack.infra.enableLogsStreamDescription": "Active l'application Logs Stream héritée et le panneau du tableau de bord.", "xpack.infra.errorPage.errorOccurredTitle": "Une erreur s'est produite", "xpack.infra.errorPage.tryAgainButtonLabel": "Réessayer", "xpack.infra.errorPage.tryAgainDescription ": "Cliquez sur le bouton Retour et réessayez.", @@ -24274,8 +24272,6 @@ "xpack.infra.logsPage.toolbar.logFilterErrorToastTitle": "Erreur de filtrage du log", "xpack.infra.logsSettingsPage.loadingButtonLabel": "Chargement", "xpack.infra.logsStreamEmbeddable.deprecationWarningDescription": "La maintenance des panneaux de flux de logs n'est plus assurée. Essayez d'utiliser {savedSearchDocsLink} pour une visualisation similaire.", - "xpack.infra.logStreamEmbeddable.displayName": "Logs Stream (déclassé)", - "xpack.infra.logStreamEmbeddable.title": "Flux de log", "xpack.infra.logStreamPageTemplate.backtoLogsStream": "Retour au flux de logs", "xpack.infra.logStreamPageTemplate.widgetBadge": "Widget", "xpack.infra.logStreamPageTemplate.widgetDescription": "Vous visionnez un widget intégré. Les modifications seront synchronisées avec l'URL, mais elles ne seront pas conservées dans la vue par défaut du flux de logs.", @@ -33853,8 +33849,6 @@ "xpack.observability.obltNav.otherTools": "Autres outils", "xpack.observability.obltNav.otherTools.logsAnomalies": "Anomalies des logs", "xpack.observability.obltNav.otherTools.logsCategories": "Bibliothèque Visualize", - "xpack.observability.obltNav.otherTools.logsSettings": "Paramètres des logs", - "xpack.observability.obltNav.otherTools.logsStream": "Flux de logs", "xpack.observability.obltNav.stackManagement": "Gestion de la Suite", "xpack.observability.overview.alerts.appLink": "Afficher les alertes", "xpack.observability.overview.alerts.title": "Alertes", diff --git a/x-pack/platform/plugins/private/translations/translations/ja-JP.json b/x-pack/platform/plugins/private/translations/translations/ja-JP.json index 06802ee2be796..f396226fdf560 100644 --- a/x-pack/platform/plugins/private/translations/translations/ja-JP.json +++ b/x-pack/platform/plugins/private/translations/translations/ja-JP.json @@ -23745,8 +23745,6 @@ "xpack.infra.durationUnits.weeks.singular": "週", "xpack.infra.durationUnits.years.plural": "年", "xpack.infra.durationUnits.years.singular": "年", - "xpack.infra.enableLogsStream": "ログストリーム", - "xpack.infra.enableLogsStreamDescription": "レガシーログストリームアプリケーションとダッシュボードパネルを有効化します。", "xpack.infra.errorPage.errorOccurredTitle": "エラーが発生しました", "xpack.infra.errorPage.tryAgainButtonLabel": "再試行", "xpack.infra.errorPage.tryAgainDescription ": "戻るボタンをクリックして再試行してください。", @@ -24135,8 +24133,6 @@ "xpack.infra.logsPage.toolbar.logFilterErrorToastTitle": "ログフィルターエラー", "xpack.infra.logsSettingsPage.loadingButtonLabel": "読み込み中", "xpack.infra.logsStreamEmbeddable.deprecationWarningDescription": "ログストリームパネルは管理されていません。{savedSearchDocsLink}を同様の視覚化に活用してください。", - "xpack.infra.logStreamEmbeddable.displayName": "ログストリーム(廃止予定)", - "xpack.infra.logStreamEmbeddable.title": "ログストリーム", "xpack.infra.logStreamPageTemplate.backtoLogsStream": "ログストリームに戻る", "xpack.infra.logStreamPageTemplate.widgetBadge": "ウィジェット", "xpack.infra.logStreamPageTemplate.widgetDescription": "埋め込まれたウィジェットを表示しています。変更はURLと同期されますが、デフォルトログストリームビューには永続しません。", @@ -33714,8 +33710,6 @@ "xpack.observability.obltNav.otherTools": "その他のツール", "xpack.observability.obltNav.otherTools.logsAnomalies": "Logs異常", "xpack.observability.obltNav.otherTools.logsCategories": "Visualizeライブラリ", - "xpack.observability.obltNav.otherTools.logsSettings": "Logs設定", - "xpack.observability.obltNav.otherTools.logsStream": "ログストリーム", "xpack.observability.obltNav.stackManagement": "スタック管理", "xpack.observability.overview.alerts.appLink": "アラートを表示", "xpack.observability.overview.alerts.title": "アラート", diff --git a/x-pack/platform/plugins/private/translations/translations/zh-CN.json b/x-pack/platform/plugins/private/translations/translations/zh-CN.json index de40b51eca65e..73ef6cc59c976 100644 --- a/x-pack/platform/plugins/private/translations/translations/zh-CN.json +++ b/x-pack/platform/plugins/private/translations/translations/zh-CN.json @@ -23366,8 +23366,6 @@ "xpack.infra.durationUnits.weeks.singular": "周", "xpack.infra.durationUnits.years.plural": "年", "xpack.infra.durationUnits.years.singular": "年", - "xpack.infra.enableLogsStream": "日志流", - "xpack.infra.enableLogsStreamDescription": "启用旧版日志流应用程序和仪表板面板。", "xpack.infra.errorPage.errorOccurredTitle": "发生错误", "xpack.infra.errorPage.tryAgainButtonLabel": "重试", "xpack.infra.errorPage.tryAgainDescription ": "请点击后退按钮,然后重试。", @@ -23752,8 +23750,6 @@ "xpack.infra.logsPage.toolbar.logFilterErrorToastTitle": "日志筛选错误", "xpack.infra.logsSettingsPage.loadingButtonLabel": "正在加载", "xpack.infra.logsStreamEmbeddable.deprecationWarningDescription": "将不再维护日志流面板。尝试将 {savedSearchDocsLink} 用于类似可视化。", - "xpack.infra.logStreamEmbeddable.displayName": "日志流(已过时)", - "xpack.infra.logStreamEmbeddable.title": "日志流", "xpack.infra.logStreamPageTemplate.backtoLogsStream": "返回到日志流", "xpack.infra.logStreamPageTemplate.widgetBadge": "小组件", "xpack.infra.logStreamPageTemplate.widgetDescription": "您正在查看嵌入式小组件。更改将同步到 URL,但不会持续存在于默认日志流视图。", @@ -33229,8 +33225,6 @@ "xpack.observability.obltNav.otherTools": "其他工具", "xpack.observability.obltNav.otherTools.logsAnomalies": "日志异常", "xpack.observability.obltNav.otherTools.logsCategories": "Visualize 库", - "xpack.observability.obltNav.otherTools.logsSettings": "日志设置", - "xpack.observability.obltNav.otherTools.logsStream": "日志流", "xpack.observability.obltNav.stackManagement": "Stack Management", "xpack.observability.overview.alerts.appLink": "显示告警", "xpack.observability.overview.alerts.title": "告警", diff --git a/x-pack/plugins/observability_solution/infra/common/ui_settings.ts b/x-pack/plugins/observability_solution/infra/common/ui_settings.ts deleted file mode 100644 index 9b85630761942..0000000000000 --- a/x-pack/plugins/observability_solution/infra/common/ui_settings.ts +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -/** - * uiSettings definitions for the logs_data_access plugin. - */ -import { schema } from '@kbn/config-schema'; -import { UiSettingsParams } from '@kbn/core-ui-settings-common'; -import { i18n } from '@kbn/i18n'; -import { OBSERVABILITY_ENABLE_LOGS_STREAM } from '@kbn/management-settings-ids'; - -export const uiSettings: Record = { - [OBSERVABILITY_ENABLE_LOGS_STREAM]: { - category: ['observability'], - name: i18n.translate('xpack.infra.enableLogsStream', { - defaultMessage: 'Logs Stream', - }), - value: false, - description: i18n.translate('xpack.infra.enableLogsStreamDescription', { - defaultMessage: 'Enables the legacy Logs Stream application and dashboard panel. ', - }), - deprecation: { - message: i18n.translate('xpack.infra.enableLogsStreamDeprecationWarning', { - defaultMessage: - 'Logs Stream is deprecated, and this setting will be removed in Kibana 9.0.', - }), - docLinksKey: 'generalSettings', - }, - type: 'boolean', - schema: schema.boolean(), - requiresPageReload: true, - }, -}; diff --git a/x-pack/plugins/observability_solution/infra/public/pages/logs/page_content.tsx b/x-pack/plugins/observability_solution/infra/public/pages/logs/page_content.tsx index ecf5af5572b31..bdb738c33315c 100644 --- a/x-pack/plugins/observability_solution/infra/public/pages/logs/page_content.tsx +++ b/x-pack/plugins/observability_solution/infra/public/pages/logs/page_content.tsx @@ -9,7 +9,7 @@ import { EuiFlexGroup, EuiFlexItem, EuiHeaderLink, EuiHeaderLinks } from '@elast import { i18n } from '@kbn/i18n'; import React, { useContext } from 'react'; import { Routes, Route } from '@kbn/shared-ux-router'; -import { useKibana, useUiSetting } from '@kbn/kibana-react-plugin/public'; +import { useKibana } from '@kbn/kibana-react-plugin/public'; import { HeaderMenuPortal, useLinkProps } from '@kbn/observability-shared-plugin/public'; import { SharePublicStart } from '@kbn/share-plugin/public/plugin'; import { @@ -20,7 +20,6 @@ import { } from '@kbn/deeplinks-observability'; import { dynamic } from '@kbn/shared-ux-utility'; import { isDevMode } from '@kbn/xstate-utils'; -import { OBSERVABILITY_ENABLE_LOGS_STREAM } from '@kbn/management-settings-ids'; import { LazyAlertDropdownWrapper } from '../../alerting/log_threshold'; import { HelpCenterContent } from '../../components/help_center_content'; import { useReadOnlyBadge } from '../../hooks/use_readonly_badge'; @@ -29,16 +28,13 @@ import { RedirectWithQueryParams } from '../../utils/redirect_with_query_params' import { NotFoundPage } from '../404'; import { getLogsAppRoutes } from './routes'; -const StreamPage = dynamic(() => import('./stream').then((mod) => ({ default: mod.StreamPage }))); const LogEntryCategoriesPage = dynamic(() => import('./log_entry_categories').then((mod) => ({ default: mod.LogEntryCategoriesPage })) ); const LogEntryRatePage = dynamic(() => import('./log_entry_rate').then((mod) => ({ default: mod.LogEntryRatePage })) ); -const LogsSettingsPage = dynamic(() => - import('./settings').then((mod) => ({ default: mod.LogsSettingsPage })) -); + const StateMachinePlayground = dynamic(() => import('../../observability_logs/xstate_helpers').then((mod) => ({ default: mod.StateMachinePlayground, @@ -48,8 +44,6 @@ const StateMachinePlayground = dynamic(() => export const LogsPageContent: React.FunctionComponent = () => { const { application, share } = useKibana<{ share: SharePublicStart }>().services; - const isLogsStreamEnabled: boolean = useUiSetting(OBSERVABILITY_ENABLE_LOGS_STREAM, false); - const uiCapabilities = application?.capabilities; const onboardingLocator = share?.url.locators.get( OBSERVABILITY_ONBOARDING_LOCATOR @@ -60,7 +54,7 @@ export const LogsPageContent: React.FunctionComponent = () => { useReadOnlyBadge(!uiCapabilities?.logs?.save); - const routes = getLogsAppRoutes({ isLogsStreamEnabled }); + const routes = getLogsAppRoutes(); const settingsLinkProps = useLinkProps({ app: 'logs', @@ -94,34 +88,23 @@ export const LogsPageContent: React.FunctionComponent = () => { )} - {routes.stream ? ( - - ) : ( - { - share.url.locators - .get(ALL_DATASETS_LOCATOR_ID) - ?.navigate({}); - - return null; - }} - /> - )} + { + share.url.locators.get(ALL_DATASETS_LOCATOR_ID)?.navigate({}); + + return null; + }} + /> - {enableDeveloperRoutes && ( )} - + } /> diff --git a/x-pack/plugins/observability_solution/infra/public/pages/logs/routes.ts b/x-pack/plugins/observability_solution/infra/public/pages/logs/routes.ts index a5c38672a8bed..c575492a63e37 100644 --- a/x-pack/plugins/observability_solution/infra/public/pages/logs/routes.ts +++ b/x-pack/plugins/observability_solution/infra/public/pages/logs/routes.ts @@ -5,12 +5,7 @@ * 2.0. */ -import { - logsAnomaliesTitle, - logCategoriesTitle, - settingsTitle, - streamTitle, -} from '../../translations'; +import { logsAnomaliesTitle, logCategoriesTitle } from '../../translations'; export interface LogsRoute { id: string; @@ -21,11 +16,9 @@ export interface LogsRoute { export interface LogsAppRoutes { logsAnomalies: LogsRoute; logsCategories: LogsRoute; - settings: LogsRoute; - stream?: LogsRoute; } -export const getLogsAppRoutes = ({ isLogsStreamEnabled }: { isLogsStreamEnabled: boolean }) => { +export const getLogsAppRoutes = () => { const routes: LogsAppRoutes = { logsAnomalies: { id: 'anomalies', @@ -37,20 +30,7 @@ export const getLogsAppRoutes = ({ isLogsStreamEnabled }: { isLogsStreamEnabled: title: logCategoriesTitle, path: '/log-categories', }, - settings: { - id: 'settings', - title: settingsTitle, - path: '/settings', - }, }; - if (isLogsStreamEnabled) { - routes.stream = { - id: 'stream', - title: streamTitle, - path: '/stream', - }; - } - return routes; }; diff --git a/x-pack/plugins/observability_solution/infra/public/plugin.ts b/x-pack/plugins/observability_solution/infra/public/plugin.ts index f9825915a6815..70a07b13b7c81 100644 --- a/x-pack/plugins/observability_solution/infra/public/plugin.ts +++ b/x-pack/plugins/observability_solution/infra/public/plugin.ts @@ -30,24 +30,19 @@ import { map, firstValueFrom, } from 'rxjs'; -import type { EmbeddableApiContext } from '@kbn/presentation-publishing'; -import { apiCanAddNewPanel } from '@kbn/presentation-containers'; -import { IncompatibleActionError, ADD_PANEL_TRIGGER } from '@kbn/ui-actions-plugin/public'; -import { COMMON_EMBEDDABLE_GROUPING } from '@kbn/embeddable-plugin/public'; import { ASSET_DETAILS_LOCATOR_ID, INVENTORY_LOCATOR_ID, type AssetDetailsLocatorParams, type InventoryLocatorParams, } from '@kbn/observability-shared-plugin/common'; -import { OBSERVABILITY_ENABLE_LOGS_STREAM } from '@kbn/management-settings-ids'; import { NavigationEntry } from '@kbn/observability-shared-plugin/public'; import { OBSERVABILITY_LOGS_EXPLORER_APP_ID } from '@kbn/deeplinks-observability/constants'; import type { InfraPublicConfig } from '../common/plugin_config_types'; import { createInventoryMetricRuleType } from './alerting/inventory'; import { createLogThresholdRuleType } from './alerting/log_threshold'; import { createMetricThresholdRuleType } from './alerting/metric_threshold'; -import { ADD_LOG_STREAM_ACTION_ID, LOG_STREAM_EMBEDDABLE } from './components/log_stream/constants'; +import { LOG_STREAM_EMBEDDABLE } from './components/log_stream/constants'; import { createMetricsFetchData, createMetricsHasData } from './metrics_overview_fetchers'; import { registerFeatures } from './register_feature'; import { InventoryViewsService } from './services/inventory_views'; @@ -62,7 +57,6 @@ import type { InfraClientStartExports, } from './types'; import { getLogsHasDataFetcher, getLogsOverviewDataFetcher } from './utils/logs_overview_fetchers'; -import type { LogStreamSerializedState } from './components/log_stream/types'; import { hostsTitle, inventoryTitle, @@ -94,8 +88,6 @@ export class Plugin implements InfraClientPluginClass { } setup(core: InfraClientCoreSetup, pluginsSetup: InfraClientSetupDeps) { - const isLogsStreamEnabled = core.uiSettings.get(OBSERVABILITY_ENABLE_LOGS_STREAM, false); - if (pluginsSetup.home) { registerFeatures(pluginsSetup.home); } @@ -141,7 +133,7 @@ export class Plugin implements InfraClientPluginClass { ) ); - const logRoutes = getLogsAppRoutes({ isLogsStreamEnabled }); + const logRoutes = getLogsAppRoutes(); /** !! Need to be kept in sync with the deepLinks in x-pack/plugins/observability_solution/infra/public/plugin.ts */ pluginsSetup.observabilityShared.navigation.registerSections( @@ -335,48 +327,11 @@ export class Plugin implements InfraClientPluginClass { } start(core: InfraClientCoreStart, plugins: InfraClientStartDeps) { - const { http, uiSettings } = core; - const isLogsStreamEnabled = uiSettings.get(OBSERVABILITY_ENABLE_LOGS_STREAM, false); + const { http } = core; const inventoryViews = this.inventoryViews.start({ http }); const metricsExplorerViews = this.metricsExplorerViews?.start({ http }); const telemetry = this.telemetry.start(); - if (isLogsStreamEnabled) { - plugins.uiActions.registerAction({ - id: ADD_LOG_STREAM_ACTION_ID, - grouping: [COMMON_EMBEDDABLE_GROUPING.legacy], - order: 30, - getDisplayName: () => - i18n.translate('xpack.infra.logStreamEmbeddable.displayName', { - defaultMessage: 'Log stream (deprecated)', - }), - getDisplayNameTooltip: () => - i18n.translate('xpack.infra.logStreamEmbeddable.description', { - defaultMessage: - 'Add a table of live streaming logs. For a more efficient experience, we recommend using the Discover Page to create a saved Discover session instead of using Log stream.', - }), - getIconType: () => 'logsApp', - isCompatible: async ({ embeddable }) => { - return apiCanAddNewPanel(embeddable); - }, - execute: async ({ embeddable }) => { - if (!apiCanAddNewPanel(embeddable)) throw new IncompatibleActionError(); - embeddable.addNewPanel( - { - panelType: LOG_STREAM_EMBEDDABLE, - initialState: { - title: i18n.translate('xpack.infra.logStreamEmbeddable.title', { - defaultMessage: 'Log stream', - }), - }, - }, - true - ); - }, - }); - plugins.uiActions.attachAction(ADD_PANEL_TRIGGER, ADD_LOG_STREAM_ACTION_ID); - } - const startContract: InfraClientStartExports = { inventoryViews, metricsExplorerViews, @@ -411,13 +366,9 @@ const getLogsNavigationEntries = ({ }); } - // Display Stream nav entry when Logs Stream is enabled - if (routes.stream) entries.push(createNavEntryFromRoute(routes.stream)); // Display always Logs Anomalies and Logs Categories entries entries.push(createNavEntryFromRoute(routes.logsAnomalies)); entries.push(createNavEntryFromRoute(routes.logsCategories)); - // Display Logs Settings entry when Logs Stream is not enabled - if (!routes.stream) entries.push(createNavEntryFromRoute(routes.settings)); return entries; }; diff --git a/x-pack/plugins/observability_solution/infra/server/plugin.ts b/x-pack/plugins/observability_solution/infra/server/plugin.ts index 6008954b63bde..6eac138e9fc91 100644 --- a/x-pack/plugins/observability_solution/infra/server/plugin.ts +++ b/x-pack/plugins/observability_solution/infra/server/plugin.ts @@ -52,7 +52,6 @@ import { } from './types'; import { UsageCollector } from './usage/usage_collector'; import { mapSourceToLogView } from './utils/map_source_to_log_view'; -import { uiSettings } from '../common/ui_settings'; export interface KbnServer extends Server { usage: any; @@ -134,9 +133,6 @@ export class InfraServerPlugin const inventoryViews = this.inventoryViews.setup(); const metricsExplorerViews = this.metricsExplorerViews?.setup(); - // Register uiSettings config - core.uiSettings.register(uiSettings); - // Register saved object types core.savedObjects.registerType(infraSourceConfigurationSavedObjectType); core.savedObjects.registerType(inventoryViewSavedObjectType); diff --git a/x-pack/plugins/observability_solution/infra/tsconfig.json b/x-pack/plugins/observability_solution/infra/tsconfig.json index 639780d61ae82..6ec9100ce7661 100644 --- a/x-pack/plugins/observability_solution/infra/tsconfig.json +++ b/x-pack/plugins/observability_solution/infra/tsconfig.json @@ -101,7 +101,6 @@ "@kbn/react-kibana-context-render", "@kbn/react-kibana-context-theme", "@kbn/presentation-publishing", - "@kbn/presentation-containers", "@kbn/deeplinks-observability", "@kbn/event-annotation-common", "@kbn/logs-data-access-plugin", @@ -110,8 +109,6 @@ "@kbn/core-application-browser", "@kbn/shared-ux-page-no-data-types", "@kbn/xstate-utils", - "@kbn/management-settings-ids", - "@kbn/core-ui-settings-common", "@kbn/entityManager-plugin", "@kbn/entities-schema", "@kbn/zod", diff --git a/x-pack/solutions/observability/plugins/observability/public/navigation_tree.ts b/x-pack/solutions/observability/plugins/observability/public/navigation_tree.ts index 16718648c9724..2413a81b32f1c 100644 --- a/x-pack/solutions/observability/plugins/observability/public/navigation_tree.ts +++ b/x-pack/solutions/observability/plugins/observability/public/navigation_tree.ts @@ -397,12 +397,6 @@ function createNavTree({ streamsAvailable }: { streamsAvailable?: boolean }) { }), renderAs: 'panelOpener', children: [ - { - link: 'logs:stream', - title: i18n.translate('xpack.observability.obltNav.otherTools.logsStream', { - defaultMessage: 'Logs stream', - }), - }, { link: 'logs:anomalies', title: i18n.translate('xpack.observability.obltNav.otherTools.logsAnomalies', { @@ -415,12 +409,6 @@ function createNavTree({ streamsAvailable }: { streamsAvailable?: boolean }) { defaultMessage: 'Logs categories', }), }, - { - link: 'logs:settings', - title: i18n.translate('xpack.observability.obltNav.otherTools.logsSettings', { - defaultMessage: 'Logs settings', - }), - }, { link: 'maps' }, { link: 'canvas' }, { link: 'graph' }, diff --git a/x-pack/test/functional/apps/infra/logs/log_stream.ts b/x-pack/test/functional/apps/infra/logs/log_stream.ts index 16dcc038f7aab..b8f926380e632 100644 --- a/x-pack/test/functional/apps/infra/logs/log_stream.ts +++ b/x-pack/test/functional/apps/infra/logs/log_stream.ts @@ -6,7 +6,6 @@ */ import expect from '@kbn/expect'; -import { OBSERVABILITY_ENABLE_LOGS_STREAM } from '@kbn/management-settings-ids'; import { URL } from 'url'; import { FtrProviderContext } from '../../../ftr_provider_context'; @@ -17,20 +16,17 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { const retry = getService('retry'); const browser = getService('browser'); const esArchiver = getService('esArchiver'); - const kibanaServer = getService('kibanaServer'); - describe('Log stream', function () { + describe.skip('Log stream', function () { describe('Legacy URL handling', () => { describe('Correctly handles legacy versions of logFilter', () => { before(async () => { await esArchiver.load('x-pack/test/functional/es_archives/infra/8.0.0/logs_and_metrics'); - await kibanaServer.uiSettings.update({ [OBSERVABILITY_ENABLE_LOGS_STREAM]: true }); }); after(async () => { await esArchiver.unload( 'x-pack/test/functional/es_archives/infra/8.0.0/logs_and_metrics' ); - await kibanaServer.uiSettings.update({ [OBSERVABILITY_ENABLE_LOGS_STREAM]: false }); }); it('Expression and kind', async () => { const location = { diff --git a/x-pack/test/functional/apps/infra/logs/log_stream_date_nano.ts b/x-pack/test/functional/apps/infra/logs/log_stream_date_nano.ts index 141d1bc38c3d3..eb0e23083ad6b 100644 --- a/x-pack/test/functional/apps/infra/logs/log_stream_date_nano.ts +++ b/x-pack/test/functional/apps/infra/logs/log_stream_date_nano.ts @@ -6,7 +6,6 @@ */ import expect from '@kbn/expect'; -import { OBSERVABILITY_ENABLE_LOGS_STREAM } from '@kbn/management-settings-ids'; import { FtrProviderContext } from '../../../ftr_provider_context'; import { DATES } from '../constants'; @@ -15,7 +14,6 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { const esArchiver = getService('esArchiver'); const logsUi = getService('logsUi'); const find = getService('find'); - const kibanaServer = getService('kibanaServer'); const logFilter = { timeRange: { from: DATES.metricsAndLogs.stream.startWithData, @@ -23,14 +21,12 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { }, }; - describe('Log stream supports nano precision', function () { + describe.skip('Log stream supports nano precision', function () { before(async () => { await esArchiver.load('x-pack/test/functional/es_archives/infra/logs_with_nano_date'); - await kibanaServer.uiSettings.update({ [OBSERVABILITY_ENABLE_LOGS_STREAM]: true }); }); after(async () => { await esArchiver.unload('x-pack/test/functional/es_archives/infra/logs_with_nano_date'); - await kibanaServer.uiSettings.update({ [OBSERVABILITY_ENABLE_LOGS_STREAM]: false }); }); it('should display logs entries containing date_nano timestamps properly ', async () => { diff --git a/x-pack/test/functional/apps/infra/logs/logs_source_configuration.ts b/x-pack/test/functional/apps/infra/logs/logs_source_configuration.ts index 84158051021c3..27fa95ca16696 100644 --- a/x-pack/test/functional/apps/infra/logs/logs_source_configuration.ts +++ b/x-pack/test/functional/apps/infra/logs/logs_source_configuration.ts @@ -10,7 +10,6 @@ import { ELASTIC_HTTP_VERSION_HEADER, X_ELASTIC_INTERNAL_ORIGIN_REQUEST, } from '@kbn/core-http-common'; -import { OBSERVABILITY_ENABLE_LOGS_STREAM } from '@kbn/management-settings-ids'; import { DATES } from '../constants'; import { FtrProviderContext } from '../../../ftr_provider_context'; @@ -29,14 +28,12 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { const supertest = getService('supertest'); const kibanaServer = getService('kibanaServer'); - describe('Logs Source Configuration', function () { + describe.skip('Logs Source Configuration', function () { before(async () => { await kibanaServer.savedObjects.cleanStandardList(); - await kibanaServer.uiSettings.update({ [OBSERVABILITY_ENABLE_LOGS_STREAM]: true }); }); after(async () => { await kibanaServer.savedObjects.cleanStandardList(); - await kibanaServer.uiSettings.update({ [OBSERVABILITY_ENABLE_LOGS_STREAM]: false }); }); describe('Allows indices configuration', () => { diff --git a/x-pack/test/functional/apps/infra/page_not_found.ts b/x-pack/test/functional/apps/infra/page_not_found.ts index eb1fc77b4f9f9..38860eae0ad71 100644 --- a/x-pack/test/functional/apps/infra/page_not_found.ts +++ b/x-pack/test/functional/apps/infra/page_not_found.ts @@ -6,36 +6,26 @@ */ import expect from '@kbn/expect'; -import { OBSERVABILITY_ENABLE_LOGS_STREAM } from '@kbn/management-settings-ids'; import { FtrProviderContext } from '../../ftr_provider_context'; -const logsPages = ['logs/stream', 'logs/anomalies', 'logs/log-categories', 'logs/settings']; +const logsPages = ['logs/anomalies', 'logs/log-categories']; const metricsPages = [ 'metrics/inventory', 'metrics/hosts', 'metrics/explorer', - 'metrics/settings', 'metrics/detail/hosts/host_name', ]; export default ({ getPageObjects, getService }: FtrProviderContext) => { const pageObjects = getPageObjects(['common', 'infraHome']); const find = getService('find'); - const kibanaServer = getService('kibanaServer'); const testSubjects = getService('testSubjects'); describe('Infra Not Found page', function () { this.tags('includeFirefox'); describe('Logs', () => { - before(async () => { - await kibanaServer.uiSettings.update({ [OBSERVABILITY_ENABLE_LOGS_STREAM]: true }); - }); - after(async () => { - await kibanaServer.uiSettings.update({ [OBSERVABILITY_ENABLE_LOGS_STREAM]: false }); - }); - it('should render the not found page when the route does not exist', async () => { await pageObjects.common.navigateToApp('logs/broken-link'); await testSubjects.existOrFail('infraNotFoundPage');