mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-07 08:08:15 -06:00
Allow custom fields for interfaces. Switch to get_status_display on INTERFACE_ENABLED template code.
This commit is contained in:
parent
f855733f46
commit
271c771b76
@ -1146,7 +1146,7 @@ class Interface(models.Model):
|
||||
help_text="This interface is used only for out-of-band management"
|
||||
)
|
||||
description = models.CharField(max_length=100, blank=True)
|
||||
|
||||
custom_field_values = GenericRelation(CustomFieldValue, content_type_field='obj_type', object_id_field='obj_id')
|
||||
objects = InterfaceQuerySet.as_manager()
|
||||
|
||||
csv_headers = ['device','lag','name','mac_address','form_factor','enabled','description','mtu','mgmt_only','is_virtual','is_wireless','is_connected','is_lag']
|
||||
|
@ -104,7 +104,7 @@ DEVICE_STATUS = """
|
||||
"""
|
||||
|
||||
INTERFACE_ENABLED = """
|
||||
<span class="label label-{{ record.get_status_class }}">{{ record.enabled }}</span>
|
||||
<span class="label label-{{ record.get_status_class }}">{{ record.get_status_display }}</span>
|
||||
"""
|
||||
|
||||
DEVICE_PRIMARY_IP = """
|
||||
|
Loading…
Reference in New Issue
Block a user