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

[Security Solution] Decouple Detections Bulk Actions from Rules Table #154617

Open
spong opened this issue Apr 7, 2023 · 2 comments
Open

[Security Solution] Decouple Detections Bulk Actions from Rules Table #154617

spong opened this issue Apr 7, 2023 · 2 comments
Labels
Feature:Rule Management Security Solution Detection Rule Management refactoring Team:Detection Rule Management Security Detection Rule Management Team Team:Detections and Resp Security Detection Response Team Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. technical debt Improvement of the software architecture and operational architecture

Comments

@spong
Copy link
Member

spong commented Apr 7, 2023

Currently the Detections Bulk Actions are tightly coupled to the Rules Table. This includes using custom bulk* hooks to return event handlers, UI visibility flags, and more that are then managed and forwarded along by the Rules Table:

const {
bulkActionsDryRunResult,
bulkAction,
isBulkActionConfirmationVisible,
showBulkActionConfirmation,
cancelBulkActionConfirmation,
approveBulkActionConfirmation,
} = useBulkActionsConfirmation();
const {
isBulkDuplicateConfirmationVisible,
showBulkDuplicateConfirmation,
cancelRuleDuplication,
confirmRuleDuplication,
} = useBulkDuplicateExceptionsConfirmation();
const {
bulkEditActionType,
isBulkEditFlyoutVisible,
handleBulkEditFormConfirm,
handleBulkEditFormCancel,
completeBulkEditForm,
} = useBulkEditFormFlyout();
const { isBulkActionsDryRunLoading, executeBulkActionsDryRun } = useBulkActionsDryRun();
const getBulkItemsPopoverContent = useBulkActions({
filterOptions,
confirmDeletion,
showBulkActionConfirmation,
showBulkDuplicateConfirmation,
completeBulkEditForm,
executeBulkActionsDryRun,
});

Where possible, we should extract functionality into the desired context's interface (encapsulating any relevant actions/state), and then inject the necessary bulk actions depending on the context (installed rules table will get all the bulk actions we know and love, whereas upgrade/new rules tables will get installed/resolve conflicts/etc actions).

@spong spong added Team:Detections and Resp Security Detection Response Team Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. Feature:Rule Management Security Solution Detection Rule Management Team:Detection Rule Management Security Detection Rule Management Team Feature:Prebuilt Detection Rules Security Solution Prebuilt Detection Rules 8.8 candidate labels Apr 7, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-detections-response (Team:Detections and Resp)

@elasticmachine
Copy link
Contributor

Pinging @elastic/security-solution (Team: SecuritySolution)

@banderror banderror added refactoring technical debt Improvement of the software architecture and operational architecture and removed 8.8 candidate Feature:Prebuilt Detection Rules Security Solution Prebuilt Detection Rules labels Apr 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Rule Management Security Solution Detection Rule Management refactoring Team:Detection Rule Management Security Detection Rule Management Team Team:Detections and Resp Security Detection Response Team Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. technical debt Improvement of the software architecture and operational architecture
Projects
None yet
Development

No branches or pull requests

3 participants