From 1b92d5fc7f32cb03d9c70aad253b05ef62fc6dd1 Mon Sep 17 00:00:00 2001 From: jennypavlova Date: Mon, 28 Oct 2024 18:17:02 +0100 Subject: [PATCH] [ObsUx][Infra] Remove no longer used feature flags for GA features (#197684) Closes #197612 ## Summary This PR removes the feature flags (`observability:enableInfrastructureHostsView` and `enableInfrastructureContainerAssetView` ) for host and container views Feature settings under `Infrastructure > Settings` (ignore the profiling one) | Before | After | | ------ | ----- | |![image](https://github.com/user-attachments/assets/f7ee9585-e96c-4492-9116-8de3c5e0c9c6) | ![image](https://github.com/user-attachments/assets/1c75e229-bd29-45c5-a354-cfdcb324ea9d) | ## Testing: The feature flags should not appear in the settings The Host menu item should be visible The Container asset views should be always enabled and visible (without an option to disable them) The Host asset views should be always enabled and visible (without an option to disable them) https://github.com/user-attachments/assets/a4d574d0-2669-4f96-88a4-a40c2f5023c2 --- .../kbn_management_settings_ids.devdocs.json | 30 --- api_docs/observability.devdocs.json | 228 ------------------ .../settings/setting_ids/index.ts | 4 - .../settings/observability_project/index.ts | 2 - .../server/collectors/management/schema.ts | 8 - .../server/collectors/management/types.ts | 2 - src/plugins/telemetry/schema/oss_plugins.json | 12 - .../infra/public/pages/metrics/index.tsx | 6 +- .../inventory_view/components/waffle/node.tsx | 6 +- .../pages/metrics/metric_detail/index.tsx | 7 +- .../settings/features_configuration_panel.tsx | 14 -- .../source_configuration_settings.tsx | 4 - .../infra/public/plugin.ts | 50 ++-- .../observability/common/index.ts | 2 - .../observability/common/ui_settings_keys.ts | 3 - .../observability/public/index.ts | 2 - .../observability/server/ui_settings.ts | 27 --- .../translations/translations/fr-FR.json | 4 - .../translations/translations/ja-JP.json | 4 - .../translations/translations/zh-CN.json | 4 - .../functional/apps/infra/node_details.ts | 30 +-- .../observability/infra/navigation.ts | 23 -- 22 files changed, 21 insertions(+), 451 deletions(-) diff --git a/api_docs/kbn_management_settings_ids.devdocs.json b/api_docs/kbn_management_settings_ids.devdocs.json index 716f5512821b5..068892a8dc375 100644 --- a/api_docs/kbn_management_settings_ids.devdocs.json +++ b/api_docs/kbn_management_settings_ids.devdocs.json @@ -1372,36 +1372,6 @@ "trackAdoption": false, "initialIsOpen": false }, - { - "parentPluginId": "@kbn/management-settings-ids", - "id": "def-common.OBSERVABILITY_ENABLE_INFRASTRUCTURE_CONTAINER_ASSET_VIEW_ID", - "type": "string", - "tags": [], - "label": "OBSERVABILITY_ENABLE_INFRASTRUCTURE_CONTAINER_ASSET_VIEW_ID", - "description": [], - "signature": [ - "\"observability:enableInfrastructureContainerAssetView\"" - ], - "path": "packages/kbn-management/settings/setting_ids/index.ts", - "deprecated": false, - "trackAdoption": false, - "initialIsOpen": false - }, - { - "parentPluginId": "@kbn/management-settings-ids", - "id": "def-common.OBSERVABILITY_ENABLE_INFRASTRUCTURE_HOSTS_VIEW_ID", - "type": "string", - "tags": [], - "label": "OBSERVABILITY_ENABLE_INFRASTRUCTURE_HOSTS_VIEW_ID", - "description": [], - "signature": [ - "\"observability:enableInfrastructureHostsView\"" - ], - "path": "packages/kbn-management/settings/setting_ids/index.ts", - "deprecated": false, - "trackAdoption": false, - "initialIsOpen": false - }, { "parentPluginId": "@kbn/management-settings-ids", "id": "def-common.OBSERVABILITY_ENABLE_INSPECT_ES_QUERIES_ID", diff --git a/api_docs/observability.devdocs.json b/api_docs/observability.devdocs.json index 5c875c4abbd9a..6f87ad7be9bee 100644 --- a/api_docs/observability.devdocs.json +++ b/api_docs/observability.devdocs.json @@ -4547,36 +4547,6 @@ "trackAdoption": false, "initialIsOpen": false }, - { - "parentPluginId": "observability", - "id": "def-public.enableInfrastructureContainerAssetView", - "type": "string", - "tags": [], - "label": "enableInfrastructureContainerAssetView", - "description": [], - "signature": [ - "\"observability:enableInfrastructureContainerAssetView\"" - ], - "path": "x-pack/plugins/observability_solution/observability/common/ui_settings_keys.ts", - "deprecated": false, - "trackAdoption": false, - "initialIsOpen": false - }, - { - "parentPluginId": "observability", - "id": "def-public.enableInfrastructureHostsView", - "type": "string", - "tags": [], - "label": "enableInfrastructureHostsView", - "description": [], - "signature": [ - "\"observability:enableInfrastructureHostsView\"" - ], - "path": "x-pack/plugins/observability_solution/observability/common/ui_settings_keys.ts", - "deprecated": false, - "trackAdoption": false, - "initialIsOpen": false - }, { "parentPluginId": "observability", "id": "def-public.enableInspectEsQueries", @@ -10244,174 +10214,6 @@ } ] }, - { - "parentPluginId": "observability", - "id": "def-server.uiSettings.enableInfrastructureHostsView", - "type": "Object", - "tags": [], - "label": "[enableInfrastructureHostsView]", - "description": [], - "path": "x-pack/plugins/observability_solution/observability/server/ui_settings.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "observability", - "id": "def-server.uiSettings.enableInfrastructureHostsView.category", - "type": "Array", - "tags": [], - "label": "category", - "description": [], - "signature": [ - "string[]" - ], - "path": "x-pack/plugins/observability_solution/observability/server/ui_settings.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "observability", - "id": "def-server.uiSettings.enableInfrastructureHostsView.name", - "type": "string", - "tags": [], - "label": "name", - "description": [], - "path": "x-pack/plugins/observability_solution/observability/server/ui_settings.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "observability", - "id": "def-server.uiSettings.enableInfrastructureHostsView.value", - "type": "boolean", - "tags": [], - "label": "value", - "description": [], - "signature": [ - "true" - ], - "path": "x-pack/plugins/observability_solution/observability/server/ui_settings.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "observability", - "id": "def-server.uiSettings.enableInfrastructureHostsView.description", - "type": "string", - "tags": [], - "label": "description", - "description": [], - "path": "x-pack/plugins/observability_solution/observability/server/ui_settings.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "observability", - "id": "def-server.uiSettings.enableInfrastructureHostsView.schema", - "type": "Object", - "tags": [], - "label": "schema", - "description": [], - "signature": [ - { - "pluginId": "@kbn/config-schema", - "scope": "common", - "docId": "kibKbnConfigSchemaPluginApi", - "section": "def-common.Type", - "text": "Type" - }, - "" - ], - "path": "x-pack/plugins/observability_solution/observability/server/ui_settings.ts", - "deprecated": false, - "trackAdoption": false - } - ] - }, - { - "parentPluginId": "observability", - "id": "def-server.uiSettings.enableInfrastructureContainerAssetView", - "type": "Object", - "tags": [], - "label": "[enableInfrastructureContainerAssetView]", - "description": [], - "path": "x-pack/plugins/observability_solution/observability/server/ui_settings.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "observability", - "id": "def-server.uiSettings.enableInfrastructureContainerAssetView.category", - "type": "Array", - "tags": [], - "label": "category", - "description": [], - "signature": [ - "string[]" - ], - "path": "x-pack/plugins/observability_solution/observability/server/ui_settings.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "observability", - "id": "def-server.uiSettings.enableInfrastructureContainerAssetView.name", - "type": "string", - "tags": [], - "label": "name", - "description": [], - "path": "x-pack/plugins/observability_solution/observability/server/ui_settings.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "observability", - "id": "def-server.uiSettings.enableInfrastructureContainerAssetView.value", - "type": "boolean", - "tags": [], - "label": "value", - "description": [], - "signature": [ - "true" - ], - "path": "x-pack/plugins/observability_solution/observability/server/ui_settings.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "observability", - "id": "def-server.uiSettings.enableInfrastructureContainerAssetView.description", - "type": "string", - "tags": [], - "label": "description", - "description": [], - "path": "x-pack/plugins/observability_solution/observability/server/ui_settings.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "observability", - "id": "def-server.uiSettings.enableInfrastructureContainerAssetView.schema", - "type": "Object", - "tags": [], - "label": "schema", - "description": [], - "signature": [ - { - "pluginId": "@kbn/config-schema", - "scope": "common", - "docId": "kibKbnConfigSchemaPluginApi", - "section": "def-common.Type", - "text": "Type" - }, - "" - ], - "path": "x-pack/plugins/observability_solution/observability/server/ui_settings.ts", - "deprecated": false, - "trackAdoption": false - } - ] - }, { "parentPluginId": "observability", "id": "def-server.uiSettings.enableInfrastructureProfilingIntegration", @@ -14532,36 +14334,6 @@ "trackAdoption": false, "initialIsOpen": false }, - { - "parentPluginId": "observability", - "id": "def-common.enableInfrastructureContainerAssetView", - "type": "string", - "tags": [], - "label": "enableInfrastructureContainerAssetView", - "description": [], - "signature": [ - "\"observability:enableInfrastructureContainerAssetView\"" - ], - "path": "x-pack/plugins/observability_solution/observability/common/ui_settings_keys.ts", - "deprecated": false, - "trackAdoption": false, - "initialIsOpen": false - }, - { - "parentPluginId": "observability", - "id": "def-common.enableInfrastructureHostsView", - "type": "string", - "tags": [], - "label": "enableInfrastructureHostsView", - "description": [], - "signature": [ - "\"observability:enableInfrastructureHostsView\"" - ], - "path": "x-pack/plugins/observability_solution/observability/common/ui_settings_keys.ts", - "deprecated": false, - "trackAdoption": false, - "initialIsOpen": false - }, { "parentPluginId": "observability", "id": "def-common.enableInfrastructureProfilingIntegration", diff --git a/packages/kbn-management/settings/setting_ids/index.ts b/packages/kbn-management/settings/setting_ids/index.ts index e926007f77f25..551e99e4ef131 100644 --- a/packages/kbn-management/settings/setting_ids/index.ts +++ b/packages/kbn-management/settings/setting_ids/index.ts @@ -122,10 +122,6 @@ export const OBSERVABILITY_APM_TRACE_EXPLORER_TAB_ID = 'observability:apmTraceEx export const OBSERVABILITY_ENABLE_AWS_LAMBDA_METRICS_ID = 'observability:enableAwsLambdaMetrics'; export const OBSERVABILITY_ENABLE_COMPARISON_BY_DEFAULT_ID = 'observability:enableComparisonByDefault'; -export const OBSERVABILITY_ENABLE_INFRASTRUCTURE_HOSTS_VIEW_ID = - 'observability:enableInfrastructureHostsView'; -export const OBSERVABILITY_ENABLE_INFRASTRUCTURE_CONTAINER_ASSET_VIEW_ID = - 'observability:enableInfrastructureContainerAssetView'; export const OBSERVABILITY_ENABLE_INFRASTRUCTURE_ASSET_CUSTOM_DASHBOARDS_ID = 'observability:enableInfrastructureAssetCustomDashboards'; export const OBSERVABILITY_ENABLE_INSPECT_ES_QUERIES_ID = 'observability:enableInspectEsQueries'; diff --git a/packages/serverless/settings/observability_project/index.ts b/packages/serverless/settings/observability_project/index.ts index 44f30e4320463..d04b0238c5510 100644 --- a/packages/serverless/settings/observability_project/index.ts +++ b/packages/serverless/settings/observability_project/index.ts @@ -27,8 +27,6 @@ export const OBSERVABILITY_PROJECT_SETTINGS = [ settings.OBSERVABILITY_APM_TRACE_EXPLORER_TAB_ID, settings.OBSERVABILITY_ENABLE_AWS_LAMBDA_METRICS_ID, settings.OBSERVABILITY_APM_ENABLE_CRITICAL_PATH_ID, - settings.OBSERVABILITY_ENABLE_INFRASTRUCTURE_HOSTS_VIEW_ID, - settings.OBSERVABILITY_ENABLE_INFRASTRUCTURE_CONTAINER_ASSET_VIEW_ID, settings.OBSERVABILITY_ENABLE_INFRASTRUCTURE_ASSET_CUSTOM_DASHBOARDS_ID, settings.OBSERVABILITY_LOGS_EXPLORER_ALLOWED_DATA_VIEWS_ID, settings.OBSERVABILITY_APM_ENABLE_TABLE_SEARCH_BAR, 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 6b3db9460eb7c..779150faa89fb 100644 --- a/src/plugins/kibana_usage_collection/server/collectors/management/schema.ts +++ b/src/plugins/kibana_usage_collection/server/collectors/management/schema.ts @@ -642,14 +642,6 @@ export const stackManagementSchema: MakeSchemaFrom = { type: 'boolean', _meta: { description: 'Non-default value of setting.' }, }, - 'observability:enableInfrastructureHostsView': { - type: 'boolean', - _meta: { description: 'Non-default value of setting.' }, - }, - 'observability:enableInfrastructureContainerAssetView': { - type: 'boolean', - _meta: { description: 'Non-default value of setting.' }, - }, 'observability:enableInfrastructureProfilingIntegration': { type: 'boolean', _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 92076ebc302e2..2734ab6304319 100644 --- a/src/plugins/kibana_usage_collection/server/collectors/management/types.ts +++ b/src/plugins/kibana_usage_collection/server/collectors/management/types.ts @@ -46,8 +46,6 @@ export interface UsageStats { 'observability:apmEnableContinuousRollups': boolean; 'observability:apmAWSLambdaPriceFactor': string; 'observability:apmAWSLambdaRequestCostPerMillion': number; - 'observability:enableInfrastructureHostsView': boolean; - 'observability:enableInfrastructureContainerAssetView': boolean; 'observability:enableInfrastructureProfilingIntegration': boolean; 'observability:enableInfrastructureAssetCustomDashboards': boolean; 'observability:apmAgentExplorerView': boolean; diff --git a/src/plugins/telemetry/schema/oss_plugins.json b/src/plugins/telemetry/schema/oss_plugins.json index c71718cfaa5a6..d54a75b313cd8 100644 --- a/src/plugins/telemetry/schema/oss_plugins.json +++ b/src/plugins/telemetry/schema/oss_plugins.json @@ -10815,18 +10815,6 @@ "description": "Non-default value of setting." } }, - "observability:enableInfrastructureHostsView": { - "type": "boolean", - "_meta": { - "description": "Non-default value of setting." - } - }, - "observability:enableInfrastructureContainerAssetView": { - "type": "boolean", - "_meta": { - "description": "Non-default value of setting." - } - }, "observability:enableInfrastructureProfilingIntegration": { "type": "boolean", "_meta": { diff --git a/x-pack/plugins/observability_solution/infra/public/pages/metrics/index.tsx b/x-pack/plugins/observability_solution/infra/public/pages/metrics/index.tsx index 1d0e394b281d4..7a0289d461af7 100644 --- a/x-pack/plugins/observability_solution/infra/public/pages/metrics/index.tsx +++ b/x-pack/plugins/observability_solution/infra/public/pages/metrics/index.tsx @@ -17,9 +17,8 @@ import { EuiFlexGroup, EuiFlexItem, } from '@elastic/eui'; -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 { enableInfrastructureHostsView } from '@kbn/observability-plugin/common'; import { SharePublicStart } from '@kbn/share-plugin/public/plugin'; import { ObservabilityOnboardingLocatorParams, @@ -60,7 +59,6 @@ export const InfrastructurePage = () => { const config = usePluginConfig(); const { application } = useKibana<{ share: SharePublicStart }>().services; const { setHeaderActionMenu, theme$ } = useContext(HeaderActionMenuContext); - const isHostsViewEnabled = useUiSetting(enableInfrastructureHostsView); const uiCapabilities = application?.capabilities; @@ -128,7 +126,7 @@ export const InfrastructurePage = () => { )} - {isHostsViewEnabled ? : null} + diff --git a/x-pack/plugins/observability_solution/infra/public/pages/metrics/inventory_view/components/waffle/node.tsx b/x-pack/plugins/observability_solution/infra/public/pages/metrics/inventory_view/components/waffle/node.tsx index fb787e8df7c5b..02e4e634d30d1 100644 --- a/x-pack/plugins/observability_solution/infra/public/pages/metrics/inventory_view/components/waffle/node.tsx +++ b/x-pack/plugins/observability_solution/infra/public/pages/metrics/inventory_view/components/waffle/node.tsx @@ -11,8 +11,6 @@ import { first } from 'lodash'; import { EuiPopover, EuiToolTip } from '@elastic/eui'; import { InventoryItemType } from '@kbn/metrics-data-access-plugin/common'; import { useBoolean } from '@kbn/react-hooks'; -import { useUiSetting } from '@kbn/kibana-react-plugin/public'; -import { enableInfrastructureContainerAssetView } from '@kbn/observability-plugin/common'; import { InfraWaffleMapBounds, InfraWaffleMapNode, @@ -55,9 +53,7 @@ export const Node = ({ const color = colorFromValue(options.legend, rawValue, bounds); const value = formatter(rawValue); - const isContainerAssetViewEnabled = useUiSetting(enableInfrastructureContainerAssetView); - const showContainerAssetDetailPage = nodeType === 'container' && isContainerAssetViewEnabled; - const isFlyoutMode = nodeType === 'host' || showContainerAssetDetailPage; + const isFlyoutMode = nodeType === 'host' || nodeType === 'container'; const toggleAssetPopover = () => { if (isFlyoutMode) { diff --git a/x-pack/plugins/observability_solution/infra/public/pages/metrics/metric_detail/index.tsx b/x-pack/plugins/observability_solution/infra/public/pages/metrics/metric_detail/index.tsx index b41de1b7b9e3a..064973ebd92f6 100644 --- a/x-pack/plugins/observability_solution/infra/public/pages/metrics/metric_detail/index.tsx +++ b/x-pack/plugins/observability_solution/infra/public/pages/metrics/metric_detail/index.tsx @@ -8,9 +8,7 @@ import { EuiErrorBoundary } from '@elastic/eui'; import React from 'react'; import { useRouteMatch } from 'react-router-dom'; -import { useUiSetting } from '@kbn/kibana-react-plugin/public'; import type { InventoryItemType } from '@kbn/metrics-data-access-plugin/common'; -import { enableInfrastructureContainerAssetView } from '@kbn/observability-plugin/common'; import { AssetDetailPage } from './asset_detail_page'; import { MetricDetailPage } from './metric_detail_page'; import { MetricsTimeProvider } from './hooks/use_metrics_time'; @@ -20,12 +18,9 @@ export const NodeDetail = () => { params: { type: nodeType }, } = useRouteMatch<{ type: InventoryItemType; node: string }>(); - const isContainerAssetViewEnabled = useUiSetting(enableInfrastructureContainerAssetView); - - const showContainerAssetDetailPage = nodeType === 'container' && isContainerAssetViewEnabled; return ( - {nodeType === 'host' || showContainerAssetDetailPage ? ( + {nodeType === 'host' || nodeType === 'container' ? ( ) : ( diff --git a/x-pack/plugins/observability_solution/infra/public/pages/metrics/settings/features_configuration_panel.tsx b/x-pack/plugins/observability_solution/infra/public/pages/metrics/settings/features_configuration_panel.tsx index d8df6ef8b39fa..df8b78b5ef64b 100644 --- a/x-pack/plugins/observability_solution/infra/public/pages/metrics/settings/features_configuration_panel.tsx +++ b/x-pack/plugins/observability_solution/infra/public/pages/metrics/settings/features_configuration_panel.tsx @@ -11,10 +11,8 @@ import { EuiForm } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n-react'; import React from 'react'; import { - enableInfrastructureHostsView, enableInfrastructureProfilingIntegration, enableInfrastructureAssetCustomDashboards, - enableInfrastructureContainerAssetView, } from '@kbn/observability-plugin/common'; import { useEditableSettings } from '@kbn/observability-shared-plugin/public'; import { withSuspense } from '@kbn/shared-ux-utility'; @@ -71,12 +69,6 @@ export function FeaturesConfigurationPanel({ validateChange: async () => settingsValidationResponse, }} > - )} - ); diff --git a/x-pack/plugins/observability_solution/infra/public/pages/metrics/settings/source_configuration_settings.tsx b/x-pack/plugins/observability_solution/infra/public/pages/metrics/settings/source_configuration_settings.tsx index de078dcb354df..8deaa805ba9b4 100644 --- a/x-pack/plugins/observability_solution/infra/public/pages/metrics/settings/source_configuration_settings.tsx +++ b/x-pack/plugins/observability_solution/infra/public/pages/metrics/settings/source_configuration_settings.tsx @@ -14,8 +14,6 @@ import { useEditableSettings, } from '@kbn/observability-shared-plugin/public'; import { - enableInfrastructureContainerAssetView, - enableInfrastructureHostsView, enableInfrastructureProfilingIntegration, enableInfrastructureAssetCustomDashboards, } from '@kbn/observability-plugin/common'; @@ -87,10 +85,8 @@ export const SourceConfigurationSettings = ({ getUnsavedChanges, } = useSourceConfigurationFormState(source?.configuration); const infraUiSettings = useEditableSettings([ - enableInfrastructureHostsView, enableInfrastructureProfilingIntegration, enableInfrastructureAssetCustomDashboards, - enableInfrastructureContainerAssetView, ]); const resetAllUnsavedChanges = useCallback(() => { diff --git a/x-pack/plugins/observability_solution/infra/public/plugin.ts b/x-pack/plugins/observability_solution/infra/public/plugin.ts index daaa3510e1660..2324c5a633e2a 100644 --- a/x-pack/plugins/observability_solution/infra/public/plugin.ts +++ b/x-pack/plugins/observability_solution/infra/public/plugin.ts @@ -15,7 +15,6 @@ import { AppDeepLinkLocations, } from '@kbn/core/public'; import { i18n } from '@kbn/i18n'; -import { enableInfrastructureHostsView } from '@kbn/observability-plugin/public'; import { METRICS_EXPLORER_LOCATOR_ID, MetricsExplorerLocatorParams, @@ -131,10 +130,7 @@ export class Plugin implements InfraClientPluginClass { messageFields: this.config.sources?.default?.fields?.message, }); - const startDep$AndHostViewFlag$ = combineLatest([ - from(core.getStartServices()), - core.settings.client.get$(enableInfrastructureHostsView), - ]); + const startDep$AndHostViewFlag$ = combineLatest([from(core.getStartServices())]); const logRoutes = getLogsAppRoutes({ isLogsStreamEnabled }); @@ -148,7 +144,6 @@ export class Plugin implements InfraClientPluginClass { application: { capabilities }, }, ], - isInfrastructureHostsViewEnabled, ]) => { const { infrastructure, logs } = capabilities; return [ @@ -185,15 +180,11 @@ export class Plugin implements InfraClientPluginClass { }, ] : []), - ...(isInfrastructureHostsViewEnabled - ? [ - { - label: hostsTitle, - app: 'metrics', - path: '/hosts', - }, - ] - : []), + { + label: hostsTitle, + app: 'metrics', + path: '/hosts', + }, ], }, ] @@ -243,10 +234,8 @@ export class Plugin implements InfraClientPluginClass { // !! Need to be kept in sync with the routes in x-pack/plugins/observability_solution/infra/public/pages/metrics/index.tsx const getInfraDeepLinks = ({ - hostsEnabled, metricsExplorerEnabled, }: { - hostsEnabled: boolean; metricsExplorerEnabled: boolean; }): AppDeepLink[] => { const visibleIn: AppDeepLinkLocations[] = ['globalSearch']; @@ -258,18 +247,14 @@ export class Plugin implements InfraClientPluginClass { path: '/inventory', visibleIn, }, - ...(hostsEnabled - ? [ - { - id: 'hosts', - title: i18n.translate('xpack.infra.homePage.metricsHostsTabTitle', { - defaultMessage: 'Hosts', - }), - path: '/hosts', - visibleIn, - }, - ] - : []), + { + id: 'hosts', + title: i18n.translate('xpack.infra.homePage.metricsHostsTabTitle', { + defaultMessage: 'Hosts', + }), + path: '/hosts', + visibleIn, + }, ...(metricsExplorerEnabled ? [ { @@ -308,7 +293,6 @@ export class Plugin implements InfraClientPluginClass { category: DEFAULT_APP_CATEGORIES.observability, updater$: this.appUpdater$, deepLinks: getInfraDeepLinks({ - hostsEnabled: core.settings.client.get(enableInfrastructureHostsView), metricsExplorerEnabled: this.config.featureFlags.metricsExplorerEnabled, }), mount: async (params: AppMountParameters) => { @@ -334,13 +318,9 @@ export class Plugin implements InfraClientPluginClass { }); startDep$AndHostViewFlag$.subscribe( - ([_startServices, isInfrastructureHostsViewEnabled]: [ - [CoreStart, InfraClientStartDeps, InfraClientStartExports], - boolean - ]) => { + ([_startServices]: [[CoreStart, InfraClientStartDeps, InfraClientStartExports]]) => { this.appUpdater$.next(() => ({ deepLinks: getInfraDeepLinks({ - hostsEnabled: isInfrastructureHostsViewEnabled, metricsExplorerEnabled: this.config.featureFlags.metricsExplorerEnabled, }), })); diff --git a/x-pack/plugins/observability_solution/observability/common/index.ts b/x-pack/plugins/observability_solution/observability/common/index.ts index 3dc44c5ac02aa..4baaf7957fa81 100644 --- a/x-pack/plugins/observability_solution/observability/common/index.ts +++ b/x-pack/plugins/observability_solution/observability/common/index.ts @@ -30,8 +30,6 @@ export { apmServiceGroupMaxNumberOfServices, apmTraceExplorerTab, apmLabsButton, - enableInfrastructureHostsView, - enableInfrastructureContainerAssetView, enableInfrastructureProfilingIntegration, enableInfrastructureAssetCustomDashboards, enableAwsLambdaMetrics, diff --git a/x-pack/plugins/observability_solution/observability/common/ui_settings_keys.ts b/x-pack/plugins/observability_solution/observability/common/ui_settings_keys.ts index efceaca9a0427..7025c120cae5d 100644 --- a/x-pack/plugins/observability_solution/observability/common/ui_settings_keys.ts +++ b/x-pack/plugins/observability_solution/observability/common/ui_settings_keys.ts @@ -16,13 +16,10 @@ export const apmServiceGroupMaxNumberOfServices = 'observability:apmServiceGroupMaxNumberOfServices'; export const apmTraceExplorerTab = 'observability:apmTraceExplorerTab'; export const apmLabsButton = 'observability:apmLabsButton'; -export const enableInfrastructureHostsView = 'observability:enableInfrastructureHostsView'; export const enableInfrastructureProfilingIntegration = 'observability:enableInfrastructureProfilingIntegration'; export const enableInfrastructureAssetCustomDashboards = 'observability:enableInfrastructureAssetCustomDashboards'; -export const enableInfrastructureContainerAssetView = - 'observability:enableInfrastructureContainerAssetView'; export const enableAwsLambdaMetrics = 'observability:enableAwsLambdaMetrics'; export const enableAgentExplorerView = 'observability:apmAgentExplorerView'; export const apmEnableTableSearchBar = 'observability:apmEnableTableSearchBar'; diff --git a/x-pack/plugins/observability_solution/observability/public/index.ts b/x-pack/plugins/observability_solution/observability/public/index.ts index 58c3aa4cadd66..6230f5411b543 100644 --- a/x-pack/plugins/observability_solution/observability/public/index.ts +++ b/x-pack/plugins/observability_solution/observability/public/index.ts @@ -40,8 +40,6 @@ export { enableInspectEsQueries, enableComparisonByDefault, apmServiceGroupMaxNumberOfServices, - enableInfrastructureHostsView, - enableInfrastructureContainerAssetView, enableAgentExplorerView, apmEnableTableSearchBar, } from '../common/ui_settings_keys'; diff --git a/x-pack/plugins/observability_solution/observability/server/ui_settings.ts b/x-pack/plugins/observability_solution/observability/server/ui_settings.ts index dae7e2ad9ab5b..1a387f24fbaed 100644 --- a/x-pack/plugins/observability_solution/observability/server/ui_settings.ts +++ b/x-pack/plugins/observability_solution/observability/server/ui_settings.ts @@ -28,7 +28,6 @@ import { apmEnableServiceMetrics, apmEnableContinuousRollups, enableCriticalPath, - enableInfrastructureHostsView, syntheticsThrottlingEnabled, enableLegacyUptimeApp, apmEnableProfilingIntegration, @@ -45,7 +44,6 @@ import { enableInfrastructureAssetCustomDashboards, apmEnableServiceInventoryTableSearchBar, profilingFetchTopNFunctionsFromStacktraces, - enableInfrastructureContainerAssetView, searchExcludedDataTiers, } from '../common/ui_settings_keys'; @@ -232,31 +230,6 @@ export const uiSettings: Record = { requiresPageReload: true, type: 'boolean', }, - [enableInfrastructureHostsView]: { - category: [observabilityFeatureId], - name: i18n.translate('xpack.observability.enableInfrastructureHostsView', { - defaultMessage: 'Infrastructure Hosts view', - }), - value: true, - description: i18n.translate('xpack.observability.enableInfrastructureHostsViewDescription', { - defaultMessage: 'Enable the Hosts view in the Infrastructure app.', - }), - schema: schema.boolean(), - }, - [enableInfrastructureContainerAssetView]: { - category: [observabilityFeatureId], - name: i18n.translate('xpack.observability.enableInfrastructureContainerAssetView', { - defaultMessage: 'Container view', - }), - value: true, - description: i18n.translate( - 'xpack.observability.enableInfrastructureContainerAssetViewDescription', - { - defaultMessage: 'Enable the Container asset view in the Infrastructure app.', - } - ), - schema: schema.boolean(), - }, [enableInfrastructureProfilingIntegration]: { category: [observabilityFeatureId], name: i18n.translate('xpack.observability.enableInfrastructureProfilingIntegration', { diff --git a/x-pack/plugins/translations/translations/fr-FR.json b/x-pack/plugins/translations/translations/fr-FR.json index a0cfae596fc96..ab75f1543cc33 100644 --- a/x-pack/plugins/translations/translations/fr-FR.json +++ b/x-pack/plugins/translations/translations/fr-FR.json @@ -32227,10 +32227,6 @@ "xpack.observability.enableCriticalPathDescription": "{technicalPreviewLabel} Affiche de façon optionnelle le chemin critique d'une trace.", "xpack.observability.enableInfrastructureAssetCustomDashboards": "Tableaux de bord personnalisés pour les détails de ressource dans Infrastructure", "xpack.observability.enableInfrastructureAssetCustomDashboardsDescription": "{technicalPreviewLabel} Activez l'option pour lier des tableaux de bord personnalisés dans l'affichage des détails de ressource.", - "xpack.observability.enableInfrastructureContainerAssetView": "Vue Conteneur", - "xpack.observability.enableInfrastructureContainerAssetViewDescription": "Activez la vue des ressources du conteneur dans l'application Infrastructure.", - "xpack.observability.enableInfrastructureHostsView": "Vue des hôtes de l'infrastructure", - "xpack.observability.enableInfrastructureHostsViewDescription": "{betaLabel} Activez la vue \"Hôtes\" dans l’application \"Infrastructure\".", "xpack.observability.enableInfrastructureProfilingIntegration": "Intégration Universal Profiling dans Infrastructure", "xpack.observability.enableInfrastructureProfilingIntegrationDescription": "Activez l'intégration Universal Profiling dans l'application Infrastructure.", "xpack.observability.enableInspectEsQueriesExperimentDescription": "Inspectez les recherches Elasticsearch dans les réponses API.", diff --git a/x-pack/plugins/translations/translations/ja-JP.json b/x-pack/plugins/translations/translations/ja-JP.json index 6a81bee15918b..a77f0348b572f 100644 --- a/x-pack/plugins/translations/translations/ja-JP.json +++ b/x-pack/plugins/translations/translations/ja-JP.json @@ -31973,10 +31973,6 @@ "xpack.observability.enableCriticalPathDescription": "{technicalPreviewLabel} 任意で、トレースのクリティカルパスを表示します。", "xpack.observability.enableInfrastructureAssetCustomDashboards": "インフラのアセット詳細のカスタムダッシュボード", "xpack.observability.enableInfrastructureAssetCustomDashboardsDescription": "{technicalPreviewLabel}アセット詳細ビューでカスタムダッシュボードをリンクするオプションを有効化します。", - "xpack.observability.enableInfrastructureContainerAssetView": "コンテナービュー", - "xpack.observability.enableInfrastructureContainerAssetViewDescription": "インフラアプリでコンテナーアセットビューを有効にします。", - "xpack.observability.enableInfrastructureHostsView": "インフラストラクチャーホストビュー", - "xpack.observability.enableInfrastructureHostsViewDescription": "{betaLabel}インフラアプリでホストビューを有効にします。", "xpack.observability.enableInfrastructureProfilingIntegration": "インフラのユニバーサルプロファイリング統合", "xpack.observability.enableInfrastructureProfilingIntegrationDescription": "インフラアプリでユニバーサルプロファイリング統合を有効化します。", "xpack.observability.enableInspectEsQueriesExperimentDescription": "API応答でElasticsearchクエリーを調査します。", diff --git a/x-pack/plugins/translations/translations/zh-CN.json b/x-pack/plugins/translations/translations/zh-CN.json index 95c94e1f0b17f..2b13eacdad26e 100644 --- a/x-pack/plugins/translations/translations/zh-CN.json +++ b/x-pack/plugins/translations/translations/zh-CN.json @@ -32015,10 +32015,6 @@ "xpack.observability.enableCriticalPathDescription": "{technicalPreviewLabel}(可选)显示跟踪的关键路径。", "xpack.observability.enableInfrastructureAssetCustomDashboards": "Infrastructure 中资产详情的定制仪表板", "xpack.observability.enableInfrastructureAssetCustomDashboardsDescription": "{technicalPreviewLabel} 启用选项以在资产详情视图中链接定制仪表板。", - "xpack.observability.enableInfrastructureContainerAssetView": "容器视图", - "xpack.observability.enableInfrastructureContainerAssetViewDescription": "在 Infrastructure 应用中启用容器资产视图。", - "xpack.observability.enableInfrastructureHostsView": "基础架构主机视图", - "xpack.observability.enableInfrastructureHostsViewDescription": "{betaLabel} 在 Infrastructure 应用中启用主机视图。", "xpack.observability.enableInfrastructureProfilingIntegration": "Infrastructure 中的 Universal Profiling 集成", "xpack.observability.enableInfrastructureProfilingIntegrationDescription": "在 Infrastructure 应用中启用 Universal Profiling 集成。", "xpack.observability.enableInspectEsQueriesExperimentDescription": "检查 API 响应中的 Elasticsearch 查询。", diff --git a/x-pack/test/functional/apps/infra/node_details.ts b/x-pack/test/functional/apps/infra/node_details.ts index 0f1de8cb9c8bf..0e70d974d6ed5 100644 --- a/x-pack/test/functional/apps/infra/node_details.ts +++ b/x-pack/test/functional/apps/infra/node_details.ts @@ -9,10 +9,7 @@ import moment from 'moment'; import expect from '@kbn/expect'; import rison from '@kbn/rison'; import { InfraSynthtraceEsClient } from '@kbn/apm-synthtrace'; -import { - enableInfrastructureContainerAssetView, - enableInfrastructureProfilingIntegration, -} from '@kbn/observability-plugin/common'; +import { enableInfrastructureProfilingIntegration } from '@kbn/observability-plugin/common'; import { ALERT_STATUS_ACTIVE, ALERT_STATUS_RECOVERED, @@ -135,12 +132,6 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { await pageObjects.header.waitUntilLoadingHasFinished(); }; - const setInfrastructureContainerAssetViewUiSetting = async (value: boolean = true) => { - await kibanaServer.uiSettings.update({ [enableInfrastructureContainerAssetView]: value }); - await browser.refresh(); - await pageObjects.header.waitUntilLoadingHasFinished(); - }; - describe('Node Details', () => { let synthEsClient: InfraSynthtraceEsClient; before(async () => { @@ -801,25 +792,8 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { after(() => synthEsClient.clean()); - describe('when container asset view is disabled', () => { - before(async () => { - await setInfrastructureContainerAssetViewUiSetting(false); - await navigateToNodeDetails('container-id-0', 'container', { name: 'container-id-0' }); - await pageObjects.header.waitUntilLoadingHasFinished(); - await pageObjects.timePicker.setAbsoluteRange( - START_CONTAINER_DATE.format(DATE_PICKER_FORMAT), - END_CONTAINER_DATE.format(DATE_PICKER_FORMAT) - ); - }); - - it('should show old view of container details', async () => { - await testSubjects.find('metricsEmptyViewState'); - }); - }); - - describe('when container asset view is enabled', () => { + describe('when navigating to container asset view', () => { before(async () => { - await setInfrastructureContainerAssetViewUiSetting(true); await navigateToNodeDetails('container-id-0', 'container', { name: 'container-id-0' }); await pageObjects.header.waitUntilLoadingHasFinished(); await pageObjects.timePicker.setAbsoluteRange( diff --git a/x-pack/test_serverless/functional/test_suites/observability/infra/navigation.ts b/x-pack/test_serverless/functional/test_suites/observability/infra/navigation.ts index 64f764b289ab4..57e0f82f03aca 100644 --- a/x-pack/test_serverless/functional/test_suites/observability/infra/navigation.ts +++ b/x-pack/test_serverless/functional/test_suites/observability/infra/navigation.ts @@ -5,21 +5,12 @@ * 2.0. */ -import { enableInfrastructureHostsView } from '@kbn/observability-plugin/common'; import { FtrProviderContext } from '../../../ftr_provider_context'; export default ({ getPageObjects, getService }: FtrProviderContext) => { - const kibanaServer = getService('kibanaServer'); const svlObltNavigation = getService('svlObltNavigation'); - const browser = getService('browser'); const pageObjects = getPageObjects(['svlCommonPage', 'svlCommonNavigation', 'header']); - const setHostsSetting = async (value: boolean) => { - await kibanaServer.uiSettings.update({ [enableInfrastructureHostsView]: value }); - await browser.refresh(); - await pageObjects.svlCommonNavigation.expectExists(); - }; - const openInfraSection = async () => { await pageObjects.svlCommonNavigation.sidenav.openSection('observability_project_nav.metrics'); }; @@ -32,7 +23,6 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { describe('when Hosts settings is on', () => { before(async () => { - await setHostsSetting(true); await openInfraSection(); }); @@ -42,18 +32,5 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { }); }); }); - - describe('when Hosts settings is off', () => { - before(async () => { - await setHostsSetting(false); - await openInfraSection(); - }); - - it("hides the 'Hosts' nav item", async () => { - await pageObjects.svlCommonNavigation.sidenav.expectLinkMissing({ - deepLinkId: 'metrics:hosts', - }); - }); - }); }); };