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

Un-racked devices not listed when editing #35

Closed
matejv opened this issue Jul 18, 2024 · 2 comments
Closed

Un-racked devices not listed when editing #35

matejv opened this issue Jul 18, 2024 · 2 comments

Comments

@matejv
Copy link

matejv commented Jul 18, 2024

When editing floorplan for location when I click on Un-racked devices there are no devices listed even when I have some devices under Location but not in Rack.

Looking through the code, I see there are two ajax calls here.

Using browser developer tools I see that the first URL (/plugins/floorplan/floorplans/racks/?floorplan_id=1) is called and loaded, but the second (/plugins/floorplan/floorplans/devices/?floorplan_id=1) is not called by the browser at all.

image

If I use browser developer tools to set a breakpoint to the first ajax call and then just continue execution (so just a small pause is introduced) it works - both URLs are called and shown correctly. So there might be a race condition of some kind?

Tested on:

  • netbox 4.0.7
  • netbox-floorplan 0.4.0
  • firefox 127 and chromium 126
@timeu
Copy link

timeu commented Aug 20, 2024

This is related to this issue: bigskysoftware/htmx#2147.
Solution is to provide the source to the htmx.ajax call

@ringhidb
Copy link

I submitted a pull request to fix this in the plugin. #46

cruse1977 added a commit that referenced this issue Oct 8, 2024
Added Source to htmx.ajax to allow both calls. Fix for Issue #35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants