UI: Cable Trace button has incorrect URL for power-port & power-outlet models #7434

Closed
opened 2025-12-29 20:23:27 +01:00 by adam · 0 comments
Owner

Originally created by @ZPrimed on GitHub (Dec 29, 2022).

Originally assigned to: @kkthxbye-code on GitHub.

NetBox version

v3.4.1

Python version

3.8

Steps to Reproduce

  1. Create a device with at least one power port
  2. Create another device with at least one power outlet
  3. Connect the power port to the power outlet with a cable
  4. Click on either the power port or the power outlet to get the main "overview" page of the port or outlet (URL should be /dcim/power-ports/{id} or /dcim/power-outlets/{id})
  5. In the "Connection" table on the page, to the right of the "Cable" cell, the cable's ID # will be shown [correct], and the cable trace button to the right of the ID will have an incorrect URL, to /dcim/interfaces instead of /dcim/power-ports or /dcim/power-outlets

Expected Behavior

Expect the cable trace button to trace the power cable, and not some other random interface (which may or may not actually be connected, and hence might throw an error).

Observed Behavior

The Cable Trace button should be referencing /dcim/(power-ports|power-outlets)/{id}/trace/ but instead it references /dcim/interfaces/{id}/trace/. I poked through the code a little bit but I couldn't figure out where/how it is building the URL (possibly due to my very limited Python skill).

Originally created by @ZPrimed on GitHub (Dec 29, 2022). Originally assigned to: @kkthxbye-code on GitHub. ### NetBox version v3.4.1 ### Python version 3.8 ### Steps to Reproduce 1. Create a device with at least one power port 2. Create another device with at least one power outlet 3. Connect the power port to the power outlet with a cable 4. Click on either the power port or the power outlet to get the main "overview" page of the port or outlet (URL should be `/dcim/power-ports/{id}` or `/dcim/power-outlets/{id}`) 5. In the "Connection" table on the page, to the right of the "Cable" cell, the cable's ID # will be shown [correct], and the cable trace button to the right of the ID will have an incorrect URL, to `/dcim/interfaces` instead of `/dcim/power-ports` or `/dcim/power-outlets` ### Expected Behavior Expect the cable trace button to trace the power cable, and not some other random interface (which may or may not actually be connected, and hence might throw an error). ### Observed Behavior The Cable Trace button should be referencing `/dcim/(power-ports|power-outlets)/{id}/trace/` but instead it references `/dcim/interfaces/{id}/trace/`. I poked through the code a little bit but I couldn't figure out where/how it is building the URL (possibly due to my very limited Python skill).
adam added the type: bugstatus: accepted labels 2025-12-29 20:23:27 +01:00
adam closed this issue 2025-12-29 20:23:28 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#7434