mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Adds tenant on power feed (#13300)
* adds tenant on power feed * cleanup * adds power feed count on tenant object view * Misc cleanup; add filterset tests --------- Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
This commit is contained in:
committed by
GitHub
parent
07f68ae579
commit
36f95f7842
@ -611,7 +611,7 @@ class PowerPanelForm(NetBoxModelForm):
|
||||
]
|
||||
|
||||
|
||||
class PowerFeedForm(NetBoxModelForm):
|
||||
class PowerFeedForm(TenancyForm, NetBoxModelForm):
|
||||
power_panel = DynamicModelChoiceField(
|
||||
queryset=PowerPanel.objects.all(),
|
||||
selector=True
|
||||
@ -626,13 +626,14 @@ class PowerFeedForm(NetBoxModelForm):
|
||||
fieldsets = (
|
||||
('Power Feed', ('power_panel', 'rack', 'name', 'status', 'type', 'description', 'mark_connected', 'tags')),
|
||||
('Characteristics', ('supply', 'voltage', 'amperage', 'phase', 'max_utilization')),
|
||||
('Tenancy', ('tenant_group', 'tenant')),
|
||||
)
|
||||
|
||||
class Meta:
|
||||
model = PowerFeed
|
||||
fields = [
|
||||
'power_panel', 'rack', 'name', 'status', 'type', 'mark_connected', 'supply', 'phase', 'voltage', 'amperage',
|
||||
'max_utilization', 'description', 'comments', 'tags',
|
||||
'max_utilization', 'tenant_group', 'tenant', 'description', 'comments', 'tags'
|
||||
]
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user