diff --git a/x-pack/plugins/index_management/__jest__/client_integration/home/data_streams_tab.test.ts b/x-pack/plugins/index_management/__jest__/client_integration/home/data_streams_tab.test.ts index 1d7ee65790cfd..3bc122ad867f6 100644 --- a/x-pack/plugins/index_management/__jest__/client_integration/home/data_streams_tab.test.ts +++ b/x-pack/plugins/index_management/__jest__/client_integration/home/data_streams_tab.test.ts @@ -812,7 +812,7 @@ describe('Data Streams tab', () => { const { actions, findDetailPanelIlmPolicyLink } = testBed; await actions.clickNameAt(0); - expect(findDetailPanelIlmPolicyLink().prop('href')).toBe('/test/my_ilm_policy'); + expect(findDetailPanelIlmPolicyLink().prop('data-href')).toBe('/test/my_ilm_policy'); }); test('with an ILM url locator and no ILM policy', async () => { diff --git a/x-pack/plugins/index_management/public/application/sections/home/data_stream_list/data_stream_detail_panel/data_stream_detail_panel.tsx b/x-pack/plugins/index_management/public/application/sections/home/data_stream_list/data_stream_detail_panel/data_stream_detail_panel.tsx index d962305a7147c..10ef17c566241 100644 --- a/x-pack/plugins/index_management/public/application/sections/home/data_stream_list/data_stream_detail_panel/data_stream_detail_panel.tsx +++ b/x-pack/plugins/index_management/public/application/sections/home/data_stream_list/data_stream_detail_panel/data_stream_detail_panel.tsx @@ -131,7 +131,7 @@ export const DataStreamDetailPanel: React.FunctionComponent = ({ const { error, data: dataStream, isLoading } = useLoadDataStream(dataStreamName); const ilmPolicyLink = useIlmLocator(ILM_PAGES_POLICY_EDIT, dataStream?.ilmPolicyName); - const { history, config } = useAppContext(); + const { history, config, core } = useAppContext(); let indicesLink; let content; @@ -193,7 +193,11 @@ export const DataStreamDetailPanel: React.FunctionComponent = ({ > <> {ilmPolicyLink ? ( - + core.application.navigateToUrl(ilmPolicyLink)} + > {ilmPolicyName} ) : ( @@ -204,7 +208,11 @@ export const DataStreamDetailPanel: React.FunctionComponent = ({ ) : ( <> {ilmPolicyLink ? ( - + core.application.navigateToUrl(ilmPolicyLink)} + > {ilmPolicyName} ) : ( @@ -429,7 +437,7 @@ export const DataStreamDetailPanel: React.FunctionComponent = ({ defaultMessage="To edit data retention for this data stream, you must edit its associated {link}." values={{ link: ( - + core.application.navigateToUrl(ilmPolicyLink)}> { + const { core } = useAppContext(); + return ( + core.application.navigateToUrl(ilmPolicyLink)} + > {ilmPolicyName} ), diff --git a/x-pack/plugins/index_management/public/application/sections/home/template_list/template_details/tabs/tab_summary.tsx b/x-pack/plugins/index_management/public/application/sections/home/template_list/template_details/tabs/tab_summary.tsx index 2621f3ec483c1..eed3335d01431 100644 --- a/x-pack/plugins/index_management/public/application/sections/home/template_list/template_details/tabs/tab_summary.tsx +++ b/x-pack/plugins/index_management/public/application/sections/home/template_list/template_details/tabs/tab_summary.tsx @@ -63,7 +63,7 @@ export const TabSummary: React.FunctionComponent = ({ templateDetails }) const numIndexPatterns = indexPatterns.length; - const { history } = useAppContext(); + const { history, core } = useAppContext(); const ilmPolicyLink = useIlmLocator(ILM_PAGES_POLICY_EDIT, ilmPolicy?.name); return ( @@ -171,7 +171,9 @@ export const TabSummary: React.FunctionComponent = ({ templateDetails }) {ilmPolicy?.name && ilmPolicyLink ? ( - {ilmPolicy!.name} + core.application.navigateToUrl(ilmPolicyLink)}> + {ilmPolicy!.name} + ) : ( ilmPolicy?.name || i18nTexts.none )}