Fixes #10177: Correct display of custom fields when editing VM interfaces

This commit is contained in:
jeremystretch 2022-08-29 15:10:14 -04:00
parent e0741cc9af
commit 777af35030
3 changed files with 24 additions and 3 deletions

View File

@ -7,6 +7,7 @@
* [#10155](https://github.com/netbox-community/netbox/issues/10155) - Fix rear port display when editing front port template for module type
* [#10156](https://github.com/netbox-community/netbox/issues/10156) - Avoid forcing SVG image links to open in a new window
* [#10161](https://github.com/netbox-community/netbox/issues/10161) - Restore "set null" option for custom fields during bulk edit
* [#10177](https://github.com/netbox-community/netbox/issues/10177) - Correct display of custom fields when editing VM interfaces
* [#10181](https://github.com/netbox-community/netbox/issues/10181) - Restore MultiPartParser (regression from #10031)
---

View File

@ -21,10 +21,22 @@
{% endif %}
{% render_field form.name %}
{% render_field form.description %}
{% render_field form.mac_address %}
{% render_field form.vrf %}
{% render_field form.mtu %}
{% render_field form.tags %}
</div>
<div class="field-group my-5">
<div class="row mb-2">
<h5 class="offset-sm-3">Addressing</h5>
</div>
{% render_field form.vrf %}
{% render_field form.mac_address %}
</div>
<div class="field-group my-5">
<div class="row mb-2">
<h5 class="offset-sm-3">Operation</h5>
</div>
{% render_field form.mtu %}
{% render_field form.enabled %}
</div>

View File

@ -323,6 +323,14 @@ class VMInterfaceForm(InterfaceCommonForm, NetBoxModelForm):
label='VRF'
)
fieldsets = (
('Interface', ('virtual_machine', 'name', 'description', 'tags')),
('Addressing', ('vrf', 'mac_address')),
('Operation', ('mtu', 'enabled')),
('Related Interfaces', ('parent', 'bridge')),
('802.1Q Switching', ('mode', 'vlan_group', 'untagged_vlan', 'tagged_vlans')),
)
class Meta:
model = VMInterface
fields = [