Closes #20923: Migrate Virtualization object views to declarative layouts #303

Closed
opened 2026-04-05 16:25:17 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @pheus on 2/19/2026

Fixes: #20923

This PR continues the migration of object views in the virtualization app to NetBox v4.5’s declarative layouts.

Summary of changes

  • Replace legacy object view templates with declarative layouts for:
    • Cluster
    • ClusterGroup
    • ClusterTypes
    • Virtual Disk
    • VM Interface
  • Add/port panels covering common related data views, including:
    • Addressing
    • VLAN assignment & translation
    • FHRP group assignments/handling

Layout primitive improvements

To support parity with the legacy templates and keep templates slim, this PR also expands the declarative layout primitives:

  • Add attribute rendering support for GenericForeignKey (GFK) values
  • Add a new panel for rendering context-provided tables
  • Update existing templates/components as needed to support the new panels/attrs

Reviewer notes

  • Please pay extra attention to the naming of the newly introduced Attr and Panel classes (and any related template/component names). I aimed to keep them consistent with existing conventions, but I’d appreciate a second set of eyes.
  • I removed the redundant Cluster count under ClusterGroup, since the Related Objects section already provides a cluster count.

Thanks for taking the time to review this!

*Originally created by @pheus on 2/19/2026* ### Fixes: #20923 This PR continues the migration of object views in the `virtualization` app to NetBox v4.5’s declarative layouts. #### Summary of changes - Replace legacy object view templates with declarative layouts for: - Cluster - ClusterGroup - ClusterTypes - Virtual Disk - VM Interface - Add/port panels covering common related data views, including: - Addressing - VLAN assignment & translation - FHRP group assignments/handling #### Layout primitive improvements To support parity with the legacy templates and keep templates slim, this PR also expands the declarative layout primitives: - Add attribute rendering support for GenericForeignKey (GFK) values - Add a new panel for rendering context-provided tables - Update existing templates/components as needed to support the new panels/attrs #### Reviewer notes - Please pay extra attention to the **naming** of the newly introduced **Attr** and **Panel** classes (and any related template/component names). I aimed to keep them consistent with existing conventions, but I’d appreciate a second set of eyes. - I removed the redundant **Cluster** count under **ClusterGroup**, since the Related Objects section already provides a cluster count. Thanks for taking the time to review this!
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/netbox#303