├── tests └── __init__.py ├── netbox_path ├── api │ ├── __init__.py │ ├── urls.py │ ├── serializers.py │ ├── impact.py │ └── views.py ├── template_content.py ├── migrations │ ├── __init__.py │ ├── 0003_path_image.py │ ├── 0002_alter_path_created_alter_path_custom_field_data_and_more.py │ └── 0001_initial.py ├── admin.py ├── forms.py ├── search.py ├── filtersets.py ├── tables.py ├── templates │ └── netbox_path │ │ ├── region.html │ │ ├── site.html │ │ ├── device.html │ │ ├── rack.html │ │ ├── vlan.html │ │ ├── virtualmachine.html │ │ └── path.html ├── __init__.py ├── navigation.py ├── models.py ├── urls.py └── views.py ├── MANIFEST.in ├── .gitlab-ci.yml ├── .gitignore ├── frontend ├── index.html ├── .gitignore ├── elements.json ├── build.sh ├── package.json ├── selector.js ├── style.css ├── package-lock.json └── main.js ├── setup.py ├── README.rst ├── README.md └── contrib └── scan.py /tests/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /netbox_path/api/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /netbox_path/template_content.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /netbox_path/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /MANIFEST.in: -------------------------------------------------------------------------------- 1 | include README.rst 2 | recursive-include netbox_path/static * 3 | recursive-include netbox_path/templates * -------------------------------------------------------------------------------- /.gitlab-ci.yml: -------------------------------------------------------------------------------- 1 | --- 2 | stages: 3 | - demo 4 | 5 | 6 | demo: 7 | stage: demo 8 | only: 9 | - demo 10 | tags: 11 | - netbox-path-demo 12 | script: 13 | - whoami 14 | 15 | -------------------------------------------------------------------------------- /netbox_path/admin.py: -------------------------------------------------------------------------------- 1 | import imp 2 | from django.contrib import admin 3 | from .models import Path 4 | 5 | @admin.register(Path) 6 | class PathAdmin(admin.ModelAdmin): 7 | list_display = ('name', 'description') -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | __pycache__ 2 | netbox_path/static/netbox_path/index.css 3 | netbox_path/static/netbox_path/index.js 4 | netbox_path/static/netbox_path/sprite.svg 5 | dist 6 | *.egg-info 7 | .vscode 8 | .DS_Store 9 | build -------------------------------------------------------------------------------- /netbox_path/forms.py: -------------------------------------------------------------------------------- 1 | from netbox.forms import NetBoxModelForm 2 | from .models import Path 3 | 4 | class PathForm(NetBoxModelForm): 5 | 6 | class Meta: 7 | model = Path 8 | fields = ('name', 'description', 'tags') -------------------------------------------------------------------------------- /netbox_path/search.py: -------------------------------------------------------------------------------- 1 | from netbox.search import SearchIndex, register_search 2 | from models import Path 3 | 4 | @register_search 5 | class PathIndex(SearchIndex): 6 | model = Path 7 | fields = ( 8 | ('name', 100), 9 | ('description', 5000), 10 | ) -------------------------------------------------------------------------------- /netbox_path/api/urls.py: -------------------------------------------------------------------------------- 1 | from netbox.api.routers import NetBoxRouter 2 | from . import views 3 | 4 | app_name = 'netbox_path' 5 | 6 | router = NetBoxRouter() 7 | router.register(r'paths', views.PathViewSet) 8 | router.register(r'impact', views.ImpactViewSet, basename='impact-assessment') 9 | 10 | urlpatterns = router.urls 11 | -------------------------------------------------------------------------------- /frontend/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 |${escape(item.display)}
37 |${escape(item.display)}
195 |