Skip to content

Commit

Permalink
[Security Solution][Alert details] Fix analyzer preview navigation to…
Browse files Browse the repository at this point in the history
… timeline (#182749)

## Summary

This PR fixed the analyzer preview (in alerts flyout) to timeline
navigation. The user is now directed to the `analyzer` tab not `query`
tab. Same to session view, if session view is available, clicking the
session preview title should open timeline and go to `Session view` tab.

Related
- #180667
- #181232
- #169623 related to rule with
suppression
- #166052 related to rule with
timeline template

How to test
- Generate some alerts with analyzer and session view data
- Expand a row in alerts table
- Scroll down alerts detail flyout and go to `Visualization` section
- Click `Analyzer preview` should open timeline and go to `Analyzer` tab
- Click `Session viewer preview` should open timeline and go to `Session
view` tab (enterprise license)

Basic scenario (Alert details -> Click Analyzer preview -> Timeline)


https://github.com/elastic/kibana/assets/18648970/ff617c07-d269-4108-8a3d-3744872ee66d

Rule with suppression & timeline template



https://github.com/elastic/kibana/assets/18648970/242d545c-d871-4c42-9ec8-5aa2fcd783ba
  • Loading branch information
christineweng committed May 14, 2024
1 parent ac2a751 commit e10ae00
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ export const AnalyzerPreviewContainer: React.FC = () => {
});

// open timeline to the analyzer tab because the expandable flyout left panel Visualize => Analyzer tab is not ready
const goToAnalyzerTab = useCallback(() => {
const goToAnalyzerTab = useCallback(async () => {
// open timeline
investigateInTimelineAlertClick();
await investigateInTimelineAlertClick();

// open analyzer tab
startTransaction({ name: ALERTS_ACTIONS.OPEN_ANALYZER });
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ export const SessionPreviewContainer: FC = () => {
ecsRowData: dataAsNestedObject,
});

const goToSessionViewTab = useCallback(() => {
const goToSessionViewTab = useCallback(async () => {
// open timeline
investigateInTimelineAlertClick();
await investigateInTimelineAlertClick();

// open session view tab
startTransaction({ name: ALERTS_ACTIONS.OPEN_SESSION_VIEW });
Expand Down

0 comments on commit e10ae00

Please sign in to comment.