Skip to content

Commit

Permalink
adds unit to the power port draw #13587
Browse files Browse the repository at this point in the history
  • Loading branch information
abhi1693 committed Nov 8, 2023
1 parent 22e474f commit a373c91
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions netbox/dcim/tables/devices.py
Original file line number Diff line number Diff line change
Expand Up @@ -466,6 +466,14 @@ class PowerPortTable(ModularDeviceComponentTable, PathEndpointTable):
'args': [Accessor('device_id')],
}
)
maximum_draw = tables.TemplateColumn(
template_code='''{% if record.maximum_draw %}{{ record.maximum_draw }} W{% else %}—{% endif %}''',
verbose_name=_('Maximum draw')
)
allocated_draw = tables.TemplateColumn(
template_code='''{% if record.allocated_draw %}{{ record.allocated_draw }} W{% else %}—{% endif %}''',
verbose_name=_('Allocated draw')
)
tags = columns.TagColumn(
url_name='dcim:powerport_list'
)
Expand Down

0 comments on commit a373c91

Please sign in to comment.