mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-23 17:08:41 -06:00
Update table field ordering
This commit is contained in:
parent
12c7d83a91
commit
9adeed55fb
@ -229,7 +229,7 @@ class RegionTable(BaseTable):
|
|||||||
|
|
||||||
class SiteTable(BaseTable):
|
class SiteTable(BaseTable):
|
||||||
pk = ToggleColumn()
|
pk = ToggleColumn()
|
||||||
name = tables.LinkColumn()
|
name = tables.LinkColumn(order_by=('_name',))
|
||||||
status = tables.TemplateColumn(template_code=STATUS_LABEL, verbose_name='Status')
|
status = tables.TemplateColumn(template_code=STATUS_LABEL, verbose_name='Status')
|
||||||
region = tables.TemplateColumn(template_code=SITE_REGION_LINK)
|
region = tables.TemplateColumn(template_code=SITE_REGION_LINK)
|
||||||
tenant = tables.TemplateColumn(template_code=COL_TENANT)
|
tenant = tables.TemplateColumn(template_code=COL_TENANT)
|
||||||
@ -291,7 +291,7 @@ class RackRoleTable(BaseTable):
|
|||||||
|
|
||||||
class RackTable(BaseTable):
|
class RackTable(BaseTable):
|
||||||
pk = ToggleColumn()
|
pk = ToggleColumn()
|
||||||
name = tables.LinkColumn()
|
name = tables.LinkColumn(order_by=('_name',))
|
||||||
site = tables.LinkColumn('dcim:site', args=[Accessor('site.slug')])
|
site = tables.LinkColumn('dcim:site', args=[Accessor('site.slug')])
|
||||||
group = tables.Column(accessor=Accessor('group.name'), verbose_name='Group')
|
group = tables.Column(accessor=Accessor('group.name'), verbose_name='Group')
|
||||||
tenant = tables.TemplateColumn(template_code=COL_TENANT)
|
tenant = tables.TemplateColumn(template_code=COL_TENANT)
|
||||||
@ -409,6 +409,7 @@ class DeviceTypeTable(BaseTable):
|
|||||||
|
|
||||||
class ConsolePortTemplateTable(BaseTable):
|
class ConsolePortTemplateTable(BaseTable):
|
||||||
pk = ToggleColumn()
|
pk = ToggleColumn()
|
||||||
|
name = tables.Column(order_by=('_name',))
|
||||||
actions = tables.TemplateColumn(
|
actions = tables.TemplateColumn(
|
||||||
template_code=get_component_template_actions('consoleporttemplate'),
|
template_code=get_component_template_actions('consoleporttemplate'),
|
||||||
attrs={'td': {'class': 'text-right noprint'}},
|
attrs={'td': {'class': 'text-right noprint'}},
|
||||||
@ -432,6 +433,7 @@ class ConsolePortImportTable(BaseTable):
|
|||||||
|
|
||||||
class ConsoleServerPortTemplateTable(BaseTable):
|
class ConsoleServerPortTemplateTable(BaseTable):
|
||||||
pk = ToggleColumn()
|
pk = ToggleColumn()
|
||||||
|
name = tables.Column(order_by=('_name',))
|
||||||
actions = tables.TemplateColumn(
|
actions = tables.TemplateColumn(
|
||||||
template_code=get_component_template_actions('consoleserverporttemplate'),
|
template_code=get_component_template_actions('consoleserverporttemplate'),
|
||||||
attrs={'td': {'class': 'text-right noprint'}},
|
attrs={'td': {'class': 'text-right noprint'}},
|
||||||
@ -455,6 +457,7 @@ class ConsoleServerPortImportTable(BaseTable):
|
|||||||
|
|
||||||
class PowerPortTemplateTable(BaseTable):
|
class PowerPortTemplateTable(BaseTable):
|
||||||
pk = ToggleColumn()
|
pk = ToggleColumn()
|
||||||
|
name = tables.Column(order_by=('_name',))
|
||||||
actions = tables.TemplateColumn(
|
actions = tables.TemplateColumn(
|
||||||
template_code=get_component_template_actions('powerporttemplate'),
|
template_code=get_component_template_actions('powerporttemplate'),
|
||||||
attrs={'td': {'class': 'text-right noprint'}},
|
attrs={'td': {'class': 'text-right noprint'}},
|
||||||
@ -478,6 +481,7 @@ class PowerPortImportTable(BaseTable):
|
|||||||
|
|
||||||
class PowerOutletTemplateTable(BaseTable):
|
class PowerOutletTemplateTable(BaseTable):
|
||||||
pk = ToggleColumn()
|
pk = ToggleColumn()
|
||||||
|
name = tables.Column(order_by=('_name',))
|
||||||
actions = tables.TemplateColumn(
|
actions = tables.TemplateColumn(
|
||||||
template_code=get_component_template_actions('poweroutlettemplate'),
|
template_code=get_component_template_actions('poweroutlettemplate'),
|
||||||
attrs={'td': {'class': 'text-right noprint'}},
|
attrs={'td': {'class': 'text-right noprint'}},
|
||||||
@ -526,6 +530,7 @@ class InterfaceImportTable(BaseTable):
|
|||||||
|
|
||||||
class FrontPortTemplateTable(BaseTable):
|
class FrontPortTemplateTable(BaseTable):
|
||||||
pk = ToggleColumn()
|
pk = ToggleColumn()
|
||||||
|
name = tables.Column(order_by=('_name',))
|
||||||
rear_port_position = tables.Column(
|
rear_port_position = tables.Column(
|
||||||
verbose_name='Position'
|
verbose_name='Position'
|
||||||
)
|
)
|
||||||
@ -552,6 +557,7 @@ class FrontPortImportTable(BaseTable):
|
|||||||
|
|
||||||
class RearPortTemplateTable(BaseTable):
|
class RearPortTemplateTable(BaseTable):
|
||||||
pk = ToggleColumn()
|
pk = ToggleColumn()
|
||||||
|
name = tables.Column(order_by=('_name',))
|
||||||
actions = tables.TemplateColumn(
|
actions = tables.TemplateColumn(
|
||||||
template_code=get_component_template_actions('rearporttemplate'),
|
template_code=get_component_template_actions('rearporttemplate'),
|
||||||
attrs={'td': {'class': 'text-right noprint'}},
|
attrs={'td': {'class': 'text-right noprint'}},
|
||||||
@ -575,6 +581,7 @@ class RearPortImportTable(BaseTable):
|
|||||||
|
|
||||||
class DeviceBayTemplateTable(BaseTable):
|
class DeviceBayTemplateTable(BaseTable):
|
||||||
pk = ToggleColumn()
|
pk = ToggleColumn()
|
||||||
|
name = tables.Column(order_by=('_name',))
|
||||||
actions = tables.TemplateColumn(
|
actions = tables.TemplateColumn(
|
||||||
template_code=get_component_template_actions('devicebaytemplate'),
|
template_code=get_component_template_actions('devicebaytemplate'),
|
||||||
attrs={'td': {'class': 'text-right noprint'}},
|
attrs={'td': {'class': 'text-right noprint'}},
|
||||||
@ -653,7 +660,10 @@ class PlatformTable(BaseTable):
|
|||||||
|
|
||||||
class DeviceTable(BaseTable):
|
class DeviceTable(BaseTable):
|
||||||
pk = ToggleColumn()
|
pk = ToggleColumn()
|
||||||
name = tables.TemplateColumn(template_code=DEVICE_LINK)
|
name = tables.TemplateColumn(
|
||||||
|
order_by=('_name',),
|
||||||
|
template_code=DEVICE_LINK
|
||||||
|
)
|
||||||
status = tables.TemplateColumn(template_code=STATUS_LABEL, verbose_name='Status')
|
status = tables.TemplateColumn(template_code=STATUS_LABEL, verbose_name='Status')
|
||||||
tenant = tables.TemplateColumn(template_code=COL_TENANT)
|
tenant = tables.TemplateColumn(template_code=COL_TENANT)
|
||||||
site = tables.LinkColumn('dcim:site', args=[Accessor('site.slug')])
|
site = tables.LinkColumn('dcim:site', args=[Accessor('site.slug')])
|
||||||
@ -701,6 +711,7 @@ class DeviceImportTable(BaseTable):
|
|||||||
|
|
||||||
class DeviceComponentDetailTable(BaseTable):
|
class DeviceComponentDetailTable(BaseTable):
|
||||||
pk = ToggleColumn()
|
pk = ToggleColumn()
|
||||||
|
name = tables.Column(order_by=('_name',))
|
||||||
cable = tables.LinkColumn()
|
cable = tables.LinkColumn()
|
||||||
|
|
||||||
class Meta(BaseTable.Meta):
|
class Meta(BaseTable.Meta):
|
||||||
@ -710,6 +721,7 @@ class DeviceComponentDetailTable(BaseTable):
|
|||||||
|
|
||||||
|
|
||||||
class ConsolePortTable(BaseTable):
|
class ConsolePortTable(BaseTable):
|
||||||
|
name = tables.Column(order_by=('_name',))
|
||||||
|
|
||||||
class Meta(BaseTable.Meta):
|
class Meta(BaseTable.Meta):
|
||||||
model = ConsolePort
|
model = ConsolePort
|
||||||
@ -724,6 +736,7 @@ class ConsolePortDetailTable(DeviceComponentDetailTable):
|
|||||||
|
|
||||||
|
|
||||||
class ConsoleServerPortTable(BaseTable):
|
class ConsoleServerPortTable(BaseTable):
|
||||||
|
name = tables.Column(order_by=('_name',))
|
||||||
|
|
||||||
class Meta(BaseTable.Meta):
|
class Meta(BaseTable.Meta):
|
||||||
model = ConsoleServerPort
|
model = ConsoleServerPort
|
||||||
@ -738,6 +751,7 @@ class ConsoleServerPortDetailTable(DeviceComponentDetailTable):
|
|||||||
|
|
||||||
|
|
||||||
class PowerPortTable(BaseTable):
|
class PowerPortTable(BaseTable):
|
||||||
|
name = tables.Column(order_by=('_name',))
|
||||||
|
|
||||||
class Meta(BaseTable.Meta):
|
class Meta(BaseTable.Meta):
|
||||||
model = PowerPort
|
model = PowerPort
|
||||||
@ -752,6 +766,7 @@ class PowerPortDetailTable(DeviceComponentDetailTable):
|
|||||||
|
|
||||||
|
|
||||||
class PowerOutletTable(BaseTable):
|
class PowerOutletTable(BaseTable):
|
||||||
|
name = tables.Column(order_by=('_name',))
|
||||||
|
|
||||||
class Meta(BaseTable.Meta):
|
class Meta(BaseTable.Meta):
|
||||||
model = PowerOutlet
|
model = PowerOutlet
|
||||||
@ -783,6 +798,7 @@ class InterfaceDetailTable(DeviceComponentDetailTable):
|
|||||||
|
|
||||||
|
|
||||||
class FrontPortTable(BaseTable):
|
class FrontPortTable(BaseTable):
|
||||||
|
name = tables.Column(order_by=('_name',))
|
||||||
|
|
||||||
class Meta(BaseTable.Meta):
|
class Meta(BaseTable.Meta):
|
||||||
model = FrontPort
|
model = FrontPort
|
||||||
@ -798,6 +814,7 @@ class FrontPortDetailTable(DeviceComponentDetailTable):
|
|||||||
|
|
||||||
|
|
||||||
class RearPortTable(BaseTable):
|
class RearPortTable(BaseTable):
|
||||||
|
name = tables.Column(order_by=('_name',))
|
||||||
|
|
||||||
class Meta(BaseTable.Meta):
|
class Meta(BaseTable.Meta):
|
||||||
model = RearPort
|
model = RearPort
|
||||||
@ -813,6 +830,7 @@ class RearPortDetailTable(DeviceComponentDetailTable):
|
|||||||
|
|
||||||
|
|
||||||
class DeviceBayTable(BaseTable):
|
class DeviceBayTable(BaseTable):
|
||||||
|
name = tables.Column(order_by=('_name',))
|
||||||
|
|
||||||
class Meta(BaseTable.Meta):
|
class Meta(BaseTable.Meta):
|
||||||
model = DeviceBay
|
model = DeviceBay
|
||||||
|
Loading…
Reference in New Issue
Block a user