BloodHound icon indicating copy to clipboard operation
BloodHound copied to clipboard

feat(SigmaChart): add pathfinding edge filter context menu option

Open TheNando opened this issue 5 months ago • 2 comments

Description

  • Adds pathfinding edge filter to Graph context menu
  • Adds relevant copy options to edges in context menu
  • Moves reusable context menu items to shared lib
  • Same naming updates for clarity and expressiveness
  • Updates tests and adds coverage for related items

Motivation and Context

Resolves BED-5180

This give users a more convenient method to make one-off modifications to the existing pathfinding edge filter. When in Explore -> Pathfinding tab, right-clicking on an edge will show a new context menu allowing to easily update pathfinding filters.

How Has This Been Tested?

Manual testing and new/updated unit tests

  1. Load ad_sampledata.zip
  2. Visit link https://bloodhound.localhost/ui/explore?exploreSearchTab=pathfinding&primarySearch=PHANTOM.CORP-S-1-5-11&searchType=pathfinding&secondarySearch=S-1-5-21-2697957641-2271029196-387917394
  3. Right click an edge to add it to pathfinding edge filter

Screenshots:

image

Types of changes

  • New feature (non-breaking change which adds functionality)

Checklist:

  • [x] I have met the contributing prerequisites
    • Assigned myself to this PR
    • Added the appropriate labels
    • Associated an issue: https://github.com/SpecterOps/BloodHound/issues/672
    • Read the Contributing guide: https://github.com/SpecterOps/BloodHound/wiki/Contributing
  • [x] I have ensured that related documentation is up-to-date
    • Open API docs
    • Code comments (GoDocs / JSDocs)
  • [x] I have followed proper test practices
    • Added/updated tests to cover my changes
    • All new and existing tests passed

Summary by CodeRabbit

  • New Features

    • Added right-click context menu support for graph edges, enabling edge-specific actions such as filtering directly from the graph.
    • Introduced modular context menu components for nodes and edges, including copy and filter options.
    • Integrated pathfinding filter management into the search and context menu experiences.
    • Enhanced context menu logic to distinguish between node and edge selections and handle permissions.
  • Improvements

    • Refactored context menu and related components for greater modularity and maintainability.
    • Centralized context menu state and logic using new hooks and utility functions.
    • Improved filter application and update logic for pathfinding.
  • Bug Fixes

    • Ensured consistent menu positioning and correct handling of context menu events.
  • Tests

    • Added and updated tests for new context menu hooks, utilities, and modular menu item components.
  • Documentation

    • Added Apache 2.0 license headers to several files.

TheNando avatar Jul 17 '25 16:07 TheNando