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

[OneDiscover][Security Solution] Refactor Security components to use rowAdditionalLeadingControls prop for UnifiedDataTable #189294

Open
jughosta opened this issue Jul 26, 2024 · 2 comments
Labels
Project:OneDiscover Enrich Discover with contextual awareness Team:Security Solution Platform Security Solution Platform Team Team:Threat Hunting:Investigations Security Solution Investigations Team

Comments

@jughosta
Copy link
Contributor

jughosta commented Jul 26, 2024

Follow up for:

We suggest to refactor the code to use the new prop rowAdditionalLeadingControls which provides a unified look for row leading controls (can result in 500+ lines of code changes):

  • Convert from externalControlColumns to the new prop rowAdditionalLeadingControls
  • Convert from trailingControlColumns to a normal column. trailingControlColumns prop is deprecated
@jughosta jughosta added the Project:OneDiscover Enrich Discover with contextual awareness label Jul 26, 2024
@botelastic botelastic bot added the needs-team Issues missing a team label label Jul 26, 2024
@dmlemeshko dmlemeshko added the Team:Security Solution Platform Security Solution Platform Team label Jul 29, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-detection-engine (Team:Security Solution Platform)

@botelastic botelastic bot removed the needs-team Issues missing a team label label Jul 29, 2024
@logeekal logeekal added the Team:Threat Hunting:Investigations Security Solution Investigations Team label Aug 7, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-threat-hunting-investigations (Team:Threat Hunting:Investigations)

jughosta added a commit that referenced this issue Aug 7, 2024
- Closes #186637
- Closes #186808

## Summary

- [x] Extend UnifiedDataTable with a new `rowAdditionalLeadingControls`
prop to render additional leading controls
- [x] In case of many actions, collapse the rest of them under "More"
button
- [x] New OneDiscover extension
- [x] Convert from `customControlColumnsConfiguration` to the new prop.
Refactor actions format in Log Explorer.
- [x] Swap the default "select" and "expand" control columns ~if custom
row actions are specified~
- [x] Add to example OneDiscover profile
- [x] Add functional and units tests

<img width="858" alt="Screenshot 2024-07-26 at 16 00 17"
src="https://github.com/user-attachments/assets/68832abc-a498-4ec6-8333-79ad5f83855b">
<img width="1139" alt="Screenshot 2024-07-26 at 16 00 47"
src="https://github.com/user-attachments/assets/8ff99ac1-21b0-4687-b548-fbf3c5517808">

### Testing 

For testing the example profile:
- add `discover.experimental.enabledProfiles: ['example-root-profile',
'example-data-source-profile', 'example-document-profile']` to
kibana.dev.yml
- start kibana
- make sure to have an index with `my-example-logs` name or create an
alias to an existing index:
```
POST _aliases
{
  "actions": [
    {
      "add": {
        "index": "kibana_sample_data_logs",
        "alias": "my-example-logs"
      }
    }
  ]
}
```
- create a data view for `my-example-logs` index


### Follow up for Security solution

The following items would require deprecation/refactoring in components
on Security Solution pages to have consistent UX (can result in 500+
lines of code changes):
- Convert from `externalControlColumns` to the new prop
`rowAdditionalLeadingControls`
- Convert from `trailingControlColumns` to a normal column.
`trailingControlColumns` is deprecated.
  - #189294
- Use `getRowIndicator` prop on UnifiedDataTable instead of
`border-left` style
  - #189295


### Checklist


- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [x] This renders correctly on smaller devices using a responsive
layout. (You can test this [in your
browser](https://www.browserstack.com/guide/responsive-testing-on-local-server))
- [x] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)

---------

Co-authored-by: kibanamachine <[email protected]>
@PhilippeOberti PhilippeOberti added this to the 8.16 milestone Sep 3, 2024
@PhilippeOberti PhilippeOberti modified the milestones: 8.16, 8.17 Oct 29, 2024
@PhilippeOberti PhilippeOberti modified the milestones: 8.17, 8.18 Jan 7, 2025
@logeekal logeekal removed their assignment Jan 21, 2025
@PhilippeOberti PhilippeOberti removed this from the 8.18 milestone Feb 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Project:OneDiscover Enrich Discover with contextual awareness Team:Security Solution Platform Security Solution Platform Team Team:Threat Hunting:Investigations Security Solution Investigations Team
Projects
None yet
Development

No branches or pull requests

5 participants