mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Adds contact tabs (#12460)
* adds contact tabs #11599 * fixed lint issues * changes as per review * changes as per review * replaces generic object template with base template
This commit is contained in:
committed by
GitHub
parent
e71a98499f
commit
4eb5e90ccc
@@ -9,9 +9,10 @@ from dcim.filtersets import DeviceFilterSet
|
||||
from dcim.models import Device
|
||||
from dcim.tables import DeviceTable
|
||||
from extras.views import ObjectConfigContextView
|
||||
from ipam.models import IPAddress, Service
|
||||
from ipam.models import IPAddress
|
||||
from ipam.tables import InterfaceVLANTable
|
||||
from netbox.views import generic
|
||||
from tenancy.views import ObjectContactsView
|
||||
from utilities.utils import count_related
|
||||
from utilities.views import ViewTab, register_model_view
|
||||
from . import filtersets, forms, tables
|
||||
@@ -140,6 +141,11 @@ class ClusterGroupBulkDeleteView(generic.BulkDeleteView):
|
||||
table = tables.ClusterGroupTable
|
||||
|
||||
|
||||
@register_model_view(ClusterGroup, 'contacts')
|
||||
class ClusterGroupContactsView(ObjectContactsView):
|
||||
queryset = ClusterGroup.objects.all()
|
||||
|
||||
|
||||
#
|
||||
# Clusters
|
||||
#
|
||||
@@ -312,6 +318,11 @@ class ClusterRemoveDevicesView(generic.ObjectEditView):
|
||||
})
|
||||
|
||||
|
||||
@register_model_view(Cluster, 'contacts')
|
||||
class ClusterContactsView(ObjectContactsView):
|
||||
queryset = Cluster.objects.all()
|
||||
|
||||
|
||||
#
|
||||
# Virtual machines
|
||||
#
|
||||
@@ -390,6 +401,11 @@ class VirtualMachineBulkDeleteView(generic.BulkDeleteView):
|
||||
table = tables.VirtualMachineTable
|
||||
|
||||
|
||||
@register_model_view(VirtualMachine, 'contacts')
|
||||
class VirtualMachineContactsView(ObjectContactsView):
|
||||
queryset = VirtualMachine.objects.all()
|
||||
|
||||
|
||||
#
|
||||
# VM interfaces
|
||||
#
|
||||
|
Reference in New Issue
Block a user