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

Cleaned up Observability plugin from timelines unused dependencies on TGrid usage #143607

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
3208637
Clean Observability plugin from timelines unused deps on TGrid usage
YulNaumenko Oct 19, 2022
e7311ff
-
YulNaumenko Oct 19, 2022
dd00222
End of standalone version of TGrid
YulNaumenko Oct 19, 2022
380e93c
fixed unused deps
YulNaumenko Oct 19, 2022
9450e4c
-
YulNaumenko Oct 19, 2022
f90dc7b
Clean up variables
YulNaumenko Oct 19, 2022
c41aadd
Fixed tests
YulNaumenko Oct 19, 2022
e2a635c
FIxed tests
YulNaumenko Oct 19, 2022
9f51037
Merge branch 'main' into observability-remove-timeline-deps
kibanamachine Oct 19, 2022
a194112
Removed unused tests
YulNaumenko Oct 19, 2022
cdb2972
Merge remote-tracking branch 'origin/observability-remove-timeline-de…
YulNaumenko Oct 19, 2022
e206ebc
Merge branch 'main' into observability-remove-timeline-deps
YulNaumenko Oct 19, 2022
7541979
Merge branch 'main' into observability-remove-timeline-deps
YulNaumenko Oct 19, 2022
4e07e1c
removed the failing code
YulNaumenko Oct 19, 2022
e3484e8
Merge branch 'main' into observability-remove-timeline-deps
YulNaumenko Oct 19, 2022
8e29ea3
-
YulNaumenko Oct 19, 2022
590383d
Merge remote-tracking branch 'origin/observability-remove-timeline-de…
YulNaumenko Oct 19, 2022
0c877a8
Merge branch 'main' into observability-remove-timeline-deps
YulNaumenko Oct 19, 2022
49faf0e
Merge branch 'main' into observability-remove-timeline-deps
YulNaumenko Oct 19, 2022
86b78f4
Merge branch 'main' into observability-remove-timeline-deps
YulNaumenko Oct 19, 2022
775290e
Merge branch 'main' into observability-remove-timeline-deps
YulNaumenko Oct 19, 2022
54d273c
Merge branch 'main' into observability-remove-timeline-deps
YulNaumenko Oct 19, 2022
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
2 changes: 0 additions & 2 deletions tsconfig.base.json
Original file line number Diff line number Diff line change
Expand Up @@ -475,8 +475,6 @@
"@kbn/global-search-test-plugin/*": ["x-pack/test/plugin_functional/plugins/global_search_test/*"],
"@kbn/resolver-test-plugin": ["x-pack/test/plugin_functional/plugins/resolver_test"],
"@kbn/resolver-test-plugin/*": ["x-pack/test/plugin_functional/plugins/resolver_test/*"],
"@kbn/timelines-test-plugin": ["x-pack/test/plugin_functional/plugins/timelines_test"],
"@kbn/timelines-test-plugin/*": ["x-pack/test/plugin_functional/plugins/timelines_test/*"],
"@kbn/security-test-endpoints-plugin": ["x-pack/test/security_functional/fixtures/common/test_endpoints"],
"@kbn/security-test-endpoints-plugin/*": ["x-pack/test/security_functional/fixtures/common/test_endpoints/*"],
"@kbn/application-usage-test-plugin": ["x-pack/test/usage_collection/plugins/application_usage_test"],
Expand Down
1 change: 0 additions & 1 deletion x-pack/plugins/observability/kibana.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
"features",
"inspector",
"ruleRegistry",
"timelines",
"triggersActionsUi",
"inspector",
"unifiedSearch",
Expand Down
3 changes: 0 additions & 3 deletions x-pack/plugins/observability/public/application/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ import { DataViewsPublicPluginStart } from '@kbn/data-views-plugin/public';
import { LensPublicStart } from '@kbn/lens-plugin/public';
import { TriggersAndActionsUIPublicPluginStart } from '@kbn/triggers-actions-ui-plugin/public';
import { CasesUiStart } from '@kbn/cases-plugin/public';
import { TimelinesUIStart } from '@kbn/timelines-plugin/public';

export interface ObservabilityAppServices {
application: ApplicationStart;
cases: CasesUiStart;
Expand All @@ -42,7 +40,6 @@ export interface ObservabilityAppServices {
stateTransfer: EmbeddableStateTransfer;
storage: IStorageWrapper;
theme: ThemeServiceStart;
timelines: TimelinesUIStart;
triggersActionsUi: TriggersAndActionsUIPublicPluginStart;
uiSettings: IUiSettingsClient;
isDev?: boolean;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ import { casesFeatureId, observabilityFeatureId } from '../../common';
import { useBulkAddToCaseActions } from '../hooks/use_alert_bulk_case_actions';
import { TopAlert, useToGetInternalFlyout } from '../pages/alerts';
import { getRenderCellValue } from '../pages/alerts/components/render_cell_value';
import { addDisplayNames } from '../pages/alerts/containers/alerts_table_t_grid/add_display_names';
import { columns as alertO11yColumns } from '../pages/alerts/containers/alerts_table_t_grid/alerts_table_t_grid';
import { getRowActions } from '../pages/alerts/containers/alerts_table_t_grid/get_row_actions';
import { addDisplayNames } from '../pages/alerts/containers/alerts_table/add_display_names';
import { columns as alertO11yColumns } from '../pages/alerts/containers/alerts_table/default_columns';
import { getRowActions } from '../pages/alerts/containers/alerts_table/get_row_actions';
import type { ObservabilityRuleTypeRegistry } from '../rules/create_observability_rule_type_registry';
import type { ConfigSchema } from '../plugin';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
ADD_TO_CASE_DISABLED,
ADD_TO_EXISTING_CASE,
ADD_TO_NEW_CASE,
} from '../pages/alerts/containers/alerts_table_t_grid/translations';
} from '../pages/alerts/containers/alerts_table/translations';
import { useGetUserCasesPermissions } from './use_get_user_cases_permissions';
import { ObservabilityAppServices } from '../application/types';

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ export * from './render_cell_value';
export * from './severity_badge';
export * from './workflow_status_filter';
export * from './alerts_search_bar';
export * from './default_cell_actions';
export * from './filter_for_value';
export * from './parse_alert';
export * from './alerts_status_filter';
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,7 @@ import { useKibana } from '../../../utils/kibana_react';
import { useGetUserCasesPermissions } from '../../../hooks/use_get_user_cases_permissions';
import { parseAlert } from './parse_alert';
import { translations, paths } from '../../../config';
import {
ADD_TO_EXISTING_CASE,
ADD_TO_NEW_CASE,
} from '../containers/alerts_table_t_grid/translations';
import { ADD_TO_EXISTING_CASE, ADD_TO_NEW_CASE } from '../containers/alerts_table/translations';
import { ObservabilityAppServices } from '../../../application/types';
import { RULE_DETAILS_PAGE_ID } from '../../rule_details/types';
import type { TopAlert } from '../containers/alerts_page/types';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
* 2.0.
*/

export { getRenderCellValue, getMappedNonEcsValue } from './render_cell_value';
export { getRenderCellValue } from './render_cell_value';
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,10 @@
*/
import { ALERT_DURATION, ALERT_REASON, ALERT_STATUS, TIMESTAMP } from '@kbn/rule-data-utils';
import { EuiDataGridColumn } from '@elastic/eui';
import type { ColumnHeaderOptions } from '@kbn/timelines-plugin/common';
import { translations } from '../../../../config';

export const addDisplayNames = (
column: Pick<EuiDataGridColumn, 'display' | 'displayAsText' | 'id' | 'initialWidth'> &
ColumnHeaderOptions
column: Pick<EuiDataGridColumn, 'display' | 'displayAsText' | 'id' | 'initialWidth'>
) => {
if (column.id === ALERT_REASON) {
return { ...column, displayAsText: translations.alertsTable.reasonColumnDescription };
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/

/**
* We need to produce types and code transpilation at different folders during the build of the package.
* We have types and code at different imports because we don't want to import the whole package in the resulting webpack bundle for the plugin.
* This way plugins can do targeted imports to reduce the final code bundle
*/
import { ALERT_DURATION, ALERT_REASON, ALERT_STATUS, TIMESTAMP } from '@kbn/rule-data-utils';

import { EuiDataGridColumn } from '@elastic/eui';

import type { ColumnHeaderOptions } from '@kbn/timelines-plugin/common';

import { translations } from '../../../../config';

/**
* columns implements a subset of `EuiDataGrid`'s `EuiDataGridColumn` interface,
* plus additional TGrid column properties
*/
export const columns: Array<
Pick<EuiDataGridColumn, 'display' | 'displayAsText' | 'id' | 'initialWidth'> & ColumnHeaderOptions
> = [
{
columnHeaderType: 'not-filtered',
displayAsText: translations.alertsTable.statusColumnDescription,
id: ALERT_STATUS,
initialWidth: 110,
},
{
columnHeaderType: 'not-filtered',
displayAsText: translations.alertsTable.lastUpdatedColumnDescription,
id: TIMESTAMP,
initialWidth: 230,
},
{
columnHeaderType: 'not-filtered',
displayAsText: translations.alertsTable.durationColumnDescription,
id: ALERT_DURATION,
initialWidth: 116,
},
{
columnHeaderType: 'not-filtered',
displayAsText: translations.alertsTable.reasonColumnDescription,
id: ALERT_REASON,
linkField: '*',
},
];
Loading