Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Data Usage] add locator to link to data stream management #195433

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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:/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/**/*"]
}