mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-24 17:38:37 -06:00
feat: add outer_width to RackTable (#7766)
* feat: add outer_width to RackTable * fix: add outer_units to column display * feat: add outer_depth to available columns
This commit is contained in:
parent
e04402ed57
commit
9c2514fce4
@ -72,12 +72,20 @@ class RackTable(BaseTable):
|
|||||||
tags = TagColumn(
|
tags = TagColumn(
|
||||||
url_name='dcim:rack_list'
|
url_name='dcim:rack_list'
|
||||||
)
|
)
|
||||||
|
outer_width = tables.TemplateColumn(
|
||||||
|
template_code="{{ record.outer_width }} {{ record.outer_unit }}",
|
||||||
|
verbose_name='Outer Width'
|
||||||
|
)
|
||||||
|
outer_depth = tables.TemplateColumn(
|
||||||
|
template_code="{{ record.outer_depth }} {{ record.outer_unit }}",
|
||||||
|
verbose_name='Outer Depth'
|
||||||
|
)
|
||||||
|
|
||||||
class Meta(BaseTable.Meta):
|
class Meta(BaseTable.Meta):
|
||||||
model = Rack
|
model = Rack
|
||||||
fields = (
|
fields = (
|
||||||
'pk', 'id', 'name', 'site', 'location', 'status', 'facility_id', 'tenant', 'role', 'serial', 'asset_tag', 'type',
|
'pk', 'id', 'name', 'site', 'location', 'status', 'facility_id', 'tenant', 'role', 'serial', 'asset_tag', 'type',
|
||||||
'width', 'u_height', 'comments', 'device_count', 'get_utilization', 'get_power_utilization', 'tags',
|
'width', 'outer_width', 'outer_depth', 'u_height', 'comments', 'device_count', 'get_utilization', 'get_power_utilization', 'tags',
|
||||||
)
|
)
|
||||||
default_columns = (
|
default_columns = (
|
||||||
'pk', 'name', 'site', 'location', 'status', 'facility_id', 'tenant', 'role', 'u_height', 'device_count',
|
'pk', 'name', 'site', 'location', 'status', 'facility_id', 'tenant', 'role', 'u_height', 'device_count',
|
||||||
|
Loading…
Reference in New Issue
Block a user