feat: grouped firewall rules view - #7
Merged
Merged
Conversation
There was a problem hiding this comment.
All reported issues were addressed across 7 files
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
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.
Summary
Large rulesets (1000+ rules) were one flat table. This groups rules by table → chain in collapsible sections.
bastion/fwview.pygroup_rules_by_table()— pure grouping (sorted by family/table; chains in ruleset order), fully tested.<details>per table (auto-open when ≤3 tables), each with per-chain subsections and readable expressions.Test plan
python -m pytest -q→ 169 passed. New:tests/test_fwview.py+ a grouped-render web test.Summary by cubic
Groups firewall rules by table and chain into collapsible sections, with a smart filter that auto-expands matches and restores default collapse when cleared. Adds visible row separators to make large rulesets easier to scan.
New Features
group_rules_by_table()inbastion/fwview.py(sorted by family/table; preserves chain order).Details
per table with per-chain subsections; auto-opens when ≤3. Filter hides non-matching rows and auto-opens matches.Bug Fixes
Written for commit 31f5c67. Summary will update on new commits.