Add Hierarchy Table class - #79
Open
sjanusz-r7 wants to merge 1 commit into
Open
Conversation
sjanusz-r7
force-pushed
the
add-hierarchy-table
branch
from
September 2, 2026 13:25
a313ad9 to
5082cac
Compare
sjanusz-r7
force-pushed
the
add-hierarchy-table
branch
from
September 2, 2026 13:42
5082cac to
0b25056
Compare
sjanusz-r7
marked this pull request as ready for review
September 2, 2026 14:35
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In draft as I move some table code from Framework back into this repo.
This PR has been coded with the help of Kiro.
This PR adds a new Hierarchy Table class. It allows for storing relationship data as part of the table rows, which allows for printing the relationships out to the console as text.
As this is a spike, this PR allows for two ways of printing out the table to the console.
Option 1
Option 2
Example API usage
The API with row registration took some inspiration from the create_service API, where we can provide parents to the rows.
Using Metasploit Framework's services for this example:
which results in the following:
This code supports ASCII and Unicode glyphs for the relationship hierarchy display. For example, in ASCII, we see:
In Unicode mode we see:
Testing
bundle exec rspec spec