mirror of
https://github.com/netbox-community/netbox.git
synced 2025-12-21 21:02:23 -06:00
15106 Add Length Field to Wireless Link (#16528)
* 15106 add wireles link length * 15106 add wireles link length * 15106 add wireless link length * 15106 add tests * 15106 rename length -> distance * 15106 rename length -> distance * 15106 review comments * 15106 review comments * 15106 fix form * 15106 length -> distance
This commit is contained in:
@@ -4,6 +4,7 @@ import django_tables2 as tables
|
||||
from netbox.tables import NetBoxTable, columns
|
||||
from tenancy.tables import TenancyColumnsMixin
|
||||
from wireless.models import *
|
||||
from .template_code import WIRELESS_LINK_DISTANCE
|
||||
|
||||
__all__ = (
|
||||
'WirelessLinkTable',
|
||||
@@ -36,6 +37,10 @@ class WirelessLinkTable(TenancyColumnsMixin, NetBoxTable):
|
||||
verbose_name=_('Interface B'),
|
||||
linkify=True
|
||||
)
|
||||
distance = columns.TemplateColumn(
|
||||
template_code=WIRELESS_LINK_DISTANCE,
|
||||
order_by=('_abs_distance')
|
||||
)
|
||||
tags = columns.TagColumn(
|
||||
url_name='wireless:wirelesslink_list'
|
||||
)
|
||||
@@ -44,7 +49,8 @@ class WirelessLinkTable(TenancyColumnsMixin, NetBoxTable):
|
||||
model = WirelessLink
|
||||
fields = (
|
||||
'pk', 'id', 'status', 'device_a', 'interface_a', 'device_b', 'interface_b', 'ssid', 'tenant',
|
||||
'tenant_group', 'description', 'auth_type', 'auth_cipher', 'auth_psk', 'tags', 'created', 'last_updated',
|
||||
'tenant_group', 'distance', 'description', 'auth_type', 'auth_cipher', 'auth_psk', 'tags',
|
||||
'created', 'last_updated',
|
||||
)
|
||||
default_columns = (
|
||||
'pk', 'id', 'status', 'device_a', 'interface_a', 'device_b', 'interface_b', 'ssid', 'auth_type',
|
||||
|
||||
Reference in New Issue
Block a user