netbox-canvas 0.6.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- netbox_canvas-0.6.0/LICENSE +177 -0
- netbox_canvas-0.6.0/NOTICE +8 -0
- netbox_canvas-0.6.0/PKG-INFO +419 -0
- netbox_canvas-0.6.0/README.md +390 -0
- netbox_canvas-0.6.0/netbox_canvas.egg-info/PKG-INFO +419 -0
- netbox_canvas-0.6.0/netbox_canvas.egg-info/SOURCES.txt +65 -0
- netbox_canvas-0.6.0/netbox_canvas.egg-info/dependency_links.txt +1 -0
- netbox_canvas-0.6.0/netbox_canvas.egg-info/top_level.txt +1 -0
- netbox_canvas-0.6.0/netbox_service_canvas/__init__.py +31 -0
- netbox_canvas-0.6.0/netbox_service_canvas/api/__init__.py +0 -0
- netbox_canvas-0.6.0/netbox_service_canvas/api/serializers.py +274 -0
- netbox_canvas-0.6.0/netbox_service_canvas/api/urls.py +18 -0
- netbox_canvas-0.6.0/netbox_service_canvas/api/views.py +445 -0
- netbox_canvas-0.6.0/netbox_service_canvas/canvas_yaml.py +469 -0
- netbox_canvas-0.6.0/netbox_service_canvas/choices.py +125 -0
- netbox_canvas-0.6.0/netbox_service_canvas/compat.py +59 -0
- netbox_canvas-0.6.0/netbox_service_canvas/constants.py +65 -0
- netbox_canvas-0.6.0/netbox_service_canvas/filtersets.py +266 -0
- netbox_canvas-0.6.0/netbox_service_canvas/forms/__init__.py +4 -0
- netbox_canvas-0.6.0/netbox_service_canvas/forms/bulk_edit.py +126 -0
- netbox_canvas-0.6.0/netbox_service_canvas/forms/bulk_import.py +158 -0
- netbox_canvas-0.6.0/netbox_service_canvas/forms/filtersets.py +167 -0
- netbox_canvas-0.6.0/netbox_service_canvas/forms/model_forms.py +205 -0
- netbox_canvas-0.6.0/netbox_service_canvas/graph.py +632 -0
- netbox_canvas-0.6.0/netbox_service_canvas/graphql/__init__.py +0 -0
- netbox_canvas-0.6.0/netbox_service_canvas/graphql/filters.py +89 -0
- netbox_canvas-0.6.0/netbox_service_canvas/graphql/schema.py +39 -0
- netbox_canvas-0.6.0/netbox_service_canvas/graphql/types.py +127 -0
- netbox_canvas-0.6.0/netbox_service_canvas/migrations/0001_initial.py +165 -0
- netbox_canvas-0.6.0/netbox_service_canvas/migrations/0002_applications_notes.py +82 -0
- netbox_canvas-0.6.0/netbox_service_canvas/migrations/0003_icons_kind_edge_styles.py +26 -0
- netbox_canvas-0.6.0/netbox_service_canvas/migrations/0004_network_nodes.py +18 -0
- netbox_canvas-0.6.0/netbox_service_canvas/migrations/0005_ip_circuit_endpoints.py +33 -0
- netbox_canvas-0.6.0/netbox_service_canvas/migrations/0006_owner_related_name.py +30 -0
- netbox_canvas-0.6.0/netbox_service_canvas/migrations/0007_canvas_link_nodes.py +19 -0
- netbox_canvas-0.6.0/netbox_service_canvas/migrations/__init__.py +0 -0
- netbox_canvas-0.6.0/netbox_service_canvas/models/__init__.py +3 -0
- netbox_canvas-0.6.0/netbox_service_canvas/models/applications.py +70 -0
- netbox_canvas-0.6.0/netbox_service_canvas/models/canvas.py +246 -0
- netbox_canvas-0.6.0/netbox_service_canvas/models/connections.py +249 -0
- netbox_canvas-0.6.0/netbox_service_canvas/navigation.py +46 -0
- netbox_canvas-0.6.0/netbox_service_canvas/replace.py +133 -0
- netbox_canvas-0.6.0/netbox_service_canvas/search.py +38 -0
- netbox_canvas-0.6.0/netbox_service_canvas/signals.py +66 -0
- netbox_canvas-0.6.0/netbox_service_canvas/static/netbox_service_canvas/dist/canvas.css +1 -0
- netbox_canvas-0.6.0/netbox_service_canvas/static/netbox_service_canvas/dist/canvas.js +73 -0
- netbox_canvas-0.6.0/netbox_service_canvas/static/netbox_service_canvas/dist/chunks/elk.bundled-Zo4S1ULM.js +26 -0
- netbox_canvas-0.6.0/netbox_service_canvas/static/netbox_service_canvas/dist/chunks/html2canvas.esm-B0tyYwQk.js +22 -0
- netbox_canvas-0.6.0/netbox_service_canvas/static/netbox_service_canvas/dist/chunks/index.es-w7MLceHM.js +18 -0
- netbox_canvas-0.6.0/netbox_service_canvas/static/netbox_service_canvas/dist/chunks/jspdf.es.min-C1H5N2qJ.js +169 -0
- netbox_canvas-0.6.0/netbox_service_canvas/static/netbox_service_canvas/dist/chunks/purify.es-BKvm9NlY.js +3 -0
- netbox_canvas-0.6.0/netbox_service_canvas/tables.py +183 -0
- netbox_canvas-0.6.0/netbox_service_canvas/template_content.py +100 -0
- netbox_canvas-0.6.0/netbox_service_canvas/templates/netbox_service_canvas/application.html +5 -0
- netbox_canvas-0.6.0/netbox_service_canvas/templates/netbox_service_canvas/canvas.html +5 -0
- netbox_canvas-0.6.0/netbox_service_canvas/templates/netbox_service_canvas/canvas_editor.html +16 -0
- netbox_canvas-0.6.0/netbox_service_canvas/templates/netbox_service_canvas/connectionhop.html +5 -0
- netbox_canvas-0.6.0/netbox_service_canvas/templates/netbox_service_canvas/inc/canvas_preview.html +15 -0
- netbox_canvas-0.6.0/netbox_service_canvas/templates/netbox_service_canvas/inc/show_on_canvas_button.html +15 -0
- netbox_canvas-0.6.0/netbox_service_canvas/templates/netbox_service_canvas/inc/url_attr.html +1 -0
- netbox_canvas-0.6.0/netbox_service_canvas/templates/netbox_service_canvas/serviceconnection.html +5 -0
- netbox_canvas-0.6.0/netbox_service_canvas/ui/__init__.py +0 -0
- netbox_canvas-0.6.0/netbox_service_canvas/ui/panels.py +37 -0
- netbox_canvas-0.6.0/netbox_service_canvas/urls.py +21 -0
- netbox_canvas-0.6.0/netbox_service_canvas/views.py +478 -0
- netbox_canvas-0.6.0/pyproject.toml +63 -0
- netbox_canvas-0.6.0/setup.cfg +4 -0
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
NetBox Canvas
|
|
2
|
+
Copyright 2026 sieteunoseis
|
|
3
|
+
|
|
4
|
+
This product is a fork of NetBox Service Canvas
|
|
5
|
+
(https://github.com/Jasper-Claus/netbox-service-canvas), version 0.5.1,
|
|
6
|
+
Copyright Jasper Claus, licensed under the Apache License, Version 2.0.
|
|
7
|
+
|
|
8
|
+
Changes made in this fork are listed in CHANGELOG.md (from version 0.6.0 on).
|
|
@@ -0,0 +1,419 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: netbox-canvas
|
|
3
|
+
Version: 0.6.0
|
|
4
|
+
Summary: Interactive canvas for NetBox: services, hosts, networks, VIPs and circuits, how they connect and what breaks if one fails. Fork of netbox-service-canvas.
|
|
5
|
+
Author: Jasper Claus
|
|
6
|
+
Author-email: sieteunoseis <jeremy.worden@gmail.com>
|
|
7
|
+
License-Expression: Apache-2.0
|
|
8
|
+
Project-URL: Homepage, https://github.com/sieteunoseis/netbox-canvas
|
|
9
|
+
Project-URL: Source, https://github.com/sieteunoseis/netbox-canvas
|
|
10
|
+
Project-URL: Issues, https://github.com/sieteunoseis/netbox-canvas/issues
|
|
11
|
+
Project-URL: Changelog, https://github.com/sieteunoseis/netbox-canvas/blob/main/CHANGELOG.md
|
|
12
|
+
Keywords: netbox,netbox-plugin,homelab,service-map,dependency-mapping,impact-analysis,ipam,dcim,diagram,network-documentation
|
|
13
|
+
Classifier: Development Status :: 4 - Beta
|
|
14
|
+
Classifier: Environment :: Web Environment
|
|
15
|
+
Classifier: Framework :: Django
|
|
16
|
+
Classifier: Intended Audience :: System Administrators
|
|
17
|
+
Classifier: Programming Language :: Python :: 3
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
21
|
+
Classifier: Programming Language :: JavaScript
|
|
22
|
+
Classifier: Topic :: System :: Networking
|
|
23
|
+
Classifier: Topic :: System :: Systems Administration
|
|
24
|
+
Requires-Python: >=3.12
|
|
25
|
+
Description-Content-Type: text/markdown
|
|
26
|
+
License-File: LICENSE
|
|
27
|
+
License-File: NOTICE
|
|
28
|
+
Dynamic: license-file
|
|
29
|
+
|
|
30
|
+
<div align="center">
|
|
31
|
+
|
|
32
|
+
# 🗺️ NetBox Canvas
|
|
33
|
+
|
|
34
|
+
A NetBox plugin that shows on an interactive canvas which services run where, how they talk to each other, which
|
|
35
|
+
networks, VIPs and circuits they depend on, and what breaks if a host fails.
|
|
36
|
+
|
|
37
|
+
<sub>A fork of [NetBox Service Canvas](https://github.com/Jasper-Claus/netbox-service-canvas) by Jasper Claus, see
|
|
38
|
+
[Where this comes from](#where-this-comes-from).</sub>
|
|
39
|
+
|
|
40
|
+
[](https://github.com/netbox-community/netbox)
|
|
41
|
+
[](https://www.python.org/)
|
|
42
|
+
[](https://pypi.org/project/netbox-canvas/)
|
|
43
|
+
[](https://github.com/sieteunoseis/netbox-canvas/blob/main/LICENSE)
|
|
44
|
+
[](https://github.com/sieteunoseis/netbox-canvas/actions/workflows/ci.yml)
|
|
45
|
+
[](#built-with-ai)
|
|
46
|
+
|
|
47
|
+
[Installation](#installation) · [How it works](#how-it-works) · [Features](#features) ·
|
|
48
|
+
[Permissions](#permissions) · [Wiki](https://github.com/sieteunoseis/netbox-canvas/tree/main/docs/wiki) ·
|
|
49
|
+
[Deutsch](https://github.com/sieteunoseis/netbox-canvas/blob/main/docs/README.de.md)
|
|
50
|
+
|
|
51
|
+
</div>
|
|
52
|
+
|
|
53
|
+
<p align="center">
|
|
54
|
+
<img src="https://raw.githubusercontent.com/sieteunoseis/netbox-canvas/main/docs/images/demo.gif" alt="Demo: drag a NAS onto the canvas, add its services, draw a connection, run the impact analysis" width="100%">
|
|
55
|
+
<br><sub>Drag a host in, let <i>Add missing</i> pull in its services, draw a connection, then check what breaks if it fails.</sub>
|
|
56
|
+
</p>
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
## Installation
|
|
61
|
+
|
|
62
|
+
Requirements: NetBox 4.7 (tested on 4.7.6) and Python 3.12 or newer.
|
|
63
|
+
|
|
64
|
+
> [!WARNING]
|
|
65
|
+
> The plugin declares support for NetBox 4.7 (4.7.6 or newer). On a newer minor version (for example 4.8) the whole of NetBox
|
|
66
|
+
> refuses to start while the plugin is enabled. Before upgrading NetBox, check the
|
|
67
|
+
> [releases](https://github.com/sieteunoseis/netbox-canvas/releases) for a matching plugin version, or
|
|
68
|
+
> remove `netbox_service_canvas` from `PLUGINS` first.
|
|
69
|
+
|
|
70
|
+
### netbox-docker
|
|
71
|
+
|
|
72
|
+
All files below are in your netbox-docker folder, next to `docker-compose.yml`. If you have never installed a plugin
|
|
73
|
+
there, read [No plugins installed yet?](#no-plugins-installed-yet) first.
|
|
74
|
+
|
|
75
|
+
1. Open `plugin_requirements.txt` (for example with `nano plugin_requirements.txt`) and add this line. It goes into
|
|
76
|
+
the file, not into the terminal:
|
|
77
|
+
|
|
78
|
+
```text
|
|
79
|
+
netbox-canvas
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
2. Open `Dockerfile-Plugins` and make sure it ends with these three lines. They copy the editor's JavaScript and
|
|
83
|
+
CSS into NetBox while the image is built. The two `COPY` lines are needed because NetBox only collects the files of
|
|
84
|
+
plugins listed in `plugins.py`, and netbox-docker mounts that file only when the container starts:
|
|
85
|
+
|
|
86
|
+
```dockerfile
|
|
87
|
+
COPY configuration/configuration.py /etc/netbox/config/configuration.py
|
|
88
|
+
COPY configuration/plugins.py /etc/netbox/config/plugins.py
|
|
89
|
+
RUN DEBUG="true" SECRET_KEY="dummydummydummydummydummydummydummydummydummydummy" /opt/netbox/venv/bin/python /opt/netbox/netbox/manage.py collectstatic --no-input
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
3. Open `configuration/plugins.py` and add `"netbox_service_canvas"` to the existing `PLUGINS` list. Add it to the
|
|
93
|
+
list, do not replace the list. If you use netbox-branching, `netbox_branching` must stay the last entry:
|
|
94
|
+
|
|
95
|
+
```python
|
|
96
|
+
PLUGINS = [
|
|
97
|
+
# ... your other plugins ...
|
|
98
|
+
"netbox_service_canvas",
|
|
99
|
+
]
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
4. Rebuild the image and restart. Database migrations run automatically when the container starts:
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
docker compose build --no-cache
|
|
106
|
+
docker compose up -d
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
5. Check: the menu shows *Plugins → Service Canvas*. Create a canvas and open its *Editor* tab. If the editor stays at
|
|
110
|
+
"Loading canvas…", see [Troubleshooting](#troubleshooting).
|
|
111
|
+
|
|
112
|
+
#### No plugins installed yet?
|
|
113
|
+
|
|
114
|
+
netbox-docker needs three files to install plugins. The official guide is
|
|
115
|
+
[Using NetBox Plugins](https://github.com/netbox-community/netbox-docker/wiki/Using-Netbox-Plugins). For this plugin
|
|
116
|
+
alone, the files look like this:
|
|
117
|
+
|
|
118
|
+
`plugin_requirements.txt`
|
|
119
|
+
|
|
120
|
+
```text
|
|
121
|
+
netbox-canvas
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
`Dockerfile-Plugins` (use the same image tag as in your `docker-compose.yml`)
|
|
125
|
+
|
|
126
|
+
```dockerfile
|
|
127
|
+
FROM netboxcommunity/netbox:v4.7
|
|
128
|
+
|
|
129
|
+
COPY ./plugin_requirements.txt /opt/netbox/
|
|
130
|
+
RUN /usr/local/bin/uv pip install -r /opt/netbox/plugin_requirements.txt
|
|
131
|
+
|
|
132
|
+
COPY configuration/configuration.py /etc/netbox/config/configuration.py
|
|
133
|
+
COPY configuration/plugins.py /etc/netbox/config/plugins.py
|
|
134
|
+
RUN DEBUG="true" SECRET_KEY="dummydummydummydummydummydummydummydummydummydummy" /opt/netbox/venv/bin/python /opt/netbox/netbox/manage.py collectstatic --no-input
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
`docker-compose.override.yml` (if the file already exists, add the `image`, `pull_policy` and `build` lines and keep
|
|
138
|
+
your other settings, for example `ports`)
|
|
139
|
+
|
|
140
|
+
```yaml
|
|
141
|
+
services:
|
|
142
|
+
netbox:
|
|
143
|
+
image: netbox:latest-plugins
|
|
144
|
+
pull_policy: never
|
|
145
|
+
build:
|
|
146
|
+
context: .
|
|
147
|
+
dockerfile: Dockerfile-Plugins
|
|
148
|
+
netbox-worker:
|
|
149
|
+
image: netbox:latest-plugins
|
|
150
|
+
pull_policy: never
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
Then continue with step 3 above.
|
|
154
|
+
|
|
155
|
+
### Plain install (without Docker)
|
|
156
|
+
|
|
157
|
+
Run these commands as the user that owns the NetBox installation (usually with `sudo`):
|
|
158
|
+
|
|
159
|
+
```bash
|
|
160
|
+
source /opt/netbox/venv/bin/activate
|
|
161
|
+
pip install netbox-canvas
|
|
162
|
+
echo netbox-canvas >> /opt/netbox/local_requirements.txt # keeps the plugin across NetBox upgrades
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
Open `/opt/netbox/netbox/netbox/configuration.py` and add `"netbox_service_canvas"` to the existing `PLUGINS` list.
|
|
166
|
+
Then:
|
|
167
|
+
|
|
168
|
+
```bash
|
|
169
|
+
cd /opt/netbox/netbox
|
|
170
|
+
python manage.py migrate
|
|
171
|
+
python manage.py collectstatic --no-input
|
|
172
|
+
sudo systemctl restart netbox netbox-rq
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
Check as in step 5 above.
|
|
176
|
+
|
|
177
|
+
### Configuration (optional)
|
|
178
|
+
|
|
179
|
+
The plugin works without any settings. If you want a different grid, line shape or menu placement, add this to `PLUGINS_CONFIG`
|
|
180
|
+
(next to your existing entries):
|
|
181
|
+
|
|
182
|
+
```python
|
|
183
|
+
PLUGINS_CONFIG = {
|
|
184
|
+
"netbox_service_canvas": {
|
|
185
|
+
"grid_size": 10, # grid in pixels, default 10
|
|
186
|
+
"edge_line_style": "curved", # default shape of connection lines: "curved", "straight" or "step"
|
|
187
|
+
"top_level_menu": True, # False: list the items under NetBox's shared "Plugins" menu
|
|
188
|
+
},
|
|
189
|
+
}
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
Single lines can still pick their own shape in the editor.
|
|
193
|
+
|
|
194
|
+
**More connection protocols.** The built-in list is TCP, UDP, HTTP, HTTPS, MQTT, gRPC, SMB, NFS, SIP, MGCP and Other.
|
|
195
|
+
Add your own in NetBox's `configuration.py` with NetBox's standard
|
|
196
|
+
[`FIELD_CHOICES`](https://netboxlabs.com/docs/netbox/configuration/data-validation/#field_choices) setting, no plugin
|
|
197
|
+
change needed. A trailing `+` extends the list, without it the list is replaced:
|
|
198
|
+
|
|
199
|
+
```python
|
|
200
|
+
FIELD_CHOICES = {
|
|
201
|
+
"netbox_service_canvas.ServiceConnection.protocol+": (
|
|
202
|
+
("sccp", "SCCP"),
|
|
203
|
+
("ldap", "LDAP"),
|
|
204
|
+
("snmp", "SNMP"),
|
|
205
|
+
),
|
|
206
|
+
}
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
The editor, the forms, the API and the filters all pick the extra protocols up after a NetBox restart.
|
|
210
|
+
|
|
211
|
+
### Update
|
|
212
|
+
|
|
213
|
+
Make a database backup first. With netbox-docker, run `docker compose build --no-cache` and `docker compose up -d`
|
|
214
|
+
again; this installs the newest release (or the version you pinned in `plugin_requirements.txt`). With a plain
|
|
215
|
+
install, run `pip install --upgrade netbox-canvas` and repeat `migrate`, `collectstatic` and the restart.
|
|
216
|
+
Then reload the editor once with Ctrl+F5.
|
|
217
|
+
|
|
218
|
+
### Uninstall
|
|
219
|
+
|
|
220
|
+
> [!CAUTION]
|
|
221
|
+
> The first step deletes all canvases, connections, hops and applications of this plugin. Make a database backup
|
|
222
|
+
> first. Devices, VMs and services in NetBox are not touched.
|
|
223
|
+
|
|
224
|
+
1. Remove the plugin's tables while the plugin is still installed:
|
|
225
|
+
`docker compose exec netbox /opt/netbox/netbox/manage.py migrate netbox_service_canvas zero`
|
|
226
|
+
(plain install: `python manage.py migrate netbox_service_canvas zero`).
|
|
227
|
+
2. Remove `netbox_service_canvas` from `PLUGINS` and `PLUGINS_CONFIG`, and the line from `plugin_requirements.txt`
|
|
228
|
+
or `local_requirements.txt`.
|
|
229
|
+
3. Rebuild and restart (netbox-docker) or `pip uninstall netbox-canvas` and restart (plain install).
|
|
230
|
+
4. Optional: delete the leftover static files. In netbox-docker this needs root:
|
|
231
|
+
`docker compose exec -u root netbox rm -rf /opt/netbox/netbox/static/netbox_service_canvas`
|
|
232
|
+
|
|
233
|
+
A German step-by-step guide with backup and restore is in
|
|
234
|
+
[docs/install-netbox-docker.md](https://github.com/sieteunoseis/netbox-canvas/blob/main/docs/install-netbox-docker.md).
|
|
235
|
+
|
|
236
|
+
### Troubleshooting
|
|
237
|
+
|
|
238
|
+
| Symptom | Cause and fix |
|
|
239
|
+
|---|---|
|
|
240
|
+
| The editor stays at "Loading canvas…". The browser console shows a 404 for `canvas.js` or "MIME type ("") blocked". | The static files were not collected. Add the two `COPY` lines and the `collectstatic` line to `Dockerfile-Plugins` (step 2) and rebuild. Running `collectstatic` by hand (`docker compose exec -u root netbox /opt/netbox/netbox/manage.py collectstatic --no-input`) only helps until the container is recreated, and fails if files such as a logo are mounted into the static folder. Then reload with Ctrl+F5. |
|
|
241
|
+
| NetBox does not start: `ImproperlyConfigured … requires NetBox …` | The NetBox version is older than 4.7.6 or newer than 4.7. See the warning above. |
|
|
242
|
+
| `ModuleNotFoundError: No module named 'netbox_service_canvas'` | The image was not rebuilt, or the package line is missing from `plugin_requirements.txt`. |
|
|
243
|
+
| 403 when saving | The user lacks a permission. The editor names the missing one. See [Permissions](#permissions). |
|
|
244
|
+
|
|
245
|
+
---
|
|
246
|
+
|
|
247
|
+
## How it works
|
|
248
|
+
|
|
249
|
+
1. Go to *Plugins → Service Canvas → Canvases → Add* and give the canvas a name, for example *Homelab*.
|
|
250
|
+
2. Open the *Editor* tab.
|
|
251
|
+
3. Drag devices and VMs from the sidebar onto the canvas, then click **Add missing** to pull in their services.
|
|
252
|
+
4. Drag from the dot on the right of a node to another node to create a connection.
|
|
253
|
+
5. Click a node or a connection to edit it. Set the connection's kind to **Proxy** if the target is only reachable
|
|
254
|
+
through the source, for example a service behind Traefik.
|
|
255
|
+
6. Click **Impact analysis** in the node panel to see what breaks if the node fails.
|
|
256
|
+
7. Find anything with the search field in the toolbar, and export the canvas as PNG, SVG, an A4 PDF or an
|
|
257
|
+
Excalidraw scene.
|
|
258
|
+
|
|
259
|
+
Relationships are stored as normal NetBox data, the canvas only stores the layout. The same object can appear on
|
|
260
|
+
several canvases. If an object is deleted in NetBox, it disappears from every canvas.
|
|
261
|
+
|
|
262
|
+
---
|
|
263
|
+
|
|
264
|
+
## Features
|
|
265
|
+
|
|
266
|
+
### Model your services
|
|
267
|
+
|
|
268
|
+
- **Applications**: a new NetBox object for software made of one or more services, for example Grafana, with status,
|
|
269
|
+
version, URL and one of 24 icons (database, web, DNS, backup, media, …).
|
|
270
|
+
- **Connections** between services, devices, VMs, applications, IP addresses (e.g. load balancer VIPs) and circuits, with direction, protocol, port, a description of
|
|
271
|
+
the data and status (active, planned, …).
|
|
272
|
+
- **Proxy connections**: mark a connection as *Proxy* when the target is only reachable through the source, for
|
|
273
|
+
example Traefik → Paperless. Proxy chains such as Traefik → Authelia → Grafana work too.
|
|
274
|
+
- **Hops**: intermediate stations of a connection, such as a router, firewall, VLAN or tunnel, in a fixed order.
|
|
275
|
+
- **"Runs on" from NetBox**: services sit on their device or VM, and a VM pinned to a device runs on it. Nothing has
|
|
276
|
+
to be entered twice.
|
|
277
|
+
|
|
278
|
+
### Draw the canvas
|
|
279
|
+
|
|
280
|
+
- **Editor**: drag and drop from a searchable sidebar. **Add missing** pulls in the services and the cabled switches
|
|
281
|
+
and routers of what is already on the canvas. Groups, sticky notes, automatic layout, minimap and autosave.
|
|
282
|
+
- **Bendable, colourable lines**: drag the + points of a selected line to route it around other nodes, and pick a
|
|
283
|
+
colour and a shape (curved, straight or step) per line and canvas.
|
|
284
|
+
- **Networks**: place prefixes and VLANs on the canvas. Devices and VMs with an IP address in a prefix, or an
|
|
285
|
+
interface in a VLAN, are linked to it automatically ("member of"), and a prefix is linked to its VLAN. Only the most
|
|
286
|
+
specific prefix on the canvas counts, so a /16 and a /24 do not both get a line. **Add missing** on a network pulls
|
|
287
|
+
in its members.
|
|
288
|
+
- **VIPs and circuits**: place IP addresses (the sidebar lists those with the VIP role) and circuits on the canvas. A
|
|
289
|
+
VIP runs on the device or VM it is configured on and is linked to its prefix; draw a **Proxy** connection from the
|
|
290
|
+
VIP to its backends. Circuits are drawn as nodes or used as hops.
|
|
291
|
+
- **Physical layer**: the cables documented in NetBox are drawn between devices, with the interface names as label.
|
|
292
|
+
Paths through patch panels count as one link. Toggle it in the toolbar.
|
|
293
|
+
- **Search** in the toolbar: find an object by name, host, IP or port and jump to it.
|
|
294
|
+
- **Node panel**: details, connections and cables of the selected object, quick edit for services and applications,
|
|
295
|
+
links to the NetBox pages.
|
|
296
|
+
|
|
297
|
+
### Ask "what if this fails?"
|
|
298
|
+
|
|
299
|
+
- **Impact analysis** for any node, colour-coded on the canvas:
|
|
300
|
+
- **fails with it** (red): services and VMs running on the failed host,
|
|
301
|
+
- **affected** (orange): everything that depends on one of them, or whose connection runs through a failed hop,
|
|
302
|
+
- **unreachable** (yellow): everything behind a failed proxy, behind a switch that was its only cable, or whose
|
|
303
|
+
networks on the canvas have all failed. A prefix fails with its VLAN; a failing member never takes a network down.
|
|
304
|
+
- Everything comes from the documentation in NetBox. Nothing is pinged or measured, see
|
|
305
|
+
[What this is not](#what-this-is-not).
|
|
306
|
+
|
|
307
|
+
### Share it and stay in NetBox
|
|
308
|
+
|
|
309
|
+
- **Preview** on the canvas page: the drawing read-only, one click to the editor.
|
|
310
|
+
- **Export** as PNG, SVG, a printable A4 PDF with title, date and legend, or an **Excalidraw** scene to whiteboard
|
|
311
|
+
a copy.
|
|
312
|
+
- **Integrated into NetBox**: lists, filters, CSV import, global search, REST API, GraphQL and change log for all
|
|
313
|
+
objects. Device, VM, service and application pages get a *Connections* tab and a *Show on canvas* button.
|
|
314
|
+
- **Follows NetBox**: permissions, light and dark theme, English or German depending on the NetBox language.
|
|
315
|
+
- **Works offline**: no CDNs, no external requests. The frontend is bundled with the plugin.
|
|
316
|
+
|
|
317
|
+
More details and screenshots are in the [wiki](https://github.com/sieteunoseis/netbox-canvas/tree/main/docs/wiki).
|
|
318
|
+
|
|
319
|
+
<table>
|
|
320
|
+
<tr>
|
|
321
|
+
<td width="50%"><img src="https://raw.githubusercontent.com/sieteunoseis/netbox-canvas/main/docs/images/impact.png" alt="Impact analysis: truenas fails, red and orange mark everything that breaks with it"></td>
|
|
322
|
+
<td width="50%"><img src="https://raw.githubusercontent.com/sieteunoseis/netbox-canvas/main/docs/images/new-service.png" alt="Create a service and its application in one dialog"></td>
|
|
323
|
+
</tr>
|
|
324
|
+
<tr>
|
|
325
|
+
<td align="center">Impact analysis: what breaks if <code>truenas</code> goes down?</td>
|
|
326
|
+
<td align="center">New service with an optional application, in one dialog</td>
|
|
327
|
+
</tr>
|
|
328
|
+
</table>
|
|
329
|
+
|
|
330
|
+
<sub>Screenshots show a demo homelab.</sub>
|
|
331
|
+
|
|
332
|
+
### Service vs. Application (in one sentence each)
|
|
333
|
+
|
|
334
|
+
- **Service** (NetBox core) = *where* something listens: one port on one host, for example `grafana · TCP 3000 · nas`.
|
|
335
|
+
- **Application** (this plugin) = *what* it is: the software, optionally spanning several services and hosts, for
|
|
336
|
+
example `Grafana`.
|
|
337
|
+
|
|
338
|
+
For a simple one-port app a service is enough. When you create a service in the editor, you can create or link the
|
|
339
|
+
application in the same dialog.
|
|
340
|
+
|
|
341
|
+
---
|
|
342
|
+
|
|
343
|
+
## Permissions
|
|
344
|
+
|
|
345
|
+
| Action | Required permission |
|
|
346
|
+
|---|---|
|
|
347
|
+
| View a canvas | `view` on *canvas* (objects and connections only as far as you may view them) |
|
|
348
|
+
| Move, add, remove nodes | `change` on the canvas + `add/change/delete` on *canvas node* |
|
|
349
|
+
| Groups / notes | additionally `add/change/delete` on *canvas group* / *canvas note* |
|
|
350
|
+
| Create / edit / delete connections | `add/change/delete` on *service connection* |
|
|
351
|
+
| Hops | `add/change/delete` on *connection hop* |
|
|
352
|
+
| New service, "runs on", quick edit | `add` / `change` on *ipam › service* |
|
|
353
|
+
| Applications | `add` / `change` on *application* |
|
|
354
|
+
|
|
355
|
+
Users without change permission see the canvas in view-only mode.
|
|
356
|
+
|
|
357
|
+
---
|
|
358
|
+
|
|
359
|
+
## More
|
|
360
|
+
|
|
361
|
+
- [Wiki](https://github.com/sieteunoseis/netbox-canvas/tree/main/docs/wiki): getting started, editor guide, impact analysis,
|
|
362
|
+
export, FAQ
|
|
363
|
+
- REST API under `/api/plugins/service-canvas/` and GraphQL: see
|
|
364
|
+
[API in the wiki](https://github.com/sieteunoseis/netbox-canvas/blob/main/docs/wiki/API.md)
|
|
365
|
+
- Bug reports, development setup and tests: [CONTRIBUTING.md](https://github.com/sieteunoseis/netbox-canvas/blob/main/CONTRIBUTING.md)
|
|
366
|
+
- Changes per version: [CHANGELOG.md](https://github.com/sieteunoseis/netbox-canvas/blob/main/CHANGELOG.md)
|
|
367
|
+
|
|
368
|
+
## Why this exists
|
|
369
|
+
|
|
370
|
+
In the words of the original author, Jasper Claus: "NetBox documents my homelab down to every cable and IP, but it
|
|
371
|
+
did not show which service runs on which host and who talks to whom. This plugin adds that service layer." This fork
|
|
372
|
+
takes it to an enterprise network: the networks, VIPs and circuits those services depend on.
|
|
373
|
+
|
|
374
|
+
## What this is not
|
|
375
|
+
|
|
376
|
+
- **Not a monitoring tool.** Nothing is pinged, polled or measured. The canvas shows what is documented in NetBox,
|
|
377
|
+
and the impact analysis answers "what if this fails?" from that documentation. Live state belongs in your
|
|
378
|
+
monitoring (Uptime Kuma, Zabbix, Prometheus, …).
|
|
379
|
+
- **Not a discovery tool.** It does not scan your network or import anything automatically. Discovery and imports
|
|
380
|
+
are better done by the tools made for that (Diode, Orb, NAPALM, …) feeding NetBox.
|
|
381
|
+
- **Not another network diagram.** Topology plugins draw cables and devices. This plugin adds the service layer on
|
|
382
|
+
top: which service runs where, who talks to whom, through which proxy, and what breaks. The cables are only an
|
|
383
|
+
optional layer for the impact analysis.
|
|
384
|
+
|
|
385
|
+
## Built with AI
|
|
386
|
+
|
|
387
|
+
The code, tests and documentation of the original plugin were written by AI ([Claude](https://claude.ai) via Claude
|
|
388
|
+
Code), with Jasper Claus contributing the idea and requirements, testing and feedback. This fork's additions were
|
|
389
|
+
written the same way. Issues and pull requests are welcome.
|
|
390
|
+
|
|
391
|
+
How it is kept maintainable: every change runs the Django tests against NetBox 4.7 and the frontend tests in CI, dependencies are updated through Dependabot, security reports go through
|
|
392
|
+
[SECURITY.md](https://github.com/sieteunoseis/netbox-canvas/blob/main/SECURITY.md), and every release is listed
|
|
393
|
+
in the changelog. The plugin only uses NetBox's own models, permissions and change log, so it does not touch NetBox
|
|
394
|
+
core.
|
|
395
|
+
|
|
396
|
+
## Where this comes from
|
|
397
|
+
|
|
398
|
+
NetBox Canvas started as a fork of [NetBox Service Canvas](https://github.com/Jasper-Claus/netbox-service-canvas)
|
|
399
|
+
by **Jasper Claus** (Apache-2.0), at version 0.5.1. The editor, the service/application model, connections, hops,
|
|
400
|
+
impact analysis, exports and the documentation are his work. Thank you, Jasper, for building and sharing it.
|
|
401
|
+
|
|
402
|
+
This fork adds what we needed to document an enterprise voice and data network on the canvas: prefixes and VLANs as
|
|
403
|
+
nodes with derived "member of" lines, IP addresses (load balancer VIPs) and circuits as nodes and connection
|
|
404
|
+
endpoints, straight and step line shapes, an Excalidraw export, and export fixes. See the
|
|
405
|
+
[CHANGELOG](https://github.com/sieteunoseis/netbox-canvas/blob/main/CHANGELOG.md) for details. The Python module
|
|
406
|
+
is still `netbox_service_canvas` and the URLs still live under `/plugins/service-canvas/`, so a database set up with
|
|
407
|
+
the original plugin keeps working: uninstall `netbox-service-canvas`, install `netbox-canvas`, run `migrate`.
|
|
408
|
+
|
|
409
|
+
## Support
|
|
410
|
+
|
|
411
|
+
If you find this plugin helpful, consider supporting development:
|
|
412
|
+
|
|
413
|
+
[](https://buymeacoffee.com/automatebldrs)
|
|
414
|
+
|
|
415
|
+
## License
|
|
416
|
+
|
|
417
|
+
[Apache-2.0](https://github.com/sieteunoseis/netbox-canvas/blob/main/LICENSE), see also
|
|
418
|
+
[NOTICE](https://github.com/sieteunoseis/netbox-canvas/blob/main/NOTICE). Original work © Jasper Claus. Not
|
|
419
|
+
affiliated with NetBox Labs. NetBox is a trademark of NetBox Labs, Inc.
|