From ee4815a570e4ac1151deec1eb28437ec585411b6 Mon Sep 17 00:00:00 2001 From: Sandra G Date: Wed, 9 Oct 2024 05:47:16 -0400 Subject: [PATCH] [Data Usage] add locator to link to data stream management (#195433) ## Summary add locator to link to data stream management recently made available https://github.com/elastic/kibana/pull/195299 --- .../public/app/components/legend_action.tsx | 12 ++++++------ x-pack/plugins/data_usage/tsconfig.json | 1 + 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/x-pack/plugins/data_usage/public/app/components/legend_action.tsx b/x-pack/plugins/data_usage/public/app/components/legend_action.tsx index a816d1f8eadda..c9059037c4445 100644 --- a/x-pack/plugins/data_usage/public/app/components/legend_action.tsx +++ b/x-pack/plugins/data_usage/public/app/components/legend_action.tsx @@ -14,6 +14,7 @@ import { EuiListGroupItem, EuiSpacer, } from '@elastic/eui'; +import { IndexManagementLocatorParams } from '@kbn/index-management-shared-types'; import { DatasetQualityLink } from './dataset_quality_link'; import { useKibanaContextForPlugin } from '../../utils/use_kibana'; @@ -39,12 +40,11 @@ export const LegendAction: React.FC = React.memo( const hasIndexManagementFeature = !!capabilities?.index_management; const onClickIndexManagement = useCallback(async () => { - // TODO: use proper index management locator https://github.com/elastic/kibana/issues/195083 - const dataQualityLocator = locators.get('MANAGEMENT_APP_LOCATOR'); - if (dataQualityLocator) { - await dataQualityLocator.navigate({ - sectionId: 'data', - appId: `index_management/data_streams/${label}`, + const locator = locators.get('INDEX_MANAGEMENT_LOCATOR_ID'); + if (locator) { + await locator.navigate({ + page: 'data_streams_details', + dataStreamName: label, }); } togglePopover(null); // Close the popover after action diff --git a/x-pack/plugins/data_usage/tsconfig.json b/x-pack/plugins/data_usage/tsconfig.json index cecbeb654db30..d3754906475e9 100644 --- a/x-pack/plugins/data_usage/tsconfig.json +++ b/x-pack/plugins/data_usage/tsconfig.json @@ -28,6 +28,7 @@ "@kbn/core-http-browser", "@kbn/core-chrome-browser", "@kbn/features-plugin", + "@kbn/index-management-shared-types", ], "exclude": ["target/**/*"] }