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

Fixes #377: Non-devices do not save coordinates #387

Merged
merged 9 commits into from
Sep 27, 2023

Conversation

dreng
Copy link
Collaborator

@dreng dreng commented Sep 26, 2023

This PR adds the ability to save coordinates not only for devices but also for power feeds, power panels and circuits. In order to achieve this I had to add new models, because the recent coordinate model is only sufficient for devices (caused by foreign keys). Therefore, I needed to add a lot of boilerplate code. In fact, the change is not very big in terms of visible changes, but the boilerplate code leads to many code changes.

Known issue: The coordinate_groups template renders the coordinates_table, which contains device coordinates only. The NetBox framework doesn't support Unions and I found it not worth it to code around that problem, since it's just a nice-to-have table on this view. The alternative would be to simply not display the table at all.

@dreng dreng merged commit 987c7ef into netbox-community:develop Sep 27, 2023
@dreng dreng deleted the 377_save_coords_for_non_devices branch October 29, 2023 15:12
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