Skip to content

[Security solution][Endpoint] New Event Filters sub-section under Administration area#97903

Merged
paul-tavares merged 15 commits intoelastic:masterfrom
paul-tavares:task/olm-954-event-filters-list-view
Apr 23, 2021
Merged

[Security solution][Endpoint] New Event Filters sub-section under Administration area#97903
paul-tavares merged 15 commits intoelastic:masterfrom
paul-tavares:task/olm-954-event-filters-list-view

Conversation

@paul-tavares
Copy link
Copy Markdown
Contributor

@paul-tavares paul-tavares commented Apr 21, 2021

Summary

  • Add a new sub-tab to the Administration area for Event Filters (WIP and hidden behind the eventFilteringEnabled experimental feature)
  • A new generic component for displaying paginated lists of content. Each item in the content will be rendered using a Component that is also defined as a prop.

olm-954-event-filters-sub-tab

Checklist

Delete any items that are not applicable to this PR.

@paul-tavares paul-tavares added v8.0.0 release_note:skip Skip the PR/issue when compiling release notes Team:Defend Workflows “EDR Workflows” sub-team of Security Solution v7.14.0 auto-backport Deprecated - use backport:version if exact versions are needed labels Apr 21, 2021
@paul-tavares paul-tavares self-assigned this Apr 21, 2021
Comment thread x-pack/plugins/security_solution/public/management/common/routing.ts Outdated
Comment thread x-pack/plugins/security_solution/public/management/common/routing.ts Outdated
<div>
<EuiSpacer size="l" />

<EuiTablePagination
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

out of curiosity - Is there an specific reason why you are using this instead of EuiPagination

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just copied it from Trusted apps. I looked at EuiPagination, but it only gives you the pagination portion, not the items per page dropdown. Late yesterday I noticed that we don't have control over the label on the "Pick page Size" dropdown and that the label being used now ("Items per row") is a bit specific to tables and we might want this component to allow control of it.

What do you think? create a custom pagination component for use by this PaginatedContent component?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I see... What about a custom component with EuiPagination and a dropdown for page size?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I think that will likely be better and will decouple us from the Pagination component used in Tables.
I will include that change in next PR that will follow this one
Thanks for the feedback.

// eslint-disable-next-line @typescript-eslint/no-explicit-any
type ComponentWithAnyProps = ComponentType<any>;

export interface PaginatedContentProps<T, C extends ComponentWithAnyProps> {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This component will allow us to reuse a lot of code between trusted apps, event filters and upcoming listings 👍 😃

@paul-tavares paul-tavares marked this pull request as ready for review April 23, 2021 13:40
@paul-tavares paul-tavares requested a review from a team as a code owner April 23, 2021 13:40
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/security-onboarding-and-lifecycle-mgt (Team:Onboarding and Lifecycle Mgt)

@paul-tavares paul-tavares requested a review from dasansol92 April 23, 2021 13:40
@dasansol92
Copy link
Copy Markdown
Contributor

LGTM!! 🔥 🚢 🥳

@kibanamachine
Copy link
Copy Markdown
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
securitySolution 2167 2172 +5

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
securitySolution 6.9MB 7.0MB +4.3KB

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @paul-tavares

@paul-tavares paul-tavares merged commit 485692d into elastic:master Apr 23, 2021
@paul-tavares paul-tavares deleted the task/olm-954-event-filters-list-view branch April 23, 2021 15:56
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Apr 23, 2021
…inistration area (elastic#97903)

* Add Event Filters section to the Admin area (behind feature flag)
* new `PaginatedContent` generic component
* Refactor Trusted Apps grid view to use PaginatedContent
* Refactor usages of `getTestId()` to use new hook
@kibanamachine
Copy link
Copy Markdown
Contributor

💚 Backport successful

Status Branch Result
7.x

This backport PR will be merged automatically after passing CI.

kibanamachine added a commit that referenced this pull request Apr 23, 2021
…inistration area (#97903) (#98169)

* Add Event Filters section to the Admin area (behind feature flag)
* new `PaginatedContent` generic component
* Refactor Trusted Apps grid view to use PaginatedContent
* Refactor usages of `getTestId()` to use new hook

Co-authored-by: Paul Tavares <56442535+paul-tavares@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-backport Deprecated - use backport:version if exact versions are needed OLM Sprint release_note:skip Skip the PR/issue when compiling release notes Team:Defend Workflows “EDR Workflows” sub-team of Security Solution v7.14.0 v8.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants