netbox-community / netbox

The premier source of truth powering network automation. Open source under Apache 2. Try NetBox Cloud free: https://netboxlabs.com/free-netbox-cloud/
http://netboxlabs.com/oss/netbox/
Apache License 2.0
15.77k stars 2.54k forks source link

Weight Unit Preference #11873

Closed danner26 closed 9 months ago

danner26 commented 1 year ago

NetBox version

v3.4.5

Feature type

Data model extension

Proposed functionality

When importing a device type with a weight of KG it would be nice to see values displayed in the frontend in LBs rather than KGs. My suggestion is to add a pre-user preference which will let you specify whether you prefer metric or imperial measurements. Once the preferred unit of measurement is selected by a user, it should be translated within the user interface as applicable.

By default I suggest that it displays the data as-is in the database.

Use case

Some vendors list items in LBs, others in KGs as well as others in both. The devicetype-library is a mix of KG and LB depending on who creates the files. Being in America myself, we prefer pounds whereas someone in Germany might prefer kilograms. It would be helpful to have these automatically translated in the UI as a UX improvement

Database changes

No response

External dependencies

No response

jeremystretch commented 1 year ago

This might actually tie into our higher-level efforts to support localization, if it can be inferred from the user's locale. However there may also be a benefit to providing a discrete control for it.

github-actions[bot] commented 1 year ago

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.

danner26 commented 1 year ago

Hey Jeremy, just circuling back around on this. Is this something we want to tie into the localization effort?

jeremystretch commented 1 year ago

This proposal doesn't seem to have generated any interest, so I'm not sure it's worth pursuing at this point. It might be something to reconsider once we've formally introduced localization support.

github-actions[bot] commented 10 months ago

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.

danner26 commented 9 months ago

I agree once localization support is implemented this will fall in line with that effort

jeremystretch commented 9 months ago

Let's wrap this into #13915, which proposes the ability to set user-preferred units for both length and weight measurements.