|
@@ -7,7 +7,7 @@ from dcim.models import (
|
|
|
)
|
|
)
|
|
|
from tenancy.tables import TenantColumn
|
|
from tenancy.tables import TenantColumn
|
|
|
from utilities.tables import (
|
|
from utilities.tables import (
|
|
|
- BaseTable, BooleanColumn, ButtonsColumn, ChoiceFieldColumn, ColorColumn, ColoredLabelColumn, LinkedCountColumn,
|
|
|
|
|
|
|
+ ActionsColumn, BaseTable, BooleanColumn, ChoiceFieldColumn, ColorColumn, ColoredLabelColumn, LinkedCountColumn,
|
|
|
MarkdownColumn, TagColumn, TemplateColumn, ToggleColumn,
|
|
MarkdownColumn, TagColumn, TemplateColumn, ToggleColumn,
|
|
|
)
|
|
)
|
|
|
from .template_code import *
|
|
from .template_code import *
|
|
@@ -94,15 +94,14 @@ class DeviceRoleTable(BaseTable):
|
|
|
tags = TagColumn(
|
|
tags = TagColumn(
|
|
|
url_name='dcim:devicerole_list'
|
|
url_name='dcim:devicerole_list'
|
|
|
)
|
|
)
|
|
|
- actions = ButtonsColumn(DeviceRole)
|
|
|
|
|
|
|
|
|
|
class Meta(BaseTable.Meta):
|
|
class Meta(BaseTable.Meta):
|
|
|
model = DeviceRole
|
|
model = DeviceRole
|
|
|
fields = (
|
|
fields = (
|
|
|
'pk', 'id', 'name', 'device_count', 'vm_count', 'color', 'vm_role', 'description', 'slug', 'tags',
|
|
'pk', 'id', 'name', 'device_count', 'vm_count', 'color', 'vm_role', 'description', 'slug', 'tags',
|
|
|
- 'actions',
|
|
|
|
|
|
|
+ 'actions', 'created', 'last_updated',
|
|
|
)
|
|
)
|
|
|
- default_columns = ('pk', 'name', 'device_count', 'vm_count', 'color', 'vm_role', 'description', 'actions')
|
|
|
|
|
|
|
+ default_columns = ('pk', 'name', 'device_count', 'vm_count', 'color', 'vm_role', 'description')
|
|
|
|
|
|
|
|
|
|
|
|
|
#
|
|
#
|
|
@@ -127,16 +126,15 @@ class PlatformTable(BaseTable):
|
|
|
tags = TagColumn(
|
|
tags = TagColumn(
|
|
|
url_name='dcim:platform_list'
|
|
url_name='dcim:platform_list'
|
|
|
)
|
|
)
|
|
|
- actions = ButtonsColumn(Platform)
|
|
|
|
|
|
|
|
|
|
class Meta(BaseTable.Meta):
|
|
class Meta(BaseTable.Meta):
|
|
|
model = Platform
|
|
model = Platform
|
|
|
fields = (
|
|
fields = (
|
|
|
'pk', 'id', 'name', 'manufacturer', 'device_count', 'vm_count', 'slug', 'napalm_driver', 'napalm_args',
|
|
'pk', 'id', 'name', 'manufacturer', 'device_count', 'vm_count', 'slug', 'napalm_driver', 'napalm_args',
|
|
|
- 'description', 'tags', 'actions',
|
|
|
|
|
|
|
+ 'description', 'tags', 'actions', 'created', 'last_updated',
|
|
|
)
|
|
)
|
|
|
default_columns = (
|
|
default_columns = (
|
|
|
- 'pk', 'name', 'manufacturer', 'device_count', 'vm_count', 'napalm_driver', 'description', 'actions',
|
|
|
|
|
|
|
+ 'pk', 'name', 'manufacturer', 'device_count', 'vm_count', 'napalm_driver', 'description',
|
|
|
)
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
@@ -207,7 +205,8 @@ class DeviceTable(BaseTable):
|
|
|
fields = (
|
|
fields = (
|
|
|
'pk', 'id', 'name', 'status', 'tenant', 'device_role', 'manufacturer', 'device_type', 'platform', 'serial',
|
|
'pk', 'id', 'name', 'status', 'tenant', 'device_role', 'manufacturer', 'device_type', 'platform', 'serial',
|
|
|
'asset_tag', 'site', 'location', 'rack', 'position', 'face', 'primary_ip', 'airflow', 'primary_ip4',
|
|
'asset_tag', 'site', 'location', 'rack', 'position', 'face', 'primary_ip', 'airflow', 'primary_ip4',
|
|
|
- 'primary_ip6', 'cluster', 'virtual_chassis', 'vc_position', 'vc_priority', 'comments', 'tags',
|
|
|
|
|
|
|
+ 'primary_ip6', 'cluster', 'virtual_chassis', 'vc_position', 'vc_priority', 'comments', 'tags', 'created',
|
|
|
|
|
+ 'last_updated',
|
|
|
)
|
|
)
|
|
|
default_columns = (
|
|
default_columns = (
|
|
|
'pk', 'name', 'status', 'tenant', 'site', 'location', 'rack', 'device_role', 'manufacturer', 'device_type',
|
|
'pk', 'name', 'status', 'tenant', 'site', 'location', 'rack', 'device_role', 'manufacturer', 'device_type',
|
|
@@ -313,7 +312,7 @@ class ConsolePortTable(ModularDeviceComponentTable, PathEndpointTable):
|
|
|
model = ConsolePort
|
|
model = ConsolePort
|
|
|
fields = (
|
|
fields = (
|
|
|
'pk', 'id', 'name', 'device', 'module_bay', 'module', 'label', 'type', 'speed', 'description',
|
|
'pk', 'id', 'name', 'device', 'module_bay', 'module', 'label', 'type', 'speed', 'description',
|
|
|
- 'mark_connected', 'cable', 'cable_color', 'link_peer', 'connection', 'tags',
|
|
|
|
|
|
|
+ 'mark_connected', 'cable', 'cable_color', 'link_peer', 'connection', 'tags', 'created', 'last_updated',
|
|
|
)
|
|
)
|
|
|
default_columns = ('pk', 'name', 'device', 'label', 'type', 'speed', 'description')
|
|
default_columns = ('pk', 'name', 'device', 'label', 'type', 'speed', 'description')
|
|
|
|
|
|
|
@@ -324,10 +323,8 @@ class DeviceConsolePortTable(ConsolePortTable):
|
|
|
order_by=Accessor('_name'),
|
|
order_by=Accessor('_name'),
|
|
|
attrs={'td': {'class': 'text-nowrap'}}
|
|
attrs={'td': {'class': 'text-nowrap'}}
|
|
|
)
|
|
)
|
|
|
- actions = ButtonsColumn(
|
|
|
|
|
- model=ConsolePort,
|
|
|
|
|
- buttons=('edit', 'delete'),
|
|
|
|
|
- prepend_template=CONSOLEPORT_BUTTONS
|
|
|
|
|
|
|
+ actions = ActionsColumn(
|
|
|
|
|
+ extra_buttons=CONSOLEPORT_BUTTONS
|
|
|
)
|
|
)
|
|
|
|
|
|
|
|
class Meta(DeviceComponentTable.Meta):
|
|
class Meta(DeviceComponentTable.Meta):
|
|
@@ -336,7 +333,7 @@ class DeviceConsolePortTable(ConsolePortTable):
|
|
|
'pk', 'id', 'name', 'module_bay', 'module', 'label', 'type', 'speed', 'description', 'mark_connected',
|
|
'pk', 'id', 'name', 'module_bay', 'module', 'label', 'type', 'speed', 'description', 'mark_connected',
|
|
|
'cable', 'cable_color', 'link_peer', 'connection', 'tags', 'actions'
|
|
'cable', 'cable_color', 'link_peer', 'connection', 'tags', 'actions'
|
|
|
)
|
|
)
|
|
|
- default_columns = ('pk', 'name', 'label', 'type', 'speed', 'description', 'cable', 'connection', 'actions')
|
|
|
|
|
|
|
+ default_columns = ('pk', 'name', 'label', 'type', 'speed', 'description', 'cable', 'connection')
|
|
|
row_attrs = {
|
|
row_attrs = {
|
|
|
'class': get_cabletermination_row_class
|
|
'class': get_cabletermination_row_class
|
|
|
}
|
|
}
|
|
@@ -357,7 +354,7 @@ class ConsoleServerPortTable(ModularDeviceComponentTable, PathEndpointTable):
|
|
|
model = ConsoleServerPort
|
|
model = ConsoleServerPort
|
|
|
fields = (
|
|
fields = (
|
|
|
'pk', 'id', 'name', 'device', 'module_bay', 'module', 'label', 'type', 'speed', 'description',
|
|
'pk', 'id', 'name', 'device', 'module_bay', 'module', 'label', 'type', 'speed', 'description',
|
|
|
- 'mark_connected', 'cable', 'cable_color', 'link_peer', 'connection', 'tags',
|
|
|
|
|
|
|
+ 'mark_connected', 'cable', 'cable_color', 'link_peer', 'connection', 'tags', 'created', 'last_updated',
|
|
|
)
|
|
)
|
|
|
default_columns = ('pk', 'name', 'device', 'label', 'type', 'speed', 'description')
|
|
default_columns = ('pk', 'name', 'device', 'label', 'type', 'speed', 'description')
|
|
|
|
|
|
|
@@ -369,10 +366,8 @@ class DeviceConsoleServerPortTable(ConsoleServerPortTable):
|
|
|
order_by=Accessor('_name'),
|
|
order_by=Accessor('_name'),
|
|
|
attrs={'td': {'class': 'text-nowrap'}}
|
|
attrs={'td': {'class': 'text-nowrap'}}
|
|
|
)
|
|
)
|
|
|
- actions = ButtonsColumn(
|
|
|
|
|
- model=ConsoleServerPort,
|
|
|
|
|
- buttons=('edit', 'delete'),
|
|
|
|
|
- prepend_template=CONSOLESERVERPORT_BUTTONS
|
|
|
|
|
|
|
+ actions = ActionsColumn(
|
|
|
|
|
+ extra_buttons=CONSOLESERVERPORT_BUTTONS
|
|
|
)
|
|
)
|
|
|
|
|
|
|
|
class Meta(DeviceComponentTable.Meta):
|
|
class Meta(DeviceComponentTable.Meta):
|
|
@@ -381,7 +376,7 @@ class DeviceConsoleServerPortTable(ConsoleServerPortTable):
|
|
|
'pk', 'id', 'name', 'module_bay', 'module', 'label', 'type', 'speed', 'description', 'mark_connected',
|
|
'pk', 'id', 'name', 'module_bay', 'module', 'label', 'type', 'speed', 'description', 'mark_connected',
|
|
|
'cable', 'cable_color', 'link_peer', 'connection', 'tags', 'actions',
|
|
'cable', 'cable_color', 'link_peer', 'connection', 'tags', 'actions',
|
|
|
)
|
|
)
|
|
|
- default_columns = ('pk', 'name', 'label', 'type', 'speed', 'description', 'cable', 'connection', 'actions')
|
|
|
|
|
|
|
+ default_columns = ('pk', 'name', 'label', 'type', 'speed', 'description', 'cable', 'connection')
|
|
|
row_attrs = {
|
|
row_attrs = {
|
|
|
'class': get_cabletermination_row_class
|
|
'class': get_cabletermination_row_class
|
|
|
}
|
|
}
|
|
@@ -402,7 +397,8 @@ class PowerPortTable(ModularDeviceComponentTable, PathEndpointTable):
|
|
|
model = PowerPort
|
|
model = PowerPort
|
|
|
fields = (
|
|
fields = (
|
|
|
'pk', 'id', 'name', 'device', 'module_bay', 'module', 'label', 'type', 'description', 'mark_connected',
|
|
'pk', 'id', 'name', 'device', 'module_bay', 'module', 'label', 'type', 'description', 'mark_connected',
|
|
|
- 'maximum_draw', 'allocated_draw', 'cable', 'cable_color', 'link_peer', 'connection', 'tags',
|
|
|
|
|
|
|
+ 'maximum_draw', 'allocated_draw', 'cable', 'cable_color', 'link_peer', 'connection', 'tags', 'created',
|
|
|
|
|
+ 'last_updated',
|
|
|
)
|
|
)
|
|
|
default_columns = ('pk', 'name', 'device', 'label', 'type', 'maximum_draw', 'allocated_draw', 'description')
|
|
default_columns = ('pk', 'name', 'device', 'label', 'type', 'maximum_draw', 'allocated_draw', 'description')
|
|
|
|
|
|
|
@@ -414,10 +410,8 @@ class DevicePowerPortTable(PowerPortTable):
|
|
|
order_by=Accessor('_name'),
|
|
order_by=Accessor('_name'),
|
|
|
attrs={'td': {'class': 'text-nowrap'}}
|
|
attrs={'td': {'class': 'text-nowrap'}}
|
|
|
)
|
|
)
|
|
|
- actions = ButtonsColumn(
|
|
|
|
|
- model=PowerPort,
|
|
|
|
|
- buttons=('edit', 'delete'),
|
|
|
|
|
- prepend_template=POWERPORT_BUTTONS
|
|
|
|
|
|
|
+ actions = ActionsColumn(
|
|
|
|
|
+ extra_buttons=POWERPORT_BUTTONS
|
|
|
)
|
|
)
|
|
|
|
|
|
|
|
class Meta(DeviceComponentTable.Meta):
|
|
class Meta(DeviceComponentTable.Meta):
|
|
@@ -428,7 +422,6 @@ class DevicePowerPortTable(PowerPortTable):
|
|
|
)
|
|
)
|
|
|
default_columns = (
|
|
default_columns = (
|
|
|
'pk', 'name', 'label', 'type', 'maximum_draw', 'allocated_draw', 'description', 'cable', 'connection',
|
|
'pk', 'name', 'label', 'type', 'maximum_draw', 'allocated_draw', 'description', 'cable', 'connection',
|
|
|
- 'actions',
|
|
|
|
|
)
|
|
)
|
|
|
row_attrs = {
|
|
row_attrs = {
|
|
|
'class': get_cabletermination_row_class
|
|
'class': get_cabletermination_row_class
|
|
@@ -453,7 +446,8 @@ class PowerOutletTable(ModularDeviceComponentTable, PathEndpointTable):
|
|
|
model = PowerOutlet
|
|
model = PowerOutlet
|
|
|
fields = (
|
|
fields = (
|
|
|
'pk', 'id', 'name', 'device', 'module_bay', 'module', 'label', 'type', 'description', 'power_port',
|
|
'pk', 'id', 'name', 'device', 'module_bay', 'module', 'label', 'type', 'description', 'power_port',
|
|
|
- 'feed_leg', 'mark_connected', 'cable', 'cable_color', 'link_peer', 'connection', 'tags',
|
|
|
|
|
|
|
+ 'feed_leg', 'mark_connected', 'cable', 'cable_color', 'link_peer', 'connection', 'tags', 'created',
|
|
|
|
|
+ 'last_updated',
|
|
|
)
|
|
)
|
|
|
default_columns = ('pk', 'name', 'device', 'label', 'type', 'power_port', 'feed_leg', 'description')
|
|
default_columns = ('pk', 'name', 'device', 'label', 'type', 'power_port', 'feed_leg', 'description')
|
|
|
|
|
|
|
@@ -464,10 +458,8 @@ class DevicePowerOutletTable(PowerOutletTable):
|
|
|
order_by=Accessor('_name'),
|
|
order_by=Accessor('_name'),
|
|
|
attrs={'td': {'class': 'text-nowrap'}}
|
|
attrs={'td': {'class': 'text-nowrap'}}
|
|
|
)
|
|
)
|
|
|
- actions = ButtonsColumn(
|
|
|
|
|
- model=PowerOutlet,
|
|
|
|
|
- buttons=('edit', 'delete'),
|
|
|
|
|
- prepend_template=POWEROUTLET_BUTTONS
|
|
|
|
|
|
|
+ actions = ActionsColumn(
|
|
|
|
|
+ extra_buttons=POWEROUTLET_BUTTONS
|
|
|
)
|
|
)
|
|
|
|
|
|
|
|
class Meta(DeviceComponentTable.Meta):
|
|
class Meta(DeviceComponentTable.Meta):
|
|
@@ -477,7 +469,7 @@ class DevicePowerOutletTable(PowerOutletTable):
|
|
|
'mark_connected', 'cable', 'cable_color', 'link_peer', 'connection', 'tags', 'actions',
|
|
'mark_connected', 'cable', 'cable_color', 'link_peer', 'connection', 'tags', 'actions',
|
|
|
)
|
|
)
|
|
|
default_columns = (
|
|
default_columns = (
|
|
|
- 'pk', 'name', 'label', 'type', 'power_port', 'feed_leg', 'description', 'cable', 'connection', 'actions',
|
|
|
|
|
|
|
+ 'pk', 'name', 'label', 'type', 'power_port', 'feed_leg', 'description', 'cable', 'connection',
|
|
|
)
|
|
)
|
|
|
row_attrs = {
|
|
row_attrs = {
|
|
|
'class': get_cabletermination_row_class
|
|
'class': get_cabletermination_row_class
|
|
@@ -535,6 +527,7 @@ class InterfaceTable(ModularDeviceComponentTable, BaseInterfaceTable, PathEndpoi
|
|
|
'mode', 'mac_address', 'wwn', 'rf_role', 'rf_channel', 'rf_channel_frequency', 'rf_channel_width',
|
|
'mode', 'mac_address', 'wwn', 'rf_role', 'rf_channel', 'rf_channel_frequency', 'rf_channel_width',
|
|
|
'tx_power', 'description', 'mark_connected', 'cable', 'cable_color', 'wireless_link', 'wireless_lans',
|
|
'tx_power', 'description', 'mark_connected', 'cable', 'cable_color', 'wireless_link', 'wireless_lans',
|
|
|
'link_peer', 'connection', 'tags', 'vrf', 'ip_addresses', 'fhrp_groups', 'untagged_vlan', 'tagged_vlans',
|
|
'link_peer', 'connection', 'tags', 'vrf', 'ip_addresses', 'fhrp_groups', 'untagged_vlan', 'tagged_vlans',
|
|
|
|
|
+ 'created', 'last_updated',
|
|
|
)
|
|
)
|
|
|
default_columns = ('pk', 'name', 'device', 'label', 'enabled', 'type', 'description')
|
|
default_columns = ('pk', 'name', 'device', 'label', 'enabled', 'type', 'description')
|
|
|
|
|
|
|
@@ -557,10 +550,8 @@ class DeviceInterfaceTable(InterfaceTable):
|
|
|
linkify=True,
|
|
linkify=True,
|
|
|
verbose_name='LAG'
|
|
verbose_name='LAG'
|
|
|
)
|
|
)
|
|
|
- actions = ButtonsColumn(
|
|
|
|
|
- model=Interface,
|
|
|
|
|
- buttons=('edit', 'delete'),
|
|
|
|
|
- prepend_template=INTERFACE_BUTTONS
|
|
|
|
|
|
|
+ actions = ActionsColumn(
|
|
|
|
|
+ extra_buttons=INTERFACE_BUTTONS
|
|
|
)
|
|
)
|
|
|
|
|
|
|
|
class Meta(DeviceComponentTable.Meta):
|
|
class Meta(DeviceComponentTable.Meta):
|
|
@@ -575,7 +566,7 @@ class DeviceInterfaceTable(InterfaceTable):
|
|
|
order_by = ('name',)
|
|
order_by = ('name',)
|
|
|
default_columns = (
|
|
default_columns = (
|
|
|
'pk', 'name', 'label', 'enabled', 'type', 'parent', 'lag', 'mtu', 'mode', 'description', 'ip_addresses',
|
|
'pk', 'name', 'label', 'enabled', 'type', 'parent', 'lag', 'mtu', 'mode', 'description', 'ip_addresses',
|
|
|
- 'cable', 'connection', 'actions',
|
|
|
|
|
|
|
+ 'cable', 'connection',
|
|
|
)
|
|
)
|
|
|
row_attrs = {
|
|
row_attrs = {
|
|
|
'class': get_interface_row_class,
|
|
'class': get_interface_row_class,
|
|
@@ -607,6 +598,7 @@ class FrontPortTable(ModularDeviceComponentTable, CableTerminationTable):
|
|
|
fields = (
|
|
fields = (
|
|
|
'pk', 'id', 'name', 'device', 'module_bay', 'module', 'label', 'type', 'color', 'rear_port',
|
|
'pk', 'id', 'name', 'device', 'module_bay', 'module', 'label', 'type', 'color', 'rear_port',
|
|
|
'rear_port_position', 'description', 'mark_connected', 'cable', 'cable_color', 'link_peer', 'tags',
|
|
'rear_port_position', 'description', 'mark_connected', 'cable', 'cable_color', 'link_peer', 'tags',
|
|
|
|
|
+ 'created', 'last_updated',
|
|
|
)
|
|
)
|
|
|
default_columns = (
|
|
default_columns = (
|
|
|
'pk', 'name', 'device', 'label', 'type', 'color', 'rear_port', 'rear_port_position', 'description',
|
|
'pk', 'name', 'device', 'label', 'type', 'color', 'rear_port', 'rear_port_position', 'description',
|
|
@@ -620,10 +612,8 @@ class DeviceFrontPortTable(FrontPortTable):
|
|
|
order_by=Accessor('_name'),
|
|
order_by=Accessor('_name'),
|
|
|
attrs={'td': {'class': 'text-nowrap'}}
|
|
attrs={'td': {'class': 'text-nowrap'}}
|
|
|
)
|
|
)
|
|
|
- actions = ButtonsColumn(
|
|
|
|
|
- model=FrontPort,
|
|
|
|
|
- buttons=('edit', 'delete'),
|
|
|
|
|
- prepend_template=FRONTPORT_BUTTONS
|
|
|
|
|
|
|
+ actions = ActionsColumn(
|
|
|
|
|
+ extra_buttons=FRONTPORT_BUTTONS
|
|
|
)
|
|
)
|
|
|
|
|
|
|
|
class Meta(DeviceComponentTable.Meta):
|
|
class Meta(DeviceComponentTable.Meta):
|
|
@@ -634,7 +624,6 @@ class DeviceFrontPortTable(FrontPortTable):
|
|
|
)
|
|
)
|
|
|
default_columns = (
|
|
default_columns = (
|
|
|
'pk', 'name', 'label', 'type', 'rear_port', 'rear_port_position', 'description', 'cable', 'link_peer',
|
|
'pk', 'name', 'label', 'type', 'rear_port', 'rear_port_position', 'description', 'cable', 'link_peer',
|
|
|
- 'actions',
|
|
|
|
|
)
|
|
)
|
|
|
row_attrs = {
|
|
row_attrs = {
|
|
|
'class': get_cabletermination_row_class
|
|
'class': get_cabletermination_row_class
|
|
@@ -657,7 +646,7 @@ class RearPortTable(ModularDeviceComponentTable, CableTerminationTable):
|
|
|
model = RearPort
|
|
model = RearPort
|
|
|
fields = (
|
|
fields = (
|
|
|
'pk', 'id', 'name', 'device', 'module_bay', 'module', 'label', 'type', 'color', 'positions', 'description',
|
|
'pk', 'id', 'name', 'device', 'module_bay', 'module', 'label', 'type', 'color', 'positions', 'description',
|
|
|
- 'mark_connected', 'cable', 'cable_color', 'link_peer', 'tags',
|
|
|
|
|
|
|
+ 'mark_connected', 'cable', 'cable_color', 'link_peer', 'tags', 'created', 'last_updated',
|
|
|
)
|
|
)
|
|
|
default_columns = ('pk', 'name', 'device', 'label', 'type', 'color', 'description')
|
|
default_columns = ('pk', 'name', 'device', 'label', 'type', 'color', 'description')
|
|
|
|
|
|
|
@@ -669,10 +658,8 @@ class DeviceRearPortTable(RearPortTable):
|
|
|
order_by=Accessor('_name'),
|
|
order_by=Accessor('_name'),
|
|
|
attrs={'td': {'class': 'text-nowrap'}}
|
|
attrs={'td': {'class': 'text-nowrap'}}
|
|
|
)
|
|
)
|
|
|
- actions = ButtonsColumn(
|
|
|
|
|
- model=RearPort,
|
|
|
|
|
- buttons=('edit', 'delete'),
|
|
|
|
|
- prepend_template=REARPORT_BUTTONS
|
|
|
|
|
|
|
+ actions = ActionsColumn(
|
|
|
|
|
+ extra_buttons=REARPORT_BUTTONS
|
|
|
)
|
|
)
|
|
|
|
|
|
|
|
class Meta(DeviceComponentTable.Meta):
|
|
class Meta(DeviceComponentTable.Meta):
|
|
@@ -682,7 +669,7 @@ class DeviceRearPortTable(RearPortTable):
|
|
|
'cable', 'cable_color', 'link_peer', 'tags', 'actions',
|
|
'cable', 'cable_color', 'link_peer', 'tags', 'actions',
|
|
|
)
|
|
)
|
|
|
default_columns = (
|
|
default_columns = (
|
|
|
- 'pk', 'name', 'label', 'type', 'positions', 'description', 'cable', 'link_peer', 'actions',
|
|
|
|
|
|
|
+ 'pk', 'name', 'label', 'type', 'positions', 'description', 'cable', 'link_peer',
|
|
|
)
|
|
)
|
|
|
row_attrs = {
|
|
row_attrs = {
|
|
|
'class': get_cabletermination_row_class
|
|
'class': get_cabletermination_row_class
|
|
@@ -709,7 +696,11 @@ class DeviceBayTable(DeviceComponentTable):
|
|
|
|
|
|
|
|
class Meta(DeviceComponentTable.Meta):
|
|
class Meta(DeviceComponentTable.Meta):
|
|
|
model = DeviceBay
|
|
model = DeviceBay
|
|
|
- fields = ('pk', 'id', 'name', 'device', 'label', 'status', 'installed_device', 'description', 'tags')
|
|
|
|
|
|
|
+ fields = (
|
|
|
|
|
+ 'pk', 'id', 'name', 'device', 'label', 'status', 'installed_device', 'description', 'tags',
|
|
|
|
|
+ 'created', 'last_updated',
|
|
|
|
|
+ )
|
|
|
|
|
+
|
|
|
default_columns = ('pk', 'name', 'device', 'label', 'status', 'installed_device', 'description')
|
|
default_columns = ('pk', 'name', 'device', 'label', 'status', 'installed_device', 'description')
|
|
|
|
|
|
|
|
|
|
|
|
@@ -720,10 +711,8 @@ class DeviceDeviceBayTable(DeviceBayTable):
|
|
|
order_by=Accessor('_name'),
|
|
order_by=Accessor('_name'),
|
|
|
attrs={'td': {'class': 'text-nowrap'}}
|
|
attrs={'td': {'class': 'text-nowrap'}}
|
|
|
)
|
|
)
|
|
|
- actions = ButtonsColumn(
|
|
|
|
|
- model=DeviceBay,
|
|
|
|
|
- buttons=('edit', 'delete'),
|
|
|
|
|
- prepend_template=DEVICEBAY_BUTTONS
|
|
|
|
|
|
|
+ actions = ActionsColumn(
|
|
|
|
|
+ extra_buttons=DEVICEBAY_BUTTONS
|
|
|
)
|
|
)
|
|
|
|
|
|
|
|
class Meta(DeviceComponentTable.Meta):
|
|
class Meta(DeviceComponentTable.Meta):
|
|
@@ -731,9 +720,7 @@ class DeviceDeviceBayTable(DeviceBayTable):
|
|
|
fields = (
|
|
fields = (
|
|
|
'pk', 'id', 'name', 'label', 'status', 'installed_device', 'description', 'tags', 'actions',
|
|
'pk', 'id', 'name', 'label', 'status', 'installed_device', 'description', 'tags', 'actions',
|
|
|
)
|
|
)
|
|
|
- default_columns = (
|
|
|
|
|
- 'pk', 'name', 'label', 'status', 'installed_device', 'description', 'actions',
|
|
|
|
|
- )
|
|
|
|
|
|
|
+ default_columns = ('pk', 'name', 'label', 'status', 'installed_device', 'description')
|
|
|
|
|
|
|
|
|
|
|
|
|
class ModuleBayTable(DeviceComponentTable):
|
|
class ModuleBayTable(DeviceComponentTable):
|
|
@@ -758,16 +745,14 @@ class ModuleBayTable(DeviceComponentTable):
|
|
|
|
|
|
|
|
|
|
|
|
|
class DeviceModuleBayTable(ModuleBayTable):
|
|
class DeviceModuleBayTable(ModuleBayTable):
|
|
|
- actions = ButtonsColumn(
|
|
|
|
|
- model=DeviceBay,
|
|
|
|
|
- buttons=('edit', 'delete'),
|
|
|
|
|
- prepend_template=MODULEBAY_BUTTONS
|
|
|
|
|
|
|
+ actions = ActionsColumn(
|
|
|
|
|
+ extra_buttons=MODULEBAY_BUTTONS
|
|
|
)
|
|
)
|
|
|
|
|
|
|
|
class Meta(DeviceComponentTable.Meta):
|
|
class Meta(DeviceComponentTable.Meta):
|
|
|
model = ModuleBay
|
|
model = ModuleBay
|
|
|
fields = ('pk', 'id', 'name', 'label', 'description', 'installed_module', 'tags', 'actions')
|
|
fields = ('pk', 'id', 'name', 'label', 'description', 'installed_module', 'tags', 'actions')
|
|
|
- default_columns = ('pk', 'name', 'label', 'description', 'installed_module', 'actions')
|
|
|
|
|
|
|
+ default_columns = ('pk', 'name', 'label', 'description', 'installed_module')
|
|
|
|
|
|
|
|
|
|
|
|
|
class InventoryItemTable(DeviceComponentTable):
|
|
class InventoryItemTable(DeviceComponentTable):
|
|
@@ -798,7 +783,7 @@ class InventoryItemTable(DeviceComponentTable):
|
|
|
model = InventoryItem
|
|
model = InventoryItem
|
|
|
fields = (
|
|
fields = (
|
|
|
'pk', 'id', 'name', 'device', 'component', 'label', 'role', 'manufacturer', 'part_id', 'serial',
|
|
'pk', 'id', 'name', 'device', 'component', 'label', 'role', 'manufacturer', 'part_id', 'serial',
|
|
|
- 'asset_tag', 'description', 'discovered', 'tags',
|
|
|
|
|
|
|
+ 'asset_tag', 'description', 'discovered', 'tags', 'created', 'last_updated',
|
|
|
)
|
|
)
|
|
|
default_columns = (
|
|
default_columns = (
|
|
|
'pk', 'name', 'device', 'label', 'role', 'manufacturer', 'part_id', 'serial', 'asset_tag',
|
|
'pk', 'name', 'device', 'label', 'role', 'manufacturer', 'part_id', 'serial', 'asset_tag',
|
|
@@ -812,10 +797,7 @@ class DeviceInventoryItemTable(InventoryItemTable):
|
|
|
order_by=Accessor('_name'),
|
|
order_by=Accessor('_name'),
|
|
|
attrs={'td': {'class': 'text-nowrap'}}
|
|
attrs={'td': {'class': 'text-nowrap'}}
|
|
|
)
|
|
)
|
|
|
- actions = ButtonsColumn(
|
|
|
|
|
- model=InventoryItem,
|
|
|
|
|
- buttons=('edit', 'delete')
|
|
|
|
|
- )
|
|
|
|
|
|
|
+ actions = ActionsColumn()
|
|
|
|
|
|
|
|
class Meta(BaseTable.Meta):
|
|
class Meta(BaseTable.Meta):
|
|
|
model = InventoryItem
|
|
model = InventoryItem
|
|
@@ -824,7 +806,7 @@ class DeviceInventoryItemTable(InventoryItemTable):
|
|
|
'description', 'discovered', 'tags', 'actions',
|
|
'description', 'discovered', 'tags', 'actions',
|
|
|
)
|
|
)
|
|
|
default_columns = (
|
|
default_columns = (
|
|
|
- 'pk', 'name', 'label', 'role', 'manufacturer', 'part_id', 'serial', 'asset_tag', 'component', 'actions',
|
|
|
|
|
|
|
+ 'pk', 'name', 'label', 'role', 'manufacturer', 'part_id', 'serial', 'asset_tag', 'component',
|
|
|
)
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
@@ -842,14 +824,13 @@ class InventoryItemRoleTable(BaseTable):
|
|
|
tags = TagColumn(
|
|
tags = TagColumn(
|
|
|
url_name='dcim:inventoryitemrole_list'
|
|
url_name='dcim:inventoryitemrole_list'
|
|
|
)
|
|
)
|
|
|
- actions = ButtonsColumn(InventoryItemRole)
|
|
|
|
|
|
|
|
|
|
class Meta(BaseTable.Meta):
|
|
class Meta(BaseTable.Meta):
|
|
|
model = InventoryItemRole
|
|
model = InventoryItemRole
|
|
|
fields = (
|
|
fields = (
|
|
|
'pk', 'id', 'name', 'inventoryitem_count', 'color', 'description', 'slug', 'tags', 'actions',
|
|
'pk', 'id', 'name', 'inventoryitem_count', 'color', 'description', 'slug', 'tags', 'actions',
|
|
|
)
|
|
)
|
|
|
- default_columns = ('pk', 'name', 'inventoryitem_count', 'color', 'description', 'actions')
|
|
|
|
|
|
|
+ default_columns = ('pk', 'name', 'inventoryitem_count', 'color', 'description')
|
|
|
|
|
|
|
|
|
|
|
|
|
#
|
|
#
|
|
@@ -875,5 +856,5 @@ class VirtualChassisTable(BaseTable):
|
|
|
|
|
|
|
|
class Meta(BaseTable.Meta):
|
|
class Meta(BaseTable.Meta):
|
|
|
model = VirtualChassis
|
|
model = VirtualChassis
|
|
|
- fields = ('pk', 'id', 'name', 'domain', 'master', 'member_count', 'tags')
|
|
|
|
|
|
|
+ fields = ('pk', 'id', 'name', 'domain', 'master', 'member_count', 'tags', 'created', 'last_updated',)
|
|
|
default_columns = ('pk', 'name', 'domain', 'master', 'member_count')
|
|
default_columns = ('pk', 'name', 'domain', 'master', 'member_count')
|