diff --git a/netbox/circuits/views.py b/netbox/circuits/views.py index de5ef1a22..466104883 100644 --- a/netbox/circuits/views.py +++ b/netbox/circuits/views.py @@ -31,7 +31,8 @@ class ProviderListView(ObjectListView): def provider(request, slug): provider = get_object_or_404(Provider, slug=slug) - circuits = Circuit.objects.filter(provider=provider) + circuits = Circuit.objects.filter(provider=provider).select_related('type', 'tenant')\ + .prefetch_related('terminations__site') show_graphs = Graph.objects.filter(type=GRAPH_TYPE_PROVIDER).exists() return render(request, 'circuits/provider.html', { diff --git a/netbox/templates/circuits/provider.html b/netbox/templates/circuits/provider.html index c9c8b9742..5465b8599 100644 --- a/netbox/templates/circuits/provider.html +++ b/netbox/templates/circuits/provider.html @@ -48,7 +48,7 @@
Circuit ID | +Type | +Tenant | +A Side | +Z Side | +Description | +
---|---|---|---|---|---|
@@ -136,6 +150,34 @@ | {{ c.type }} | ++ {% if c.tenant %} + {{ c.tenant }} + {% else %} + — + {% endif %} + | ++ {% if c.termination_a %} + {{ c.termination_a.site }} + {% else %} + — + {% endif %} + | ++ {% if c.termination_z %} + {{ c.termination_z.site }} + {% else %} + — + {% endif %} + | ++ {% if c.description %} + {{ c.description }} + {% else %} + — + {% endif %} + |