mirror of
https://github.com/netbox-community/netbox.git
synced 2026-01-15 16:22:18 -06:00
* 10500 add ModularComponentModel * 10500 add ModularComponentModel * 10500 add to forms * 10500 add to serializer, tables * 10500 template * 10500 add docs * 10500 check recursion * 10500 fix graphql * 10500 fix conflicting migration from merge * 10500 token resolution * 10500 don't return reverse * 10500 don't return reverse / optimize * Add ModuleTypeModuleBaysView * Fix replication of module bays on new modules * Clean up tables & templates * Adjust uniqueness constraints * Correct URL * Clean up docs * Fix up serializers * 10500 add filterset tests * 10500 add nested validation to Module * Misc cleanup * 10500 ModuleBay recursion Test * 10500 ModuleBay recursion Test * 10500 ModuleBay recursion Test * 10500 ModuleBay recursion Test * Enable MPTT for module bays * Fix tests * Fix validation of module token in component names * Misc cleanup * Merge migrations * Fix table ordering --------- Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
This commit is contained in:
@@ -496,12 +496,18 @@ class ModuleType(NetBoxObjectType):
|
||||
|
||||
@strawberry_django.type(
|
||||
models.ModuleBay,
|
||||
fields='__all__',
|
||||
# fields='__all__',
|
||||
exclude=('parent',),
|
||||
filters=ModuleBayFilter
|
||||
)
|
||||
class ModuleBayType(ComponentType):
|
||||
class ModuleBayType(ModularComponentType):
|
||||
|
||||
installed_module: Annotated["ModuleType", strawberry.lazy('dcim.graphql.types')] | None
|
||||
children: List[Annotated["ModuleBayType", strawberry.lazy('dcim.graphql.types')]]
|
||||
|
||||
@strawberry_django.field
|
||||
def parent(self) -> Annotated["ModuleBayType", strawberry.lazy('dcim.graphql.types')] | None:
|
||||
return self.parent
|
||||
|
||||
|
||||
@strawberry_django.type(
|
||||
@@ -509,7 +515,7 @@ class ModuleBayType(ComponentType):
|
||||
fields='__all__',
|
||||
filters=ModuleBayTemplateFilter
|
||||
)
|
||||
class ModuleBayTemplateType(ComponentTemplateType):
|
||||
class ModuleBayTemplateType(ModularComponentTemplateType):
|
||||
_name: str
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user