Skip to content

Commit

Permalink
[Data Usage] add locator to link to data stream management (elastic#1…
Browse files Browse the repository at this point in the history
…95433)

## Summary

add locator to link to data stream management recently made available
elastic#195299
  • Loading branch information
neptunian authored Oct 9, 2024
1 parent 9493450 commit ee4815a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand All @@ -39,12 +40,11 @@ export const LegendAction: React.FC<LegendActionProps> = 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<IndexManagementLocatorParams>('INDEX_MANAGEMENT_LOCATOR_ID');
if (locator) {
await locator.navigate({
page: 'data_streams_details',
dataStreamName: label,
});
}
togglePopover(null); // Close the popover after action
Expand Down
1 change: 1 addition & 0 deletions x-pack/plugins/data_usage/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"@kbn/core-http-browser",
"@kbn/core-chrome-browser",
"@kbn/features-plugin",
"@kbn/index-management-shared-types",
],
"exclude": ["target/**/*"]
}

0 comments on commit ee4815a

Please sign in to comment.