From da7ef1fbd3125e8b38d0c53ab0e6a60a62daccbe Mon Sep 17 00:00:00 2001 From: Abhimanyu Saharan Date: Thu, 9 Nov 2023 20:28:50 +0530 Subject: [PATCH] moved units to header #13587 --- netbox/dcim/tables/devices.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/netbox/dcim/tables/devices.py b/netbox/dcim/tables/devices.py index ac99c93bb..83bf62a2c 100644 --- a/netbox/dcim/tables/devices.py +++ b/netbox/dcim/tables/devices.py @@ -466,13 +466,11 @@ class PowerPortTable(ModularDeviceComponentTable, PathEndpointTable): 'args': [Accessor('device_id')], } ) - maximum_draw = columns.TemplateColumn( - template_code='''{% if record.maximum_draw %}{{ value }} W{% endif %}''', - verbose_name=_('Maximum draw') + maximum_draw = tables.Column( + verbose_name=_('Maximum draw (watts)') ) - allocated_draw = columns.TemplateColumn( - template_code='''{% if record.allocated_draw %}{{ value }} W{% endif %}''', - verbose_name=_('Allocated draw') + allocated_draw = tables.Column( + verbose_name=_('Allocated draw (watts)') ) tags = columns.TagColumn( url_name='dcim:powerport_list'