netbox icon indicating copy to clipboard operation
netbox copied to clipboard

Option not to display Asset Tag value appended to Device Name

Open MattDRogers opened this issue 1 year ago • 9 comments

NetBox version

v4.1.0

Feature type

Change to existing functionality

Proposed functionality

Either do not append the Asset Tag to the Device Name, or make it an option.

What it looks like now: Screenshot 2024-09-09 092416 Screenshot 2024-09-09 092549 Screenshot 2024-09-09 092744

What I'd like the option to do: Screenshot 2024-09-09 092416a Screenshot 2024-09-09 092549a Screenshot 2024-09-09 092744a

Use case

For display purposes, appending the Asset Tag to the Device Name uses up a lot of space--especially when one is looking at a list of cable connections. It makes for a more cluttered view (though I suppose this is subjective). Having the option to disable the parenthetical Asset Tag appearing next to the Device Name would streamline things visually, make tables display in a more easy-to-read fashion, and eliminate needless redundancy of information.

Database changes

I don't believe any database changes should be necessary, as these are two separately defined fields being displayed a certain way in the Web UI.

External dependencies

No external dependencies.

MattDRogers avatar Sep 09 '24 19:09 MattDRogers

I agree. Asset tag seems to be the only other field that gets added to a name if you have it filled in. It was so cumbersome for our users we don't use the built-in asset tag field, instead opting to create a custom field for asset tag just so it won't get appended to the name.

ghost avatar Sep 09 '24 22:09 ghost

I like having it in selector fields but i dislike having it in most other places.

ITJamie avatar Sep 10 '24 08:09 ITJamie

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. NetBox is governed by a small group of core maintainers which means not all opened issues may receive direct feedback. Do not attempt to circumvent this process by "bumping" the issue; doing so will result in its immediate closure and you may be barred from participating in any future discussions. Please see our contributing guide.

github-actions[bot] avatar Apr 25 '25 04:04 github-actions[bot]

This will probably involve removing the asset tag from the string returned by the model's __str__() method. However, IMO it make sense to still include the asset tag as part of the dropdown choices.

jeremystretch avatar May 08 '25 17:05 jeremystretch

Agreed. Since the time I opened this FR, I have come to appreciate having the Asset Tag in dropdown lists. Thanks for looking at this.

MattDRogers avatar May 09 '25 13:05 MattDRogers

yes, we also need not showing asset tag in hostname

alisenkov avatar May 30 '25 09:05 alisenkov

Do we need a user preference for this or could it be a configuration setting? If the latter, I’m willing to volunteer to create a PR.

alehaa avatar Jul 15 '25 20:07 alehaa

Thanks, @alehaa! A global configuration setting seems like the right first step. If there’s interest in per‑user control later, we can track that as a separate feature request. Are you still up for opening a PR?

pheus avatar Sep 14 '25 16:09 pheus

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. NetBox is governed by a small group of core maintainers which means not all opened issues may receive direct feedback. Do not attempt to circumvent this process by "bumping" the issue; doing so will result in its immediate closure and you may be barred from participating in any future discussions. Please see our contributing guide.

github-actions[bot] avatar Dec 14 '25 04:12 github-actions[bot]