Cable's total length #2815

Closed
opened 2025-12-29 18:22:25 +01:00 by adam · 2 comments
Owner

Originally created by @lmgonzalezl on GitHub (Aug 21, 2019).

Environment

  • Python version: 3.6
  • NetBox version: 2.6.1

Proposed Functionality

Show add up to all links lenght since first near end until last far end

Use Case

In most cases, a cable routing has many segments. It's neccesary show the complete lenght cable routing. It isn't necessary to store this value in the database but it's necessary to convert all of them in the same measurement unit.

Database Changes

It's not necessary

Example

imagen

Originally created by @lmgonzalezl on GitHub (Aug 21, 2019). <!-- NOTE: This form is only for proposing specific new features or enhancements. If you have a general idea or question, please post to our mailing list instead of opening an issue: https://groups.google.com/forum/#!forum/netbox-discuss NOTE: Due to an excessive backlog of feature requests, we are not currently accepting any proposals which significantly extend NetBox's feature scope. Please describe the environment in which you are running NetBox. Be sure that you are running an unmodified instance of the latest stable release before submitting a bug report. --> ### Environment * Python version: 3.6 <!-- Example: 3.5.4 --> * NetBox version: 2.6.1<!-- Example: 2.3.6 --> <!-- Describe in detail the new functionality you are proposing. Include any specific changes to work flows, data models, or the user interface. --> ### Proposed Functionality Show add up to all links lenght since first near end until last far end <!-- Convey an example use case for your proposed feature. Write from the perspective of a NetBox user who would benefit from the proposed functionality and describe how. ---> ### Use Case In most cases, a cable routing has many segments. It's neccesary show the complete lenght cable routing. It isn't necessary to store this value in the database but it's necessary to convert all of them in the same measurement unit. <!-- Note any changes to the database schema necessary to support the new feature. For example, does the proposal require adding a new model or field? (Not all new features require database changes.) ---> ### Database Changes It's not necessary <!-- List any new dependencies on external libraries or services that this new feature would introduce. For example, does the proposal require the installation of a new Python package? (Not all new features introduce new dependencies.) --> ### Example ![imagen](https://user-images.githubusercontent.com/51785108/63427515-35ef3980-c40d-11e9-87c2-8df1ac2fb5aa.png)
adam added the status: acceptedtype: feature labels 2025-12-29 18:22:25 +01:00
adam closed this issue 2025-12-29 18:22:25 +01:00
Author
Owner

@lmgonzalezl commented on GitHub (Aug 21, 2019):

Hi!
That's an example to show how useful could be my proposal. This simulates a connection between two switches.

imagen

@lmgonzalezl commented on GitHub (Aug 21, 2019): Hi! That's an example to show how useful could be my proposal. This simulates a connection between two switches. ![imagen](https://user-images.githubusercontent.com/51785108/63435567-1103c200-c41f-11e9-92b2-352b754b09a5.png)
Author
Owner

@tb-killa commented on GitHub (Jan 8, 2020):

I am currently thinking about how best to work here.
I would suggest to add the length within the view 770f4c962c/netbox/dcim/api/views.py (L67) and later in the template
https://github.com/netbox-community/netbox/blob/develop/netbox/templates/dcim/cable_trace.html
to reproduce.

Since each segment is output as a three-tuple of (termination, cable, termination), the cable also contains the respective length (cable.length).

@tb-killa commented on GitHub (Jan 8, 2020): I am currently thinking about how best to work here. I would suggest to add the length within the view https://github.com/netbox-community/netbox/blob/770f4c962cf4bfb5d44bf7cc6ac5f1e080e0cd7f/netbox/dcim/api/views.py#L67 and later in the template [https://github.com/netbox-community/netbox/blob/develop/netbox/templates/dcim/cable_trace.html](https://github.com/netbox-community/netbox/blob/develop/netbox/templates/dcim/cable_trace.html) to reproduce. Since each segment is output as a three-tuple of (termination, cable, termination), the cable also contains the respective length (cable.length).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#2815