[8.19] [ObsUx][Infra] Remove no longer used feature flags for GA features (#197684) (#221946)

# Backport

This will backport the following commits from `main` to `8.19`:
- [[ObsUx][Infra] Remove no longer used feature flags for GA features
(#197684)](https://github.com/elastic/kibana/pull/197684)

<!--- Backport version: 10.0.0 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT
[{"author":{"name":"jennypavlova","email":"dzheni.pavlova@elastic.co"},"sourceCommit":{"committedDate":"2024-10-28T17:17:02Z","message":"[ObsUx][Infra]
Remove no longer used feature flags for GA features (#197684)\n\nCloses
#197612 \r\n## Summary\r\n\r\nThis PR removes the feature
flags\r\n(`observability:enableInfrastructureHostsView`
and\r\n`enableInfrastructureContainerAssetView` ) for host and container
views\r\n\r\nFeature settings under `Infrastructure > Settings` (ignore
the profiling\r\none)\r\n| Before | After |\r\n| ------ | -----
|\r\n\r\n|![image](1c75e229-bd29-45c5-a354-cfdcb324ea9d)\r\n|\r\n\r\n##
Testing:\r\nThe feature flags should not appear in the settings\r\nThe
Host menu item should be visible\r\nThe Container asset views should be
always enabled and visible (without\r\nan option to disable them)\r\nThe
Host asset views should be always enabled and visible (without
an\r\noption to disable
them)\r\n\r\n\r\n\r\n\r\nhttps://github.com/user-attachments/assets/a4d574d0-2669-4f96-88a4-a40c2f5023c2","sha":"2a65933ee24e4bdcdf419fc953c8908c259cb09d","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:deprecation","backport:skip","v9.0.0","ci:project-deploy-observability","Team:obs-ux-infra_services","Team:obs-ux-management"],"title":"[ObsUx][Infra]
Remove no longer used feature flags for GA
features","number":197684,"url":"https://github.com/elastic/kibana/pull/197684","mergeCommit":{"message":"[ObsUx][Infra]
Remove no longer used feature flags for GA features (#197684)\n\nCloses
#197612 \r\n## Summary\r\n\r\nThis PR removes the feature
flags\r\n(`observability:enableInfrastructureHostsView`
and\r\n`enableInfrastructureContainerAssetView` ) for host and container
views\r\n\r\nFeature settings under `Infrastructure > Settings` (ignore
the profiling\r\none)\r\n| Before | After |\r\n| ------ | -----
|\r\n\r\n|![image](1c75e229-bd29-45c5-a354-cfdcb324ea9d)\r\n|\r\n\r\n##
Testing:\r\nThe feature flags should not appear in the settings\r\nThe
Host menu item should be visible\r\nThe Container asset views should be
always enabled and visible (without\r\nan option to disable them)\r\nThe
Host asset views should be always enabled and visible (without
an\r\noption to disable
them)\r\n\r\n\r\n\r\n\r\nhttps://github.com/user-attachments/assets/a4d574d0-2669-4f96-88a4-a40c2f5023c2","sha":"2a65933ee24e4bdcdf419fc953c8908c259cb09d"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/197684","number":197684,"mergeCommit":{"message":"[ObsUx][Infra]
Remove no longer used feature flags for GA features (#197684)\n\nCloses
#197612 \r\n## Summary\r\n\r\nThis PR removes the feature
flags\r\n(`observability:enableInfrastructureHostsView`
and\r\n`enableInfrastructureContainerAssetView` ) for host and container
views\r\n\r\nFeature settings under `Infrastructure > Settings` (ignore
the profiling\r\none)\r\n| Before | After |\r\n| ------ | -----
|\r\n\r\n|![image](1c75e229-bd29-45c5-a354-cfdcb324ea9d)\r\n|\r\n\r\n##
Testing:\r\nThe feature flags should not appear in the settings\r\nThe
Host menu item should be visible\r\nThe Container asset views should be
always enabled and visible (without\r\nan option to disable them)\r\nThe
Host asset views should be always enabled and visible (without
an\r\noption to disable
them)\r\n\r\n\r\n\r\n\r\nhttps://github.com/user-attachments/assets/a4d574d0-2669-4f96-88a4-a40c2f5023c2","sha":"2a65933ee24e4bdcdf419fc953c8908c259cb09d"}}]}]
BACKPORT-->

---------

Co-authored-by: jennypavlova <dzheni.pavlova@elastic.co>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
Sergi Romeu 2025-05-30 15:00:41 +02:00 committed by GitHub
parent 41617507b4
commit 27a9ca7555
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
23 changed files with 32 additions and 474 deletions

View file

@ -1387,36 +1387,6 @@
"trackAdoption": false, "trackAdoption": false,
"initialIsOpen": 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", "parentPluginId": "@kbn/management-settings-ids",
"id": "def-common.OBSERVABILITY_ENABLE_INSPECT_ES_QUERIES_ID", "id": "def-common.OBSERVABILITY_ENABLE_INSPECT_ES_QUERIES_ID",

View file

@ -4576,36 +4576,6 @@
"trackAdoption": false, "trackAdoption": false,
"initialIsOpen": 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", "parentPluginId": "observability",
"id": "def-public.enableInspectEsQueries", "id": "def-public.enableInspectEsQueries",
@ -10225,174 +10195,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"
},
"<boolean>"
],
"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"
},
"<boolean>"
],
"path": "x-pack/plugins/observability_solution/observability/server/ui_settings.ts",
"deprecated": false,
"trackAdoption": false
}
]
},
{ {
"parentPluginId": "observability", "parentPluginId": "observability",
"id": "def-server.uiSettings.enableInfrastructureProfilingIntegration", "id": "def-server.uiSettings.enableInfrastructureProfilingIntegration",
@ -14415,36 +14217,6 @@
"trackAdoption": false, "trackAdoption": false,
"initialIsOpen": 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", "parentPluginId": "observability",
"id": "def-common.enableInfrastructureProfilingIntegration", "id": "def-common.enableInfrastructureProfilingIntegration",

View file

@ -120,10 +120,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_AWS_LAMBDA_METRICS_ID = 'observability:enableAwsLambdaMetrics';
export const OBSERVABILITY_ENABLE_COMPARISON_BY_DEFAULT_ID = export const OBSERVABILITY_ENABLE_COMPARISON_BY_DEFAULT_ID =
'observability:enableComparisonByDefault'; '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 = export const OBSERVABILITY_ENABLE_INFRASTRUCTURE_ASSET_CUSTOM_DASHBOARDS_ID =
'observability:enableInfrastructureAssetCustomDashboards'; 'observability:enableInfrastructureAssetCustomDashboards';
export const OBSERVABILITY_ENABLE_INSPECT_ES_QUERIES_ID = 'observability:enableInspectEsQueries'; export const OBSERVABILITY_ENABLE_INSPECT_ES_QUERIES_ID = 'observability:enableInspectEsQueries';

View file

@ -27,8 +27,6 @@ export const OBSERVABILITY_PROJECT_SETTINGS = [
settings.OBSERVABILITY_APM_TRACE_EXPLORER_TAB_ID, settings.OBSERVABILITY_APM_TRACE_EXPLORER_TAB_ID,
settings.OBSERVABILITY_ENABLE_AWS_LAMBDA_METRICS_ID, settings.OBSERVABILITY_ENABLE_AWS_LAMBDA_METRICS_ID,
settings.OBSERVABILITY_APM_ENABLE_CRITICAL_PATH_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_ENABLE_INFRASTRUCTURE_ASSET_CUSTOM_DASHBOARDS_ID,
settings.OBSERVABILITY_LOGS_EXPLORER_ALLOWED_DATA_VIEWS_ID, settings.OBSERVABILITY_LOGS_EXPLORER_ALLOWED_DATA_VIEWS_ID,
settings.OBSERVABILITY_APM_ENABLE_TABLE_SEARCH_BAR, settings.OBSERVABILITY_APM_ENABLE_TABLE_SEARCH_BAR,

View file

@ -646,14 +646,6 @@ export const stackManagementSchema: MakeSchemaFrom<UsageStats> = {
type: 'boolean', type: 'boolean',
_meta: { description: 'Non-default value of setting.' }, _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': { 'observability:enableInfrastructureProfilingIntegration': {
type: 'boolean', type: 'boolean',
_meta: { description: 'Non-default value of setting.' }, _meta: { description: 'Non-default value of setting.' },

View file

@ -46,8 +46,6 @@ export interface UsageStats {
'observability:apmEnableContinuousRollups': boolean; 'observability:apmEnableContinuousRollups': boolean;
'observability:apmAWSLambdaPriceFactor': string; 'observability:apmAWSLambdaPriceFactor': string;
'observability:apmAWSLambdaRequestCostPerMillion': number; 'observability:apmAWSLambdaRequestCostPerMillion': number;
'observability:enableInfrastructureHostsView': boolean;
'observability:enableInfrastructureContainerAssetView': boolean;
'observability:enableInfrastructureProfilingIntegration': boolean; 'observability:enableInfrastructureProfilingIntegration': boolean;
'observability:enableInfrastructureAssetCustomDashboards': boolean; 'observability:enableInfrastructureAssetCustomDashboards': boolean;
'observability:apmAgentExplorerView': boolean; 'observability:apmAgentExplorerView': boolean;

View file

@ -11520,18 +11520,6 @@
"description": "Non-default value of setting." "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": { "observability:enableInfrastructureProfilingIntegration": {
"type": "boolean", "type": "boolean",
"_meta": { "_meta": {

View file

@ -34825,10 +34825,6 @@
"xpack.observability.enableCriticalPathDescription": "{technicalPreviewLabel} Affiche de façon optionnelle le chemin critique d'une trace.", "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.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.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": "Activez la vue Hôtes dans l'application Infrastructure.",
"xpack.observability.enableInfrastructureProfilingIntegration": "Intégration Universal Profiling dans 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.enableInfrastructureProfilingIntegrationDescription": "Activez l'intégration Universal Profiling dans l'application Infrastructure.",
"xpack.observability.enableInspectEsQueriesExperimentDescription": "Inspectez les recherches Elasticsearch dans les réponses API.", "xpack.observability.enableInspectEsQueriesExperimentDescription": "Inspectez les recherches Elasticsearch dans les réponses API.",

View file

@ -34798,10 +34798,6 @@
"xpack.observability.enableCriticalPathDescription": "{technicalPreviewLabel} 任意で、トレースのクリティカルパスを表示します。", "xpack.observability.enableCriticalPathDescription": "{technicalPreviewLabel} 任意で、トレースのクリティカルパスを表示します。",
"xpack.observability.enableInfrastructureAssetCustomDashboards": "インフラのアセット詳細のカスタムダッシュボード", "xpack.observability.enableInfrastructureAssetCustomDashboards": "インフラのアセット詳細のカスタムダッシュボード",
"xpack.observability.enableInfrastructureAssetCustomDashboardsDescription": "{technicalPreviewLabel}アセット詳細ビューでカスタムダッシュボードをリンクするオプションを有効化します。", "xpack.observability.enableInfrastructureAssetCustomDashboardsDescription": "{technicalPreviewLabel}アセット詳細ビューでカスタムダッシュボードをリンクするオプションを有効化します。",
"xpack.observability.enableInfrastructureContainerAssetView": "コンテナービュー",
"xpack.observability.enableInfrastructureContainerAssetViewDescription": "インフラアプリでコンテナーアセットビューを有効にします。",
"xpack.observability.enableInfrastructureHostsView": "インフラストラクチャーホストビュー",
"xpack.observability.enableInfrastructureHostsViewDescription": "インフラアプリでホストビューを有効にします。",
"xpack.observability.enableInfrastructureProfilingIntegration": "インフラのユニバーサルプロファイリング統合", "xpack.observability.enableInfrastructureProfilingIntegration": "インフラのユニバーサルプロファイリング統合",
"xpack.observability.enableInfrastructureProfilingIntegrationDescription": "インフラアプリでユニバーサルプロファイリング統合を有効化します。", "xpack.observability.enableInfrastructureProfilingIntegrationDescription": "インフラアプリでユニバーサルプロファイリング統合を有効化します。",
"xpack.observability.enableInspectEsQueriesExperimentDescription": "API応答でElasticsearchクエリーを調査します。", "xpack.observability.enableInspectEsQueriesExperimentDescription": "API応答でElasticsearchクエリーを調査します。",

View file

@ -34863,10 +34863,6 @@
"xpack.observability.enableCriticalPathDescription": "{technicalPreviewLabel}(可选)显示跟踪的关键路径。", "xpack.observability.enableCriticalPathDescription": "{technicalPreviewLabel}(可选)显示跟踪的关键路径。",
"xpack.observability.enableInfrastructureAssetCustomDashboards": "Infrastructure 中资产详情的定制仪表板", "xpack.observability.enableInfrastructureAssetCustomDashboards": "Infrastructure 中资产详情的定制仪表板",
"xpack.observability.enableInfrastructureAssetCustomDashboardsDescription": "{technicalPreviewLabel} 启用选项以在资产详情视图中链接定制仪表板。", "xpack.observability.enableInfrastructureAssetCustomDashboardsDescription": "{technicalPreviewLabel} 启用选项以在资产详情视图中链接定制仪表板。",
"xpack.observability.enableInfrastructureContainerAssetView": "容器视图",
"xpack.observability.enableInfrastructureContainerAssetViewDescription": "在 Infrastructure 应用中启用容器资产视图。",
"xpack.observability.enableInfrastructureHostsView": "基础架构主机视图",
"xpack.observability.enableInfrastructureHostsViewDescription": "在 Infrastructure 应用中启用主机视图。",
"xpack.observability.enableInfrastructureProfilingIntegration": "Infrastructure 中的 Universal Profiling 集成", "xpack.observability.enableInfrastructureProfilingIntegration": "Infrastructure 中的 Universal Profiling 集成",
"xpack.observability.enableInfrastructureProfilingIntegrationDescription": "在 Infrastructure 应用中启用 Universal Profiling 集成。", "xpack.observability.enableInfrastructureProfilingIntegrationDescription": "在 Infrastructure 应用中启用 Universal Profiling 集成。",
"xpack.observability.enableInspectEsQueriesExperimentDescription": "检查 API 响应中的 Elasticsearch 查询。", "xpack.observability.enableInspectEsQueriesExperimentDescription": "检查 API 响应中的 Elasticsearch 查询。",

View file

@ -17,9 +17,8 @@ import {
EuiFlexGroup, EuiFlexGroup,
EuiFlexItem, EuiFlexItem,
} from '@elastic/eui'; } 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 { HeaderMenuPortal, useLinkProps } from '@kbn/observability-shared-plugin/public';
import { enableInfrastructureHostsView } from '@kbn/observability-plugin/common';
import type { SharePublicStart } from '@kbn/share-plugin/public/plugin'; import type { SharePublicStart } from '@kbn/share-plugin/public/plugin';
import type { ObservabilityOnboardingLocatorParams } from '@kbn/deeplinks-observability'; import type { ObservabilityOnboardingLocatorParams } from '@kbn/deeplinks-observability';
import { OBSERVABILITY_ONBOARDING_LOCATOR } from '@kbn/deeplinks-observability'; import { OBSERVABILITY_ONBOARDING_LOCATOR } from '@kbn/deeplinks-observability';
@ -58,7 +57,6 @@ export const InfrastructurePage = () => {
const config = usePluginConfig(); const config = usePluginConfig();
const { application } = useKibana<{ share: SharePublicStart }>().services; const { application } = useKibana<{ share: SharePublicStart }>().services;
const { setHeaderActionMenu, theme$ } = useContext(HeaderActionMenuContext); const { setHeaderActionMenu, theme$ } = useContext(HeaderActionMenuContext);
const isHostsViewEnabled = useUiSetting(enableInfrastructureHostsView);
const uiCapabilities = application?.capabilities; const uiCapabilities = application?.capabilities;
@ -126,7 +124,7 @@ export const InfrastructurePage = () => {
<Route path="/explorer" component={MetricsExplorerPage} /> <Route path="/explorer" component={MetricsExplorerPage} />
)} )}
<Route path="/detail/:type/:node" component={NodeDetail} /> <Route path="/detail/:type/:node" component={NodeDetail} />
{isHostsViewEnabled ? <Route path="/hosts" component={HostsPage} /> : null} <Route path="/hosts" component={HostsPage} />
<Route path="/settings" component={MetricsSettingsPage} /> <Route path="/settings" component={MetricsSettingsPage} />
<RedirectWithQueryParams from="/snapshot" exact to="/inventory" /> <RedirectWithQueryParams from="/snapshot" exact to="/inventory" />

View file

@ -11,8 +11,6 @@ import { first } from 'lodash';
import { EuiPopover, EuiToolTip } from '@elastic/eui'; import { EuiPopover, EuiToolTip } from '@elastic/eui';
import type { InventoryItemType } from '@kbn/metrics-data-access-plugin/common'; import type { InventoryItemType } from '@kbn/metrics-data-access-plugin/common';
import { useBoolean } from '@kbn/react-hooks'; import { useBoolean } from '@kbn/react-hooks';
import { useUiSetting } from '@kbn/kibana-react-plugin/public';
import { enableInfrastructureContainerAssetView } from '@kbn/observability-plugin/common';
import type { import type {
InfraWaffleMapBounds, InfraWaffleMapBounds,
InfraWaffleMapNode, InfraWaffleMapNode,
@ -55,9 +53,7 @@ export const Node = ({
const color = colorFromValue(options.legend, rawValue, bounds); const color = colorFromValue(options.legend, rawValue, bounds);
const value = formatter(rawValue); const value = formatter(rawValue);
const isContainerAssetViewEnabled = useUiSetting(enableInfrastructureContainerAssetView); const isFlyoutMode = nodeType === 'host' || nodeType === 'container';
const showContainerAssetDetailPage = nodeType === 'container' && isContainerAssetViewEnabled;
const isFlyoutMode = nodeType === 'host' || showContainerAssetDetailPage;
const toggleAssetPopover = () => { const toggleAssetPopover = () => {
if (isFlyoutMode) { if (isFlyoutMode) {

View file

@ -8,9 +8,7 @@
import { EuiErrorBoundary } from '@elastic/eui'; import { EuiErrorBoundary } from '@elastic/eui';
import React from 'react'; import React from 'react';
import { useRouteMatch } from 'react-router-dom'; 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 type { InventoryItemType } from '@kbn/metrics-data-access-plugin/common';
import { enableInfrastructureContainerAssetView } from '@kbn/observability-plugin/common';
import { AssetDetailPage } from './asset_detail_page'; import { AssetDetailPage } from './asset_detail_page';
import { MetricDetailPage } from './metric_detail_page'; import { MetricDetailPage } from './metric_detail_page';
import { MetricsTimeProvider } from './hooks/use_metrics_time'; import { MetricsTimeProvider } from './hooks/use_metrics_time';
@ -20,12 +18,9 @@ export const NodeDetail = () => {
params: { type: nodeType }, params: { type: nodeType },
} = useRouteMatch<{ type: InventoryItemType; node: string }>(); } = useRouteMatch<{ type: InventoryItemType; node: string }>();
const isContainerAssetViewEnabled = useUiSetting(enableInfrastructureContainerAssetView);
const showContainerAssetDetailPage = nodeType === 'container' && isContainerAssetViewEnabled;
return ( return (
<EuiErrorBoundary> <EuiErrorBoundary>
{nodeType === 'host' || showContainerAssetDetailPage ? ( {nodeType === 'host' || nodeType === 'container' ? (
<AssetDetailPage /> <AssetDetailPage />
) : ( ) : (
<MetricsTimeProvider> <MetricsTimeProvider>

View file

@ -11,10 +11,8 @@ import { EuiForm } from '@elastic/eui';
import { FormattedMessage } from '@kbn/i18n-react'; import { FormattedMessage } from '@kbn/i18n-react';
import React from 'react'; import React from 'react';
import { import {
enableInfrastructureHostsView,
enableInfrastructureProfilingIntegration, enableInfrastructureProfilingIntegration,
enableInfrastructureAssetCustomDashboards, enableInfrastructureAssetCustomDashboards,
enableInfrastructureContainerAssetView,
} from '@kbn/observability-plugin/common'; } from '@kbn/observability-plugin/common';
import type { useEditableSettings } from '@kbn/observability-shared-plugin/public'; import type { useEditableSettings } from '@kbn/observability-shared-plugin/public';
import { withSuspense } from '@kbn/shared-ux-utility'; import { withSuspense } from '@kbn/shared-ux-utility';
@ -71,12 +69,6 @@ export function FeaturesConfigurationPanel({
validateChange: async () => settingsValidationResponse, validateChange: async () => settingsValidationResponse,
}} }}
> >
<FieldRow
field={fields[enableInfrastructureHostsView]}
isSavingEnabled={true}
onFieldChange={handleFieldChange}
unsavedChange={unsavedChanges[enableInfrastructureHostsView]}
/>
<FieldRow <FieldRow
field={fields[enableInfrastructureAssetCustomDashboards]} field={fields[enableInfrastructureAssetCustomDashboards]}
isSavingEnabled={true} isSavingEnabled={true}
@ -91,12 +83,6 @@ export function FeaturesConfigurationPanel({
unsavedChange={unsavedChanges[enableInfrastructureProfilingIntegration]} unsavedChange={unsavedChanges[enableInfrastructureProfilingIntegration]}
/> />
)} )}
<FieldRow
field={fields[enableInfrastructureContainerAssetView]}
isSavingEnabled={true}
onFieldChange={handleFieldChange}
unsavedChange={unsavedChanges[enableInfrastructureContainerAssetView]}
/>
</FieldRowProvider> </FieldRowProvider>
</EuiForm> </EuiForm>
); );

View file

@ -14,8 +14,6 @@ import {
useEditableSettings, useEditableSettings,
} from '@kbn/observability-shared-plugin/public'; } from '@kbn/observability-shared-plugin/public';
import { import {
enableInfrastructureContainerAssetView,
enableInfrastructureHostsView,
enableInfrastructureProfilingIntegration, enableInfrastructureProfilingIntegration,
enableInfrastructureAssetCustomDashboards, enableInfrastructureAssetCustomDashboards,
} from '@kbn/observability-plugin/common'; } from '@kbn/observability-plugin/common';
@ -93,10 +91,8 @@ export const SourceConfigurationSettings = ({
getUnsavedChanges, getUnsavedChanges,
} = useSourceConfigurationFormState(source?.configuration); } = useSourceConfigurationFormState(source?.configuration);
const infraUiSettings = useEditableSettings([ const infraUiSettings = useEditableSettings([
enableInfrastructureHostsView,
enableInfrastructureProfilingIntegration, enableInfrastructureProfilingIntegration,
enableInfrastructureAssetCustomDashboards, enableInfrastructureAssetCustomDashboards,
enableInfrastructureContainerAssetView,
]); ]);
const resetAllUnsavedChanges = useCallback(() => { const resetAllUnsavedChanges = useCallback(() => {

View file

@ -5,11 +5,7 @@
* 2.0. * 2.0.
*/ */
import type { import type { PluginInitializerContext, AppDeepLinkLocations } from '@kbn/core/public';
PluginInitializerContext,
AppDeepLinkLocations,
ApplicationStart,
} from '@kbn/core/public';
import { import {
type AppMountParameters, type AppMountParameters,
type AppUpdater, type AppUpdater,
@ -19,7 +15,6 @@ import {
AppStatus, AppStatus,
} from '@kbn/core/public'; } from '@kbn/core/public';
import { i18n } from '@kbn/i18n'; import { i18n } from '@kbn/i18n';
import { enableInfrastructureHostsView } from '@kbn/observability-plugin/public';
import type { MetricsExplorerLocatorParams } from '@kbn/observability-shared-plugin/common'; import type { MetricsExplorerLocatorParams } from '@kbn/observability-shared-plugin/common';
import { METRICS_EXPLORER_LOCATOR_ID } from '@kbn/observability-shared-plugin/common'; import { METRICS_EXPLORER_LOCATOR_ID } from '@kbn/observability-shared-plugin/common';
import { import {
@ -138,16 +133,9 @@ export class Plugin implements InfraClientPluginClass {
messageFields: this.config.sources?.default?.fields?.message, messageFields: this.config.sources?.default?.fields?.message,
}); });
const startDep$AndAccessibleFlag$ = combineLatest([ const startDep$AndAccessibleFlag$ = from(core.getStartServices()).pipe(
from(core.getStartServices()), switchMap(([{ application }]) =>
core.settings.client.get$<boolean>(enableInfrastructureHostsView), combineLatest([of(application), getLogsExplorerAccessible$(application)])
]).pipe(
switchMap(([[{ application }], isInfrastructureHostsViewEnabled]) =>
combineLatest([
of(application),
of(isInfrastructureHostsViewEnabled),
getLogsExplorerAccessible$(application),
])
) )
); );
@ -156,7 +144,7 @@ export class Plugin implements InfraClientPluginClass {
/** !! Need to be kept in sync with the deepLinks in x-pack/solutions/observability/plugins/infra/public/plugin.ts */ /** !! Need to be kept in sync with the deepLinks in x-pack/solutions/observability/plugins/infra/public/plugin.ts */
pluginsSetup.observabilityShared.navigation.registerSections( pluginsSetup.observabilityShared.navigation.registerSections(
startDep$AndAccessibleFlag$.pipe( startDep$AndAccessibleFlag$.pipe(
map(([application, isInfrastructureHostsViewEnabled, isLogsExplorerAccessible]) => { map(([application, isLogsExplorerAccessible]) => {
const { infrastructure, logs } = application.capabilities; const { infrastructure, logs } = application.capabilities;
return [ return [
...(logs.show ...(logs.show
@ -192,15 +180,11 @@ export class Plugin implements InfraClientPluginClass {
}, },
] ]
: []), : []),
...(isInfrastructureHostsViewEnabled {
? [ label: hostsTitle,
{ app: 'metrics',
label: hostsTitle, path: '/hosts',
app: 'metrics', },
path: '/hosts',
},
]
: []),
], ],
}, },
] ]
@ -253,10 +237,8 @@ export class Plugin implements InfraClientPluginClass {
// !! Need to be kept in sync with the routes in x-pack/solutions/observability/plugins/infra/public/pages/metrics/index.tsx // !! Need to be kept in sync with the routes in x-pack/solutions/observability/plugins/infra/public/pages/metrics/index.tsx
const getInfraDeepLinks = ({ const getInfraDeepLinks = ({
hostsEnabled,
metricsExplorerEnabled, metricsExplorerEnabled,
}: { }: {
hostsEnabled: boolean;
metricsExplorerEnabled: boolean; metricsExplorerEnabled: boolean;
}): AppDeepLink[] => { }): AppDeepLink[] => {
const visibleIn: AppDeepLinkLocations[] = ['globalSearch']; const visibleIn: AppDeepLinkLocations[] = ['globalSearch'];
@ -268,18 +250,14 @@ export class Plugin implements InfraClientPluginClass {
path: '/inventory', path: '/inventory',
visibleIn, visibleIn,
}, },
...(hostsEnabled {
? [ id: 'hosts',
{ title: i18n.translate('xpack.infra.homePage.metricsHostsTabTitle', {
id: 'hosts', defaultMessage: 'Hosts',
title: i18n.translate('xpack.infra.homePage.metricsHostsTabTitle', { }),
defaultMessage: 'Hosts', path: '/hosts',
}), visibleIn,
path: '/hosts', },
visibleIn,
},
]
: []),
...(metricsExplorerEnabled ...(metricsExplorerEnabled
? [ ? [
{ {
@ -318,7 +296,6 @@ export class Plugin implements InfraClientPluginClass {
category: DEFAULT_APP_CATEGORIES.observability, category: DEFAULT_APP_CATEGORIES.observability,
updater$: this.appUpdater$, updater$: this.appUpdater$,
deepLinks: getInfraDeepLinks({ deepLinks: getInfraDeepLinks({
hostsEnabled: core.settings.client.get<boolean>(enableInfrastructureHostsView),
metricsExplorerEnabled: this.config.featureFlags.metricsExplorerEnabled, metricsExplorerEnabled: this.config.featureFlags.metricsExplorerEnabled,
}), }),
mount: async (params: AppMountParameters) => { mount: async (params: AppMountParameters) => {
@ -343,20 +320,13 @@ export class Plugin implements InfraClientPluginClass {
}, },
}); });
startDep$AndAccessibleFlag$.subscribe( startDep$AndAccessibleFlag$.subscribe(([_applicationStart, _isLogsExplorerAccessible]) => {
([_startServices, isInfrastructureHostsViewEnabled, _isLogsExplorerAccessible]: [ this.appUpdater$.next(() => ({
ApplicationStart, deepLinks: getInfraDeepLinks({
boolean, metricsExplorerEnabled: this.config.featureFlags.metricsExplorerEnabled,
boolean }),
]) => { }));
this.appUpdater$.next(() => ({ });
deepLinks: getInfraDeepLinks({
hostsEnabled: isInfrastructureHostsViewEnabled,
metricsExplorerEnabled: this.config.featureFlags.metricsExplorerEnabled,
}),
}));
}
);
// Setup telemetry events // Setup telemetry events
this.telemetry.setup({ analytics: core.analytics }); this.telemetry.setup({ analytics: core.analytics });

View file

@ -30,8 +30,6 @@ export {
apmServiceGroupMaxNumberOfServices, apmServiceGroupMaxNumberOfServices,
apmTraceExplorerTab, apmTraceExplorerTab,
apmLabsButton, apmLabsButton,
enableInfrastructureHostsView,
enableInfrastructureContainerAssetView,
enableInfrastructureProfilingIntegration, enableInfrastructureProfilingIntegration,
enableInfrastructureAssetCustomDashboards, enableInfrastructureAssetCustomDashboards,
enableAwsLambdaMetrics, enableAwsLambdaMetrics,

View file

@ -16,13 +16,10 @@ export const apmServiceGroupMaxNumberOfServices =
'observability:apmServiceGroupMaxNumberOfServices'; 'observability:apmServiceGroupMaxNumberOfServices';
export const apmTraceExplorerTab = 'observability:apmTraceExplorerTab'; export const apmTraceExplorerTab = 'observability:apmTraceExplorerTab';
export const apmLabsButton = 'observability:apmLabsButton'; export const apmLabsButton = 'observability:apmLabsButton';
export const enableInfrastructureHostsView = 'observability:enableInfrastructureHostsView';
export const enableInfrastructureProfilingIntegration = export const enableInfrastructureProfilingIntegration =
'observability:enableInfrastructureProfilingIntegration'; 'observability:enableInfrastructureProfilingIntegration';
export const enableInfrastructureAssetCustomDashboards = export const enableInfrastructureAssetCustomDashboards =
'observability:enableInfrastructureAssetCustomDashboards'; 'observability:enableInfrastructureAssetCustomDashboards';
export const enableInfrastructureContainerAssetView =
'observability:enableInfrastructureContainerAssetView';
export const enableAwsLambdaMetrics = 'observability:enableAwsLambdaMetrics'; export const enableAwsLambdaMetrics = 'observability:enableAwsLambdaMetrics';
export const enableAgentExplorerView = 'observability:apmAgentExplorerView'; export const enableAgentExplorerView = 'observability:apmAgentExplorerView';
export const apmEnableTableSearchBar = 'observability:apmEnableTableSearchBar'; export const apmEnableTableSearchBar = 'observability:apmEnableTableSearchBar';

View file

@ -38,8 +38,6 @@ export {
enableInspectEsQueries, enableInspectEsQueries,
enableComparisonByDefault, enableComparisonByDefault,
apmServiceGroupMaxNumberOfServices, apmServiceGroupMaxNumberOfServices,
enableInfrastructureHostsView,
enableInfrastructureContainerAssetView,
enableAgentExplorerView, enableAgentExplorerView,
apmEnableTableSearchBar, apmEnableTableSearchBar,
apmEnableServiceMapApiV2, apmEnableServiceMapApiV2,

View file

@ -28,7 +28,6 @@ import {
apmEnableServiceMetrics, apmEnableServiceMetrics,
apmEnableContinuousRollups, apmEnableContinuousRollups,
enableCriticalPath, enableCriticalPath,
enableInfrastructureHostsView,
syntheticsThrottlingEnabled, syntheticsThrottlingEnabled,
enableLegacyUptimeApp, enableLegacyUptimeApp,
apmEnableProfilingIntegration, apmEnableProfilingIntegration,
@ -45,7 +44,6 @@ import {
enableInfrastructureAssetCustomDashboards, enableInfrastructureAssetCustomDashboards,
apmEnableServiceInventoryTableSearchBar, apmEnableServiceInventoryTableSearchBar,
profilingFetchTopNFunctionsFromStacktraces, profilingFetchTopNFunctionsFromStacktraces,
enableInfrastructureContainerAssetView,
searchExcludedDataTiers, searchExcludedDataTiers,
apmEnableServiceMapApiV2, apmEnableServiceMapApiV2,
} from '../common/ui_settings_keys'; } from '../common/ui_settings_keys';
@ -242,31 +240,6 @@ export const uiSettings: Record<string, UiSettings> = {
type: 'boolean', type: 'boolean',
solution: 'oblt', solution: 'oblt',
}, },
[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]: { [enableInfrastructureProfilingIntegration]: {
category: [observabilityFeatureId], category: [observabilityFeatureId],
name: i18n.translate('xpack.observability.enableInfrastructureProfilingIntegration', { name: i18n.translate('xpack.observability.enableInfrastructureProfilingIntegration', {

View file

@ -9,10 +9,7 @@ import moment from 'moment';
import expect from '@kbn/expect'; import expect from '@kbn/expect';
import rison from '@kbn/rison'; import rison from '@kbn/rison';
import { InfraSynthtraceEsClient } from '@kbn/apm-synthtrace'; import { InfraSynthtraceEsClient } from '@kbn/apm-synthtrace';
import { import { enableInfrastructureProfilingIntegration } from '@kbn/observability-plugin/common';
enableInfrastructureContainerAssetView,
enableInfrastructureProfilingIntegration,
} from '@kbn/observability-plugin/common';
import { import {
ALERT_STATUS_ACTIVE, ALERT_STATUS_ACTIVE,
ALERT_STATUS_RECOVERED, ALERT_STATUS_RECOVERED,
@ -141,14 +138,7 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => {
await pageObjects.header.waitUntilLoadingHasFinished(); await pageObjects.header.waitUntilLoadingHasFinished();
}; };
const setInfrastructureContainerAssetViewUiSetting = async (value: boolean = true) => { describe('Node Details', () => {
await kibanaServer.uiSettings.update({ [enableInfrastructureContainerAssetView]: value });
await browser.refresh();
await pageObjects.header.waitUntilLoadingHasFinished();
};
// Failing: See https://github.com/elastic/kibana/issues/192891
describe.skip('Node Details', () => {
let synthEsClient: InfraSynthtraceEsClient; let synthEsClient: InfraSynthtraceEsClient;
before(async () => { before(async () => {
synthEsClient = await getInfraSynthtraceEsClient(esClient); synthEsClient = await getInfraSynthtraceEsClient(esClient);
@ -806,25 +796,8 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => {
after(() => synthEsClient.clean()); after(() => synthEsClient.clean());
describe('when container asset view is disabled', () => { describe('when navigating to container asset view', () => {
before(async () => { 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', () => {
before(async () => {
await setInfrastructureContainerAssetViewUiSetting(true);
await navigateToNodeDetails('container-id-0', 'container', { name: 'container-id-0' }); await navigateToNodeDetails('container-id-0', 'container', { name: 'container-id-0' });
await pageObjects.header.waitUntilLoadingHasFinished(); await pageObjects.header.waitUntilLoadingHasFinished();
await pageObjects.timePicker.setAbsoluteRange( await pageObjects.timePicker.setAbsoluteRange(

View file

@ -5,21 +5,12 @@
* 2.0. * 2.0.
*/ */
import { enableInfrastructureHostsView } from '@kbn/observability-plugin/common';
import { FtrProviderContext } from '../../../ftr_provider_context'; import { FtrProviderContext } from '../../../ftr_provider_context';
export default ({ getPageObjects, getService }: FtrProviderContext) => { export default ({ getPageObjects, getService }: FtrProviderContext) => {
const kibanaServer = getService('kibanaServer');
const svlObltNavigation = getService('svlObltNavigation'); const svlObltNavigation = getService('svlObltNavigation');
const browser = getService('browser');
const pageObjects = getPageObjects(['svlCommonPage', 'svlCommonNavigation', 'header']); 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 () => { const openInfraSection = async () => {
await pageObjects.svlCommonNavigation.sidenav.openPanel('metrics'); await pageObjects.svlCommonNavigation.sidenav.openPanel('metrics');
}; };
@ -32,7 +23,6 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => {
describe('when Hosts settings is on', () => { describe('when Hosts settings is on', () => {
before(async () => { before(async () => {
await setHostsSetting(true);
await openInfraSection(); 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',
});
});
});
}); });
}; };

View file

@ -91,7 +91,6 @@
"@kbn/security-plugin-types-common", "@kbn/security-plugin-types-common",
"@kbn/core-saved-objects-import-export-server-internal", "@kbn/core-saved-objects-import-export-server-internal",
"@kbn/data-usage-plugin", "@kbn/data-usage-plugin",
"@kbn/observability-plugin",
"@kbn/scout-info", "@kbn/scout-info",
"@kbn/streams-schema", "@kbn/streams-schema",
] ]