-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Security Solution] Coverage overview dashboard filter and search bar #163498
Conversation
Pinging @elastic/security-detections-response (Team:Detections and Resp) |
switch (action.type) { | ||
case 'setShowExpandedCells': { | ||
const { value } = action; | ||
return { ...state, showExpandedCells: value }; | ||
} | ||
case 'setRuleStatusFilter': { | ||
const { value } = action; | ||
if (value.length === 0 || value.length === 2) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@maximpn This weird hardcoded edge case with the length === 2
is caused by the api not taking both Enabled
and Disabled
as filters (because of the way the ternary written is structured here), even though we seem to have the other rule filter be an OR
query join instead of an AND
. Is this the expected action?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As empty activity filter produces the same result as as all selected activity values it makes sense to omit the filter param in the request when all values are selected. I don't think there should be an ability to do the same thing in two ways. But you are right the API endpoint doesn't handle right requests when activity is set to ['enabled', 'disabled']
. I thought to change it during milestone 2 but it makes sense to do it earlier.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR fixes the problem.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dplumlee thank you for nice coverage overview dashboard filters implementation 👍 I played with the dashboard having 3K+ rules and it works as charm 🙌
Though I have concerns about code organization. It should conform with the other code in particular CoverageOverviewDashaboardContext
should be similar to contexts added as a part of Rule Immutability/Customization epic.
.../detection_engine/rule_management_ui/pages/coverage_overview/coverage_overview_page.test.tsx
Outdated
Show resolved
Hide resolved
...ublic/detection_engine/rule_management_ui/pages/coverage_overview/coverage_overview_page.tsx
Outdated
Show resolved
Hide resolved
..._solution/public/detection_engine/rule_management_ui/pages/coverage_overview/helpers.test.ts
Outdated
Show resolved
Hide resolved
...detection_engine/rule_management_ui/pages/coverage_overview/technique_panel_popover.test.tsx
Outdated
Show resolved
Hide resolved
...olution/public/detection_engine/rule_management_ui/pages/coverage_overview/filters_panel.tsx
Outdated
Show resolved
Hide resolved
...olution/public/detection_engine/rule_management_ui/pages/coverage_overview/filters_panel.tsx
Outdated
Show resolved
Hide resolved
...olution/public/detection_engine/rule_management_ui/pages/coverage_overview/filters_panel.tsx
Outdated
Show resolved
Hide resolved
...olution/public/detection_engine/rule_management_ui/pages/coverage_overview/filters_panel.tsx
Outdated
Show resolved
Hide resolved
...ion/public/detection_engine/rule_management_ui/pages/coverage_overview/filter_panel.test.tsx
Outdated
Show resolved
Hide resolved
...ion/public/detection_engine/rule_management_ui/pages/coverage_overview/filter_panel.test.tsx
Outdated
Show resolved
Hide resolved
Pinging @elastic/security-solution (Team: SecuritySolution) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dplumlee thank you for addressing my comments 🙏 I've done the second review and left some comments. Mostly my concern is about passing filter
to RuleActivityFilterComponent
and `RuleSourceFilterComponent.
...ity_solution/public/detection_engine/rule_management_ui/pages/coverage_overview/constants.ts
Outdated
Show resolved
Hide resolved
...ity_solution/public/detection_engine/rule_management_ui/pages/coverage_overview/constants.ts
Outdated
Show resolved
Hide resolved
...on_engine/rule_management_ui/pages/coverage_overview/coverage_overview_dashboard_context.tsx
Outdated
Show resolved
Hide resolved
...ion/public/detection_engine/rule_management_ui/pages/coverage_overview/filter_panel.test.tsx
Outdated
Show resolved
Hide resolved
...ion/public/detection_engine/rule_management_ui/pages/coverage_overview/filter_panel.test.tsx
Outdated
Show resolved
Hide resolved
.../public/detection_engine/rule_management_ui/pages/coverage_overview/rule_activity_filter.tsx
Outdated
Show resolved
Hide resolved
switch (action.type) { | ||
case 'setShowExpandedCells': { | ||
const { value } = action; | ||
return { ...state, showExpandedCells: value }; | ||
} | ||
case 'setRuleStatusFilter': { | ||
const { value } = action; | ||
if (value.length === 0 || value.length === 2) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR fixes the problem.
...ity_solution/public/detection_engine/rule_management_ui/pages/coverage_overview/constants.ts
Outdated
Show resolved
Hide resolved
...urity_solution/public/detection_engine/rule_management_ui/pages/coverage_overview/reducer.ts
Outdated
Show resolved
Hide resolved
...urity_solution/public/detection_engine/rule_management_ui/pages/coverage_overview/reducer.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dplumlee the recent version LGTM 👍
There some little things left but it doesn't look critical. Approving in advance to unlock merging back the PR before FF.
...urity_solution/public/detection_engine/rule_management_ui/pages/coverage_overview/helpers.ts
Outdated
Show resolved
Hide resolved
...urity_solution/public/detection_engine/rule_management_ui/pages/coverage_overview/helpers.ts
Outdated
Show resolved
Hide resolved
...urity_solution/public/detection_engine/rule_management_ui/pages/coverage_overview/helpers.ts
Outdated
Show resolved
Hide resolved
...urity_solution/public/detection_engine/rule_management_ui/pages/coverage_overview/helpers.ts
Outdated
Show resolved
Hide resolved
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]Module Count
Async chunks
History
To update your PR or re-run it, just comment with: cc @dplumlee |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Detection engine area LGTM
Summary
Addresses: #158246 and #158245
Adds the MVP filters and search bar to the coverage overview dashboard page
Screenshots
Checklist
Delete any items that are not applicable to this PR.
For maintainers