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

DO NOT MERGE - Timeline New UI + Modal + Unified components #171385

Closed
wants to merge 111 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
111 commits
Select commit Hold shift + click to select a range
3d798c9
[Security Solution] Integrate UnifiedDataTable to Timeline tabs
YulNaumenko Sep 7, 2023
7fd35d5
Merge remote-tracking branch 'upstream/main' into security-solution-m…
YulNaumenko Sep 7, 2023
5f71f01
[CI] Auto-commit changed files from 'node scripts/lint_ts_projects --…
kibanamachine Sep 8, 2023
f202e20
[CI] Auto-commit changed files from 'node scripts/eslint --no-cache -…
kibanamachine Sep 9, 2023
d5dd177
-
YulNaumenko Sep 11, 2023
6fcd0de
Merge branch 'main' into security-solution-migrate-timeline-to-udt
YulNaumenko Sep 11, 2023
28e3e0a
[CI] Auto-commit changed files from 'node scripts/lint_ts_projects --…
kibanamachine Sep 11, 2023
9b9e601
fixed additional controls
YulNaumenko Sep 13, 2023
46500f8
Merge branch 'security-solution-migrate-timeline-to-udt' of github.co…
YulNaumenko Sep 13, 2023
43b7f79
moved some components out of the data table file
YulNaumenko Sep 25, 2023
71d8187
Merge remote-tracking branch 'upstream/main' into security-solution-m…
YulNaumenko Sep 25, 2023
188bac3
[CI] Auto-commit changed files from 'node scripts/lint_ts_projects --…
kibanamachine Sep 25, 2023
ac9105c
[CI] Auto-commit changed files from 'node scripts/eslint --no-cache -…
kibanamachine Sep 25, 2023
d8f740a
Added unified field list
YulNaumenko Sep 26, 2023
bcd2745
Merge branch 'security-solution-migrate-timeline-to-udt' of github.co…
YulNaumenko Sep 27, 2023
49bd9b6
[CI] Auto-commit changed files from 'node scripts/eslint --no-cache -…
kibanamachine Sep 27, 2023
aab04ec
[CI] Auto-commit changed files from 'node scripts/lint_ts_projects --…
kibanamachine Sep 27, 2023
57d6de1
-
YulNaumenko Oct 2, 2023
172bb3a
Merge branch 'security-solution-migrate-timeline-to-udt' of github.co…
YulNaumenko Oct 2, 2023
ebe0a9a
Merge remote-tracking branch 'upstream/main' into security-solution-m…
YulNaumenko Oct 2, 2023
943f298
Added advanced setting flag
YulNaumenko Oct 3, 2023
077bb0b
extended unified data table with cells metadata
YulNaumenko Oct 3, 2023
9b35f7f
added resizable layout
YulNaumenko Oct 3, 2023
54bf025
feat/intial_timeline_ui
logeekal Oct 6, 2023
69d6538
more experimental UI
logeekal Oct 12, 2023
fbb46df
-
YulNaumenko Oct 12, 2023
0d9af1f
added resizable layout for table
YulNaumenko Oct 13, 2023
34c98e6
Merge remote-tracking branch 'upstream/main' into security-solution-m…
YulNaumenko Oct 13, 2023
644f7d6
[CI] Auto-commit changed files from 'node scripts/lint_ts_projects --…
kibanamachine Oct 13, 2023
53e9b41
[CI] Auto-commit changed files from 'node scripts/eslint --no-cache -…
kibanamachine Oct 13, 2023
7314322
fixed old timeline visual issues
YulNaumenko Oct 13, 2023
7b3dd96
Merge branch 'main' into security-solution-migrate-timeline-to-udt
YulNaumenko Oct 13, 2023
3c207bd
fixed split line and loading events
YulNaumenko Oct 15, 2023
70e4733
fixed flyout close event
YulNaumenko Oct 17, 2023
8cf7bcd
Merge branch 'main' into security-solution-migrate-timeline-to-udt
YulNaumenko Oct 17, 2023
1f4dd53
incremental save
logeekal Oct 23, 2023
336f12b
fixed dialog for notes
YulNaumenko Oct 23, 2023
7f0d7a3
Merge branch 'main' into security-solution-migrate-timeline-to-udt
YulNaumenko Oct 23, 2023
d5a0634
fixed sample size updates
YulNaumenko Oct 23, 2023
b3a13bd
incremental save
logeekal Oct 24, 2023
f9e21df
fixed row rendering
YulNaumenko Oct 24, 2023
cda8ad8
fixed expand/collapse document
YulNaumenko Oct 24, 2023
f650166
fixed add notes
YulNaumenko Oct 24, 2023
055a48a
added discover component adv settings to serverlees security config
YulNaumenko Oct 24, 2023
302010f
cleanup toolbar
YulNaumenko Oct 24, 2023
b5c17d7
feat: added timeline action menu + fixed filter badges
logeekal Oct 25, 2023
6a7b176
Merge branch 'main' into security-solution-migrate-timeline-to-udt
YulNaumenko Oct 25, 2023
efd01eb
Working row height/sample size, local storage persistance not working
kqualters-elastic Oct 25, 2023
426e3a0
Merge remote-tracking branch 'yuliia/security-solution-migrate-timeli…
kqualters-elastic Oct 25, 2023
ef13b22
timeline ui all changes
logeekal Oct 30, 2023
133756f
[CI] Auto-commit changed files from 'node scripts/lint_ts_projects --…
kibanamachine Oct 30, 2023
70002c6
[CI] Auto-commit changed files from 'node scripts/eslint --no-cache -…
kibanamachine Oct 30, 2023
ba4bcc0
fix: add missing translations
logeekal Oct 30, 2023
74b3cb8
Merged main -> current branch
logeekal Oct 30, 2023
eb76e7f
fix: types + some tests
logeekal Oct 31, 2023
fee5b8c
fix: more tests
logeekal Oct 31, 2023
c3c11b9
fix: cypress tests
logeekal Nov 3, 2023
e80341b
Merged main -> current branch
logeekal Nov 7, 2023
f244f03
fix: adapt UI according to new timeline saving strategy
logeekal Nov 7, 2023
66c1300
REBASE ME
kqualters-elastic Nov 8, 2023
84997b1
fix: cypress+ftr tests
logeekal Nov 8, 2023
9b20c0e
fix: some tests
logeekal Nov 8, 2023
7643752
style changes to make timeline look like a modal
semd Nov 8, 2023
5266dce
fix: types
logeekal Nov 8, 2023
38421f5
fix visibility
semd Nov 8, 2023
bf324fe
1001 z-index to render on top of flyouts
semd Nov 9, 2023
db07950
Merge branch 'main' into 169021_timeline_as_modal
kibanamachine Nov 9, 2023
580b0f0
fix: jest tests
logeekal Nov 9, 2023
790576d
Merged main -> current branch
logeekal Nov 9, 2023
8fa0e74
fix: review feedback
logeekal Nov 9, 2023
2ae0cdc
fix: data provider redesign
logeekal Nov 9, 2023
5d1724a
render timeline only when is open instead of hiding
semd Nov 9, 2023
4d87013
Merge branch '169021_timeline_as_modal' of https://github.com/semd/ki…
semd Nov 9, 2023
2bcb203
modalStyles
semd Nov 9, 2023
8b02ed8
use class names
semd Nov 9, 2023
92b5f91
fix: tests + housekeeping
logeekal Nov 10, 2023
7dbf8dc
fix: organise tests + more fixes
logeekal Nov 10, 2023
0bd8bcf
fix unrelated cypress tests
semd Nov 10, 2023
c631402
rename class
semd Nov 10, 2023
f02ee90
Merge remote-tracking branch 'upstream/main' into 169021_timeline_as_…
semd Nov 10, 2023
9035ee7
format
semd Nov 10, 2023
c6ee3cd
add cypress test for unsaved timeline prompt
semd Nov 10, 2023
2174293
Merge branch 'main' into expr/new_timeline_ui
logeekal Nov 10, 2023
73cd424
rollback to hide timeline
semd Nov 10, 2023
fa7ae52
renaming
semd Nov 10, 2023
667992d
add overflow:hidden when timeline visible
semd Nov 10, 2023
44a4daa
Merge remote-tracking branch 'upstream/main' into 169021_timeline_as_…
semd Nov 10, 2023
5dcbb74
fix tests selectors colliding with hidden timeline
semd Nov 13, 2023
1b4bacd
Merge remote-tracking branch 'upstream/main' into 169021_timeline_as_…
semd Nov 13, 2023
ea915e5
remove wrong screen usage
semd Nov 13, 2023
9877b9b
fix: remove unnecssary eslint exception
logeekal Nov 13, 2023
780b5fd
fix: types
logeekal Nov 13, 2023
85e53b0
Merge branch 'main' into 169021_timeline_as_modal
kibanamachine Nov 14, 2023
1219c20
Merge branch 'main' into expr/new_timeline_ui
kibanamachine Nov 14, 2023
86b6d57
Merge branch 'main' into 169021_timeline_as_modal
kibanamachine Nov 14, 2023
9e78fbf
Merge branch 'main' into expr/new_timeline_ui
logeekal Nov 14, 2023
fa312b4
WIP, fix actions
kqualters-elastic Nov 15, 2023
0bc46ec
Fix delete note unpinning
kqualters-elastic Nov 15, 2023
7f71568
[CI] Auto-commit changed files from 'node scripts/eslint --no-cache -…
kibanamachine Nov 15, 2023
1ac556e
WIP fix some things, call isInstance an order of magnitude less
kqualters-elastic Nov 15, 2023
fa3d3af
Merge remote-tracking branch 'yuliia/security-solution-migrate-timeli…
kqualters-elastic Nov 15, 2023
b63a5bc
fix: review feedback
logeekal Nov 15, 2023
4c99fb5
Merge branch 'main' into expr/new_timeline_ui
logeekal Nov 15, 2023
8d06e2c
Merge branch 'main' into expr/new_timeline_ui
logeekal Nov 15, 2023
9147e34
fix: translations title
logeekal Nov 15, 2023
fa6eded
Merge branch 'main' into 169021_timeline_as_modal
kibanamachine Nov 15, 2023
5a11b18
Merge branch '169021_timeline_as_modal' into expr/new_timeline_modal_…
logeekal Nov 16, 2023
6612161
merge discover components
logeekal Nov 16, 2023
0ab8272
move kpis near table
logeekal Nov 16, 2023
7e05d5d
fix: hide standard filters
logeekal Nov 16, 2023
0e5ea12
Merge branch 'expr/new_timeline_ui' into expr/new_timeline_modal_disc…
logeekal Nov 16, 2023
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: 2 additions & 0 deletions packages/kbn-management/settings/setting_ids/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,8 @@ export const SECURITY_SOLUTION_DEFAULT_ALERT_TAGS_KEY = 'securitySolution:alertT
/** This Kibana Advanced Setting allows users to enable/disable the Expandable Flyout */
export const SECURITY_SOLUTION_ENABLE_EXPANDABLE_FLYOUT_SETTING =
'securitySolution:enableExpandableFlyout' as const;
export const SECURITY_SOLUTION_USE_DISCOVER_COMPONENTS_IN_TIMELINE =
'securitySolution:useDiscoverComponentsInTimeline';

// Timelion settings
export const TIMELION_ES_DEFAULT_INDEX_ID = 'timelion:es.default_index';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
font-family: $euiCodeFontFamily;
}

.dscDocsGrid__cell--expanded {
background-color: $euiColorHighlight;
}

.unifiedDataTable__cellPopover {
// Fixes https://github.com/elastic/kibana/issues/145216 in Chrome
.lines-content.monaco-editor-background {
Expand Down
9 changes: 9 additions & 0 deletions packages/kbn-unified-data-table/src/components/data_table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,12 @@ export interface UnifiedDataTableProps {
* Optional row line height override. Default is 1.6em.
*/
rowLineHeightOverride?: string;
/**
* Custom set of properties used by some actions.
* An action might require a specific set of metadata properties to render.
* This data is sent directly to actions.
*/
cellActionsMetadata?: Record<string, unknown>;
}

export const EuiDataGridMemoized = React.memo(EuiDataGrid);
Expand Down Expand Up @@ -399,9 +405,11 @@ export const UnifiedDataTable = ({
componentsTourSteps,
gridStyleOverride,
rowLineHeightOverride,
cellActionsMetadata,
}: UnifiedDataTableProps) => {
const { fieldFormats, toastNotifications, dataViewFieldEditor, uiSettings, storage, data } =
services;

const { darkMode } = useObservable(services.theme?.theme$ ?? of(themeDefault), themeDefault);
const dataGridRef = useRef<EuiDataGridRefProps>(null);
const [selectedDocs, setSelectedDocs] = useState<string[]>([]);
Expand Down Expand Up @@ -649,6 +657,7 @@ export const UnifiedDataTable = ({
getCellValue,
triggerId: cellActionsTriggerId,
dataGridRef,
metadata: cellActionsMetadata,
});

const euiGridColumns = useMemo(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import {
useEuiTheme,
} from '@elastic/eui';
import { FormattedMessage } from '@kbn/i18n-react';
import { euiDarkVars as themeDark, euiLightVars as themeLight } from '@kbn/ui-theme';
import { i18n } from '@kbn/i18n';
import { css } from '@emotion/react';
import type { DataTableRecord } from '@kbn/discover-utils/types';
Expand All @@ -42,9 +41,7 @@ export const SelectButton = ({ rowIndex, setCellProps }: EuiDataGridCellValueEle
useEffect(() => {
if (expanded && doc && expanded.id === doc.id) {
setCellProps({
style: {
backgroundColor: isDarkMode ? themeDark.euiColorHighlight : themeLight.euiColorHighlight,
},
className: 'dscDocsGrid__cell--expanded',
});
} else {
setCellProps({ style: undefined });
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

import React, { useContext, useEffect, useRef, useState } from 'react';
import { EuiButtonIcon, EuiDataGridCellValueElementProps, EuiToolTip } from '@elastic/eui';
import { euiLightVars as themeLight, euiDarkVars as themeDark } from '@kbn/ui-theme';
import { i18n } from '@kbn/i18n';
import { UnifiedDataTableContext } from '../table_context';

Expand All @@ -30,9 +29,7 @@ export const ExpandButton = ({ rowIndex, setCellProps }: EuiDataGridCellValueEle
});
} else if (expanded && current && expanded.id === current.id) {
setCellProps({
style: {
backgroundColor: isDarkMode ? themeDark.euiColorHighlight : themeLight.euiColorHighlight,
},
className: 'dscDocsGrid__cell--expanded',
});
} else {
setCellProps({ style: undefined });
Expand Down
38 changes: 17 additions & 21 deletions packages/kbn-unified-data-table/src/utils/get_render_cell_value.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import React, { Fragment, useContext, useEffect } from 'react';
import classnames from 'classnames';
import { i18n } from '@kbn/i18n';
import { euiLightVars as themeLight, euiDarkVars as themeDark } from '@kbn/ui-theme';
import type { DataView, DataViewField } from '@kbn/data-views-plugin/public';
import {
EuiDataGridCellValueElementProps,
Expand Down Expand Up @@ -67,21 +66,6 @@ export const getRenderCellValueFn = ({
isExpandable,
isExpanded,
}: EuiDataGridCellValueElementProps) => {
if (!!externalCustomRenderers && !!externalCustomRenderers[columnId]) {
return (
<>
{externalCustomRenderers[columnId]({
rowIndex,
columnId,
isDetails,
setCellProps,
isExpandable,
isExpanded,
colIndex,
})}
</>
);
}
const row = rows ? rows[rowIndex] : undefined;

const field = dataView.fields.getByName(columnId);
Expand All @@ -94,17 +78,29 @@ export const getRenderCellValueFn = ({
});
} else if (ctx.expanded && row && ctx.expanded.id === row.id) {
setCellProps({
style: {
backgroundColor: ctx.isDarkMode
? themeDark.euiColorHighlight
: themeLight.euiColorHighlight,
},
className: 'dscDocsGrid__cell--expanded',
});
} else {
setCellProps({ style: undefined });
}
}, [ctx, row, setCellProps]);

if (!!externalCustomRenderers && !!externalCustomRenderers[columnId]) {
return (
<span className={CELL_CLASS}>
{externalCustomRenderers[columnId]({
rowIndex,
columnId,
isDetails,
setCellProps,
isExpandable,
isExpanded,
colIndex,
})}
</span>
);
}

if (typeof row === 'undefined') {
return <span className={CELL_CLASS}>-</span>;
}
Expand Down
1 change: 0 additions & 1 deletion packages/kbn-unified-data-table/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
"@kbn/expressions-plugin",
"@kbn/test-jest-helpers",
"@kbn/i18n-react",
"@kbn/ui-theme",
"@kbn/field-types",
"@kbn/kibana-utils-plugin",
"@kbn/cell-actions",
Expand Down
Loading