1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Fixes #10973: Fix device links in VDC table

This commit is contained in:
jeremystretch
2022-11-18 16:33:06 -05:00
parent 84c0c45da9
commit 9774bb46ce
3 changed files with 8 additions and 6 deletions

View File

@@ -139,7 +139,8 @@ class PlatformTable(NetBoxTable):
class DeviceTable(TenancyColumnsMixin, ContactsColumnMixin, NetBoxTable):
name = tables.TemplateColumn(
order_by=('_name',),
template_code=DEVICE_LINK
template_code=DEVICE_LINK,
linkify=True
)
status = columns.ChoiceFieldColumn()
region = tables.Column(
@@ -220,7 +221,8 @@ class DeviceTable(TenancyColumnsMixin, ContactsColumnMixin, NetBoxTable):
class DeviceImportTable(TenancyColumnsMixin, NetBoxTable):
name = tables.TemplateColumn(
template_code=DEVICE_LINK
template_code=DEVICE_LINK,
linkify=True
)
status = columns.ChoiceFieldColumn()
site = tables.Column(
@@ -897,7 +899,8 @@ class VirtualDeviceContextTable(TenancyColumnsMixin, NetBoxTable):
)
device = tables.TemplateColumn(
order_by=('_name',),
template_code=DEVICE_LINK
template_code=DEVICE_LINK,
linkify=True
)
status = columns.ChoiceFieldColumn()
primary_ip = tables.Column(

View File

@@ -21,9 +21,7 @@ DEVICE_WEIGHT = """
"""
DEVICE_LINK = """
<a href="{% url 'dcim:device' pk=record.pk %}">
{{ record.name|default:'<span class="badge bg-info">Unnamed device</span>' }}
</a>
{{ value|default:'<span class="badge bg-info">Unnamed device</span>' }}
"""
DEVICEBAY_STATUS = """