Skip to content

Commit

Permalink
[Infra] Add Host Details Dashboard advanced setting (#176143)
Browse files Browse the repository at this point in the history
Closes #176068

## Summary

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

![CleanShot 2024-02-02 at 13 12
54@2x](https://github.com/elastic/kibana/assets/793851/b81e8f03-3358-471a-9d20-85156d89186a)
  • Loading branch information
mykolaharmash authored Feb 5, 2024
1 parent 4e15933 commit 069e6f8
Show file tree
Hide file tree
Showing 9 changed files with 39 additions and 0 deletions.
3 changes: 3 additions & 0 deletions docs/management/advanced-options.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions packages/kbn-management/settings/setting_ids/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
];
Original file line number Diff line number Diff line change
Expand Up @@ -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.' },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
6 changes: 6 additions & 0 deletions src/plugins/telemetry/schema/oss_plugins.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
1 change: 1 addition & 0 deletions x-pack/plugins/observability/common/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export {
apmLabsButton,
enableInfrastructureHostsView,
enableInfrastructureProfilingIntegration,
enableInfrastructureHostsCustomDashboards,
enableAwsLambdaMetrics,
enableAgentExplorerView,
apmEnableTableSearchBar,
Expand Down
2 changes: 2 additions & 0 deletions x-pack/plugins/observability/common/ui_settings_keys.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
19 changes: 19 additions & 0 deletions x-pack/plugins/observability/server/ui_settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ import {
profilingAWSCostDiscountRate,
profilingCostPervCPUPerHour,
enableInfrastructureProfilingIntegration,
enableInfrastructureHostsCustomDashboards,
} from '../common/ui_settings_keys';

const betaLabel = i18n.translate('xpack.observability.uiSettings.betaLabel', {
Expand Down Expand Up @@ -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', {
Expand Down

0 comments on commit 069e6f8

Please sign in to comment.