From 271c771b76b74d979dfd4a72e823db1abe531c74 Mon Sep 17 00:00:00 2001 From: Joseph Kennedy Date: Mon, 28 Aug 2017 01:32:38 -0400 Subject: [PATCH] Allow custom fields for interfaces. Switch to get_status_display on INTERFACE_ENABLED template code. --- netbox/dcim/models.py | 2 +- netbox/dcim/tables.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/netbox/dcim/models.py b/netbox/dcim/models.py index 17153c6f0..1ca561280 100644 --- a/netbox/dcim/models.py +++ b/netbox/dcim/models.py @@ -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'] diff --git a/netbox/dcim/tables.py b/netbox/dcim/tables.py index 4471b4880..599ff878e 100644 --- a/netbox/dcim/tables.py +++ b/netbox/dcim/tables.py @@ -104,7 +104,7 @@ DEVICE_STATUS = """ """ INTERFACE_ENABLED = """ -{{ record.enabled }} +{{ record.get_status_display }} """ DEVICE_PRIMARY_IP = """