|
@@ -20,6 +20,7 @@ from extras.views import ObjectConfigContextView
|
|
|
from ipam.models import ASN, IPAddress, Prefix, VLAN, VLANGroup
|
|
from ipam.models import ASN, IPAddress, Prefix, VLAN, VLANGroup
|
|
|
from ipam.tables import InterfaceVLANTable
|
|
from ipam.tables import InterfaceVLANTable
|
|
|
from netbox.views import generic
|
|
from netbox.views import generic
|
|
|
|
|
+from tenancy.views import ObjectContactsView
|
|
|
from utilities.forms import ConfirmationForm
|
|
from utilities.forms import ConfirmationForm
|
|
|
from utilities.paginator import EnhancedPaginator, get_paginate_count
|
|
from utilities.paginator import EnhancedPaginator, get_paginate_count
|
|
|
from utilities.permissions import get_permission_for_model
|
|
from utilities.permissions import get_permission_for_model
|
|
@@ -267,6 +268,11 @@ class RegionBulkDeleteView(generic.BulkDeleteView):
|
|
|
table = tables.RegionTable
|
|
table = tables.RegionTable
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
+@register_model_view(Region, 'contacts')
|
|
|
|
|
+class RegionContactsView(ObjectContactsView):
|
|
|
|
|
+ queryset = Region.objects.all()
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
#
|
|
#
|
|
|
# Site groups
|
|
# Site groups
|
|
|
#
|
|
#
|
|
@@ -342,6 +348,11 @@ class SiteGroupBulkDeleteView(generic.BulkDeleteView):
|
|
|
table = tables.SiteGroupTable
|
|
table = tables.SiteGroupTable
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
+@register_model_view(SiteGroup, 'contacts')
|
|
|
|
|
+class SiteGroupContactsView(ObjectContactsView):
|
|
|
|
|
+ queryset = SiteGroup.objects.all()
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
#
|
|
#
|
|
|
# Sites
|
|
# Sites
|
|
|
#
|
|
#
|
|
@@ -435,6 +446,11 @@ class SiteBulkDeleteView(generic.BulkDeleteView):
|
|
|
table = tables.SiteTable
|
|
table = tables.SiteTable
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
+@register_model_view(Site, 'contacts')
|
|
|
|
|
+class SiteContactsView(ObjectContactsView):
|
|
|
|
|
+ queryset = Site.objects.all()
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
#
|
|
#
|
|
|
# Locations
|
|
# Locations
|
|
|
#
|
|
#
|
|
@@ -523,6 +539,11 @@ class LocationBulkDeleteView(generic.BulkDeleteView):
|
|
|
table = tables.LocationTable
|
|
table = tables.LocationTable
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
+@register_model_view(Location, 'contacts')
|
|
|
|
|
+class LocationContactsView(ObjectContactsView):
|
|
|
|
|
+ queryset = Location.objects.all()
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
#
|
|
#
|
|
|
# Rack roles
|
|
# Rack roles
|
|
|
#
|
|
#
|
|
@@ -740,6 +761,11 @@ class RackBulkDeleteView(generic.BulkDeleteView):
|
|
|
table = tables.RackTable
|
|
table = tables.RackTable
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
+@register_model_view(Rack, 'contacts')
|
|
|
|
|
+class RackContactsView(ObjectContactsView):
|
|
|
|
|
+ queryset = Rack.objects.all()
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
#
|
|
#
|
|
|
# Rack reservations
|
|
# Rack reservations
|
|
|
#
|
|
#
|
|
@@ -874,6 +900,11 @@ class ManufacturerBulkDeleteView(generic.BulkDeleteView):
|
|
|
table = tables.ManufacturerTable
|
|
table = tables.ManufacturerTable
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
+@register_model_view(Manufacturer, 'contacts')
|
|
|
|
|
+class ManufacturerContactsView(ObjectContactsView):
|
|
|
|
|
+ queryset = Manufacturer.objects.all()
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
#
|
|
#
|
|
|
# Device types
|
|
# Device types
|
|
|
#
|
|
#
|
|
@@ -2088,6 +2119,11 @@ class DeviceBulkRenameView(generic.BulkRenameView):
|
|
|
table = tables.DeviceTable
|
|
table = tables.DeviceTable
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
+@register_model_view(Device, 'contacts')
|
|
|
|
|
+class DeviceContactsView(ObjectContactsView):
|
|
|
|
|
+ queryset = Device.objects.all()
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
#
|
|
#
|
|
|
# Modules
|
|
# Modules
|
|
|
#
|
|
#
|
|
@@ -3469,6 +3505,11 @@ class PowerPanelBulkDeleteView(generic.BulkDeleteView):
|
|
|
table = tables.PowerPanelTable
|
|
table = tables.PowerPanelTable
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
+@register_model_view(PowerPanel, 'contacts')
|
|
|
|
|
+class PowerPanelContactsView(ObjectContactsView):
|
|
|
|
|
+ queryset = PowerPanel.objects.all()
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
#
|
|
#
|
|
|
# Power feeds
|
|
# Power feeds
|
|
|
#
|
|
#
|