|
|
@@ -152,6 +152,9 @@ class DeviceTable(TenancyColumnsMixin, NetBoxTable):
|
|
|
rack = tables.Column(
|
|
|
linkify=True
|
|
|
)
|
|
|
+ position = columns.TemplateColumn(
|
|
|
+ template_code='{{ value|floatformat }}'
|
|
|
+ )
|
|
|
device_role = columns.ColoredLabelColumn(
|
|
|
verbose_name='Role'
|
|
|
)
|
|
|
@@ -199,10 +202,10 @@ class DeviceTable(TenancyColumnsMixin, NetBoxTable):
|
|
|
class Meta(NetBoxTable.Meta):
|
|
|
model = Device
|
|
|
fields = (
|
|
|
- 'pk', 'id', 'name', 'status', 'tenant', 'tenant_group', 'device_role', 'manufacturer', 'device_type', 'platform', 'serial',
|
|
|
- 'asset_tag', 'site', 'location', 'rack', 'position', 'face', 'primary_ip', 'airflow', 'primary_ip4',
|
|
|
- 'primary_ip6', 'cluster', 'virtual_chassis', 'vc_position', 'vc_priority', 'comments', 'contacts', 'tags',
|
|
|
- 'created', 'last_updated',
|
|
|
+ 'pk', 'id', 'name', 'status', 'tenant', 'tenant_group', 'device_role', 'manufacturer', 'device_type',
|
|
|
+ 'platform', 'serial', 'asset_tag', 'site', 'location', 'rack', 'position', 'face', 'primary_ip', 'airflow',
|
|
|
+ 'primary_ip4', 'primary_ip6', 'cluster', 'virtual_chassis', 'vc_position', 'vc_priority', 'comments',
|
|
|
+ 'contacts', 'tags', 'created', 'last_updated',
|
|
|
)
|
|
|
default_columns = (
|
|
|
'pk', 'name', 'status', 'tenant', 'site', 'location', 'rack', 'device_role', 'manufacturer', 'device_type',
|