From 052346364a5bf1da681e3726f5b26f9407372c60 Mon Sep 17 00:00:00 2001 From: Jeremy Stretch Date: Fri, 13 Nov 2020 13:14:10 -0500 Subject: [PATCH] Don't wrap component names --- netbox/dcim/tables/devices.py | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/netbox/dcim/tables/devices.py b/netbox/dcim/tables/devices.py index 994b6f7f1..b3676e0a5 100644 --- a/netbox/dcim/tables/devices.py +++ b/netbox/dcim/tables/devices.py @@ -253,7 +253,8 @@ class ConsolePortTable(DeviceComponentTable, PathEndpointTable): class DeviceConsolePortTable(ConsolePortTable): name = tables.TemplateColumn( - template_code=' {{ value }}' + template_code=' {{ value }}', + attrs={'td': {'class': 'text-nowrap'}} ) actions = ButtonsColumn( model=ConsolePort, @@ -286,7 +287,9 @@ class ConsoleServerPortTable(DeviceComponentTable, PathEndpointTable): class DeviceConsoleServerPortTable(ConsoleServerPortTable): name = tables.TemplateColumn( - template_code=' {{ value }}' + template_code=' ' + '{{ value }}', + attrs={'td': {'class': 'text-nowrap'}} ) actions = ButtonsColumn( model=ConsoleServerPort, @@ -322,7 +325,9 @@ class PowerPortTable(DeviceComponentTable, PathEndpointTable): class DevicePowerPortTable(PowerPortTable): name = tables.TemplateColumn( - template_code=' {{ value }}' + template_code=' ' + '{{ value }}', + attrs={'td': {'class': 'text-nowrap'}} ) actions = ButtonsColumn( model=PowerPort, @@ -365,7 +370,8 @@ class PowerOutletTable(DeviceComponentTable, PathEndpointTable): class DevicePowerOutletTable(PowerOutletTable): name = tables.TemplateColumn( - template_code=' {{ value }}' + template_code=' {{ value }}', + attrs={'td': {'class': 'text-nowrap'}} ) actions = ButtonsColumn( model=PowerOutlet, @@ -421,7 +427,8 @@ class DeviceInterfaceTable(InterfaceTable): name = tables.TemplateColumn( template_code=' {{ value }}' + '{% endif %}"> {{ value }}', + attrs={'td': {'class': 'text-nowrap'}} ) lag = tables.Column( linkify=True, @@ -472,7 +479,8 @@ class FrontPortTable(DeviceComponentTable, CableTerminationTable): class DeviceFrontPortTable(FrontPortTable): name = tables.TemplateColumn( template_code=' ' - '{{ value }}' + '{{ value }}', + attrs={'td': {'class': 'text-nowrap'}} ) actions = ButtonsColumn( model=FrontPort, @@ -510,7 +518,8 @@ class RearPortTable(DeviceComponentTable, CableTerminationTable): class DeviceRearPortTable(RearPortTable): name = tables.TemplateColumn( template_code=' ' - '{{ value }}' + '{{ value }}', + attrs={'td': {'class': 'text-nowrap'}} ) actions = ButtonsColumn( model=RearPort, @@ -552,7 +561,8 @@ class DeviceBayTable(DeviceComponentTable): class DeviceDeviceBayTable(DeviceBayTable): name = tables.TemplateColumn( template_code=' {{ value }}' + '"> {{ value }}', + attrs={'td': {'class': 'text-nowrap'}} ) actions = ButtonsColumn( model=DeviceBay, @@ -593,7 +603,8 @@ class InventoryItemTable(DeviceComponentTable): class DeviceInventoryItemTable(InventoryItemTable): name = tables.TemplateColumn( template_code='' - '{{ value }}' + '{{ value }}', + attrs={'td': {'class': 'text-nowrap'}} ) actions = ButtonsColumn( model=InventoryItem,