Display whole rackunits in stead of .0 #6937

Closed
opened 2025-12-29 19:47:00 +01:00 by adam · 5 comments
Owner

Originally created by @PieterL75 on GitHub (Sep 7, 2022).

Originally assigned to: @jeremystretch on GitHub.

NetBox version

v3.3.2

Feature type

Change to existing functionality

Proposed functionality

Netbox supports half rack units ss of 3.3.0,
As of then, all units are displayed with a .0 in the end

This causes some confusion, as people did not notice the dot on their 4K screen with very small fonts (sigh)

Is it possible to show only the .5 when used and drop the .0 at all times ?

Use case

The .0 can cause confusion (unit 1.0 could be read as unit 10)
If you don't use half units at all in your dcim, then it looks like a bug to display the .0 at the end

Database changes

None

External dependencies

None

Originally created by @PieterL75 on GitHub (Sep 7, 2022). Originally assigned to: @jeremystretch on GitHub. ### NetBox version v3.3.2 ### Feature type Change to existing functionality ### Proposed functionality Netbox supports half rack units ss of 3.3.0, As of then, all units are displayed with a .0 in the end This causes some confusion, as people did not notice the dot on their 4K screen with very small fonts (sigh) Is it possible to show only the .5 when used and drop the .0 at all times ? ### Use case The .0 can cause confusion (unit 1.0 could be read as unit 10) If you don't use half units at all in your dcim, then it looks like a bug to display the .0 at the end ### Database changes None ### External dependencies None
adam added the status: acceptedtype: feature labels 2025-12-29 19:47:00 +01:00
adam closed this issue 2025-12-29 19:47:00 +01:00
Author
Owner

@jeremystretch commented on GitHub (Sep 7, 2022):

Is it possible to show only the .5 when used and drop the .0 at all times ?

We always treat the unit number as a decimal value for consistency. Having to accommodate both integers and decimal values for a field would make development in a strongly-typed language such as Go extremely difficult.

This causes some confusion, as people did not notice the dot on their 4K screen with very small fonts (sigh)

I'm sure this won't come as a surprise, but this isn't valid justification for changing how NetBox conveys numeric values.

@jeremystretch commented on GitHub (Sep 7, 2022): > Is it possible to show only the .5 when used and drop the .0 at all times ? We always treat the unit number as a decimal value for consistency. Having to accommodate both integers and decimal values for a field would make development in a strongly-typed language such as Go extremely difficult. > This causes some confusion, as people did not notice the dot on their 4K screen with very small fonts (sigh) I'm sure this won't come as a surprise, but this isn't valid justification for changing how NetBox conveys numeric values.
Author
Owner

@PieterL75 commented on GitHub (Sep 7, 2022):

I'm very sorry to say, but this .0 after the rackunits so... 'unprofessional' (for lack of a better word).
It really looks like you forgot to cleanup the output.

Do give it some second thoughts, I'll appreciate it.
I'm even good to give it a go to implement it
may with a configuration variable (show decimal rack units), that people can choose how it is displayed.

@PieterL75 commented on GitHub (Sep 7, 2022): I'm very sorry to say, but this .0 after the rackunits so... 'unprofessional' (for lack of a better word). It really looks like you forgot to cleanup the output. Do give it some second thoughts, I'll appreciate it. I'm even good to give it a go to implement it may with a configuration variable (show decimal rack units), that people can choose how it is displayed.
Author
Owner

@jeremystretch commented on GitHub (Sep 7, 2022):

I'm very sorry to say, but this .0 after the rackunits so... 'unprofessional' (for lack of a better word).

You're welcome to your opinion, but as I've explained this is not a cosmetic decision and won't be changed.

@jeremystretch commented on GitHub (Sep 7, 2022): > I'm very sorry to say, but this .0 after the rackunits so... 'unprofessional' (for lack of a better word). You're welcome to your opinion, but as I've explained this is not a cosmetic decision and won't be changed.
Author
Owner

@jeremystretch commented on GitHub (Sep 7, 2022):

@PieterL75 were you referring to the display of the assigned position of a device under the UI?

Screenshot 2022-09-07 at 12-14-18 dmi01-albany-rtr01 NetBox

I'd be fine with omitting the trailing .0 there, just not in the API or programmatic representation of the position value. (We already do this for the selection dropdown as pictured below, via the display value of each unit.)

Screenshot from 2022-09-07 12-17-02

@jeremystretch commented on GitHub (Sep 7, 2022): @PieterL75 were you referring to the display of the assigned position of a device under the UI? ![Screenshot 2022-09-07 at 12-14-18 dmi01-albany-rtr01 NetBox](https://user-images.githubusercontent.com/13487278/188928363-15c328a1-c5be-434a-8984-eca2a65fa889.png) I'd be fine with omitting the trailing .0 there, just not in the API or programmatic representation of the `position` value. (We already do this for the selection dropdown as pictured below, via the `display` value of each unit.) ![Screenshot from 2022-09-07 12-17-02](https://user-images.githubusercontent.com/13487278/188929241-6ba2615c-3ef7-4857-a9aa-919673946496.png)
Author
Owner

@PieterL75 commented on GitHub (Sep 7, 2022):

Jeremy,
Yes, that is exactly what I was referring to.
also the Position(U) field in the device list
https://demo.netbox.dev/dcim/devices/

I agree that it should not be changed in the API or anywhere also, only in some visualization on the GUI

thx to reconsider !

@PieterL75 commented on GitHub (Sep 7, 2022): Jeremy, Yes, that is exactly what I was referring to. also the Position(U) field in the device list https://demo.netbox.dev/dcim/devices/ I agree that it should not be changed in the API or anywhere also, only in some visualization on the GUI thx to reconsider !
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#6937