mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-08 08:38:16 -06:00
10500 add to serializer, tables
This commit is contained in:
parent
d72d748164
commit
2b41ba6a53
@ -307,7 +307,7 @@ class ModuleBaySerializer(NetBoxModelSerializer):
|
||||
class Meta:
|
||||
model = ModuleBay
|
||||
fields = [
|
||||
'id', 'url', 'display_url', 'display', 'device', 'name', 'installed_module', 'label', 'position',
|
||||
'id', 'url', 'display_url', 'display', 'device', 'module', 'name', 'installed_module', 'label', 'position',
|
||||
'description', 'tags', 'custom_fields', 'created', 'last_updated',
|
||||
]
|
||||
brief_fields = ('id', 'url', 'display', 'installed_module', 'name', 'description')
|
||||
|
@ -259,7 +259,7 @@ class ModuleBayTemplateSerializer(ValidatedModelSerializer):
|
||||
class Meta:
|
||||
model = ModuleBayTemplate
|
||||
fields = [
|
||||
'id', 'url', 'display', 'device_type', 'name', 'label', 'position', 'description',
|
||||
'id', 'url', 'display', 'device_type', 'module_type', 'name', 'label', 'position', 'description',
|
||||
'created', 'last_updated',
|
||||
]
|
||||
brief_fields = ('id', 'url', 'display', 'name', 'description')
|
||||
|
@ -846,7 +846,7 @@ class RearPortTemplateFilterSet(ChangeLoggedModelFilterSet, ModularDeviceTypeCom
|
||||
fields = ('id', 'name', 'label', 'type', 'color', 'positions', 'description')
|
||||
|
||||
|
||||
class ModuleBayTemplateFilterSet(ChangeLoggedModelFilterSet, DeviceTypeComponentFilterSet):
|
||||
class ModuleBayTemplateFilterSet(ChangeLoggedModelFilterSet, ModularDeviceTypeComponentFilterSet):
|
||||
|
||||
class Meta:
|
||||
model = ModuleBayTemplate
|
||||
@ -1781,7 +1781,7 @@ class RearPortFilterSet(
|
||||
)
|
||||
|
||||
|
||||
class ModuleBayFilterSet(DeviceComponentFilterSet, NetBoxModelFilterSet):
|
||||
class ModuleBayFilterSet(ModularDeviceComponentFilterSet, NetBoxModelFilterSet):
|
||||
installed_module_id = django_filters.ModelMultipleChoiceFilter(
|
||||
field_name='installed_module',
|
||||
queryset=ModuleBay.objects.all(),
|
||||
|
@ -839,7 +839,7 @@ class DeviceDeviceBayTable(DeviceBayTable):
|
||||
default_columns = ('pk', 'name', 'label', 'status', 'installed_device', 'description')
|
||||
|
||||
|
||||
class ModuleBayTable(DeviceComponentTable):
|
||||
class ModuleBayTable(ModularDeviceComponentTable):
|
||||
device = tables.Column(
|
||||
verbose_name=_('Device'),
|
||||
linkify={
|
||||
|
Loading…
Reference in New Issue
Block a user