diff --git a/netbox/ipam/tables.py b/netbox/ipam/tables.py
index bbca3f082..131fa4c76 100644
--- a/netbox/ipam/tables.py
+++ b/netbox/ipam/tables.py
@@ -59,6 +59,14 @@ VRF_LINK = """
{% endif %}
"""
+VRF_TARGETS = """
+{% for rt in value.all %}
+ {{ rt }}{% if not forloop.last %}
{% endif %}
+{% empty %}
+ —
+{% endfor %}
+"""
+
VLAN_LINK = """
{% if record.pk %}
{{ record.vid }}
@@ -130,13 +138,23 @@ class VRFTable(BaseTable):
enforce_unique = BooleanColumn(
verbose_name='Unique'
)
+ import_targets = tables.TemplateColumn(
+ template_code=VRF_TARGETS,
+ orderable=False
+ )
+ export_targets = tables.TemplateColumn(
+ template_code=VRF_TARGETS,
+ orderable=False
+ )
tags = TagColumn(
url_name='ipam:vrf_list'
)
class Meta(BaseTable.Meta):
model = VRF
- fields = ('pk', 'name', 'rd', 'tenant', 'enforce_unique', 'description', 'tags')
+ fields = (
+ 'pk', 'name', 'rd', 'tenant', 'enforce_unique', 'description', 'import_targets', 'export_targets', 'tags',
+ )
default_columns = ('pk', 'name', 'rd', 'tenant', 'description')