Răsfoiți Sursa

Closes #19428: Add u_height column to devices table

Jeremy Stretch 5 luni în urmă
părinte
comite
0a336465f2
1 a modificat fișierele cu 5 adăugiri și 0 ștergeri
  1. 5 0
      netbox/dcim/tables/devices.py

+ 5 - 0
netbox/dcim/tables/devices.py

@@ -195,6 +195,11 @@ class DeviceTable(TenancyColumnsMixin, ContactsColumnMixin, NetBoxTable):
         linkify=True,
         linkify=True,
         verbose_name=_('Type')
         verbose_name=_('Type')
     )
     )
+    u_height = columns.TemplateColumn(
+        accessor=tables.A('device_type.u_height'),
+        verbose_name=_('U Height'),
+        template_code='{{ value|floatformat }}'
+    )
     platform = tables.Column(
     platform = tables.Column(
         linkify=True,
         linkify=True,
         verbose_name=_('Platform')
         verbose_name=_('Platform')