[WIP] Related object tabs — PoC for discussion#434
Draft
Kani999 wants to merge 3 commits intonetboxlabs:mainfrom
Draft
[WIP] Related object tabs — PoC for discussion#434Kani999 wants to merge 3 commits intonetboxlabs:mainfrom
Kani999 wants to merge 3 commits intonetboxlabs:mainfrom
Conversation
added 3 commits
March 26, 2026 09:50
- Add tab_views.py with combined and typed tab view factories - Combined tab shows all linked custom objects with actions, tags, column config, quick search - Typed tabs show per-COT filtered view with bulk actions and per-field filters - Auto-discover referenced models from app registry (never call get_model during registration) - Support CO-to-CO tabs (custom objects referencing other custom objects) - Badge callables use OR + distinct to avoid double-counting - Add combined_tab.html and typed_tab.html templates
- Add typed_tab_slugs to default_settings in PluginConfig - Call register_all_tabs() in ready() before super().ready() - Call inject_co_urls() and deduplicate_registry() after super().ready() - Add model_view_tabs to customobject.html for CO-to-CO tab support - Fix JournalEntryTable and ObjectChangeTable: remove unsupported user kwarg - Fix journal/changelog views to pass self.tab instead of string literals
- Add Related Object Tabs section explaining combined and typed tabs - Document typed_tab_slugs PLUGINS_CONFIG setting with example - Note that restart is required after config changes
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
Integrates the standalone netbox-custom-objects-tab plugin into core netbox-custom-objects (ref: CESNET/netbox-custom-objects-tab#8).
Closes #26
What's implemented
typed_tab_slugsinPLUGINS_CONFIG.__init__.py), templates, and README documentation.Open questions for discussion
typed_tab_slugslist inPLUGINS_CONFIG. Is this the right UX, or should this be a per-COT toggle in the admin UI?OR + distinctqueries to avoid double-counting — are there performance concerns at scale?Commits
1cac046— Add related object tab views and templatesab29d56— Wire tab registration into plugin and fix pre-existing view bugs69c46a7— Document related object tabs in READMEImages