mirror of
https://github.com/netbox-community/netbox.git
synced 2025-12-20 20:32:25 -06: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
1868459a7e
commit
d940797df9
@@ -1,10 +1,10 @@
|
||||
from django.contrib import messages
|
||||
from django.db import transaction
|
||||
from django.db.models import Q
|
||||
from django.shortcuts import get_object_or_404, redirect, render
|
||||
|
||||
from dcim.views import PathTraceView
|
||||
from netbox.views import generic
|
||||
from tenancy.views import ObjectContactsView
|
||||
from utilities.forms import ConfirmationForm
|
||||
from utilities.utils import count_related
|
||||
from utilities.views import register_model_view
|
||||
@@ -73,6 +73,11 @@ class ProviderBulkDeleteView(generic.BulkDeleteView):
|
||||
table = tables.ProviderTable
|
||||
|
||||
|
||||
@register_model_view(Provider, 'contacts')
|
||||
class ProviderContactsView(ObjectContactsView):
|
||||
queryset = Provider.objects.all()
|
||||
|
||||
|
||||
#
|
||||
# ProviderAccounts
|
||||
#
|
||||
@@ -134,6 +139,11 @@ class ProviderAccountBulkDeleteView(generic.BulkDeleteView):
|
||||
table = tables.ProviderAccountTable
|
||||
|
||||
|
||||
@register_model_view(ProviderAccount, 'contacts')
|
||||
class ProviderAccountContactsView(ObjectContactsView):
|
||||
queryset = ProviderAccount.objects.all()
|
||||
|
||||
|
||||
#
|
||||
# Provider networks
|
||||
#
|
||||
@@ -389,6 +399,11 @@ class CircuitSwapTerminations(generic.ObjectEditView):
|
||||
})
|
||||
|
||||
|
||||
@register_model_view(Circuit, 'contacts')
|
||||
class CircuitContactsView(ObjectContactsView):
|
||||
queryset = Circuit.objects.all()
|
||||
|
||||
|
||||
#
|
||||
# Circuit terminations
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user