Skip to content

Conversation

@lc787
Copy link

@lc787 lc787 commented Aug 6, 2024

Workaround for #37
Okay, so the static files edit.js and utils.js don't really have a mechanism for relative path referencing. I've patched the scripts so it should be fine now. Unfortunately, I couldn't find a way to not hard-code netbox_root, but at least I got it in one place only so the workaround isn't hard to apply. Mind you, I'm not a frontend developer, so I don't know how feasible it is to do this without a build process.

@lc787 lc787 requested review from cruse1977 and natm as code owners August 6, 2024 10:38
@lc787
Copy link
Author

lc787 commented Aug 6, 2024

There are a couple of hrefs that still don't work. The buttons 'Edit Floorplan' and 'Add Floorplan' under {netbox_root}/dcim/sites/{id}/floorplans/ for example. I'm not sure how the plugin framework works in netbox so I've yet to take a crack at it.

@ziggekatten
Copy link

I can get everything to work by also hacking the floorplan_view.html template, so now we can create floorplans, add racks, export SVG etc.

One thing does not work. Klicking on an rack in an floorplan does not include the NETBOX_ROOT, thsu giving an 404. My Javascript knowledge is limited, and this is far down in fabric-js generated stuff, so if anyone knows where I need to hack things to get this working i would be very happy

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

Successfully merging this pull request may close these issues.

2 participants