From 7873952e7a3b95e479274415c5325eeb33dbaa7f Mon Sep 17 00:00:00 2001 From: Jeremy Stretch Date: Wed, 30 Dec 2020 15:30:31 -0500 Subject: [PATCH] Avoid wrapping text in hierarchical table columns --- netbox/dcim/tables/racks.py | 3 ++- netbox/dcim/tables/sites.py | 3 ++- netbox/ipam/tables.py | 2 +- netbox/tenancy/tables.py | 3 ++- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/netbox/dcim/tables/racks.py b/netbox/dcim/tables/racks.py index 85943dd0d..775e90076 100644 --- a/netbox/dcim/tables/racks.py +++ b/netbox/dcim/tables/racks.py @@ -26,7 +26,8 @@ class RackGroupTable(BaseTable): pk = ToggleColumn() name = tables.TemplateColumn( template_code=MPTT_LINK, - orderable=False + orderable=False, + attrs={'td': {'class': 'text-nowrap'}} ) site = tables.LinkColumn( viewname='dcim:site', diff --git a/netbox/dcim/tables/sites.py b/netbox/dcim/tables/sites.py index 76f30f507..50a5e5ec7 100644 --- a/netbox/dcim/tables/sites.py +++ b/netbox/dcim/tables/sites.py @@ -19,7 +19,8 @@ class RegionTable(BaseTable): pk = ToggleColumn() name = tables.TemplateColumn( template_code=MPTT_LINK, - orderable=False + orderable=False, + attrs={'td': {'class': 'text-nowrap'}} ) site_count = tables.Column( verbose_name='Sites' diff --git a/netbox/ipam/tables.py b/netbox/ipam/tables.py index bea8ec255..86d7e21eb 100644 --- a/netbox/ipam/tables.py +++ b/netbox/ipam/tables.py @@ -270,7 +270,7 @@ class PrefixTable(BaseTable): pk = ToggleColumn() prefix = tables.TemplateColumn( template_code=PREFIX_LINK, - attrs={'th': {'style': 'padding-left: 17px'}} + attrs={'td': {'class': 'text-nowrap'}} ) status = ChoiceFieldColumn( default=AVAILABLE_LABEL diff --git a/netbox/tenancy/tables.py b/netbox/tenancy/tables.py index 7a3d20e12..9e8be6b18 100644 --- a/netbox/tenancy/tables.py +++ b/netbox/tenancy/tables.py @@ -27,7 +27,8 @@ class TenantGroupTable(BaseTable): pk = ToggleColumn() name = tables.TemplateColumn( template_code=MPTT_LINK, - orderable=False + orderable=False, + attrs={'td': {'class': 'text-nowrap'}} ) tenant_count = LinkedCountColumn( viewname='tenancy:tenant_list',