mirror of
https://github.com/netbox-community/netbox.git
synced 2026-01-15 00:02:17 -06:00
Introduced TopologyMap
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
from django.conf.urls import url
|
||||
|
||||
from extras.models import GRAPH_TYPE_INTERFACE, GRAPH_TYPE_SITE
|
||||
from extras.api.views import GraphListView, TopologyMapperView
|
||||
from extras.api.views import GraphListView, TopologyMapView
|
||||
|
||||
from .views import *
|
||||
|
||||
@@ -62,6 +62,6 @@ urlpatterns = [
|
||||
|
||||
# Miscellaneous
|
||||
url(r'^related-connections/$', RelatedConnectionsView.as_view(), name='related_connections'),
|
||||
url(r'^topology-mapper/$', TopologyMapperView.as_view(), name='topology_mapper'),
|
||||
url(r'^topology-maps/(?P<slug>[\w-]+)/$', TopologyMapView.as_view(), name='topology_map'),
|
||||
|
||||
]
|
||||
|
||||
@@ -15,6 +15,7 @@ from django.views.generic.edit import CreateView, UpdateView
|
||||
|
||||
from ipam.models import Prefix, IPAddress, VLAN
|
||||
from circuits.models import Circuit
|
||||
from extras.models import TopologyMap
|
||||
from utilities.error_handlers import handle_protectederror
|
||||
from utilities.forms import ConfirmationForm
|
||||
from utilities.views import ObjectListView, BulkImportView, BulkEditView, BulkDeleteView
|
||||
@@ -89,10 +90,12 @@ def site(request, slug):
|
||||
'vlan_count': VLAN.objects.filter(site=site).count(),
|
||||
'circuit_count': Circuit.objects.filter(site=site).count(),
|
||||
}
|
||||
topology_maps = TopologyMap.objects.filter(site=site)
|
||||
|
||||
return render(request, 'dcim/site.html', {
|
||||
'site': site,
|
||||
'stats': stats,
|
||||
'topology_maps': topology_maps,
|
||||
})
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user