[Infra] Add Host Details Dashboard advanced setting (#176143)

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

## Summary

This adds a new Advanced setting to toggle custom dashboards in Hosts
view.

![CleanShot 2024-02-02 at 13 12
54@2x](b81e8f03-3358-471a-9d20-85156d89186a)
This commit is contained in:
Mykola Harmash 2024-02-05 20:28:42 +01:00 committed by GitHub
parent 4e15933a9b
commit 069e6f8bc7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 39 additions and 0 deletions

View file

@ -457,6 +457,9 @@ preview:[] Enable the APM Trace Explorer feature, that allows you to search and
[[observability-infrastructure-profiling-integration]]`observability:enableInfrastructureProfilingIntegration`::
preview:[] Enables the Profiling view in Host details within Infrastructure.
[[observability-infrastructure-hosts-custom-dashboard]]`observability:enableInfrastructureHostsCustomDashboards`::
preview:[] Enables option to link custom dashboards in the Host Details view.
[float]
[[kibana-reporting-settings]]
==== Reporting

View file

@ -123,6 +123,8 @@ 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_HOSTS_CUSTOM_DASHBOARDS_ID =
'observability:enableInfrastructureHostsCustomDashboards';
export const OBSERVABILITY_ENABLE_INSPECT_ES_QUERIES_ID = 'observability:enableInspectEsQueries';
export const OBSERVABILITY_MAX_SUGGESTIONS_ID = 'observability:maxSuggestions';
export const OBSERVABILITY_PROFILING_ELASTICSEARCH_PLUGIN_ID =

View file

@ -28,4 +28,5 @@ export const OBSERVABILITY_PROJECT_SETTINGS = [
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_HOSTS_CUSTOM_DASHBOARDS_ID,
];

View file

@ -596,6 +596,10 @@ export const stackManagementSchema: MakeSchemaFrom<UsageStats> = {
type: 'boolean',
_meta: { description: 'Non-default value of setting.' },
},
'observability:enableInfrastructureHostsCustomDashboards': {
type: 'boolean',
_meta: { description: 'Non-default value of setting.' },
},
'securitySolution:enableGroupedNav': {
type: 'boolean',
_meta: { description: 'Non-default value of setting.' },

View file

@ -47,6 +47,7 @@ export interface UsageStats {
'observability:apmAWSLambdaRequestCostPerMillion': number;
'observability:enableInfrastructureHostsView': boolean;
'observability:enableInfrastructureProfilingIntegration': boolean;
'observability:enableInfrastructureHostsCustomDashboards': boolean;
'observability:apmAgentExplorerView': boolean;
'observability:apmEnableTableSearchBar': boolean;
'visualization:heatmap:maxBuckets': number;

View file

@ -10210,6 +10210,12 @@
"description": "Non-default value of setting."
}
},
"observability:enableInfrastructureHostsCustomDashboards": {
"type": "boolean",
"_meta": {
"description": "Non-default value of setting."
}
},
"securitySolution:enableGroupedNav": {
"type": "boolean",
"_meta": {

View file

@ -33,6 +33,7 @@ export {
apmLabsButton,
enableInfrastructureHostsView,
enableInfrastructureProfilingIntegration,
enableInfrastructureHostsCustomDashboards,
enableAwsLambdaMetrics,
enableAgentExplorerView,
apmEnableTableSearchBar,

View file

@ -19,6 +19,8 @@ export const apmLabsButton = 'observability:apmLabsButton';
export const enableInfrastructureHostsView = 'observability:enableInfrastructureHostsView';
export const enableInfrastructureProfilingIntegration =
'observability:enableInfrastructureProfilingIntegration';
export const enableInfrastructureHostsCustomDashboards =
'observability:enableInfrastructureHostsCustomDashboards';
export const enableAwsLambdaMetrics = 'observability:enableAwsLambdaMetrics';
export const enableAgentExplorerView = 'observability:apmAgentExplorerView';
export const apmEnableTableSearchBar = 'observability:apmEnableTableSearchBar';

View file

@ -38,6 +38,7 @@ import {
profilingAWSCostDiscountRate,
profilingCostPervCPUPerHour,
enableInfrastructureProfilingIntegration,
enableInfrastructureHostsCustomDashboards,
} from '../common/ui_settings_keys';
const betaLabel = i18n.translate('xpack.observability.uiSettings.betaLabel', {
@ -251,6 +252,24 @@ export const uiSettings: Record<string, UiSettings> = {
),
schema: schema.boolean(),
},
[enableInfrastructureHostsCustomDashboards]: {
category: [observabilityFeatureId],
name: i18n.translate('xpack.observability.enableInfrastructureHostsCustomDashboards', {
defaultMessage: 'Custom dashboards for Host Details in Infrastructure',
}),
value: false,
description: i18n.translate(
'xpack.observability.enableInfrastructureHostsCustomDashboardsDescription',
{
defaultMessage:
'{betaLabel} Enable option to link custom dashboards in the Host Details view.',
values: {
betaLabel: `<em>[${betaLabel}]</em>`,
},
}
),
schema: schema.boolean(),
},
[enableAwsLambdaMetrics]: {
category: [observabilityFeatureId],
name: i18n.translate('xpack.observability.enableAwsLambdaMetrics', {