Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes 18208: Consolidate rendering configuration templates #18604

Merged
merged 3 commits into from
Feb 10, 2025

Conversation

alehaa
Copy link
Contributor

@alehaa alehaa commented Feb 7, 2025

Fixes: #18208

The (mostly) redundant DeviceRenderConfigView and VirtualMachineRenderConfigView have been merged into a single ObjectRenderConfigView.

Although a common object rendering context variable would be a bit cleaner, the original device and virtualmachine variables have been preserved. Possible future extensions could add additional values by inheriting the view and overriding the get_extra_context_data() method.

alehaa and others added 3 commits February 7, 2025 23:50
The (mostly) redundant 'DeviceRenderConfigView' and
'VirtualMachineRenderConfigView' have been merged into a single
'ObjectRenderConfigView'.
Copy link
Member

@jeremystretch jeremystretch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for tackling this @alehaa! I've just made some minor tweaks:

  • Return a default value from get_extra_context_data()
  • Moved the VIewTabs to the subclasses (mostly just so their weights are visible relative to their peer views)

@jeremystretch jeremystretch merged commit 3e1cc0d into netbox-community:main Feb 10, 2025
3 checks passed
@alehaa alehaa deleted the 18208-render-config branch February 11, 2025 09:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Consolidate logic for rendering configuration templates
2 participants