Skip to content

Commit 7873952

Browse files
committed
Avoid wrapping text in hierarchical table columns
1 parent d989ce2 commit 7873952

File tree

4 files changed

+7
-4
lines changed

4 files changed

+7
-4
lines changed

netbox/dcim/tables/racks.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ class RackGroupTable(BaseTable):
2626
pk = ToggleColumn()
2727
name = tables.TemplateColumn(
2828
template_code=MPTT_LINK,
29-
orderable=False
29+
orderable=False,
30+
attrs={'td': {'class': 'text-nowrap'}}
3031
)
3132
site = tables.LinkColumn(
3233
viewname='dcim:site',

netbox/dcim/tables/sites.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ class RegionTable(BaseTable):
1919
pk = ToggleColumn()
2020
name = tables.TemplateColumn(
2121
template_code=MPTT_LINK,
22-
orderable=False
22+
orderable=False,
23+
attrs={'td': {'class': 'text-nowrap'}}
2324
)
2425
site_count = tables.Column(
2526
verbose_name='Sites'

netbox/ipam/tables.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ class PrefixTable(BaseTable):
270270
pk = ToggleColumn()
271271
prefix = tables.TemplateColumn(
272272
template_code=PREFIX_LINK,
273-
attrs={'th': {'style': 'padding-left: 17px'}}
273+
attrs={'td': {'class': 'text-nowrap'}}
274274
)
275275
status = ChoiceFieldColumn(
276276
default=AVAILABLE_LABEL

netbox/tenancy/tables.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ class TenantGroupTable(BaseTable):
2727
pk = ToggleColumn()
2828
name = tables.TemplateColumn(
2929
template_code=MPTT_LINK,
30-
orderable=False
30+
orderable=False,
31+
attrs={'td': {'class': 'text-nowrap'}}
3132
)
3233
tenant_count = LinkedCountColumn(
3334
viewname='tenancy:tenant_list',

0 commit comments

Comments
 (0)