Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add interface/port buttons missing on device type #591

Closed
bleything opened this issue Oct 2, 2016 · 4 comments
Closed

add interface/port buttons missing on device type #591

bleything opened this issue Oct 2, 2016 · 4 comments
Labels
type: bug A confirmed report of unexpected behavior in the application

Comments

@bleything
Copy link
Contributor

In v1.6.2 the Add Interface/Console Port/etc links are missing from the device type show page. Here's what I am seeing:

screenshot 2016-10-02 13 57 24

And here's what I'm pretty sure I'm meant to be seeing:

screenshot 2016-10-02 13 57 45

Through the magic of git bisect I have identified 30c7c2d as the commit which broke this. It looks like it's the conditional on line 8 of netbox/templates/dcim/inc/devicetype_component_table.html... if I remove that conditional block, I get the buttons back.

I'm guessing that the idea there was to make that button disappear if there were between one and ten rows in the table and then reappear if there were ten or more. If that's right, then I think that changing it to {% if table.rows|length > 10 or table.rows|length == 0 %} will do the trick. I can submit a PR if y'all want.

@therealjoshuad
Copy link

I just noticed that I'm getting the same behavior.

@jeremystretch
Copy link
Member

Derp. I'll try to get a fix out today. Thanks for catching this!

@jeremystretch jeremystretch added the type: bug A confirmed report of unexpected behavior in the application label Oct 3, 2016
jeremystretch added a commit that referenced this issue Oct 4, 2016
Fixes #591: Correct display of device type component creation buttons
@jeremystretch
Copy link
Member

This has been fixed in release v1.6.2-r1. Still need to apply the patch to the develop branch.

@bleything
Copy link
Contributor Author

Great! Thank you so much 😀

lampwins pushed a commit to lampwins/netbox that referenced this issue Oct 13, 2017
lampwins pushed a commit to lampwins/netbox that referenced this issue Oct 13, 2017
Fixes netbox-community#591: Correct display of device type component creation buttons
lampwins pushed a commit to lampwins/netbox that referenced this issue Oct 13, 2017
@lock lock bot locked as resolved and limited conversation to collaborators Jan 19, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: bug A confirmed report of unexpected behavior in the application
Projects
None yet
Development

No branches or pull requests

3 participants