1
0
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:
Jeremy Stretch
2016-07-01 17:12:43 -04:00
parent 35c5423127
commit 0123dbcf5f
17 changed files with 584 additions and 20 deletions

View File

@ -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
#