-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[8.15] [Bug][Investigations][Timeline] - Fix row highlighting & d…
…efault enable row renderers (#188388) (#188591) # Backport This will backport the following commits from `main` to `8.15`: - [[Bug][Investigations][Timeline] - Fix row highlighting & default enable row renderers (#188388)](#188388) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Michael Olorunnisola","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-07-17T18:55:27Z","message":"[Bug][Investigations][Timeline] - Fix row highlighting & default enable row renderers (#188388)\n\n## Summary\r\n\r\nThis PR accomplishes the following 2 things.\r\n\r\n1. It fixes row highlighting for the default table as the timeline\r\nstyles were only being applied when `renderCustomGridBody` was being\r\nused.\r\n\r\n\r\n\r\nhttps://github.com/user-attachments/assets/27fdfae2-729f-46d3-b1f3-691e768c871a\r\n\r\n\r\n2. It default enables the Row Renderers for the `investigateInTimeline`\r\nand timeline template workflows.\r\n\r\n\r\nhttps://github.com/user-attachments/assets/f074eaf7-3b8e-4f07-9a5d-face2b9f94a2\r\n\r\n---------\r\n\r\nCo-authored-by: Jatin Kathuria <[email protected]>\r\nCo-authored-by: kibanamachine <[email protected]>","sha":"5efc0f6bab76797036c27d0fb4726e5dc535eed4","branchLabelMapping":{"^v8.16.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:skip","Team:Threat Hunting:Investigations","v8.15.0","v8.16.0"],"title":"[Bug][Investigations][Timeline] - Fix row highlighting & default enable row renderers","number":188388,"url":"https://github.com/elastic/kibana/pull/188388","mergeCommit":{"message":"[Bug][Investigations][Timeline] - Fix row highlighting & default enable row renderers (#188388)\n\n## Summary\r\n\r\nThis PR accomplishes the following 2 things.\r\n\r\n1. It fixes row highlighting for the default table as the timeline\r\nstyles were only being applied when `renderCustomGridBody` was being\r\nused.\r\n\r\n\r\n\r\nhttps://github.com/user-attachments/assets/27fdfae2-729f-46d3-b1f3-691e768c871a\r\n\r\n\r\n2. It default enables the Row Renderers for the `investigateInTimeline`\r\nand timeline template workflows.\r\n\r\n\r\nhttps://github.com/user-attachments/assets/f074eaf7-3b8e-4f07-9a5d-face2b9f94a2\r\n\r\n---------\r\n\r\nCo-authored-by: Jatin Kathuria <[email protected]>\r\nCo-authored-by: kibanamachine <[email protected]>","sha":"5efc0f6bab76797036c27d0fb4726e5dc535eed4"}},"sourceBranch":"main","suggestedTargetBranches":["8.15"],"targetPullRequestStates":[{"branch":"8.15","label":"v8.15.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.16.0","branchLabelMappingKey":"^v8.16.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/188388","number":188388,"mergeCommit":{"message":"[Bug][Investigations][Timeline] - Fix row highlighting & default enable row renderers (#188388)\n\n## Summary\r\n\r\nThis PR accomplishes the following 2 things.\r\n\r\n1. It fixes row highlighting for the default table as the timeline\r\nstyles were only being applied when `renderCustomGridBody` was being\r\nused.\r\n\r\n\r\n\r\nhttps://github.com/user-attachments/assets/27fdfae2-729f-46d3-b1f3-691e768c871a\r\n\r\n\r\n2. It default enables the Row Renderers for the `investigateInTimeline`\r\nand timeline template workflows.\r\n\r\n\r\nhttps://github.com/user-attachments/assets/f074eaf7-3b8e-4f07-9a5d-face2b9f94a2\r\n\r\n---------\r\n\r\nCo-authored-by: Jatin Kathuria <[email protected]>\r\nCo-authored-by: kibanamachine <[email protected]>","sha":"5efc0f6bab76797036c27d0fb4726e5dc535eed4"}}]}] BACKPORT--> Co-authored-by: Michael Olorunnisola <[email protected]>
- Loading branch information
1 parent
e80610f
commit 208e83a
Showing
16 changed files
with
180 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
...melines/components/timeline/unified_components/data_table/get_event_type_row_classname.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/* | ||
* 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. | ||
*/ | ||
|
||
import type { TimelineItem } from '@kbn/timelines-plugin/common'; | ||
import { getEventType, isEvenEqlSequence, isEventBuildingBlockType } from '../../body/helpers'; | ||
|
||
export const getEventTypeRowClassName = (ecsData: TimelineItem['ecs']) => { | ||
const eventType = getEventType(ecsData); | ||
const eventTypeClassName = | ||
eventType === 'raw' | ||
? 'rawEvent' | ||
: eventType === 'eql' | ||
? isEvenEqlSequence(ecsData) | ||
? 'eqlSequence' | ||
: 'eqlNonSequence' | ||
: 'nonRawEvent'; | ||
|
||
const buildingBlockTypeClassName = isEventBuildingBlockType(ecsData) ? 'buildingBlockType' : ''; | ||
|
||
return `${eventTypeClassName} ${buildingBlockTypeClassName}`.trim(); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 0 additions & 34 deletions
34
...nes/components/timeline/unified_components/data_table/use_get_event_type_row_classname.ts
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.