mirror of
https://github.com/netbox-community/netbox.git
synced 2025-12-20 12:22:23 -06:00
Replace active_tab context for object views
This commit is contained in:
@@ -179,11 +179,6 @@ class ClusterVirtualMachinesView(generic.ObjectChildrenView):
|
||||
def get_children(self, request, parent):
|
||||
return VirtualMachine.objects.restrict(request.user, 'view').filter(cluster=parent)
|
||||
|
||||
def get_extra_context(self, request, instance):
|
||||
return {
|
||||
'active_tab': 'virtualmachines',
|
||||
}
|
||||
|
||||
|
||||
@register_model_view(Cluster, 'devices')
|
||||
class ClusterDevicesView(generic.ObjectChildrenView):
|
||||
@@ -201,11 +196,6 @@ class ClusterDevicesView(generic.ObjectChildrenView):
|
||||
def get_children(self, request, parent):
|
||||
return Device.objects.restrict(request.user, 'view').filter(cluster=parent)
|
||||
|
||||
def get_extra_context(self, request, instance):
|
||||
return {
|
||||
'active_tab': 'devices',
|
||||
}
|
||||
|
||||
|
||||
class ClusterEditView(generic.ObjectEditView):
|
||||
queryset = Cluster.objects.all()
|
||||
@@ -377,11 +367,6 @@ class VirtualMachineInterfacesView(generic.ObjectChildrenView):
|
||||
'tags',
|
||||
)
|
||||
|
||||
def get_extra_context(self, request, instance):
|
||||
return {
|
||||
'active_tab': 'interfaces',
|
||||
}
|
||||
|
||||
|
||||
@register_model_view(VirtualMachine, 'configcontext', path='config-context')
|
||||
class VirtualMachineConfigContextView(ObjectConfigContextView):
|
||||
|
||||
Reference in New Issue
Block a user