Skip to content

Introduce a standardized framework for user preferences #7759

@jeremystretch

Description

@jeremystretch

NetBox version

v3.0.9

Feature type

Change to existing functionality

Proposed functionality

Introduce a new Python class for representing individual user preferences. This would supplant the current user preferences structure, which is limited in function and offers no real validation mechanism. Currently, only the following preferences are manageable:

  • UI color preference (light/dark)
  • Page length
  • Table columns (per table)

This would likely follow the pattern introduced by the ConfigParam class in v3.1, with each instance declaring a name, default value, and acceptable choices/validation rules.

Use case

This would enable more robust validation around user preferences, and allow more dynamic rendering of the user preferences form. It would also enable us to expose more default values as user-configurable preferences. (See #7702 as an example.)

Database changes

This likely won't require any database changes, as we'll be able to continue using the UserConfig model to store saved user preferences.

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

Relationships

None yet

Development

No branches or pull requests

Issue actions