Skip to content

Commit

Permalink
Updating index management link to support for ES3
Browse files Browse the repository at this point in the history
  • Loading branch information
Samiul-TheSoccerFan committed Nov 18, 2024
1 parent 99df34d commit 0f9bfc5
Showing 1 changed file with 12 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import { euiThemeVars } from '@kbn/ui-theme';
import { css } from '@emotion/react';
import { ENTERPRISE_SEARCH_CONTENT_APP_ID } from '@kbn/deeplinks-search';

import { SEARCH_INDICES } from '@kbn/deeplinks-search/constants';
import { InferenceUsageInfo } from '../../../../types';
import { useKibana } from '../../../../../../hooks/use_kibana';
import { RenderMessageWithIcon } from './render_message_with_icon';
Expand All @@ -37,13 +38,19 @@ export const ScanUsageResults: React.FC<ScanUsageResultsProps> = ({
onIgnoreWarningCheckboxChange,
}) => {
const {
services: { application },
services: { application, serverless },
} = useKibana();
const handleNavigateToIndexManagement = () => {
application?.navigateToApp(ENTERPRISE_SEARCH_CONTENT_APP_ID, {
path: 'search_indices',
openInNewTab: true,
});
if (serverless) {
application?.navigateToApp(SEARCH_INDICES, {
openInNewTab: true,
});
} else {
application?.navigateToApp(ENTERPRISE_SEARCH_CONTENT_APP_ID, {
path: `search_indices`,
openInNewTab: true,
});
}
};

return (
Expand Down

0 comments on commit 0f9bfc5

Please sign in to comment.