Remove observability:logsExplorer:allowedDataViews advanced setting (#209120)

## 📓 Summary
Removes the `observability:logsExplorer:allowedDataViews` advanced
setting that was introduced by
https://github.com/elastic/kibana/pull/178602 as Logs Explorer is [no
longer available](https://github.com/elastic/kibana/pull/203685) in
Serverless and 9.0.

Closes https://github.com/elastic/kibana/issues/209092

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
This commit is contained in:
Giorgos Bamparopoulos 2025-02-06 13:28:00 +00:00 committed by GitHub
parent 7ff24bc35f
commit 3e5f55dd02
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 8 additions and 82 deletions

View file

@ -132,8 +132,6 @@ export const OBSERVABILITY_APM_ENABLE_PROFILING_INTEGRATION_ID =
export const OBSERVABILITY_APM_ENABLE_TABLE_SEARCH_BAR = 'observability:apmEnableTableSearchBar';
export const OBSERVABILITY_APM_ENABLE_SERVICE_INVENTORY_TABLE_SEARCH_BAR =
'observability:apmEnableServiceInventoryTableSearchBar';
export const OBSERVABILITY_LOGS_EXPLORER_ALLOWED_DATA_VIEWS_ID =
'observability:logsExplorer:allowedDataViews';
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';

View file

@ -28,7 +28,6 @@ export const OBSERVABILITY_PROJECT_SETTINGS = [
settings.OBSERVABILITY_ENABLE_AWS_LAMBDA_METRICS_ID,
settings.OBSERVABILITY_APM_ENABLE_CRITICAL_PATH_ID,
settings.OBSERVABILITY_ENABLE_INFRASTRUCTURE_ASSET_CUSTOM_DASHBOARDS_ID,
settings.OBSERVABILITY_LOGS_EXPLORER_ALLOWED_DATA_VIEWS_ID,
settings.OBSERVABILITY_APM_ENABLE_TABLE_SEARCH_BAR,
settings.OBSERVABILITY_APM_ENABLE_SERVICE_INVENTORY_TABLE_SEARCH_BAR,
settings.OBSERVABILITY_ENTITY_CENTRIC_EXPERIENCE,

View file

@ -492,13 +492,6 @@ export const stackManagementSchema: MakeSchemaFrom<UsageStats> = {
type: 'text',
_meta: { description: 'Non-default value of setting.' },
},
'observability:logsExplorer:allowedDataViews': {
type: 'array',
items: {
type: 'keyword',
_meta: { description: 'Non-default value of setting.' },
},
},
'observability:logSources': {
type: 'array',
items: {

View file

@ -49,7 +49,6 @@ export interface UsageStats {
'observability:apmAgentExplorerView': boolean;
'observability:apmEnableTableSearchBar': boolean;
'observability:apmEnableServiceInventoryTableSearchBar': boolean;
'observability:logsExplorer:allowedDataViews': string[];
'observability:logSources': string[];
'observability:newLogsOverview': boolean;
'observability:aiAssistantSimulatedFunctionCalling': boolean;

View file

@ -11030,15 +11030,6 @@
"description": "Non-default value of setting."
}
},
"observability:logsExplorer:allowedDataViews": {
"type": "array",
"items": {
"type": "keyword",
"_meta": {
"description": "Non-default value of setting."
}
}
},
"observability:logSources": {
"type": "array",
"items": {

View file

@ -24642,8 +24642,6 @@
"xpack.logsDataAccess.logSourcesSettingInfo.logSourcesSettingLabel": "Paramètre avancé des sources de logs",
"xpack.logsDataAccess.logSourcesSettingInfo.logSourcesSettingLinkText": "page des paramètres avancés",
"xpack.logsDataAccess.logSourcesSettingInfo.logSourcesSettingTitle": "Sources de log",
"xpack.logsExplorer.allowedDataViews": "Logs Explorer a autorisé les vues de données",
"xpack.logsExplorer.allowedDataViewsDescription": "Une liste de modèles de base permettant de faire correspondre et d'explorer les vues de données dans Logs Explorer. Les clusters distants seront automatiquement mis en correspondance avec les modèles de base fournis.",
"xpack.logsExplorer.dataSourceSelection.createAdHocDataViewFailedToastMessage": "La section par défaut a été modifiée en \"All log datasets\" (Tous les logs des ensembles de données)",
"xpack.logsExplorer.dataSourceSelection.createAdHocDataViewFailedToastTitle": "Nous n'avons pas pu créer de vue des données pour votre sélection.",
"xpack.logsExplorer.dataSourceSelection.restoreDatasetSelectionFailedToastMessage": "La section par défaut a été modifiée en \"All log datasets\" (Tous les logs des ensembles de données)",

View file

@ -24508,8 +24508,6 @@
"xpack.logsDataAccess.logSourcesSettingInfo.logSourcesSettingLabel": "ログソース詳細設定",
"xpack.logsDataAccess.logSourcesSettingInfo.logSourcesSettingLinkText": "詳細設定ページ",
"xpack.logsDataAccess.logSourcesSettingInfo.logSourcesSettingTitle": "ログソース",
"xpack.logsExplorer.allowedDataViews": "ログエクスプローラーで許可されたデータビュー",
"xpack.logsExplorer.allowedDataViewsDescription": "ログエクスプローラーでデータビューを照合および探索するための基本パターンのリスト。リモートクラスターは、指定された基本パターンに対して自動的に照合されます。",
"xpack.logsExplorer.dataSourceSelection.createAdHocDataViewFailedToastMessage": "\"すべてのログデータセット\"をデフォルトの選択として切り替えました。",
"xpack.logsExplorer.dataSourceSelection.createAdHocDataViewFailedToastTitle": "選択されたデータビューを作成できませんでした。",
"xpack.logsExplorer.dataSourceSelection.restoreDatasetSelectionFailedToastMessage": "\"すべてのログデータセット\"をデフォルトの選択として切り替えました。",

View file

@ -24100,8 +24100,6 @@
"xpack.logsDataAccess.logSourcesSettingInfo.logSourcesSettingLabel": "日志源高级设置",
"xpack.logsDataAccess.logSourcesSettingInfo.logSourcesSettingLinkText": "高级设置页面",
"xpack.logsDataAccess.logSourcesSettingInfo.logSourcesSettingTitle": "日志源",
"xpack.logsExplorer.allowedDataViews": "日志浏览器允许的数据视图",
"xpack.logsExplorer.allowedDataViewsDescription": "在日志浏览器中匹配并浏览数据视图的基本模式列表。提供的基本模式会自动匹配远程集群。",
"xpack.logsExplorer.dataSourceSelection.createAdHocDataViewFailedToastMessage": "我们已切换到'所有日志数据集',将其作为默认选择。",
"xpack.logsExplorer.dataSourceSelection.createAdHocDataViewFailedToastTitle": "无法为您选择的内容创建数据视图。",
"xpack.logsExplorer.dataSourceSelection.restoreDatasetSelectionFailedToastMessage": "我们已切换到'所有日志数据集',将其作为默认选择。",

View file

@ -1,39 +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.
*/
import { schema } from '@kbn/config-schema';
import { UiSettingsParams } from '@kbn/core-ui-settings-common';
import { DEFAULT_ALLOWED_LOGS_BASE_PATTERNS } from '@kbn/discover-utils';
import { i18n } from '@kbn/i18n';
import { OBSERVABILITY_LOGS_EXPLORER_ALLOWED_DATA_VIEWS_ID } from '@kbn/management-settings-ids';
/**
* uiSettings definitions for Logs Explorer.
*/
export const uiSettings: Record<string, UiSettingsParams> = {
[OBSERVABILITY_LOGS_EXPLORER_ALLOWED_DATA_VIEWS_ID]: {
category: ['observability'],
name: i18n.translate('xpack.logsExplorer.allowedDataViews', {
defaultMessage: 'Logs Explorer allowed data views',
}),
value: DEFAULT_ALLOWED_LOGS_BASE_PATTERNS,
description: i18n.translate('xpack.logsExplorer.allowedDataViewsDescription', {
defaultMessage:
'A list of base patterns to match and explore data views in Logs Explorer. Remote clusters will be automatically matched for the provided base patterns.',
}),
deprecation: {
message: i18n.translate('xpack.logsExplorer.allowedDataViewsDeprecationWarning', {
defaultMessage:
'Logs Explorer is deprecated, and this setting will be removed in Kibana 9.0.',
}),
docLinksKey: 'generalSettings',
},
type: 'array',
schema: schema.arrayOf(schema.string()),
requiresPageReload: true,
},
};

View file

@ -10,7 +10,7 @@ import createContainer from 'constate';
import { useInterpret, useSelector } from '@xstate/react';
import { DataViewsPublicPluginStart } from '@kbn/data-views-plugin/public';
import { CoreStart } from '@kbn/core/public';
import { OBSERVABILITY_LOGS_EXPLORER_ALLOWED_DATA_VIEWS_ID } from '@kbn/management-settings-ids';
import { DEFAULT_ALLOWED_LOGS_BASE_PATTERNS } from '@kbn/discover-utils';
import { DataViewDescriptor } from '../../common/data_views/models/data_view_descriptor';
import { SortOrder } from '../../common/latest';
import { DataViewsFilterParams, createDataViewsStateMachine } from '../state_machines/data_views';
@ -53,11 +53,8 @@ const useDataViews = ({ core, dataViewsService, events }: DataViewsContextDeps)
// Test whether a data view can be explored in Logs Explorer based on the settings
const isDataViewAllowed: IsDataViewAllowed = useCallback(
(dataView) =>
dataView.testAgainstAllowedList(
core.uiSettings.get(OBSERVABILITY_LOGS_EXPLORER_ALLOWED_DATA_VIEWS_ID)
),
[core.uiSettings]
(dataView) => dataView.testAgainstAllowedList(DEFAULT_ALLOWED_LOGS_BASE_PATTERNS),
[]
);
// Test whether a data view can be explored in Logs Explorer based on the settings or has fallback handler

View file

@ -8,7 +8,7 @@
import { DataViewsPublicPluginStart } from '@kbn/data-views-plugin/public';
import { InvokeCreator } from 'xstate';
import { IUiSettingsClient } from '@kbn/core/public';
import { OBSERVABILITY_LOGS_EXPLORER_ALLOWED_DATA_VIEWS_ID } from '@kbn/management-settings-ids';
import { DEFAULT_ALLOWED_LOGS_BASE_PATTERNS } from '@kbn/discover-utils';
import { LogsExplorerCustomizations } from '../../../../controller';
import { Dataset } from '../../../../../common/datasets';
import {
@ -68,7 +68,7 @@ export const initializeSelection =
*/
if (
!dataViewSelection.selection.dataView.testAgainstAllowedList(
uiSettings.get(OBSERVABILITY_LOGS_EXPLORER_ALLOWED_DATA_VIEWS_ID)
DEFAULT_ALLOWED_LOGS_BASE_PATTERNS
) &&
events?.onUknownDataViewSelection
) {

View file

@ -10,7 +10,7 @@ import { IToasts, IUiSettingsClient } from '@kbn/core/public';
import { QueryStart } from '@kbn/data-plugin/public';
import { actions, createMachine, interpret, InterpreterFrom, raise } from 'xstate';
import { DataViewsPublicPluginStart } from '@kbn/data-views-plugin/public';
import { OBSERVABILITY_LOGS_EXPLORER_ALLOWED_DATA_VIEWS_ID } from '@kbn/management-settings-ids';
import { DEFAULT_ALLOWED_LOGS_BASE_PATTERNS } from '@kbn/discover-utils';
import type { LogsExplorerCustomizations, LogsExplorerPublicEvent } from '../../../controller';
import { ControlPanelRT } from '../../../../common/control_panels';
import {
@ -363,7 +363,7 @@ export const createLogsExplorerControllerStateMachine = ({
isDataViewAllowed: (_context, event) => {
if (event.type === 'UPDATE_DATA_SOURCE_SELECTION' && isDataViewSelection(event.data)) {
return event.data.selection.dataView.testAgainstAllowedList(
uiSettings.get(OBSERVABILITY_LOGS_EXPLORER_ALLOWED_DATA_VIEWS_ID)
DEFAULT_ALLOWED_LOGS_BASE_PATTERNS
);
}
return false;
@ -371,7 +371,7 @@ export const createLogsExplorerControllerStateMachine = ({
isDataViewNotAllowed: (_context, event) => {
if (event.type === 'UPDATE_DATA_SOURCE_SELECTION' && isDataViewSelection(event.data)) {
return !event.data.selection.dataView.testAgainstAllowedList(
uiSettings.get(OBSERVABILITY_LOGS_EXPLORER_ALLOWED_DATA_VIEWS_ID)
DEFAULT_ALLOWED_LOGS_BASE_PATTERNS
);
}
return false;

View file

@ -6,13 +6,10 @@
*/
import { Plugin, CoreSetup } from '@kbn/core/server';
import { uiSettings } from '../common/ui_settings';
import type { LogsExplorerSetupDeps } from './types';
export class LogsExplorerServerPlugin implements Plugin {
setup(core: CoreSetup, plugins: LogsExplorerSetupDeps) {
core.uiSettings.register(uiSettings);
return {};
}

View file

@ -12,12 +12,10 @@
],
"kbn_references": [
"@kbn/charts-plugin",
"@kbn/config-schema",
"@kbn/controls-plugin",
"@kbn/core-application-browser",
"@kbn/core-http-browser",
"@kbn/core-ui-settings-browser",
"@kbn/core-ui-settings-common",
"@kbn/core",
"@kbn/data-plugin",
"@kbn/data-views-plugin",
@ -32,7 +30,6 @@
"@kbn/io-ts-utils",
"@kbn/kibana-react-plugin",
"@kbn/kibana-utils-plugin",
"@kbn/management-settings-ids",
"@kbn/navigation-plugin",
"@kbn/router-utils",
"@kbn/share-plugin",