-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Description
NetBox version
v4.1.0
Feature type
New functionality
Triage priority
N/A
Proposed functionality
Add an integer Index field to the Tag object definition which can be used by the frontend to order tags first by Index, then alphabetically when displaying them.
Indexordering should be from lowest to highest value, where the lowest value has the highest priority and therefore it is displayed before any other tags- Some sort of hard limit, e.g.
-128to128, could be implemented for optimization - The default index value must be zero
- For tags with the same index, alphabetical sorting should be the default behavior. This is to ensure that, when migrating to this implementation existing behavior is preserved.
Use case
There are innumerous use cases for tags, one such case is the ability to give information about an object such as a virtual machine:
NETPY CLT01 VM108 APCHE
| | | |_ Gives a clear visual hint of the service running in this machine
| | |________ Shows the virtual machine name according to our virtualization system
| |_______________ Identifies the cluster where this machine belongs to
|_____________________ Identifies the tenant
It would be lovely to display the four tags in the aforementioned order, since that is the formal name of this object and everywhere in our internal processes and documents, we refer to this virtual machine as NETPY-CLT01-VM108-APCHE.
Having the ability to sort tags when displaying objects in Netbox will allow for further customization and integration with other systems that rely on tags for looking up objects.
Database changes
A new integer column for the Tag table definition.
External dependencies
None that I am aware of.