Skip to content

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

Open

Description

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Feature:Rule ManagementSecurity Solution Detection Rule ManagementTeam: SecuritySolutionSecurity Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc.Team:Detection Rule ManagementSecurity Detection Rule Management TeamTeam:Detections and RespSecurity Detection Response Teamrefactoringtechnical debtImprovement of the software architecture and operational architecture

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions