Skip to content

Enable pagination orphans #6441

@jeremystretch

Description

@jeremystretch

NetBox version

v2.11.3

Feature type

Change to existing functionality

Proposed functionality

The paginator currently does not support the inclusion of "orphan" objects. For example, when viewing a set of 103 objects with a page size of 50, NetBox will display three pages:

  • 1-50
  • 51-100
  • 101-103

Enabling the inclusion of (at least 3) oprhans would result in two pages:

  • 1-50
  • 51-103

With a page size of 100, it would result in a single page showing all objects.

It probably makes sense to calculate the number of orphans permitted based on the page size: perhaps 5 for page sizes up to 50, and 10 for page sizes greater than 50.

This change would have no effect on REST API pagination.

Use case

As the performance impact of retrieving 53 versus 50 objects is negligible, automatically including the stray objects on the last page saves the user a bit of clicking. This can be especially useful when viewing device components: Many network devices, for example, have 52 interfaces (48 primary + 4 "uplinks"). This would avoid the need to paginate the interfaces list.

Database changes

No response

External dependencies

No response

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

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions