Skip to content

Commit

Permalink
Remove links to Logs Explorer (#203685)
Browse files Browse the repository at this point in the history
Resolves #182229

## Release Note

Remove Logs Explorer

## Summary

- Removes the Discover/Logs Explorer tabs in the top nav
- Changes all links to Logs Explorer in other applications to Discover
- Removes all APIs exposed by Logs Explorer

Note: This does not remove Logs Explorer from the codebase. There will
be a follow up for that work.

---------

Co-authored-by: kibanamachine <[email protected]>
  • Loading branch information
thomheymann and kibanamachine authored Jan 3, 2025
1 parent e8ef186 commit 8902f70
Show file tree
Hide file tree
Showing 146 changed files with 535 additions and 6,718 deletions.
1 change: 0 additions & 1 deletion .buildkite/ftr_oblt_stateful_configs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ enabled:
- x-pack/test/apm_api_integration/rules/config.ts
- x-pack/test/apm_api_integration/trial/config.ts
- x-pack/test/dataset_quality_api_integration/basic/config.ts
- x-pack/test/functional/apps/observability_logs_explorer/config.ts
- x-pack/test/functional/apps/dataset_quality/config.ts
- x-pack/test/functional/apps/slo/embeddables/config.ts
- x-pack/test/functional/apps/uptime/config.ts
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
export * from './apm';
export * from './dataset_quality';
export * from './dataset_quality_details';
export * from './logs_explorer';
export * from './observability_logs_explorer';
export * from './observability_onboarding';
export * from './uptime';

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
*/

import { SerializableRecord } from '@kbn/utility-types';
import { LogsExplorerNavigationParams } from './logs_explorer';

// Will become a union once we have more origins
export interface ObservabilityLogsExplorerLocationState extends SerializableRecord {
Expand All @@ -17,38 +16,5 @@ export interface ObservabilityLogsExplorerLocationState extends SerializableReco
};
}

export type DatasetLocatorParams = LogsExplorerNavigationParams &
ObservabilityLogsExplorerLocationState;

// All datasets locator
export const ALL_DATASETS_LOCATOR_ID = 'ALL_DATASETS_LOCATOR';

export type AllDatasetsLocatorParams = DatasetLocatorParams;

// Single dataset locator
export const SINGLE_DATASET_LOCATOR_ID = 'SINGLE_DATASET_LOCATOR';

export interface SingleDatasetLocatorParams extends DatasetLocatorParams {
/**
* Integration name to be selected.
*/
integration?: string;
/**
* Dataset name to be selected.
* ex: system.syslog
*/
dataset: string;
}

// Data view locator
export const OBS_LOGS_EXPLORER_DATA_VIEW_LOCATOR_ID = 'OBS_LOGS_EXPLORER_DATA_VIEW_LOCATOR';

export interface ObsLogsExplorerDataViewLocatorParams extends DatasetLocatorParams {
/**
* Data view id to select
*/
id: string;
}

// To store the last used logs viewer (either of discover or observability-logs-explorer)
export const OBS_LOGS_EXPLORER_LOGS_VIEWER_KEY = 'obs-logs-explorer:lastUsedViewer';
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,5 @@
],
"kbn_references": [
"@kbn/utility-types",
"@kbn/es-query",
]
}
6 changes: 4 additions & 2 deletions src/platform/plugins/shared/data_views/common/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,9 @@ export type DataViewSpec = {
*/
version?: string;
/**
* Data view title
* Contrary to its name, this property sets the index pattern of the data view. (e.g. `logs-*,metrics-*`)
*
* Use the `name` property instead to set a human readable name for the data view.
*/
title?: string;
/**
Expand Down Expand Up @@ -546,7 +548,7 @@ export type DataViewSpec = {
*/
namespaces?: string[];
/**
* Name of the data view. Human readable name used to differentiate data view.
* Human readable name used to differentiate the data view.
*/
name?: string;
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,37 +110,4 @@ describe('DiscoverTopNavInline', () => {
});
});
});

describe('LogsExplorerTabs', () => {
it('should render when showLogsExplorerTabs is true', async () => {
const props = getProps();
props.stateContainer.customizationContext.inlineTopNav.showLogsExplorerTabs = true;
render(
<DiscoverMainProvider value={props.stateContainer}>
<DiscoverTopNavInline {...props} />
</DiscoverMainProvider>
);
const topNav = screen.queryByTestId('discoverTopNavInline');
expect(topNav).not.toBeNull();
await waitFor(() => {
const logsExplorerTabs = screen.queryByTestId('logsExplorerTabs');
expect(logsExplorerTabs).not.toBeNull();
});
});

it('should not render when showLogsExplorerTabs is false', async () => {
const props = getProps();
render(
<DiscoverMainProvider value={props.stateContainer}>
<DiscoverTopNavInline {...props} />
</DiscoverMainProvider>
);
const topNav = screen.queryByTestId('discoverTopNavInline');
expect(topNav).not.toBeNull();
await waitFor(() => {
const logsExplorerTabs = screen.queryByTestId('logsExplorerTabs');
expect(logsExplorerTabs).toBeNull();
});
});
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ import React from 'react';
import { EuiHeader, EuiHeaderSection, EuiHeaderSectionItem } from '@elastic/eui';
import { TopNavMenuBadges, TopNavMenuItems } from '@kbn/navigation-plugin/public';
import { euiThemeVars } from '@kbn/ui-theme';
import { LogsExplorerTabs } from '../../../../components/logs_explorer_tabs';
import { useDiscoverServices } from '../../../../hooks/use_discover_services';
import { useDiscoverTopNav } from './use_discover_topnav';
import type { DiscoverStateContainer } from '../../state_management/discover_state';

Expand All @@ -24,7 +22,6 @@ export const DiscoverTopNavInline = ({
hideNavMenuItems?: boolean;
}) => {
const { customizationContext } = stateContainer;
const services = useDiscoverServices();
const { topNavBadges, topNavMenu } = useDiscoverTopNav({ stateContainer });

if (
Expand All @@ -39,13 +36,6 @@ export const DiscoverTopNavInline = ({
css={{ boxShadow: 'none', backgroundColor: euiThemeVars.euiPageBackgroundColor }}
data-test-subj="discoverTopNavInline"
>
{customizationContext.inlineTopNav.showLogsExplorerTabs && (
<EuiHeaderSection>
<EuiHeaderSectionItem>
<LogsExplorerTabs services={services} selectedTab="discover" />
</EuiHeaderSectionItem>
</EuiHeaderSection>
)}
{!hideNavMenuItems && (
<EuiHeaderSection side="right" data-test-subj="topNavMenuItems">
<EuiHeaderSectionItem>
Expand Down

This file was deleted.

This file was deleted.

Loading

0 comments on commit 8902f70

Please sign in to comment.