mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Initial work on #91: Support for subdevices
This commit is contained in:
@ -4,8 +4,9 @@ from django_tables2.utils import Accessor
|
||||
from utilities.tables import BaseTable, ToggleColumn
|
||||
|
||||
from .models import (
|
||||
ConsolePort, ConsolePortTemplate, ConsoleServerPortTemplate, Device, DeviceRole, DeviceType, InterfaceTemplate,
|
||||
Interface, Manufacturer, Platform, PowerOutletTemplate, PowerPort, PowerPortTemplate, Rack, RackGroup, Site,
|
||||
ConsolePort, ConsolePortTemplate, ConsoleServerPortTemplate, Device, DeviceBayTemplate, DeviceRole, DeviceType,
|
||||
Interface, InterfaceTemplate, Manufacturer, Platform, PowerOutletTemplate, PowerPort, PowerPortTemplate, Rack,
|
||||
RackGroup, Site,
|
||||
)
|
||||
|
||||
|
||||
@ -201,6 +202,19 @@ class InterfaceTemplateTable(tables.Table):
|
||||
}
|
||||
|
||||
|
||||
class DeviceBayTemplateTable(tables.Table):
|
||||
pk = ToggleColumn()
|
||||
|
||||
class Meta:
|
||||
model = DeviceBayTemplate
|
||||
fields = ('pk', 'name')
|
||||
empty_text = "None"
|
||||
show_header = False
|
||||
attrs = {
|
||||
'class': 'table table-hover panel-body',
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# Device roles
|
||||
#
|
||||
|
Reference in New Issue
Block a user