Skip to content

Move related objects to separate tabs under each object detail view #11517

@jeremystretch

Description

@jeremystretch

NetBox version

v3.4.2

Feature type

Change to existing functionality

Proposed functionality

The intent of this FR is to optimize and standardize the display of related objects when viewing an object in NetBox. It was prompted partly by discussion under #11228 and partly to capture patterns identified during the implementation of #8184. There are currently three mechanisms in place for listing related objects:

  • A static (non-paginated, non-sortable) embedded table
  • A dynamic, HTMX-enabled embedded table
  • Separate dedicated tabs leveraging ObjectChildrenView

Each approach has benefits and drawbacks, however there is currently no firm structure in place asserting when each should be employed. I'd like to propose the following guidelines.

  • Primary objects should typically employ tabs to list related objects. For example, a device's components all appear under separate tabs organized by type.
    • This approach enables us to employ ObjectChildrenView to apply specific rendering logic within the context of the object being viewed (for example, to annotate available VLAN IDs within a VLAN group).
    • An exception to this rule would be instances where there is only one specific type of related object that would make sense to embed directly on the object view; for example, listing the circuits which belong to a specific provider. Where two or more types of objects are to be included each of them should be listed under a separate tab.
  • Organizational objects (device roles, manufacturers, etc.) should not include tables or tabs for the objects they organize, and instead link to the appropriate filtered general-purpose object list views.
  • Recursively-nested objects (regions, tenant groups, etc.) should embed a dynamic table listing their own child objects.
  • The use of static tables to display related objects should be avoided except in cases where we can be reasonably confident that no more than a handful of related objects will need to be displayed (e.g. listing parent prefixes).
  • No page should ever display more than one large table, as it may not be clear to the user that additional tables beyond the first are present on the page (it requires too much scrolling to reveal successive tables).

Use case

Embracing a standardized approach for displaying related objects minimizes unnecessary screen clutter and instills a sense of confidence in the user that they'll always know where to look for related objects. It will also address several related object views that are currently missing from the UI.

Database changes

N/A

External dependencies

N/A

Metadata

Metadata

Assignees

Labels

status: acceptedThis issue has been accepted for implementationtype: featureIntroduction of new functionality to the application

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions