-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Edit ip address - change device assignment, doesnt clear interface assignment. causes confusion #10757
Comments
From experience, the device/virtual machine dropdowns are meant to be only filters for the respective interface field. Only the interface field matters in terms of association with the IP, therefore just changing the virtual machine won't result in any change to the association. |
This is a common issue with fields that filter other fields. The obvious solution would be to clear dependent fields after updating the parent. Not sure if there are any usability issues to consider though. Code for the API select fields can be found here if anyone wants to give it a shot: |
Another (quicker) option would be to also show the name of the attached device/vm in brackets after the interface name. Eg right now it just shows "eth0" but it could show "eth0 (device1)" in the interface name field. It would at least make it slightly more obvious that the data didnt update when you change the field above |
something like this apiSelect.ts
This will remove the data of a child selection if the parent has changed value. I have a branch ready with this change |
My worry about doing it for every parent child field is that in some cases the current logic is actually useful. Eg if your editing an interfaces vlan tags. I have several interfaces where there are vlans in multiple different vlan groups that need to be tagged on one interface. So with the change above if i changed the vlan group to find another vlan i need to tag on that interface, it would clear out the existing tagged vlans. |
interesting one.. so it should only clear on singlevalue dropdowns and not al the time.. and still then.. if you selected an untagged vlan from groupA and added some tagged, then got to groupB, the untagged vlan is cleared too.. Looks like this will need to be an option to either always-clear-except; or never-clear-except |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. NetBox is governed by a small group of core maintainers which means not all opened issues may receive direct feedback. Do not attempt to circumvent this process by "bumping" the issue; doing so will result in its immediate closure and you may be barred from participating in any future discussions. Please see our contributing guide. |
maybe, the element that is displayed in the list needs to show more information. What if the list is dependent on another list, then show that too. Then the current logic can remain, but the confusion on what the relation of the Eth1 is to the parent is more clear |
@DanSheps why did you mark this as blocked? |
No idea, might have been by accident |
There is an identical one however that would be fixed by moving to the new filtering logic. I am willing to take both of those |
What is the other issue? Can we consolidate them? |
Pretty sure you "just" closed it out: #11477 If we move to the new filtering mechanism, it would remove the "device assignment" all together, and make it clear that you can only assign an ip address to a interface. |
the new filtering mechanism should solve this right? https://twitter.com/jstretch85/status/1631677080252424192?s=20 |
Yeah, it should solve it. |
…orm the same change to the NAT assignment as well.
NetBox version
v3.3.5
Python version
3.10
Steps to Reproduce
(its not obvious but that eth0 field is still set to eth0 on vm1, not eth0 on vm2 which is selected above)
Expected Behavior
I would expect that at step 2 once the device or vm relationship was changed that the interfaces field would empty out
OR
that during the save process data validation would fail and tell the user that the device / virtual machine assignment + interface are not part of the same device.
OR
maybe the interface assignment (eth0) should also have the vm or device name listed after it? making it obvious that the field above didnt change anything and is just a filter?
Observed Behavior
assignment does not change in netbox. user gets no warning that there was a conflict or no change made
The text was updated successfully, but these errors were encountered: