Skip to content

Commit

Permalink
[ObsUx][Infra] Remove no longer used feature flags for GA features (e…
Browse files Browse the repository at this point in the history
…lastic#197684)

Closes elastic#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
  • Loading branch information
jennypavlova authored and tiansivive committed Oct 29, 2024
1 parent 3d80dd3 commit 1b92d5f
Show file tree
Hide file tree
Showing 22 changed files with 21 additions and 451 deletions.
30 changes: 0 additions & 30 deletions api_docs/kbn_management_settings_ids.devdocs.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
228 changes: 0 additions & 228 deletions api_docs/observability.devdocs.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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"
},
"<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",
"id": "def-server.uiSettings.enableInfrastructureProfilingIntegration",
Expand Down Expand Up @@ -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",
Expand Down
4 changes: 0 additions & 4 deletions packages/kbn-management/settings/setting_ids/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
2 changes: 0 additions & 2 deletions packages/serverless/settings/observability_project/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -642,14 +642,6 @@ export const stackManagementSchema: MakeSchemaFrom<UsageStats> = {
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.' },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
12 changes: 0 additions & 12 deletions src/plugins/telemetry/schema/oss_plugins.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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;

Expand Down Expand Up @@ -128,7 +126,7 @@ export const InfrastructurePage = () => {
<Route path="/explorer" component={MetricsExplorerPage} />
)}
<Route path="/detail/:type/:node" component={NodeDetail} />
{isHostsViewEnabled ? <Route path="/hosts" component={HostsPage} /> : null}
<Route path="/hosts" component={HostsPage} />
<Route path="/settings" component={MetricsSettingsPage} />

<RedirectWithQueryParams from="/snapshot" exact to="/inventory" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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) {
Expand Down
Loading

0 comments on commit 1b92d5f

Please sign in to comment.