Compare commits

...

1280 Commits

Author SHA1 Message Date
Jeremy Stretch
5a59f2352c Merge pull request #7986 from netbox-community/develop
Release v3.1.0
2021-12-06 16:00:19 -05:00
jeremystretch
5164b78da1 Release v3.1.0 2021-12-06 15:01:36 -05:00
jeremystretch
5561b46a59 Finalize release notes 2021-12-06 14:58:49 -05:00
jeremystretch
26b2431cbf Bump django-taggit to 2.0.0 2021-12-06 14:38:13 -05:00
jeremystretch
029605f926 Clean up site view 2021-12-06 13:43:02 -05:00
jeremystretch
0cd173f9df Update django-taggit to 2.0 2021-12-06 13:25:09 -05:00
jeremystretch
414810bdf5 Update required dependencies 2021-12-06 13:15:17 -05:00
jeremystretch
f94c1e91ea Merge branch 'develop' into feature 2021-12-06 12:10:31 -05:00
Jeremy Stretch
b7129e1456 Merge pull request #7984 from netbox-community/develop
Release v3.0.12
2021-12-06 12:07:04 -05:00
jeremystretch
dc6decd404 Release v3.0.12 2021-12-06 11:54:50 -05:00
jeremystretch
40c6b172f7 Fixes #7981: Fix Markdown sanitization regex 2021-12-06 11:33:00 -05:00
thatmattlove
7cb9cedfe1 Fixes #7823: Properly handle return_url when Save & Continue button is present 2021-12-03 16:20:05 -07:00
jeremystretch
b43980d660 Fixes #7960: Prevent creation of regions/site groups/locations with duplicate names (see #7354) 2021-12-03 15:09:56 -05:00
jeremystretch
09b612546b Omit actions column from non-paginated child object tables 2021-12-03 11:07:16 -05:00
jeremystretch
a99d14c13f Closes #7924: Include child groups on contact group view 2021-12-03 11:00:00 -05:00
jeremystretch
68f322a03b Closes #7925: Linkify contact phone and email attributes 2021-12-03 10:51:24 -05:00
jeremystretch
97f0414ff3 Changelog for #7751, #7885, #7892 2021-12-03 09:51:05 -05:00
Jeremy Stretch
d5f308d9c9 Merge pull request #7928 from kkthxbye-code/fix-7751
Fix #7751: LDAP: Only get API user from ldap when FIND_GROUP_PERMS is on
2021-12-03 09:48:58 -05:00
Jonathan Senecal
1377eda0ba Add support for L22-30P power port type (#7915)
* Add support for L22-30P power port type

Fixes #7892

* Add support for L22-30R power outlet type
2021-12-03 09:43:42 -05:00
Jeremy Stretch
70259b0d04 Merge pull request #7970 from rhyser9/7885_linkify_vlan_name
Fixes #7885: Linkify VLAN name in VLAN tables
2021-12-03 09:41:28 -05:00
Rhys Barrie
f1466d6da3 netbox-community/netbox#7885: Linkify VLAN name in VLAN tables 2021-12-02 12:27:30 -05:00
jeremystretch
83010e278c Add changelog for #7932, #7941 2021-12-01 09:18:31 -05:00
thatmattlove
dc3040550d Merge branch 'fast-filter' into develop 2021-11-30 10:10:38 -07:00
Daniel Sheppard
3b25db919a Update changelog for #7940 2021-11-30 09:43:14 -06:00
Daniel Sheppard
09f038f997 Merge pull request #7941 from bluikko/patch-9
Add multistandard ITA power outlet type
2021-11-30 09:37:53 -06:00
bluikko
bbdd3804c7 Add multistandard ITA power outlet type 2021-11-26 10:06:52 +07:00
kkthxbye
a0b9ac7bcc UI: Improve performance of the quick filter 2021-11-25 12:14:07 +01:00
kkthxbye
8bb0cba949 Fix #7751 - LDAP: Only get API user from ldap when FIND_GROUP_PERMS is enabled 2021-11-25 08:09:50 +01:00
jeremystretch
870aa3a265 Merge branch 'develop' into feature 2021-11-24 14:00:37 -05:00
jeremystretch
86ada33577 PRVB 2021-11-24 13:58:57 -05:00
Jeremy Stretch
869808b3f9 Merge pull request #7922 from netbox-community/develop
Release v3.0.11
2021-11-24 13:51:17 -05:00
jeremystretch
57ccbf44b8 Release v3.0.11 2021-11-24 13:25:57 -05:00
jeremystretch
416caa8f50 Hide code blocks when not needed 2021-11-24 13:17:59 -05:00
jeremystretch
1e42fecf66 Changelog for #7657 2021-11-24 09:15:30 -05:00
Jeremy Stretch
c9b00891ed Merge pull request #7861 from netbox-community/7657-threadsafe-changelog
Fixes #7657: Make request/webhook caching thread-safe
2021-11-24 09:06:48 -05:00
Jeremy Stretch
497eacbea3 Merge pull request #7898 from ypid/fix/7897
CEE 7/5 exists as power port and power outlet. It is only a power port.
2021-11-22 13:45:08 -05:00
jeremystretch
f90c591c78 Fixes #7890: Correct typo 2021-11-22 13:36:51 -05:00
Robin Schneider
175498940e Fixes #7897: CEE 7/5 is only a power outlet, no power port
Ref:

* https://en.wikipedia.org/wiki/CEE_7_standard_AC_plugs_and_sockets#CEE_7/5_socket_and_CEE_7/6_plug_(French;_Type_E)
* https://blog.packetsar.com/wp-content/uploads/Power_and_Cooling_Cheat_Sheet.pdf
2021-11-21 23:41:36 +01:00
Robin Schneider
eded00cbb3 chore: Always use "CEE 7" (with the space) consistently 2021-11-21 22:23:29 +01:00
jeremystretch
b7c9ca720a Closes #7886: Introduce a base FilterForm class 2021-11-19 15:12:45 -05:00
jeremystretch
7072f207c0 Call out all models with cable_peer name changes 2021-11-19 11:42:34 -05:00
jeremystretch
5f59f458f4 Fixes #7880: Include assigned IP addresses in FHRP group object representation 2021-11-19 11:34:59 -05:00
jeremystretch
b6fe613329 Fix redirection after creating FHRP group assignment 2021-11-19 10:42:13 -05:00
jeremystretch
cd128e557c Closes #7884: Add FHRP groups column to interface tables 2021-11-19 10:27:56 -05:00
Jeremy Stretch
30a5c70260 Merge pull request #7878 from netbox-community/7877-bootstrapmixin-cleanup
Closes #7877: BootstrapMixin cleanup
2021-11-18 17:05:29 -05:00
jeremystretch
beca978af5 Clean up imports 2021-11-18 16:48:29 -05:00
jeremystretch
98a830a6a0 Apply BootstrapMixin to ComponentForm 2021-11-18 16:32:22 -05:00
jeremystretch
ed2231e34b Apply BootstrapMixin to CustomFieldModelFilterForm 2021-11-18 16:27:06 -05:00
jeremystretch
55049bb303 Apply BootstrapMixin to BulkEditForm 2021-11-18 16:23:26 -05:00
jeremystretch
c210c6937b Apply BootstrapMixin to CustomFieldModelForm 2021-11-18 16:19:25 -05:00
jeremystretch
d2767f39f0 Closes #7850: Add note about where to assign FHRP groups 2021-11-18 15:12:12 -05:00
jeremystretch
1c9d39d3e6 Fix REST API version reporting for beta releases 2021-11-18 11:19:00 -05:00
jeremystretch
f16c6d81cf Merge branch 'develop' into feature 2021-11-18 11:06:54 -05:00
jeremystretch
e8d6281007 Changelog for #7399 2021-11-18 10:02:23 -05:00
Jeremy Stretch
8299845615 Merge pull request #7676 from kkthxbye-code/develop
Fix #7399: LDAP excessive CPU usage when AUTH_LDAP_FIND_GROUP_PERMS is enabled
2021-11-18 09:58:34 -05:00
jeremystretch
9ae5865c2d Fixes #7865: REST API should support null values for console port speeds 2021-11-18 09:34:41 -05:00
jeremystretch
c2d0cfdfc0 Fixes #7864: power_port can be null when creating power outlets 2021-11-18 09:27:45 -05:00
Jeremy Stretch
5dd252731e Merge pull request #7863 from etcet/sudo-ln-s
Fixes #7862: Docs: Link housekeeping cron using sudo
2021-11-18 09:16:55 -05:00
Chris James
7b9436d2b9 Docs: Run ln with sudo 2021-11-17 20:33:42 -06:00
jeremystretch
6a369ac985 Closes #7531: Add Markdown support for strikethrough formatting 2021-11-17 16:50:23 -05:00
jeremystretch
23d90823a3 Fixes #7720: Fix initialization of custom script MultiObjectVar field with multiple values 2021-11-17 16:22:47 -05:00
jeremystretch
4bfb6b476c Fixes #7859: Fix styling of form widgets under cable connection views 2021-11-17 15:53:26 -05:00
jeremystretch
0d60099588 Move request object and webhook queue to TLS 2021-11-17 15:12:19 -05:00
jeremystretch
9a45547cda Closes #5143: Include a device's asset tag in its display value 2021-11-17 13:06:57 -05:00
jeremystretch
a000ded350 Remove "primary for" references to Device on IPAddress 2021-11-17 12:50:46 -05:00
jeremystretch
424ac29131 Closes #7812: Enable change logging for image attachments 2021-11-17 11:52:50 -05:00
jeremystretch
b7b5a5788f Fixes #7589: Correct 128GFC interface type identifier 2021-11-17 11:18:41 -05:00
jeremystretch
9de179cba8 Closes #7858: Standardize the representation of content types across import & export functions 2021-11-17 11:02:22 -05:00
jeremystretch
94069e76c9 Fixes #7857: Fix ordering IP addresses by assignment status 2021-11-17 08:51:17 -05:00
jeremystretch
df9d67b873 Fixes #7851: Add missing cluster name filter for virtual machines 2021-11-17 08:48:09 -05:00
jeremystretch
6f7fbf7686 Fixes #7849: Fix exception when creating an FHRPGroup with an invalid IP address 2021-11-16 16:50:20 -05:00
jeremystretch
f32e694499 Fixes #7739: Fix exception when tracing cable across circuit with no far end termination 2021-11-15 12:41:57 -05:00
jeremystretch
e5900a3fe3 Correct changelog for #7729 2021-11-15 09:04:18 -05:00
jeremystretch
6e151b044d Changelog for #7229, #7424, #7542 2021-11-15 08:56:03 -05:00
Jeremy Stretch
516bea6a0a Merge pull request #7829 from rhyser9/7542_prefix_vlan_group_column
Fix #7542: Add VLAN Group column to IP Prefix table
2021-11-15 08:54:30 -05:00
Jeremy Stretch
496cabcc53 Merge pull request #7828 from rhyser9/7229_bug_add_vlans_link
Fix #7229: Fix context of VLAN table in VLAN Group view
2021-11-15 08:52:36 -05:00
Jeremy Stretch
d051db5083 Merge pull request #7827 from rhyser9/7424_virtualchassis_id_filter
Fix #7424: Add virtual_chassis_id filter for device components
2021-11-15 08:43:45 -05:00
Rhys Barrie
660fc23e15 netbox-community/netbox#7542: Add VLAN Group column to IP Prefix table 2021-11-13 23:29:26 -05:00
Rhys Barrie
a5a480133f netbox-community/netbox#7229: Fix context of VLAN table in VLAN Group view 2021-11-13 23:08:46 -05:00
Rhys Barrie
68b544c676 netbox-community/netbox#7424: add filterset test for virtual_chassis_id 2021-11-13 22:16:18 -05:00
Rhys Barrie
a8c958ece2 netbox-community/netbox#7424: fix test failure from adding virtual chassis filter field 2021-11-13 22:01:15 -05:00
Rhys Barrie
f77f7ca0ec netbox-community/netbox#7424:make device component device field filter from selected virtual chassis 2021-11-13 21:35:13 -05:00
Rhys Barrie
6b21c8453f netbox-community/netbox#7424: Add virtual_chassis field to device component filter form 2021-11-13 21:33:52 -05:00
Rhys Barrie
fa8a8abc98 netbox-community/netbox#7424: Add virtual_chassis and virtual_chassis_id filter to device components 2021-11-13 21:30:38 -05:00
Jeremy Stretch
98cc36c458 Merge pull request #7824 from netbox-community/2101-q-filters
Closes #2101: Ensure all relevant models have a general purpose search filter
2021-11-12 15:48:19 -05:00
jeremystretch
f3beabba69 Changelog for #2101 2021-11-12 15:33:49 -05:00
jeremystretch
467fa5a847 Add q filters for Token and ObjectPermission filter sets 2021-11-12 15:30:16 -05:00
jeremystretch
50f283cf28 Add q filter for extras models 2021-11-12 15:26:58 -05:00
jeremystretch
f49d7008a0 Add q filters for connection lists 2021-11-12 15:05:33 -05:00
jeremystretch
1fed564c47 Clean up script & report lists 2021-11-12 14:44:14 -05:00
jeremystretch
bb99c3e6f9 Changelog for #7803, #7810 2021-11-12 13:46:06 -05:00
Jeremy Stretch
8820cac792 Merge pull request #7820 from kkthxbye-code/script-reload
Fix #7803: Clear sys.modules cache when reloading scripts
2021-11-12 13:44:42 -05:00
Jeremy Stretch
ada911c20b Merge pull request #7816 from byts-tech/FR7810
Fixes: #7810 Add IEEE 802.15.1 Interface Type
2021-11-12 13:40:41 -05:00
jeremystretch
17e01644f5 Fixes #7813: Fix handling of errors during export template rendering 2021-11-12 13:32:52 -05:00
kkthxbye
9458521f3e Merge branch 'netbox-community:develop' into script-reload 2021-11-12 17:07:11 +01:00
Flo
8aa73c5900 Add IEEE 802.15.1 Interface Type 2021-11-12 16:05:42 +01:00
jeremystretch
500f213c6b Fix erroneous merge resolution 2021-11-12 09:29:55 -05:00
jeremystretch
cede27b5fe Merge branch 'develop' into feature 2021-11-12 09:09:15 -05:00
jeremystretch
c0ca1eaf90 PRVB 2021-11-12 08:54:08 -05:00
Jeremy Stretch
b29a5511df Merge pull request #7815 from netbox-community/develop
Release v3.0.10
2021-11-12 08:50:43 -05:00
jeremystretch
49e77841e0 Release v3.0.10 2021-11-12 08:36:33 -05:00
jeremystretch
daf6c8e327 Fixes #7814: Fix restriction of user & group objects in GraphQL API queries 2021-11-12 08:23:58 -05:00
jeremystretch
9f8068e8d1 Fixes #7808: Fix reference values for content type under custom field import form 2021-11-11 16:21:27 -05:00
jeremystretch
0b705553a5 Fixes #7809: Add missing export template support for various models 2021-11-11 16:16:54 -05:00
jeremystretch
a799094227 Fixes #7788: Improve XSS mitigation in Markdown renderer 2021-11-11 15:38:34 -05:00
jeremystretch
d529c1b5b3 Housekeeping: Use RestrictedQuerySet for default manager on base models 2021-11-11 15:04:22 -05:00
jeremystretch
834f68e6e4 Fixes #7761: Extend cable tracing across bridged interfaces 2021-11-11 14:45:10 -05:00
jeremystretch
83b2102705 Closes #7769: Enable assignment of IP addresses to an existing FHRP group 2021-11-11 14:05:35 -05:00
jeremystretch
2f064cdfd1 Changelog for #7767 2021-11-11 12:30:28 -05:00
Jeremy Stretch
6c28182dd3 Merge pull request #7767 from CironAkono/FR6925
Fixes: #6925 Interfaces Table - bring back the visual aids from v2.9
2021-11-11 12:29:01 -05:00
jeremystretch
3cb8c5db28 Fixes #7654: Fix assignment of members to virtual chassis with initial position of zero 2021-11-11 12:10:47 -05:00
CironAkono
251abdb4dd Apply suggestions from code review
Co-authored-by: Jeremy Stretch <jstretch@ns1.com>
2021-11-11 16:36:13 +00:00
jeremystretch
726e4df54b Changelog for #7791 2021-11-11 11:31:51 -05:00
Jeremy Stretch
bd32a6ac8e Merge pull request #7804 from kkthxbye-code/fix-7791
Fix #7791 - Allow devicebay table to be sorted by status
2021-11-11 10:46:15 -05:00
jeremystretch
27d7400c36 Fixes #7802: Differentiate ID and VID columns in VLANs table 2021-11-11 10:23:38 -05:00
kkthxbye-code
53e52aeaa8 Fix sorting devicebay table by status 2021-11-11 14:05:39 +01:00
kkthxbye-code
ae6ed97a80 Clear sys.modules cache when reloading scripts 2021-11-11 11:53:31 +01:00
jeremystretch
34f24de3e4 Fixes #7757: Fix 404 when assigning multiple contacts/FHRP groups in succession 2021-11-09 17:08:28 -05:00
jeremystretch
f93d6813a9 Merge branch 'develop' into feature 2021-11-09 16:52:36 -05:00
jeremystretch
3ad773beb3 Fixes #7741: Fix 404 when attaching multiple images in succession 2021-11-09 16:46:58 -05:00
jeremystretch
be91235858 Changelog for #7740 2021-11-09 16:08:11 -05:00
Jeremy Stretch
95fc0bbc94 Merge pull request #7774 from byts-tech/FR7740
Fixes: #7740 Add Mini-DIN 8 Console-Port-Type
2021-11-09 16:06:58 -05:00
jeremystretch
9dad7e4daf Fixes #7701: Fix conflation of assigned IP status & role in interface tables 2021-11-09 16:04:16 -05:00
jeremystretch
d08ed9fe5f Fixes #7780: Preserve mutli-line values during CSV file import 2021-11-09 15:24:21 -05:00
jeremystretch
82210cc116 Changelog for #7783 2021-11-09 15:15:34 -05:00
Jeremy Stretch
94d3e76517 Merge pull request #7785 from jasonyates/develop
Fixes #7783 - Site location visual changes
2021-11-09 15:12:47 -05:00
Jason Yates
3f72492a59 Fixed #7783 - Site location visual changes
Updating site location list to visually match the /dcim/locations list where child locations are "indtended" with mdi-circle-small.

Also removes the padding-left attribute on each row as it is no longer functional.
2021-11-09 15:18:46 +00:00
Jeremy Stretch
c0653da736 Merge pull request #7778 from netbox-community/7775-dynamic-config
7775 dynamic config
2021-11-08 15:54:25 -05:00
jeremystretch
f3d8f1b1fb Changelog for #7775 2021-11-08 15:38:55 -05:00
jeremystretch
d2391b9c63 Move GRAPHQL_ENABLED to dynamic configuration 2021-11-08 15:31:09 -05:00
jeremystretch
f8e44c09eb Move CUSTOM_VALIDATORS to dynamic configuration 2021-11-08 15:22:29 -05:00
jeremystretch
2a00519b93 Move CHANGELOG_RETENTION to dyanmic configuration 2021-11-08 15:07:58 -05:00
jeremystretch
3292a2aecc Closes #7619: Permit custom validation rules to be defined as plain data or dotted path to class 2021-11-08 14:52:56 -05:00
Flo
b7aa44837f Add Mini-DIN 8 Console-Port-Type 2021-11-08 17:50:13 +01:00
jeremystretch
17fd6e692e Fixes #7768: Validate IP address status when creating a new FHRP group 2021-11-08 08:40:24 -05:00
jeremystretch
2ce8ef5704 Fixes #7771: Group assignment should be optional when creating contacts via REST API 2021-11-08 08:34:10 -05:00
jeremystretch
7b7afd3e7b Changelog for #7765 2021-11-08 08:24:14 -05:00
Nico Domino
9c2514fce4 feat: add outer_width to RackTable (#7766)
* feat: add outer_width to RackTable

* fix: add outer_units to column display

* feat: add outer_depth to available columns
2021-11-08 08:15:26 -05:00
jeremystretch
e04402ed57 Allow bypassing the pre-commit script with NOVALIDATE=1 2021-11-05 13:40:38 -04:00
jeremystretch
3eda8d8482 Closes #7760: Add vid filter field to VLANs list 2021-11-05 13:31:36 -04:00
jeremystretch
79f2f03fb2 Issues policy tweaks 2021-11-05 13:26:18 -04:00
jeremystretch
f7d0db9cd2 Fixes #7756: Fix AttributeError exception when editing an IP address assigned to a FHRPGroup 2021-11-05 13:16:43 -04:00
jeremystretch
fab1d3651b Add new models to developer docs 2021-11-05 13:10:27 -04:00
jeremystretch
e5d7578663 Fixes #7750: Fix cable trace image link 2021-11-05 11:10:17 -04:00
jeremystretch
cf80c1a506 Release v3.1-beta1 2021-11-05 09:03:27 -04:00
jeremystretch
4649ab2d85 Merge branch 'develop' into feature 2021-11-05 08:49:25 -04:00
jeremystretch
773fd47ca6 Fixes #7752: Fix minimum version check under Python v3.10 2021-11-05 08:45:57 -04:00
jeremystretch
2fd526b359 Fix up contact template 2021-11-05 08:33:16 -04:00
kkthxbye-code
830cf4b31f Fix #7399 - LDAP using excessive CPU when AUTH_LDAP_FIND_GROUP_PERMS is enabled 2021-11-05 10:28:30 +01:00
jeremystretch
2826f27153 Split interface edit forms into subsections 2021-11-04 16:36:49 -04:00
jeremystretch
83ac869693 Fix ASNs column in SiteTable 2021-11-04 16:29:43 -04:00
jeremystretch
bc92f9221a Tweak site ASN filters & tests 2021-11-04 16:22:55 -04:00
jeremystretch
c2f85a2877 #6732: Show sites table under ASN view 2021-11-04 16:16:59 -04:00
jeremystretch
0bbd186635 Rearrange site view layout 2021-11-04 15:58:52 -04:00
jeremystretch
806dcd74ec Split circuits models into submodules 2021-11-04 15:58:17 -04:00
jeremystretch
93772e7265 Move remote authentication config parameters to a separate page 2021-11-04 15:41:46 -04:00
jeremystretch
9094f07290 Fix config revision form help texts 2021-11-04 15:35:17 -04:00
jeremystretch
0aae155c80 Refresh installation docs 2021-11-04 15:18:58 -04:00
jeremystretch
54233aba1b Remove extraneous slug field from contact import form 2021-11-04 14:23:24 -04:00
jeremystretch
bd3d2c60d9 FHRP groups cleanup 2021-11-04 14:19:10 -04:00
jeremystretch
2e75a111ed Fix return URLs for contact assignment edit/delete 2021-11-04 14:09:12 -04:00
jeremystretch
e4b0359b8e Include action buttons on contact assignments table 2021-11-04 14:01:07 -04:00
jeremystretch
803e0bfe72 #1344: Show object type & name when assigning a contact 2021-11-04 13:44:02 -04:00
jeremystretch
a5024a65a0 Add warning for Python 3.7 2021-11-04 13:32:52 -04:00
jeremystretch
734a00237a Clean up FHRP group filterset tests 2021-11-04 13:23:02 -04:00
jeremystretch
06f1d15283 Introduce create_test_virtualmachine() 2021-11-04 13:22:21 -04:00
jeremystretch
ff3edc9889 Add NestedContactAssignmentSerializer; add contact assignment API tests 2021-11-04 11:55:00 -04:00
jeremystretch
8f1acb700d Fix ID list creation in API tests 2021-11-04 11:31:39 -04:00
jeremystretch
519884d167 Invert default priority ordering for FHRPGroupAssignment 2021-11-04 11:17:10 -04:00
jeremystretch
3f0a98acbd Add nested FHRPGroupAssignment serializer; add missing API tests 2021-11-04 11:15:34 -04:00
jeremystretch
c023e5f518 Fix up FHRPGroupAssignmentTable 2021-11-04 10:05:47 -04:00
jeremystretch
67c73768c1 Add count_fhrp_groups to interface serializers 2021-11-04 09:58:33 -04:00
jeremystretch
bbb98083eb Clean up filtersets 2021-11-03 16:58:31 -04:00
jeremystretch
8bb9f4b8a2 #1344: Add missing object field to ContactAssignmentSerializer 2021-11-03 16:27:43 -04:00
jeremystretch
96cde7d4af Add wireless_lans to InterfaceSerializer; extend tests 2021-11-03 15:55:16 -04:00
jeremystretch
ea39c8a4c1 Optimize interface REST API endpoints 2021-11-03 15:38:17 -04:00
jeremystretch
7a55832a22 #6732: Add asns relationship to SiteSerializer and extend tests 2021-11-03 15:24:15 -04:00
jeremystretch
7a97d5d4eb Changelog for #6732; misc fixes 2021-11-03 14:40:14 -04:00
Jeremy Stretch
8305f6d1f5 Merge pull request #7662 from netbox-community/6732-asn-model
Closes: #6732 - Add new ASN model
2021-11-03 14:15:24 -04:00
jeremystretch
dcececf9c0 Improve documentation and testing for conditions 2021-11-03 14:02:43 -04:00
jeremystretch
839afe5ac0 Improve webhook tests 2021-11-03 14:01:59 -04:00
Daniel Sheppard
c72f25c693 #6732 - Add documentation 2021-11-03 12:22:44 -05:00
Daniel Sheppard
5fc373f5cc Merge feature -> develop 2021-11-03 12:05:11 -05:00
Daniel Sheppard
cf9eaf2eff Fix dcim/views.py merge error 2021-11-03 11:36:54 -05:00
jeremystretch
04d145d6d8 Add summary page to release notes 2021-11-03 11:47:11 -04:00
Daniel Sheppard
76d73abd81 Update ip.py 2021-11-03 10:04:26 -05:00
Daniel Sheppard
0ec0185d84 Fix Migration 2021-11-03 09:51:03 -05:00
jeremystretch
7b1335825b Closes #7687: Update CentOS installation docs 2021-11-03 10:47:17 -04:00
jeremystretch
2c2e37e9f0 Merge branch 'develop' into feature 2021-11-03 10:29:02 -04:00
Daniel Sheppard
25957bfae3 Fix migration issues 2021-11-03 08:56:04 -05:00
jeremystretch
11e2200acf PRVB 2021-11-03 09:51:28 -04:00
Jeremy Stretch
f5356b84f6 Merge pull request #7730 from netbox-community/develop
Release v3.0.9
2021-11-03 09:47:37 -04:00
Daniel Sheppard
db2d71ed9e Merge branch 'feature' into 6732-asn-model 2021-11-03 08:37:11 -05:00
jeremystretch
1bf100ba15 Release v3.0.9 2021-11-03 09:32:57 -04:00
jeremystretch
7614f423e5 #7612: Use escape() rather than strip_tags() 2021-11-03 08:56:30 -04:00
jeremystretch
318c8b85e9 Fixes #7721: Retain pagination preference when MAX_PAGE_SIZE is zero 2021-11-03 08:25:50 -04:00
jeremystretch
7085fe77da Changelog for #6529 2021-11-03 08:11:38 -04:00
Jeremy Stretch
2e20d7f02b Merge pull request #7677 from netbox-community/6529-command-line-run-scripts
#6529 - Add CLI to run scripts
2021-11-03 08:10:36 -04:00
Steven
831065b5a1 #7717 Missing tags column definition in IP range table (#7724) 2021-11-03 08:05:34 -04:00
Daniel Sheppard
b97167e841 Fix PEP8 error 2021-11-02 21:40:40 -05:00
Daniel Sheppard
19bacc9e23 #6529 - Adjusted the arguments. Fixed documentation 2021-11-02 21:37:11 -05:00
jeremystretch
61b61b1bc0 Fixes #7664: Preserve initial form data when bulk edit validation fails 2021-11-02 17:07:30 -04:00
Daniel Sheppard
7c3318df92 #6529 - Adjusted the arguments. Added documentation 2021-11-02 15:56:42 -05:00
jeremystretch
d0b85586b9 Changelog & cleanup for #6930 2021-11-02 16:24:28 -04:00
Rhys Barrie
cef0d168a5 Closes #6930: Add 'ID' column to object tables (#7673)
* netbox-community/netbox#6930: Add ID column to devices, device types, and components

* netbox-community/netbox#6930: Add ID column to sites, racks, and tenants

* netbox-community/netbox#6930: Add ID column to power, providers, TODO circuits

* netbox-community/netbox#6930: Add ID column to virtualization tables

* netbox-community/netbox#6930: Add ID column to IPAM tables

* netbox-community/netbox#6930: Add ID column to 'extras' tables

* netbox-community/netbox#6930: Move ID column to BaseTable class

* netbox-community/netbox#6930: Don't linkify ID in device component template tables

* netbox-community/netbox#6930: Don't show ID column in interface/console/power connections tables

* netbox-community/netbox#6930: Don't show ID column in device component template tables

* netbox-community/netbox#6930: Add ID column to ObjectJournal, DeviceImport, and Circuit tables

* Exclude ID column from selected tables

* netbox-community/netbox#6930:revert default columns on ObjectChangeTable, not configurable

* netbox-community/netbox#6930: Add object ID to tagged objects table in tag detail view

Co-authored-by: Jeremy Stretch <jstretch@ns1.com>
2021-11-02 16:21:34 -04:00
jeremystretch
3a192223a3 Changelog & cleanup for #7668, #7717 2021-11-02 15:58:14 -04:00
Jeremy Stretch
288a1d23e5 Merge pull request #7693 from rhyser9/7668_location_detail_elevation
Closes #7668: Add 'View Elevations' button to location detail page
2021-11-02 15:53:09 -04:00
Jeremy Stretch
7c05db8e2f Merge pull request #7718 from cybarox/7717-fix-tags-missing-from-ip-ranges-table-fields
Closes #7717 Missing tags column in IP range table
2021-11-02 15:49:35 -04:00
Jeremy Stretch
18080a969e Merge pull request #7714 from netbox-community/6235-fhrp
Closes #6235: FHRP group modeling
2021-11-02 15:43:40 -04:00
jeremystretch
412430e1c3 Docs & changelog for #6235 2021-11-02 15:26:45 -04:00
jeremystretch
131e433880 Rename FHRPGroupAssignment object to interface 2021-11-02 15:10:02 -04:00
Daniel Sheppard
b7c0e8b71f #6529 - Streamline code and resolve some issues 2021-11-02 13:12:12 -05:00
jeremystretch
264652f2c3 REST API optimizations 2021-11-02 14:08:36 -04:00
jeremystretch
2cb53a0f7e Clean up FHRP group templates, forms 2021-11-02 13:32:41 -04:00
Daniel Sheppard
7625a2dd3c #6732 - Swap ASN M2M to Site model and update some templates/filters 2021-11-02 12:26:06 -05:00
jeremystretch
93da5a39be Make assignment priority a required field 2021-11-02 13:22:00 -04:00
jeremystretch
aeb4996ac2 Allow users to create new FHRP group directly from the interface view 2021-11-02 13:06:58 -04:00
Daniel Sheppard
330c498fe4 Merge feature 2021-11-02 11:16:01 -05:00
Daniel Sheppard
5d0a7cb307 #6732 - Remove migration 2021-11-02 11:10:50 -05:00
Daniel Sheppard
8c27ff3859 #6732 - Add ASN back to filtersets 2021-11-02 11:07:19 -05:00
jeremystretch
736d6cb675 Merge branch 'feature' into 6235-fhrp 2021-11-02 12:05:34 -04:00
Jeremy Stretch
200aca470b Merge pull request #7709 from netbox-community/7649-social-auth
Closes #7649: Add support for SSO
2021-11-02 12:04:58 -04:00
jeremystretch
b2dc6c5d3d Changelog & initial docs for #7649 2021-11-02 11:49:10 -04:00
cybarox
a5ec0ee277 Closes #7717 Missing tags column in IP range table 2021-11-02 15:14:08 +01:00
jeremystretch
f48d7aedce Enable filtering FHRP groups by related IP addresses 2021-11-02 09:56:52 -04:00
jeremystretch
bb4f3e1789 Initial work on #6235 2021-11-01 16:56:30 -04:00
jeremystretch
e0230ed104 Remove errant URL path 2021-11-01 13:32:02 -04:00
jeremystretch
704fdf9ccd Optimize wireless migrations 2021-11-01 11:23:58 -04:00
Rhys Barrie
d528614cbf netbox-community/netbox#7668: Relocate elevations button to location details table 2021-11-01 11:17:15 -04:00
bluikko
b5e8157700 Fix #7685: Doc image links (#7698)
* Fix image link in custom-script.md

* Fix image link in cable.md

* Fix image link in power.md
2021-11-01 09:13:18 -04:00
jeremystretch
339776c139 Initial work on SSO support (WIP) 2021-10-29 17:06:14 -04:00
Daniel Sheppard
87e07e731d #6732 - Removed ASN field hiding 2021-10-29 14:56:58 -05:00
Daniel Sheppard
3991115ae5 #6732 - Fix imports and other small items 2021-10-29 14:54:55 -05:00
Daniel Sheppard
a30e7bf34f #6732 - Add ASN field back to bulk edit 2021-10-29 14:28:13 -05:00
Daniel Sheppard
43b983054a #6732 - Corrected model field definitions 2021-10-29 14:26:19 -05:00
Daniel Sheppard
d3364ef4d1 #6732 - Restore resolve_field to the filterset 2021-10-29 14:15:37 -05:00
Rhys Barrie
24d6941cc4 netbox-community/netbox#7668: Add 'View Elevations' button to location detail page 2021-10-29 14:07:02 -04:00
jeremystretch
4099dd3a05 Closes #6615: Add filter lookups for custom fields 2021-10-29 11:23:56 -04:00
Jeremy Stretch
f420435b82 Merge pull request #7678 from netbox-community/6615-custom-field-filters
Closes #6615: Enable filter lookups for custom fields
2021-10-29 11:21:45 -04:00
jeremystretch
696fe7bc0d Add tests for custom field lookups 2021-10-29 09:45:48 -04:00
Daniel Sheppard
7c147db324 #6732 - Fix test exception in Site form 2021-10-28 16:08:32 -05:00
jeremystretch
32205045ba Use multi-value filters for custom fields 2021-10-28 16:40:51 -04:00
jeremystretch
1ce9192369 Move MACAddressField to utilities 2021-10-28 16:26:31 -04:00
Daniel Sheppard
0a62f75a40 #6529 - Add CLI to run scripts 2021-10-28 15:14:42 -05:00
jeremystretch
2e0f15b35f Automatically add additional lookup filters for custom fields 2021-10-28 16:09:36 -04:00
jeremystretch
7c60089692 Ditch CustomFieldFilter 2021-10-28 15:36:12 -04:00
Daniel Sheppard
0a8788eb97 #6732 - Fix Site form and ASN form 2021-10-28 13:57:36 -05:00
Daniel Sheppard
9565addcd4 #6732 - Fix test failure when sending data 2021-10-28 13:12:55 -05:00
jeremystretch
6377d475fc Refactor generation of additional lookup filters 2021-10-28 14:00:07 -04:00
Daniel Sheppard
fff124ebb1 #6732 - Update migration file 2021-10-28 12:06:41 -05:00
Daniel Sheppard
033db83068 Merge branch 'feature' of https://github.com/netbox-community/netbox into 6732-asn-model 2021-10-28 11:55:20 -05:00
Daniel Sheppard
de5c9ef4b2 #6732 - Add graphql support for new ASN model and fix ASN overflow on longs 2021-10-28 11:49:59 -05:00
Daniel Sheppard
3c261b05d9 #6732 - Fix ASN tests 2021-10-28 11:49:21 -05:00
Daniel Sheppard
ada81e31c9 #6732 - Fix CSV import form 2021-10-28 11:48:50 -05:00
Daniel Sheppard
0f68ecda78 #6732 - Fix hiding of ASN field in Site creation form 2021-10-28 11:47:54 -05:00
Daniel Sheppard
1902e112f6 #6732 - Fix tests for utilities 2021-10-28 11:46:55 -05:00
Daniel Sheppard
96565c31d9 #6732 - ASN should be unique 2021-10-28 10:04:12 -05:00
jeremystretch
aa9e68e121 Tweak preformatted block styling 2021-10-28 10:46:00 -04:00
jeremystretch
15e011ae52 Closes #7452: Add JSON custom field type 2021-10-28 10:29:14 -04:00
jeremystretch
a173083e5b Closes #7606: Model transmit power for interfaces 2021-10-28 09:31:45 -04:00
jeremystretch
33c0c8cf6a Extend dynamic config tests 2021-10-28 09:06:07 -04:00
Daniel Sheppard
9b5f45aee1 #6732 - Serializers 2021-10-27 23:07:04 -05:00
Daniel Sheppard
93de6c9f88 #6732 - Tests 2021-10-27 23:06:37 -05:00
Daniel Sheppard
0ad440fea5 #6732 - GraphQL support 2021-10-27 23:06:09 -05:00
Daniel Sheppard
8235b339ee #6732 - Revert some changes to legacy ASN field on site model
* Re-instates ASN field on Site model
* Re-instates ASN field on Site view
* Re-instates ASN field on edit form and API, except for where forms instances are new (add site) or instance does not have any existing AS data
* Does not re-instate asn field on SiteBulkEditForm
* Does not re-instate ASN field on SiteTable
* Does not re-instate filter for filterset, but does allow filtering by query (q=34342)
* Does not include tests for ASN field on Site model due to planned deprecation
2021-10-27 22:25:31 -05:00
Daniel Sheppard
3185cd0b1f #6732 - Correct incorrect field definition in field order 2021-10-27 21:31:59 -05:00
Jeremy Stretch
3a85edba3d Merge pull request #7648 from netbox-community/5883-dyanmic-config
Closes #5883: Enable dynamic configuration of some settings
2021-10-27 16:48:59 -04:00
jeremystretch
a573a35349 Use a key prefix for cache values when running tests 2021-10-27 16:33:59 -04:00
jeremystretch
d67d3f8d6d Add initial tests for dynamic config 2021-10-27 15:58:54 -04:00
jeremystretch
1e317f82f5 Move config parameter value population to ConfigRevisionForm init 2021-10-27 15:55:51 -04:00
jeremystretch
acdebea7f1 Improve visibility of modified values 2021-10-27 15:44:42 -04:00
thatmattlove
a090955918 Fixes #7599: Improve color mode handling 2021-10-27 11:34:21 -07:00
jeremystretch
70f71e0f57 Extend admin UI to allow restoring previous config revisions 2021-10-27 14:05:49 -04:00
jeremystretch
dfdeac4968 Fixes #7647: Require interface assignment when designating IP address as primary for device/VM during CSV import 2021-10-27 10:20:17 -04:00
jeremystretch
e84f2e3ad2 Fixes #7601: Correct devices count for locations within global search results 2021-10-27 10:10:14 -04:00
jeremystretch
98ca4f5b5a Fixes #7643: Fix circuit assignment when creating multiple terminations simultaneously 2021-10-27 10:02:36 -04:00
jeremystretch
87779b7b88 Fixes #7644: Prevent inadvertent deletion of prior change records when deleting objects (#7333 revisited) 2021-10-27 09:44:15 -04:00
jeremystretch
b56cae24c5 Fixes #7628: Fix load_yaml method for custom scripts 2021-10-27 09:04:18 -04:00
jeremystretch
d48a68317d Fixes #7612: Strip HTML from custom field descriptions 2021-10-27 08:41:28 -04:00
jeremystretch
77bd26d17f Work around unapplied migrations when bootstrapping config 2021-10-26 17:28:39 -04:00
jeremystretch
4cdc2601f5 Add descriptions to all config parameters 2021-10-26 16:54:12 -04:00
jeremystretch
ff5c274048 Ensure bootstrapping of config on start 2021-10-26 16:45:53 -04:00
jeremystretch
561e06e7f0 Indicate when dynamic parameters are defined statically 2021-10-26 15:50:33 -04:00
jeremystretch
626a446c3d Docs & changelog for #5883 2021-10-26 15:40:34 -04:00
jeremystretch
26d2da7b98 Initialize Config with empty dict 2021-10-26 14:18:18 -04:00
jeremystretch
66ed39b4b7 Clean up boolean fields 2021-10-26 14:08:03 -04:00
jeremystretch
fbf91dda7d Optimize config queries 2021-10-26 13:41:56 -04:00
jeremystretch
41ff1d0fc9 Add NAPALM config parameters 2021-10-26 11:53:46 -04:00
jeremystretch
64d8512fc3 Add PAGINATE_COUNT, MAX_PAGE_SIZE 2021-10-26 11:43:06 -04:00
jeremystretch
94804fecd8 Add MAINTENANCE_MODE, MAPS_URL 2021-10-26 10:57:33 -04:00
jeremystretch
559dc2f865 Add ALLOWED_URL_SCHEMES 2021-10-26 10:24:33 -04:00
jeremystretch
7c0f32e8ee Introduce ConfigItem; add rack elevation parameters 2021-10-26 10:04:56 -04:00
jeremystretch
82243732a1 Initial work on #5883 2021-10-25 16:10:50 -04:00
jeremystretch
61d2158f76 #6346: Add 'bridge' interface type 2021-10-25 11:11:58 -04:00
jeremystretch
68081fb9a2 Cleanup & API changelog for #3979 2021-10-25 11:07:15 -04:00
Jeremy Stretch
8276933dbb Merge pull request #7630 from netbox-community/6238-conditional-webhooks
Closes #6238: Implement conditional webhooks
2021-10-25 10:42:17 -04:00
jeremystretch
0d84338e28 Add regex condition op 2021-10-25 10:14:18 -04:00
jeremystretch
2423e0872f Documentation & changelog for #6238 2021-10-25 09:52:08 -04:00
jeremystretch
35c967e6f7 Implement condition negation 2021-10-25 09:09:51 -04:00
jeremystretch
b92de63245 Improve validation 2021-10-25 09:01:05 -04:00
Daniel Sheppard
8b529abfe1 Initial work on #6732 2021-10-24 23:47:31 -05:00
Daniel Sheppard
a01068949c Initial work on #6732 2021-10-24 23:42:47 -05:00
Miguel Teixeira
b07e88869a Fix interfaces row colors on device interfaces table 2021-10-24 03:31:29 +01:00
Miguel Teixeira
94bd27bcf5 Fix interface icons on the device interfaces table 2021-10-24 03:24:54 +01:00
jeremystretch
78ecc8673c Add conditions for webhooks 2021-10-22 17:15:08 -04:00
jeremystretch
7e26d92190 Introduce conditions & condition sets 2021-10-22 16:27:08 -04:00
Jeremy Stretch
dbe2f8a6f1 Merge pull request #7622 from netbox-community/6346-interface-bridge
Closes #6346: Bridge group support
2021-10-22 09:37:28 -04:00
jeremystretch
e96f5447f4 Changelog for #6346 2021-10-21 17:03:21 -04:00
jeremystretch
5193fa6483 Add tests for #6346 2021-10-21 16:57:01 -04:00
jeremystretch
e1e2c76ae1 Add bridge field to Interface, VMInterface models 2021-10-21 16:30:18 -04:00
jeremystretch
a3e7cab935 Split tenancy models into separate modules 2021-10-21 15:33:58 -04:00
jeremystretch
c06b3374ce #6497: Add missing tag fields to filter forms 2021-10-21 15:29:52 -04:00
jeremystretch
6f66138a18 Changelog for #3979 2021-10-21 15:15:01 -04:00
Jeremy Stretch
334c97035e Merge pull request #7611 from netbox-community/3979-wireless
Closes #3979: Wireless network modeling
2021-10-21 15:09:08 -04:00
jeremystretch
1c6a84659c #3979 cleanup 2021-10-21 14:20:47 -04:00
jeremystretch
3a3ed8bf64 Merge branch 'feature' into 3979-wireless 2021-10-21 13:19:52 -04:00
Jeremy Stretch
001ab1d067 Merge pull request #7610 from netbox-community/6497-organizational-model-tags
Closes #6297: Extend tag support to organizational models
2021-10-21 11:49:18 -04:00
jeremystretch
4932e4f8c6 Changelog for #6497 2021-10-21 11:28:25 -04:00
jeremystretch
6f05f17c62 Standardize & simplify tags panel inclusion 2021-10-21 11:23:31 -04:00
jeremystretch
cfb3897047 Add tags to organizational & nested group models 2021-10-21 10:51:02 -04:00
jeremystretch
8c058dcd45 Closes #7530: Move device type component lists to separate views 2021-10-20 15:04:40 -04:00
jeremystretch
7b70129974 Refactor device component views 2021-10-20 14:24:02 -04:00
jeremystretch
6a4becfb46 Add tests for wireless 2021-10-20 13:34:39 -04:00
jeremystretch
4a7159389e Add wireless documentation 2021-10-20 11:22:56 -04:00
jeremystretch
a66501250e Add wireless authentication attributes 2021-10-20 10:58:15 -04:00
jeremystretch
efb41b7433 Merge branch 'develop' into feature 2021-10-20 10:10:10 -04:00
jeremystretch
090df05193 PRVB 2021-10-20 09:59:33 -04:00
Jeremy Stretch
2c161c01c1 Merge pull request #7590 from netbox-community/develop
Release v3.0.8
2021-10-20 09:49:15 -04:00
jeremystretch
fc5a23cc88 Release v3.0.8 2021-10-20 09:31:12 -04:00
jeremystretch
73f2f9fc63 Closes #7551: Add UI field to filter interfaces by kind 2021-10-19 15:57:02 -04:00
jeremystretch
eb4b4a6c8d Closes #7561: Add a utilization column to the IP ranges table 2021-10-19 15:51:39 -04:00
jeremystretch
39430e01de Fixes #7550: Fix rendering of UTF8-encoded data in change records 2021-10-19 15:41:19 -04:00
jeremystretch
96015aa590 Fixes #7582: Fix rendering of CustomLink context data table 2021-10-19 15:31:07 -04:00
jeremystretch
c1720505f3 Fixes #7584: Fix alignment of object identifier under object view 2021-10-19 15:22:22 -04:00
Jeremy Stretch
5c338a90a1 Merge pull request #7566 from PieterL75/patch-1
Fix #7556 : NewVersion showing url
2021-10-19 15:20:58 -04:00
jeremystretch
f04dc55030 Reorganize panel inclusion templates 2021-10-19 14:21:31 -04:00
jeremystretch
38bc5de3e8 Changelog for #1344 2021-10-19 14:08:27 -04:00
jeremystretch
7c56b21095 Closes #7354: Relax uniqueness constraints on region, site group, and location names 2021-10-19 13:46:35 -04:00
jeremystretch
8d0ed99bcd Clean up UniqueTogetherValidator workarounds 2021-10-19 13:32:43 -04:00
jeremystretch
8375995680 Closes #1943: Relax uniqueness constraint on cluster names 2021-10-19 13:06:41 -04:00
jeremystretch
0afd3e6189 Closes #6715: Add tenant assignment for cables 2021-10-19 12:33:17 -04:00
PieterL75
79cee12b1e Updated release notes with #7556 2021-10-19 16:23:05 +02:00
Jeremy Stretch
ba7361bdc7 Merge pull request #7575 from netbox-community/1344-contacts
Closes #1344: Contact objects
2021-10-19 08:46:13 -04:00
jeremystretch
554b44b9f2 Fix string repr for ContactAssignment 2021-10-18 16:47:49 -04:00
jeremystretch
b44a5ea609 Prevent duplicate contact assignments 2021-10-18 16:33:31 -04:00
jeremystretch
487d67768b Cleanup and documentation for #1344 2021-10-18 16:20:31 -04:00
jeremystretch
f485a47b48 Tweak uniqueness constraints 2021-10-18 15:41:29 -04:00
jeremystretch
faf1e6a43d Add contact/role assignment tables 2021-10-18 15:30:28 -04:00
jeremystretch
f193f0d3f9 Add contact assignments to models 2021-10-18 15:09:57 -04:00
jeremystretch
2e78568d4d Initial work on contacts 2021-10-18 13:59:05 -04:00
PieterL75
aa5c42683a Fix #7556 : NewVersion showing url 2021-10-18 16:12:23 +02:00
jeremystretch
0c72c20d2a Add WirelessLANs column to interfaces table 2021-10-18 10:05:43 -04:00
thatmattlove
9c6938e7ae Minor Style Improvement: Fix interface table dropdowns being hidden when opened 2021-10-15 17:45:47 -07:00
thatmattlove
811c21ec7e Minor Style Improvement: Add vertical spacing to Device Type component navigation & fix inconsistent component active color 2021-10-15 17:21:36 -07:00
thatmattlove
84c14aadc7 Fixes #7300: Fix incorrect Device LLDP interface row coloring & improve related JS 2021-10-15 17:07:54 -07:00
thatmattlove
f1f0d9cd0d Fixes #7495: Fix sidenav overlapping elements 2021-10-15 15:02:50 -07:00
jeremystretch
717fd760df #3979: UI cleanup 2021-10-15 12:24:07 -04:00
jeremystretch
075f4907ef Store channel frequency & width as independent values 2021-10-15 11:39:53 -04:00
jeremystretch
b7317bfe29 Remove choices from rf_channel_width 2021-10-15 10:06:49 -04:00
jeremystretch
01d3c062f2 Move wireless field choices to wireless app 2021-10-15 10:00:03 -04:00
jeremystretch
6af5a884cd Merge branch 'feature' into 3979-wireless 2021-10-14 16:32:24 -04:00
Jeremy Stretch
6015c47587 Merge pull request #7547 from netbox-community/3839-device-airflow
Closes #3839: Add airflow fields to Device and DeviceType
2021-10-14 16:29:43 -04:00
jeremystretch
33ea8763d5 3839: Add airflow field to Device 2021-10-14 16:15:08 -04:00
jeremystretch
2c2c2e9060 3839: Add airflow field to DeviceType 2021-10-14 15:45:36 -04:00
jeremystretch
64dad7dbd2 Optimize migrations 2021-10-14 15:11:03 -04:00
jeremystretch
176bd2396b Closes #6711: Add longtext custom field type with Markdown support 2021-10-14 14:48:00 -04:00
jeremystretch
e16942dea5 Fixes #7529: Restore horizontal scrolling for tables in narrow viewports 2021-10-14 13:44:54 -04:00
Jeremy Stretch
12efcec3b0 Merge pull request #7546 from miaow2/7545-webhook-events-status
Fixes #7545: Incorrect display of Events status on webhook page
2021-10-14 13:43:00 -04:00
miaow2
a7b6c40596 Fixing display of webhook types 2021-10-14 20:35:21 +03:00
jeremystretch
b95773938d Fixes #7534: Avoid exception when utilizing "create and add another" twice in succession 2021-10-14 12:24:29 -04:00
jeremystretch
6898ae7106 Fixes #7544: Fix multi-value filtering of custom field objects 2021-10-14 11:36:13 -04:00
jeremystretch
909b83c537 Include interface RF attributes on wireless link view 2021-10-14 10:06:46 -04:00
jeremystretch
fb9da87abb Add devices to WirelessLinkForm 2021-10-14 10:02:05 -04:00
jeremystretch
bdf359470e Include WirelessLAN attached interfaces 2021-10-14 09:48:12 -04:00
jeremystretch
4c475c1b33 Extend wireless channel choices 2021-10-13 20:56:14 -04:00
jeremystretch
438b4b4758 Add rf_role to Interface 2021-10-13 20:16:36 -04:00
jeremystretch
01f791a44e Add WirelessLANGroup model 2021-10-13 16:40:12 -04:00
jeremystretch
43f2d4a331 Add SVG trace support for WirelessLinks 2021-10-13 15:00:35 -04:00
jeremystretch
95ed07a95e Add status field to WirelessLink 2021-10-13 14:31:30 -04:00
jeremystretch
ec0560a2c5 Fix trace_paths command for wireless links 2021-10-13 14:16:10 -04:00
jeremystretch
ac2cd552b9 Rename cable_peer fields to link_peer 2021-10-13 14:04:53 -04:00
jeremystretch
1c73bd5079 Resolve test errors 2021-10-13 13:39:14 -04:00
jeremystretch
138af27bf7 Record wireless links as part of cable path 2021-10-13 13:28:14 -04:00
jeremystretch
445e16f668 Reference WirelessLink on both attached Interfaces 2021-10-13 11:54:52 -04:00
jeremystretch
90e9f34494 Add WirelessLink model 2021-10-13 09:46:17 -04:00
jeremystretch
5271680483 Rename SSID model to WirelessLAN 2021-10-12 17:06:31 -04:00
jeremystretch
38f6d22d2d Enable attachment of wireless interfaces to SSIDs 2021-10-12 13:48:06 -04:00
jeremystretch
8b80b0c3df Introduce the wireless app and SSID model 2021-10-12 12:48:36 -04:00
jeremystretch
8e1535f7ec Add RF channel fields to Interface 2021-10-12 10:46:41 -04:00
jeremystretch
3e7922e41e Merge branch 'develop' into feature 2021-10-11 14:43:20 -04:00
jeremystretch
1a4f8c5422 PRVB 2021-10-11 14:42:29 -04:00
Jeremy Stretch
66c4d23119 Merge pull request #7510 from netbox-community/develop
Release v3.0.7
2021-10-08 14:04:34 -04:00
jeremystretch
d66fc8f661 Release v3.0.7 2021-10-08 13:49:15 -04:00
jeremystretch
031876964f #2102: Implement q search filter for device type components 2021-10-08 13:42:43 -04:00
jeremystretch
5a6190e321 Closes #6874: Add tenant assignment for locations 2021-10-07 15:46:21 -04:00
jeremystretch
18c3bb673f Closes #1337: Add WWN field to interfaces 2021-10-07 15:09:42 -04:00
jeremystretch
6463fd902c Merge branch 'develop' into feature 2021-10-07 14:20:42 -04:00
jeremystretch
c63766c4c6 Fix test for #7051 2021-10-07 14:19:29 -04:00
jeremystretch
af6237e12e Fixes #7479: Fix parent interface choices when bulk editing VM interfaces 2021-10-07 13:57:00 -04:00
jeremystretch
00328226ec Fixes #7051: Fix permissions evaluation and improve error handling for connected device REST API endpoint 2021-10-07 13:15:59 -04:00
jeremystretch
b31ba4e9d2 Changelog & UI tweaks for #6879 2021-10-07 12:41:24 -04:00
Jeremy Stretch
4be5d3f9e9 Merge pull request #6960 from candlerb/candlerb/6879-v3
Display device names in front of device front/rear images
2021-10-07 12:35:17 -04:00
jeremystretch
53154746fc Changelog for #7485 2021-10-07 10:40:51 -04:00
Jeremy Stretch
2f4c1b6e8f Merge pull request #7475 from HumanEquivalentUnit/patch-1
Mention data in custom fields, link Jinja2 docs.
2021-10-07 10:38:01 -04:00
Jeremy Stretch
045ec7d3a0 Merge pull request #7486 from alexanderhofstaetter/patch-1
Added "USB Micro AB" combo type to choices
2021-10-07 10:35:40 -04:00
jeremystretch
b73db750e5 Fixes #7471: Correct redirect URL when attaching images via "add another" button 2021-10-07 09:58:42 -04:00
jeremystretch
3f766ffea8 Fixes #7474: Fix AttributeError exception when rendering a report or custom script 2021-10-07 09:37:21 -04:00
Alexander Hofstätter
f28761202f Added "USB Micro AB" combo type to choices 2021-10-07 14:31:54 +02:00
HumanEquivalentUnit
6d1f07df05 Mention data in custom fields, link Jinja2 docs.
Resolves #7367
2021-10-07 00:51:07 +01:00
Brian Candler
eb9f2b36ab Display device names in front of device front/rear images
Fixes #6879
2021-10-06 18:07:28 +00:00
jeremystretch
ca59cd1eb8 Merge branch 'develop' into feature 2021-10-06 14:04:53 -04:00
jeremystretch
2bd29127dc PRVB 2021-10-06 14:04:24 -04:00
Jeremy Stretch
3eef6363fd Merge pull request #7465 from netbox-community/develop
Release v3.0.6
2021-10-06 14:02:44 -04:00
jeremystretch
d451f30bfc Release v3.0.6 2021-10-06 13:45:02 -04:00
jeremystretch
105956f8e6 Closes #7464: Improve documentation for executing housekeeping task as a cron job 2021-10-06 13:24:13 -04:00
jeremystretch
39256afb67 Closes #7394: Enable filtering cables by termination type & ID in REST API 2021-10-06 12:06:32 -04:00
jeremystretch
69aaf28b9c Closes #6955: Include type, ID, and slug on object view 2021-10-06 11:23:06 -04:00
jeremystretch
b806220074 Closes #6850: Default to current user when creating journal entries via REST API 2021-10-06 10:56:50 -04:00
jeremystretch
d2bdf4e822 Closes #7462: Include count of assigned virtual machines under platform view 2021-10-06 10:12:44 -04:00
jeremystretch
3ab5682e7a Fixes #7460: Fix filtering connections by site ID 2021-10-06 10:08:56 -04:00
jeremystretch
c0010ec100 Fixes #7459: Pre-populate location data when adding a device to a rack 2021-10-06 10:00:31 -04:00
jeremystretch
6897c5fadd Fixes #7455: Fix site/provider network validation for circuit termination API serializer 2021-10-06 09:11:42 -04:00
jeremystretch
745aa23ed6 Fixes #7458: Correct tenants count label under tenant group view 2021-10-06 08:44:59 -04:00
jeremystretch
9089f5cf67 #7450: Clean up object edit forms 2021-10-05 15:37:49 -04:00
jeremystretch
dd79aae137 #7450: Misc UI cleanup 2021-10-05 15:21:49 -04:00
jeremystretch
26e470f521 #7449: Use lighter color for top-level nav menu items 2021-10-05 14:57:35 -04:00
jeremystretch
a34c8b80e5 #7449: Use original primary color 2021-10-05 14:52:10 -04:00
jeremystretch
854a12982f #7449: Lighten dropdown widget caret color 2021-10-05 14:36:33 -04:00
jeremystretch
cf173d4f50 #7449: Remove color from table header links 2021-10-05 14:16:19 -04:00
jeremystretch
7041486b93 #7449: Remove color from panel headers on home view 2021-10-05 14:03:14 -04:00
jeremystretch
548a8c3be3 #7449: Fix login banner color 2021-10-05 14:01:24 -04:00
jeremystretch
087a018faf Fix changelog for v3.0.5 2021-10-05 12:08:07 -04:00
jeremystretch
e09024e86f Fixes #7446: Fix exception when viewing a large number of child IPs within a prefix 2021-10-05 12:07:03 -04:00
jeremystretch
1757102536 Fixes #7442: Fix missing actions column on user-configured tables 2021-10-05 09:34:30 -04:00
jeremystretch
9c8432cf13 Merge branch 'develop' into feature 2021-10-04 14:19:16 -04:00
jeremystretch
c262af550d PRVB 2021-10-04 14:18:42 -04:00
Jeremy Stretch
d9c6609b24 Merge pull request #7437 from netbox-community/develop
Release v3.0.5
2021-10-04 14:15:53 -04:00
jeremystretch
339bcb89bb Release v3.0.5 2021-10-04 13:46:34 -04:00
jeremystretch
b5884a5b54 Fixes #7215: Prevent rack elevations from overlapping when higher width is specified 2021-10-04 13:41:16 -04:00
thatmattlove
c818d63043 Fixes #7427: Don't select hidden rows when selecting all in a table 2021-10-04 09:19:18 -07:00
jeremystretch
c9c537a1b9 Fixes #6817: Custom field columns should be removed from tables upon their deletion 2021-10-01 20:22:54 -04:00
jeremystretch
1be748b479 Fixes #6433: Fix bulk editing of child prefixes under aggregate view 2021-10-01 16:21:16 -04:00
jeremystretch
376c776520 Fixes #7425: Housekeeping command should honor zero verbosity 2021-10-01 15:29:22 -04:00
jeremystretch
a1f271d7d9 Fixes #7417: Prevent exception when filtering objects list by invalid tag 2021-10-01 14:07:26 -04:00
jeremystretch
724997cb48 Closes #5925: Always show IP addresses tab under prefix view 2021-10-01 13:39:29 -04:00
jeremystretch
f3fe3f9a18 Closes #6708: Add image attachment support for circuits, power panels 2021-10-01 12:50:51 -04:00
jeremystretch
357a5d1e65 Refactor image attachments panel template 2021-10-01 12:45:41 -04:00
jeremystretch
460e3fd5d6 Introduce a common URL for the creation of image attachments 2021-10-01 12:34:30 -04:00
jeremystretch
257c0afdb5 Closes #6423: Cache rendered REST API specifications 2021-10-01 12:02:04 -04:00
jeremystretch
ed3bc7cdcc Changelog for #7387 2021-10-01 09:30:17 -04:00
Jeremy Stretch
bd181ac84f Merge pull request #7400 from maximumG/7387-order-scripts
Fixes #7387 : possibility to order scripts
2021-10-01 09:20:08 -04:00
jeremystretch
d1f5988db7 Closes #7319: Remove migrations check from upgrade.sh to avoid misleading error messages 2021-10-01 08:57:17 -04:00
jeremystretch
a5b99e7148 Fixes #7412: Fix exception in UI when adding child device to device bay 2021-09-30 12:29:08 -04:00
jeremystretch
114500e7f4 Fixes #7401: Pin jsonschema package to v3.2.0 to fix REST API docs rendering 2021-09-30 11:41:32 -04:00
jeremystretch
d9f178e315 Fixes #7411: Fix exception in UI when adding member devices to virtual chassis 2021-09-30 11:36:16 -04:00
maximumG
7337630704 chore: introduce the script_order notion in the documentation 2021-09-30 09:21:38 +02:00
maximumG
0fdd081869 feat: scripts within a module can now be ordered 2021-09-30 09:17:33 +02:00
jeremystretch
a9761e8dd2 Fixes #7397: Fix AttributeError exception when rendering export template for devices via REST API 2021-09-29 21:09:12 -04:00
jeremystretch
1f1a05dc67 Fixes #6895: Remove errant markup for null values in CSV export 2021-09-29 21:00:45 -04:00
thatmattlove
14b065cf5f Fixes #7373: Improve handling of mismatched server, client, and browser color-mode preferences 2021-09-29 17:44:28 -07:00
jeremystretch
47c3a20fda Correct version number referenced for installation video 2021-09-29 12:40:20 -04:00
jeremystretch
86aed4e073 Closes #7318: Raise minimum required PostgreSQL version from 9.6 to 10 2021-09-29 12:14:15 -04:00
jeremystretch
19c984bdab PRVB 2021-09-29 09:46:39 -04:00
Jeremy Stretch
84d83fbd14 Merge pull request #7393 from netbox-community/develop
Release v3.0.4
2021-09-29 09:41:11 -04:00
jeremystretch
965ba3aca1 Release v3.0.4 2021-09-29 09:18:57 -04:00
jeremystretch
38f34ddb28 Fixes #7392: Fix "help" links for custom fields, other models 2021-09-29 09:09:10 -04:00
jeremystretch
6b3e0d3229 Drop pycryptodome as a Python dependency 2021-09-28 17:07:15 -04:00
jeremystretch
854121b6ec Closes #7314: Add SMA 905/906 fiber port types 2021-09-28 16:42:54 -04:00
jeremystretch
047425dadd Closes #7389: Linkify tenant group in tenants list 2021-09-28 16:28:11 -04:00
jeremystretch
8dc0767cdf Changelog for #7365 2021-09-28 16:22:28 -04:00
Jeremy Stretch
a99753fb0f Merge pull request #7366 from shuichiro-makigaki/optimize-prefix-util
Fix #7365: Optimize calculation of prefix utilization
2021-09-28 16:09:27 -04:00
jeremystretch
ad65e06d0a Closes #7252: Validate IP range size does not exceed max supported value 2021-09-28 15:44:41 -04:00
jeremystretch
bfb37d6283 Closes #7022: Add ITA type C (CEE 7/16) power port type 2021-09-28 13:46:54 -04:00
jeremystretch
fd180e480a Changelog & docs cleanup for #6973 2021-09-28 13:40:24 -04:00
Jeremy Stretch
3e5452d9da Merge pull request #7369 from maximumG/6973-order-reports
Fixes #6973:  order reports
2021-09-28 13:34:23 -04:00
jeremystretch
3ec0fe5519 Closes #7372: Link to local docs for model from object add/edit views 2021-09-28 13:23:57 -04:00
jeremystretch
71449b3414 Fixes #7304: Require explicit values for all required choice fields during CSV import 2021-09-28 12:04:54 -04:00
Jeremy Stretch
16f5e233d0 Merge pull request #7382 from netbox-community/refactor-forms
Refactor forms
2021-09-28 11:40:34 -04:00
Daniel Sheppard
abb72868f2 Update changelog for #7374 2021-09-28 09:50:23 -05:00
jeremystretch
13e9d57d68 Merge branch 'develop' into refactor-forms 2021-09-28 10:49:14 -04:00
jeremystretch
833acc3618 Refactor extras forms 2021-09-28 10:44:53 -04:00
jeremystretch
db522f96be Refactor virtualization forms 2021-09-28 10:25:07 -04:00
Daniel Sheppard
df8b76127e Fixes #7374 - Adds query param on position for rack face 2021-09-28 09:06:35 -05:00
jeremystretch
8e849566d5 Refactored IPAM forms 2021-09-28 09:25:12 -04:00
jeremystretch
dba9602c75 Refactor tenancy forms 2021-09-27 17:19:05 -04:00
jeremystretch
9e2364b246 Refactor DCIM forms 2021-09-27 17:09:37 -04:00
jeremystretch
b5aecfeb91 Refactor circuits forms 2021-09-27 15:23:12 -04:00
jeremystretch
c7523ffc67 Fixes #7358: Add missing choices column to custom field CSV import form 2021-09-27 12:28:52 -04:00
jeremystretch
d87d860a57 Remove obsolete TS for a.formaction 2021-09-27 11:41:05 -04:00
jeremystretch
68b1234388 Fixes #7353: Fix bulk creation of device/VM components via list view 2021-09-27 10:36:01 -04:00
jeremystretch
8fda08a1b5 Fixes #7356: Fix display of model documentation when adding device components 2021-09-27 10:09:32 -04:00
jeremystretch
aaba4b534f Fixes #7360: Correct redirection URL after removing child device from device bay 2021-09-27 09:58:03 -04:00
Jeremy Stretch
6d32aa8a88 Merge pull request #7320 from royreznik/feature-6917
Feature-6917 make ip assigned checkmark link to interface
2021-09-27 09:18:24 -04:00
maximumG
0214c388ae add: document how to order reports 2021-09-27 11:02:37 +02:00
maximumG
e443d719d4 feat: reports within a module can now be ordered 2021-09-27 11:02:31 +02:00
Shuichiro MAKIGAKI
d514290688 Fix #7365: Optimize calculation of prefix utilization 2021-09-25 22:28:31 +09:00
royreznik
694bd231e3 Update changelog with #6917 2021-09-23 06:33:26 -07:00
royreznik
8523ad166e Feature-6917 make ip assigned checkmark link to interface 2021-09-23 06:33:26 -07:00
Daniel Sheppard
7ec6b4ebb7 Fixes #7341 - Corrects url in Circuit breadcrumb 2021-09-22 11:48:22 -05:00
jeremystretch
38172b793b Fixes #7294: Fix SVG rendering for cable traces ending at unoccupied front ports 2021-09-21 15:04:37 -04:00
jeremystretch
6bccb6d90b Fixes #7333: Prevent inadvertent deletion of prior change records when deleting objects 2021-09-21 14:24:23 -04:00
jeremystretch
3cf1d6baf4 Closes #7118: Render URL custom fields as hyperlinks in object tables 2021-09-21 14:04:47 -04:00
jeremystretch
2a1718bfc8 Closes #7323: Add serial filter field for racks & devices 2021-09-21 13:53:11 -04:00
jeremystretch
0db4092266 Fixes #7321: Don't overwrite multi-select custom fields during bulk edit 2021-09-21 13:41:33 -04:00
jeremystretch
41dfdc0aaa Fixes #7324: Fix TypeError exception in web UI when filtering objects using single-choice filters 2021-09-21 09:13:26 -04:00
jeremystretch
6bc72109c1 PRVB 2021-09-20 13:19:53 -04:00
Jeremy Stretch
55e9685d30 Merge pull request #7317 from netbox-community/develop
Release v3.0.3
2021-09-20 13:08:32 -04:00
jeremystretch
d2dcc51430 Changelog cleanup 2021-09-20 12:55:04 -04:00
jeremystretch
214c1d5a50 Release v3.0.3 2021-09-20 12:44:44 -04:00
jeremystretch
38be0b4976 Changelog for #7228 2021-09-20 10:23:29 -04:00
Jeremy Stretch
b86847c57e Merge pull request #7307 from royreznik/fix-7228
Fixes #7228: Round °F temperature to one decimal place
2021-09-20 10:21:43 -04:00
jeremystretch
8ba5d03280 Fixes #7301: Fix exception when deleting a large number of child prefixes 2021-09-20 10:02:03 -04:00
jeremystretch
879ffd648b Fix 'select all' widget display 2021-09-20 09:02:28 -04:00
royreznik
030c573037 Fixes #7228: Round °F temperature to one decimal place 2021-09-20 02:44:40 -07:00
jeremystretch
713e79c1a9 Fixes #7298: Restore missing object names from applied object list filters 2021-09-17 16:55:32 -04:00
Jeremy Stretch
383cdb5340 Merge pull request #7297 from netbox-community/7295-tables-cleanup
Closes #7295: General cleanup of table classes
2021-09-17 15:56:26 -04:00
jeremystretch
7b3f6f1c67 Clean up table classes 2021-09-17 15:37:19 -04:00
jeremystretch
9cb29f48a0 Use exclude() when instantiating tables to omit columns 2021-09-17 14:25:02 -04:00
jeremystretch
5e29679968 Merge 'detail' tables into primaries for each model 2021-09-17 13:55:32 -04:00
jeremystretch
84f3ab90df Changelog for #7273 2021-09-17 12:11:08 -04:00
Jeremy Stretch
34db2eb611 Merge pull request #7285 from netbox-community/7273-apiselect-sorting
Fixes #7273: Disable automatic sorting of select options fetched via API
2021-09-17 12:09:56 -04:00
jeremystretch
16d8981a3f Closes #7284: Include comments field in table/export for all appropriate models 2021-09-17 12:04:22 -04:00
jeremystretch
e67c965180 Closes #7087: Add local_context_data filter for virtual machines list 2021-09-17 10:30:31 -04:00
jeremystretch
b0abfee35b Fixes #7282: Fix KeyError exception when INSECURE_SKIP_TLS_VERIFY is true 2021-09-17 10:16:06 -04:00
jeremystretch
1e8ee5e59b Correct changelog for #7210; revert static asset change 2021-09-16 16:14:20 -04:00
jeremystretch
cc0830bf28 Closes #7087: Add search/filter forms for all organizational models 2021-09-16 16:04:46 -04:00
jeremystretch
e3e005e327 Fixes #7266: Tweak font color for form field placeholder text 2021-09-16 14:41:01 -04:00
jeremystretch
42afd80e82 Changelog for #5775 2021-09-16 14:28:17 -04:00
jeremystretch
0b2862be54 Changelog for #5775 2021-09-16 14:03:28 -04:00
Jeremy Stretch
8d703ffb36 Merge pull request #6730 from MaxRink/remote_groups
Remote groups via HTTP Headers
2021-09-16 14:02:22 -04:00
jeremystretch
6f24a938d9 Fixes #7273: Disable automatic sorting of select options fetched via API 2021-09-16 11:08:05 -04:00
jeremystretch
574b57eadb Treat compiled JS/CSS as binary when diffing 2021-09-16 11:03:55 -04:00
jeremystretch
aa05097fca Fixes #7279: Fix exception when tracing cable with no associated path 2021-09-16 08:56:26 -04:00
jeremystretch
de58f53f9f Closes #7208: Add navigation breadcrumbs for custom scripts & reports 2021-09-15 15:14:24 -04:00
jeremystretch
e738ff2fa7 Closes #6988: Order tenants alphabetically without regard to group assignment 2021-09-15 14:56:20 -04:00
jeremystretch
25f501fb12 Remove obsolete responsive_table.html template 2021-09-15 12:41:21 -04:00
jeremystretch
baf045aed6 Clean up documentation build warnings 2021-09-15 11:46:58 -04:00
jeremystretch
e813dda275 Remove default_app_config (deprecated in Django 3.2) 2021-09-15 11:18:47 -04:00
Jeremy Stretch
ca131f12db Merge pull request #7272 from cimnine/Fix7271
Remove secrets from the feature list
2021-09-15 07:56:28 -04:00
cimnine
ca72b07947 Remove secrets from the feature list 2021-09-15 11:00:51 +02:00
jeremystretch
13d8957cf1 Changelog for #7032 2021-09-14 17:05:07 -04:00
Jeremy Stretch
ca11b74c8e Merge pull request #7052 from tb-killa/#7032
Close #7032
2021-09-14 16:59:16 -04:00
jeremystretch
2ba6a6fc45 Closes #6387: Add xDSL interface type 2021-09-14 16:56:47 -04:00
jeremystretch
a6e79a1d61 Add virtualenv instructions to plugin development docs 2021-09-13 10:58:03 -04:00
jeremystretch
1f4263aa6d Fixes #7253: Remove obsolete reference to queryset cache invalidation 2021-09-13 09:36:01 -04:00
jeremystretch
147a4cbfb0 Closes #7239: Redirect global search to filtered object list when an object type is selected 2021-09-13 09:33:08 -04:00
jeremystretch
ab0a2abc54 Fixes #7248: Fix global search results section links 2021-09-13 09:21:57 -04:00
Jeremy Stretch
57abbf1058 Merge pull request #7245 from dvaccarosenna/issue/7195
Fixes #7195 update base template in plugin dev doc
2021-09-10 11:34:49 -04:00
Daniel Vaccaro-Senna
2a95e1bf71 Fixes #7195 update base template in plugin dev doc 2021-09-10 16:03:46 +01:00
jeremystretch
bd957612c6 Fixes #7167: Ensure consistent font size when using monospace formatting 2021-09-09 16:05:46 -04:00
jeremystretch
908e6a7a38 Update NetBox installation video 2021-09-09 14:46:31 -04:00
jeremystretch
4493c31216 Fixes #7227: Correct placeholder value for webhook CA file path 2021-09-09 09:10:02 -04:00
jeremystretch
7a813349f3 Correct example GraphQL queries 2021-09-09 09:07:28 -04:00
jeremystretch
ad7b8a9ac8 Fixes #7226: Exempt GraphQL API requests from CSRF inspection 2021-09-09 09:06:45 -04:00
jeremystretch
a226f06b1b PRVB 2021-09-08 16:47:04 -04:00
Jeremy Stretch
b55c85b2af Merge pull request #7220 from netbox-community/develop
Release v3.0.2
2021-09-08 16:45:05 -04:00
jeremystretch
0d1d14bcd6 Release v3.0.2 2021-09-08 16:32:37 -04:00
Jeremy Stretch
8c1a01d5ab Merge pull request #7218 from netbox-community/7162-base-path-bug2
Fixes #7162: Decouple base path rendering from API request logic
2021-09-08 16:19:49 -04:00
jeremystretch
cf8fdacfa3 Refactor connection toggle to use API URLs 2021-09-08 14:25:14 -04:00
jeremystretch
2c1745ce28 Refactor checkJobStatus() to use API URLs provided via context 2021-09-08 14:17:27 -04:00
jeremystretch
950ce94653 Refactor ApiRequest to take only full URLs; update TableConfigForm 2021-09-08 13:59:25 -04:00
thatmattlove
851f8a1585 Fixes #7191: Access SlimSelect's internal options when getting current options so selection state is maintained 2021-09-08 09:54:38 -07:00
jeremystretch
d40d1638af Fixes #7179: Prevent obscuring "connect" pop-up for interfaces under device view 2021-09-08 11:27:14 -04:00
Jeremy Stretch
26ceeb61ef Merge pull request #7206 from netbox-community/7205-applied-filters
Handle `null_option` in `applied_filters` template tag
2021-09-08 11:22:54 -04:00
Jeremy Stretch
a39a9c9b56 Merge branch 'develop' into 7205-applied-filters 2021-09-08 11:12:29 -04:00
jeremystretch
45988b9818 Minor cleanup for get_selected_values() 2021-09-08 11:11:52 -04:00
Jeremy Stretch
7234b3bbf8 Merge pull request #7204 from netbox-community/7202-verify-static-assets
Verify integrity of bundled assets in CI
2021-09-08 10:23:51 -04:00
Jeremy Stretch
513ecd7e26 Merge branch 'develop' into 7202-verify-static-assets 2021-09-08 10:13:07 -04:00
jeremystretch
e12314ba60 Fix test user permissions for API pagination tests 2021-09-08 09:57:53 -04:00
jeremystretch
9226302742 Fixes #7209: Allow unlimited API results when MAX_PAGE_SIZE is disabled 2021-09-08 09:38:23 -04:00
jeremystretch
0e8c6ee522 Changelog for #7189 2021-09-08 08:33:30 -04:00
thatmattlove
a9c1c8968e Return cleaned null_option value as None in dynamic multi-select field 2021-09-07 18:43:36 -07:00
thatmattlove
6a15c2ae86 Remove invalid (for Python <3.9) type annotation 2021-09-07 18:37:55 -07:00
thatmattlove
752de0d9c0 Fixes #7205: Handle null_option when getting selected form values in applied_filters template tag 2021-09-07 18:30:45 -07:00
thatmattlove
49617a595d #7205: Handle null_option in dynamic multi-select choices field 2021-09-07 18:28:49 -07:00
thatmattlove
2a293d5d02 Fixes #7188: Re-add missing support for null_option on API select 2021-09-07 18:19:32 -07:00
thatmattlove
9d99ede024 Fixes #7202: Verify integrity of bundled assets in CI 2021-09-07 16:20:36 -07:00
thatmattlove
4a13ee6f40 Fixes #7176: Reset query parameters on APISelect when deep copied 2021-09-07 14:13:53 -07:00
Jeremy Stretch
2ba840c72c Merge pull request #7200 from pierrechev/develop
Enable the alternate connection factory for Redis Sentinel
2021-09-07 16:58:11 -04:00
jeremystretch
46cd55151d Use shallow git clone for production installations 2021-09-07 16:35:48 -04:00
jeremystretch
4d9691c8e5 Extend feature request template to request more detail 2021-09-07 16:25:10 -04:00
jeremystretch
f1687ef53d Remove obsolete entries from .gitignore 2021-09-07 16:21:01 -04:00
Daniel Sheppard
2fb55374b9 Fixes #7193 - Fixes issue with viewing child prefixes when prefix (flat) column is selected and there are available prefixes. 2021-09-07 14:53:12 -05:00
Pierre Chevallereau
312246fec2 Enable the alternate connection factory (https://github.com/jazzband/django-redis#use-the-sentinel-connection-factory) 2021-09-07 16:07:25 +02:00
jeremystretch
27c0e6dd5e Fixes #7164: Fix styling of "decommissioned" label for circuits 2021-09-03 13:52:48 -04:00
jeremystretch
0d7986e082 Fixes #7169: Fix CSV import file upload 2021-09-03 13:46:38 -04:00
Jeremy Stretch
94300b221e Merge pull request #7160 from netbox-community/7149-secrets-changelog
Fixes #7149: Delete all changelog records referencing the old secrets app
2021-09-03 12:51:13 -04:00
jeremystretch
a1110b07de Fixes #7153: Allow clearing of assigned device type images 2021-09-02 16:48:54 -04:00
jeremystretch
a3069239e9 Fixes #7159: Remove NAPALM link 2021-09-02 15:55:41 -04:00
jeremystretch
69f083428d Fixes #7149: Delete all changelog records referencing the old secrets app 2021-09-02 15:27:05 -04:00
thatmattlove
113358f2de Fixes #7148: Handle array values when constructing API URLs 2021-09-02 08:59:26 -07:00
thatmattlove
caa2813d0d Fix regression from ddff193 causing invalid selections 2021-09-02 07:56:08 -07:00
Jeremy Stretch
481046c8b8 Merge pull request #7133 from slowy07/minor-changes
fix: typo spelling grammar
2021-09-02 09:48:58 -04:00
slowy07
83f70dc28c fix: typo spelling grammar
Signed-off-by: slowy07 <slowy.arfy@gmail.com>
2021-09-02 12:01:43 +07:00
thatmattlove
8ede7a9297 Update changelog for #7131 2021-09-01 17:05:50 -07:00
thatmattlove
ddff193786 #7123: Handle empty_option on API Select 2021-09-01 17:02:43 -07:00
thatmattlove
774dff07ee Fixes #7131: Only execute scope selector field visibility logic on specified views 2021-09-01 15:27:37 -07:00
thatmattlove
4b14b31853 Use url_name instead of request.path for view-based styles 2021-09-01 15:22:38 -07:00
jeremystretch
b0addfbe13 PRVB 2021-09-01 15:22:03 -04:00
Jeremy Stretch
593874b45f Merge pull request #7130 from netbox-community/develop
Release v3.0.1
2021-09-01 15:10:17 -04:00
jeremystretch
b207f28402 Release v3.0.1 2021-09-01 14:53:57 -04:00
thatmattlove
7bdde47473 Fixes #7124: Fix duplicate static query param values in API Select 2021-09-01 11:48:13 -07:00
thatmattlove
a2eb0d80d2 #7084: Fix issue where hidden VLAN form fields were incorrectly included in the form submission 2021-09-01 11:41:35 -07:00
jeremystretch
6f94198934 #7123: Remove "Global" placeholder for null VRF field 2021-09-01 13:52:32 -04:00
jeremystretch
707e51d855 #7084: Catch ValueErrors when initializing dynamic form fields 2021-09-01 13:33:41 -04:00
jeremystretch
528df76747 #7082: Handle stale content types 2021-09-01 12:55:25 -04:00
jeremystretch
662c896480 #7113: Add bulk actions under child prefixes view; general cleanup 2021-09-01 11:06:50 -04:00
Jeremy Stretch
29eb2383d6 Merge pull request #7115 from sdktr/7113-fix-prefix-iprange-bulkedit
Fixes #7113: iprange bulk options within Prefix view
2021-09-01 10:56:11 -04:00
Jeremy Stretch
9772c5705f Merge branch 'develop' into 7113-fix-prefix-iprange-bulkedit 2021-09-01 10:55:52 -04:00
jeremystretch
d2fe59ae8f Fixes #7109: Ensure human readability of exceptions raised during REST API requests 2021-09-01 10:43:12 -04:00
Max Rink
d5e5cdda23 Add Remote Group Support to the RemoteUserAuth Backend and Middleware
fix incorrect assumption about when to run the group sync

Add documentation for new Settings

format to autopep8 compliance

add first set of basic testcases

format test to comply with pep8

rename SEPERATOR to SEPARATOR

remove accidentally carried over parameter
2021-09-01 16:34:14 +02:00
jeremystretch
f63dcb1f08 #7091: Simplify access to BASE_PATH variable 2021-09-01 09:34:33 -04:00
Stefan de Kooter
6f66b27507 Changelog for #7113 2021-09-01 11:00:30 +02:00
Stefan de Kooter
909d127c27 Fixes #7113: Correct links to IPRanges bulk actions within Prefix view 2021-09-01 10:25:37 +02:00
Stefan de Kooter
20ef18f98f Fixes #7113: Add permissions to IPRanges bulk actions within Prefix view 2021-09-01 10:24:35 +02:00
thatmattlove
a33e47780b Remove legacy script tags from templates 2021-09-01 00:27:10 -07:00
thatmattlove
691c66d2f5 Fixes #7107: Fix missing search button and search results in IP Address assignment "Assign IP" tab 2021-09-01 00:11:48 -07:00
thatmattlove
14d87a3584 Fixes #7041: Properly format JSON config object returned from a NAPALM device 2021-09-01 00:03:53 -07:00
thatmattlove
d743dc160a Fixes #7080: Re-add missing image preview element 2021-08-31 17:05:02 -07:00
thatmattlove
2b263b054c Fixes #7106: Fix incorrect "Map It" button URL on a site's Physical Address field 2021-08-31 16:27:02 -07:00
thatmattlove
b95e8350d2 Fixes #7092: Fix missing object permissions on Prefix IP Addresses view 2021-08-31 16:03:22 -07:00
thatmattlove
5235866d05 Changelog for #7081, #7091 2021-08-31 15:23:12 -07:00
thatmattlove
093a86bc38 Fixes #7081: Properly handle pre-selected values even when they're outside of pagination limits 2021-08-31 15:13:53 -07:00
thatmattlove
5b87232f59 #7081: Fix APISelect loading of paginated data 2021-08-31 15:13:53 -07:00
thatmattlove
679bbd3e76 Fixes #7091: Ensure API requests from the UI are aware of BASE_PATH 2021-08-31 15:13:53 -07:00
Jeremy Stretch
515b6bf71a Merge pull request #7105 from sdktr/7090-fix-cablebulkedit-length-field
Fix #7090: cable bulk edit form - allow decimal input on length field
2021-08-31 16:12:04 -04:00
Stefan de Kooter
9c389d9dcb Changelog #7090 fix whitespace 2021-08-31 22:01:15 +02:00
Stefan de Kooter
f1e4273a23 Changelog for #7090 2021-08-31 21:24:07 +02:00
Stefan de Kooter
4618cc2b22 Merge branch 'develop' of github.com:netbox-community/netbox into 7090-fix-cablebulkedit-length-field 2021-08-31 21:18:35 +02:00
Stefan de Kooter
1909f0c733 Fix #7090: Cable Bulk Edit, length field should be decimal 2021-08-31 21:17:50 +02:00
Jeremy Stretch
840ea36f70 Merge pull request #7103 from candlerb/candlerb/7102
Redirect users on error to the GitHub discussion forum
2021-08-31 15:08:08 -04:00
jeremystretch
a8cdb3895b Fixes #7093: Multi-select custom field filters should employ exact match 2021-08-31 15:03:39 -04:00
Brian Candler
349733c6dd Redirect users on error to the GitHub discussion forum
Fixes #7102
2021-08-31 19:51:53 +01:00
jeremystretch
1c09ffdd1f Fixes #7101: Enforce MAX_PAGE_SIZE for table and REST API pagination 2021-08-31 13:52:04 -04:00
Daniel Sheppard
c4c6fa6042 Fix misplacement of method for #7089 2021-08-31 11:41:50 -05:00
Daniel Sheppard
86da6c6c14 Fixes #7089 - Adds Q filter to ContentTypeFilterSet 2021-08-31 11:31:40 -05:00
jeremystretch
7b7b01a26b Changelog for #7075 2021-08-31 11:44:51 -04:00
jeremystretch
415313ac2f Fixes #7082: Avoid exception when referencing invalid content type in table 2021-08-31 11:43:44 -04:00
jeremystretch
7db2b9d091 Fixes #7072: Fix table configuration under prefix child object views 2021-08-31 11:15:41 -04:00
jeremystretch
8036d1e5a5 Fixes #7078: Restore styling on server error page 2021-08-31 09:50:24 -04:00
jeremystretch
65c9339687 Fixes #7083: Correct labeling for VM memory attribute 2021-08-31 09:44:59 -04:00
jeremystretch
3090981335 Fixes #7084: Fix KeyError exception when editing access VLAN on an interface 2021-08-31 09:44:59 -04:00
jeremystretch
4f36885c5e Fixes #7096: Home links should honor BASE_PATH configuration 2021-08-31 09:44:59 -04:00
thatmattlove
db2993035d Fixes #7075: Wrap label selectors in quotes to ensure IDs with spaces are properly selected 2021-08-30 17:48:33 -07:00
jeremystretch
bf05bc2986 #7070: Fix filterset test 2021-08-30 17:22:48 -04:00
jeremystretch
88b230f0e4 Fixes #7071: Fix exception when removing a primary IP from a device/VM 2021-08-30 16:55:31 -04:00
jeremystretch
deb53d771d Fixes #7070: Fix exception when filtering by prefix max length in UI 2021-08-30 16:51:07 -04:00
Jeremy Stretch
fd16c47d2e Merge pull request #7069 from netbox-community/develop
Release v3.0.0
2021-08-30 14:43:47 -04:00
jeremystretch
b78451742f Release v3.0.0 2021-08-30 14:22:00 -04:00
jeremystretch
6f23ab5603 Better copy/paste support for installation docs 2021-08-30 14:15:21 -04:00
thatmattlove
5e67627e6b Fix file input font-size 2021-08-30 11:09:44 -07:00
thatmattlove
19e77ed456 Pin Bootstrap 5 to 5.0.2 2021-08-30 11:02:47 -07:00
thatmattlove
ed0f792f04 Fixes #7068: Disable sourcemaps on CSS files, use external sourcemaps 2021-08-30 10:56:02 -07:00
thatmattlove
deda1691e9 Fixes #7066: Migrate division statements in Sass from / to math.div 2021-08-30 09:54:58 -07:00
thatmattlove
94d2ad120c Fixes #7066: Resolve dependency issue between TypeScript/ESLint 2021-08-30 09:54:06 -07:00
jeremystretch
ab1a5f32ef Update references to NAPALM in docs 2021-08-30 11:51:18 -04:00
jeremystretch
2a1de5e28c Delete extraneous v2.11 release notes 2021-08-30 11:35:06 -04:00
thatmattlove
f78fdd6900 Fixes #7063: Update security dependencies, move esbuild to devDependencies, update clipboard 2021-08-30 08:14:24 -07:00
jeremystretch
6b43eafcb4 Update UI screenshots 2021-08-30 10:52:11 -04:00
jeremystretch
844cd154b9 Update dependencies & release notes 2021-08-30 10:30:48 -04:00
Jeremy Stretch
e05fa5c302 Merge pull request #7061 from netbox-community/feature
v3.0 release prep
2021-08-30 10:16:56 -04:00
jeremystretch
f5f74944dd Merge branch 'develop' into feature 2021-08-30 10:05:12 -04:00
jeremystretch
556efcc1d7 Fixes #7045: Fix navigation menu rendering under Chrome 2021-08-30 09:56:05 -04:00
Matt Love
25d1fe2c8d Improve APISelect query parameter handling (#7040)
* Fixes #7035: Refactor APISelect query_param logic

* Add filter_fields to extras.ObjectVar & fix default value handling

* Update ObjectVar docs to reflect new filter_fields attribute

* Revert changes from 89b7f3f

* Maintain current `query_params` API for form fields, transform data structure in widget

* Revert changes from d0208d4
2021-08-30 09:43:32 -04:00
Oliver
b44ec35ade Close #7032
Add URM connector to the list of available types for front and rear ports.

There are URM-P2, URM-P4 and URM-P8 connectors available.
2021-08-27 20:27:26 +02:00
Jeremy Stretch
1a478150d6 Merge pull request #7050 from netbox-community/7034-vlangroup-scope-selectors
Fixes #7034: Update VLAN Scope parent selectors and run change handler on load
2021-08-27 11:42:23 -04:00
jeremystretch
e5643fb1e2 JS & changelog updates for #7034 2021-08-27 11:36:29 -04:00
jeremystretch
13e633778a Closes #7042: Show count of journal entries in tab under object view 2021-08-27 10:36:06 -04:00
jeremystretch
bb57600f0f Fixes #7019: Enable searching VM interfaces by description 2021-08-27 10:14:12 -04:00
jeremystretch
9813f3b696 Clean up custom script templates 2021-08-26 15:04:24 -04:00
jeremystretch
3203db07b7 UI cleanup 2021-08-26 14:48:24 -04:00
jeremystretch
94b8d36065 Introduce ContentTypesColumn for custom field and webhook tables 2021-08-26 12:55:37 -04:00
thatmattlove
0d61dcb1bc Fixes #7034: Update VLAN Scope parent selectors and run change handler on load 2021-08-26 00:11:58 -07:00
jeremystretch
58203dbcfa List device/VM component names first in tables by default 2021-08-25 15:18:00 -04:00
jeremystretch
66619cdc2f Clean up object edit forms 2021-08-25 15:03:19 -04:00
jeremystretch
99cba25108 Misc UI cleanup ahead of v3.0 release 2021-08-25 13:50:59 -04:00
jeremystretch
2fb1d388e3 Omit node 15.x from CI builds 2021-08-24 21:32:28 -04:00
Jeremy Stretch
6a4ed099fc Merge pull request #7031 from netbox-community/object-filter-forms
Object filter forms
2021-08-24 21:31:25 -04:00
jeremystretch
d184ed4712 Enable filtering device components by location 2021-08-24 21:10:30 -04:00
jeremystretch
125a562189 Fix RegionFilterForm model 2021-08-24 20:44:00 -04:00
Matt
a02ba5f7bb Fix incorrect classes in device config & status templates 2021-08-24 14:53:36 -07:00
Matt
2e90f22529 Clean up TypeScript file structure, fix missing VLAN tag visibility logic 2021-08-24 14:53:36 -07:00
jeremystretch
bd681f5908 Clean up object filter forms 2021-08-24 17:29:16 -04:00
jeremystretch
85b61c0b7e Bump django-timezone-field to 4.2.1 2021-08-24 15:52:04 -04:00
jeremystretch
d11ea67bdd Update design of user profile section 2021-08-24 15:24:03 -04:00
jeremystretch
52603c087b Remove unnecessary component creation templates 2021-08-24 14:51:12 -04:00
jeremystretch
545474a1a3 Clean up object edit forms 2021-08-24 13:59:54 -04:00
Jeremy Stretch
b63c838c74 Merge pull request #7024 from netbox-community/feature-precommit-ui
Run UI Lint, Type, and Formatting Checks in Pre-Commit and CI
2021-08-24 12:48:20 -04:00
Matt
1c6fdea27f Improve docs styling 2021-08-24 07:30:52 -07:00
Matt
9d0e6f0c30 Exclude node_modules from CI build 2021-08-24 06:40:00 -07:00
Matt
1d0c72f5fa Add UI checks to pre-commit and CI 2021-08-24 00:41:10 -07:00
Matt
c221b9b4d4 Add UI development docs & update front-end scripts 2021-08-24 00:30:04 -07:00
Matt
a0ba8380c9 Fix eslint misconfiguration and corresponding errors 2021-08-24 00:27:45 -07:00
Matt
82a209bc5b Remove screenshots from docs 2021-08-23 18:24:39 -07:00
jeremystretch
2a338110f2 Remove unused aggregate list template 2021-08-23 16:53:06 -04:00
jeremystretch
e890944160 Use badge template tag for numeric values 2021-08-23 16:47:08 -04:00
jeremystretch
542e01775e Merge branch 'develop' into feature 2021-08-23 15:46:22 -04:00
Jeremy Stretch
9cc4992fad Merge pull request #7018 from netbox-community/develop
Release v2.11.12
2021-08-23 15:36:04 -04:00
jeremystretch
6518d87200 Release v2.11.12 2021-08-23 15:16:42 -04:00
jeremystretch
499005f84d Merge branch 'develop' into feature 2021-08-23 13:23:39 -04:00
jeremystretch
8497965cf7 Fixes #6326: Enable filtering assigned VLANs by group in interface edit form 2021-08-23 12:49:32 -04:00
jeremystretch
0b0ab9277c Fixes #6776: Fix erroneous webhook dispatch on failure to save objects 2021-08-23 12:06:43 -04:00
jeremystretch
75c62ff729 Print request index after webhook data dump 2021-08-23 11:32:47 -04:00
Jeremy Stretch
aef8c5fbb5 Merge pull request #6965 from bluikko/poweroutlet-hardwired
Add hardwired PowerOutlet
2021-08-23 10:04:28 -04:00
jeremystretch
cfa4f5677b Fixes #7012: Fix hidden "add components" dropdown on devices list 2021-08-23 09:41:43 -04:00
jeremystretch
8131feae8a Closes #7011: Add search field to VM interfaces filter form 2021-08-23 09:36:05 -04:00
Matt
a3d5e04946 Fixes #6990: Fix query param and query filter handling in API select 2021-08-20 16:25:31 -07:00
jeremystretch
1fc3c6d9d2 Fixes #6974: Show contextual label for IP address role 2021-08-20 16:12:09 -04:00
jeremystretch
53a5bc2221 Fixes #6929: Introduce LOGIN_PERSISTENCE configuration parameter to persist user sessions 2021-08-20 16:06:37 -04:00
Matt
12f3c2596f Fixes #6966: Migrate to stock fonts 2021-08-20 12:57:41 -07:00
jeremystretch
87dad41c37 Tweak logo size on mobile 2021-08-20 15:21:26 -04:00
jeremystretch
4dbb18d408 Update change log 2021-08-20 15:20:55 -04:00
Matt
a7cb75d73d Fixes #6999: Properly align controls on sm and md breakpoints 2021-08-20 12:15:07 -07:00
Matt
517c0e2fe6 Fixes #6996: Make search bar full width on small screens 2021-08-20 08:54:00 -07:00
Matt
84db2e90ab Fixes #6998: Properly handle merge and replace actions in API Select 2021-08-20 08:41:30 -07:00
Matt
9d469874c0 #6881: Improve device IP address styles 2021-08-20 08:06:41 -07:00
jeremystretch
d850aa0773 Changelog for #6790 2021-08-20 09:17:53 -04:00
Jeremy Stretch
9baebfa241 Merge pull request #6790 from WillIrvine/issue-6632
Fixes #6632  - Allow a /32 prefix to contain a /32 ipaddress
2021-08-20 09:16:05 -04:00
Matt
9e1d2da449 Fixes #7001: Focus the main content container when the page loads 2021-08-19 14:13:54 -07:00
Matt
a71604e79f Closes #6881: Wrap interface IP addresses in a badge that displays status and/or role 2021-08-19 12:35:30 -07:00
Matt
9a8d33e6bf Fixes #6979: Don't show 'Create & Add Another' button when editing/creating a circuit 2021-08-18 16:49:15 -07:00
Matt
09d745d987 Fixes #6976: Improve handling of printing layouts/styling 2021-08-18 16:17:50 -07:00
Matt
8199bb6b62 Fixes: #6982: Remove inherited background-color on disabled options 2021-08-18 14:57:42 -07:00
Matt
643939ea1e Rebundle scripts after rebase 2021-08-18 14:53:28 -07:00
Matt
9b3498d87a Add visibility toggle for object depth indicators 2021-08-18 14:51:49 -07:00
Matt
e4a162b054 Improve prefix hierarchy/depth styling 2021-08-18 14:51:36 -07:00
jeremystretch
bd47d0850e Changelog for #6856 2021-08-18 14:38:30 -04:00
jeremystretch
be3b4f0d3e #6856: Remove ?limit=0 from API queries 2021-08-18 14:35:12 -04:00
Matt
664b02d735 Fixes #6856: Properly handle existence of next property in API select responses 2021-08-17 16:50:29 -07:00
jeremystretch
6d1b981ecb Closes #6975: Reduce footer height 2021-08-17 12:02:30 -04:00
jeremystretch
ac6b1bf422 Fixes #6977: Truncate global search dropdown on small screens 2021-08-17 11:49:32 -04:00
jeremystretch
10847e2956 Optimize addition/removal of default custom field values 2021-08-16 14:48:56 -04:00
jeremystretch
9b0258fef4 Fixes #6686: Force assignment of null custom field values to objects 2021-08-16 14:38:06 -04:00
jeremystretch
5b89cdc868 Fixes #5968: Model forms should save empty custom field values as null 2021-08-16 13:45:46 -04:00
bluikko
5a8cedd63f Add hardwired PowerOutlet 2021-08-16 11:30:13 +07:00
jeremystretch
3feba2997f Closes #6872: Add table configuration button to child prefixes view 2021-08-13 15:56:14 -04:00
jeremystretch
fce419526d Closes #6748: Add site group filter to devices list 2021-08-13 15:26:06 -04:00
jeremystretch
e8fb86a283 Release v3.0-beta2 2021-08-13 14:19:43 -04:00
jeremystretch
90a820e0cf Add "clear all" option for applied filters 2021-08-13 13:50:11 -04:00
jeremystretch
9f59f99663 Set max width for object edit forms 2021-08-13 13:35:23 -04:00
jeremystretch
a6150f2578 Remove select widget hover effect 2021-08-13 11:31:51 -04:00
jeremystretch
b784705cd3 Tweak nav submenu heading color 2021-08-13 11:20:00 -04:00
jeremystretch
0609bcaaf0 Reduce base font size 2021-08-13 11:17:37 -04:00
jeremystretch
7727ec91f4 #6934: Correct prefix utilization and available IP reporting to account for child IP ranges 2021-08-13 10:43:25 -04:00
jeremystretch
5365c866ff #6934: Account for child IP ranges when calculating prefix utilization 2021-08-13 10:33:58 -04:00
jeremystretch
e1fbe89b41 Reduce form text size 2021-08-13 09:56:06 -04:00
jeremystretch
a72e23eddf Fix custom script layout 2021-08-13 09:43:23 -04:00
jeremystretch
dcd49fd97b Fixes #6953: Remove change log tab from non-applicable object views 2021-08-13 09:13:09 -04:00
Jeremy Stretch
1b074d2d53 Merge pull request #6933 from netbox-community/6912-static-resources
Fixes #6912: Fix static asset references when BASE_PATH is in use
2021-08-12 15:15:18 -04:00
jeremystretch
aed07a8ec5 Merge v2.11.11 2021-08-12 11:51:04 -04:00
jeremystretch
1b12185a39 PRVB 2021-08-12 11:47:59 -04:00
jeremystretch
736da4bcad Merge branch 'develop' into feature 2021-08-10 21:03:10 -04:00
jeremystretch
6d27e11043 #6934: Include child IP ranges under prefix view 2021-08-10 16:26:14 -04:00
jeremystretch
b8e387ce98 #6912: Remove absolute publicPath reference 2021-08-10 14:03:07 -04:00
jeremystretch
c7ebad0fbb Closes #6931: Include applied filters on object list view 2021-08-10 13:11:35 -04:00
Matt
6845fb0f00 Improve object view on small screens 2021-08-06 17:56:38 -07:00
Matt
a312311be9 Improve sidenav link styles 2021-08-06 17:46:49 -07:00
Jeremy Stretch
fe54acef51 v3.0 nav menu tweaks (#6906)
* Clean up nav menu spacing & link colors

* Shrink NetBox icon & collapsed sidebar

* Fix gap between scrollbar and righthand window border
2021-08-06 17:43:02 -04:00
jeremystretch
ef057b3e45 Fix footer fonts 2021-08-06 16:49:17 -04:00
jeremystretch
84ab233571 Fix wrapping of table controls on device interfaces view 2021-08-06 16:40:00 -04:00
jeremystretch
cf381d732d Use red border for confirmation dialog 2021-08-06 16:19:21 -04:00
jeremystretch
8653b0f3d0 Tabify object add/edit views 2021-08-06 16:16:19 -04:00
jeremystretch
65659fb676 Badges use secondary BG by default; add custom option 2021-08-06 15:41:26 -04:00
Jeremy Stretch
939bcfec4b Improve object list layout (#6907)
* Split object list and filters into tabs

* Use object_list template for connections, rack elevations

* Include custom field filters in grouped filter form

* Annotate number of applied filters on tab

* Rearrange table controls
2021-08-06 15:35:14 -04:00
jeremystretch
6ce8dd5ac3 Closes #6823: Improve table configuration form layout 2021-08-06 12:46:57 -04:00
jeremystretch
63f4d81bc0 Remove errant buttons block from cable view 2021-08-06 12:33:21 -04:00
jeremystretch
d0fbbbfb37 Merge branch 'develop' into feature 2021-08-06 10:06:52 -04:00
jeremystretch
34aa231436 Closes #6899: Add filterset tests for Token 2021-08-06 09:41:49 -04:00
jeremystretch
51d1b6e0d6 Fixes #6901: Correct example REST API request 2021-08-06 08:39:57 -04:00
jeremystretch
42b961229f Fixes #6894: Fix available IP generation for prefix assigned to a VRF 2021-08-05 13:23:14 -04:00
Matt
79f726e6cd #6797: Fix various mobile layout issues 2021-08-05 09:59:13 -07:00
Matt
31cd6898d4 #6797: Fix search result layout on small screens when there are no results 2021-08-05 09:40:02 -07:00
Matt
7608ee8450 #6797: Fix initial sidenav handling on smaller screens 2021-08-05 09:35:36 -07:00
Matt
da67a35328 #6797: Automatically collapse inactive sections in the sidenav 2021-08-05 09:28:25 -07:00
Matt
0ea9c65007 Add common Bootstrap components to window so they can be consumed by plugins 2021-08-04 23:46:34 -07:00
jeremystretch
57dc4c207f Fixes #6832: Support config context rendering under GraphQL API 2021-08-04 15:55:55 -04:00
Matt
582b69de74 #6797: Improve object edit form field layout 2021-08-04 10:57:01 -07:00
Matt
0cf9be2a8d Remove deprecated advanced search template 2021-08-04 10:41:43 -07:00
Matt
0bf39590e3 #6797: Fix object list layout when there is no filter form 2021-08-04 10:40:39 -07:00
Matt
2debeb7475 #6797: Fix empty filter panels 2021-08-04 10:37:59 -07:00
jeremystretch
11836cdfb1 Fixes #6871: Support dynamic tag types in GraphQL API 2021-08-03 16:29:34 -04:00
Jeremy Stretch
c411d2a9f1 Merge pull request #6873 from netbox-community/6829-graphql-reverse-relations
Closes #6829: GraphQL reverse generic relations
2021-08-03 16:22:45 -04:00
jeremystretch
1b612816cc Merge branch 'feature' into 6829-graphql-reverse-relations 2021-08-03 16:05:31 -04:00
Matt
051abc00c4 Fix bulk_import button class in test view after naming change in e8ba4b0 2021-08-03 12:43:28 -07:00
Matt
f7ee5e8d78 Fix button class in test view after naming change in e8ba4b0 2021-08-03 12:06:13 -07:00
jeremystretch
cc26bc4858 Changelog for #6829 2021-08-03 14:56:22 -04:00
jeremystretch
88d2441ab3 Add changelog GraphQL relation for changelogged models 2021-08-03 14:51:56 -04:00
Matt
6842879985 #6797: Improve object view styling & responsiveness 2021-08-03 11:41:46 -07:00
jeremystretch
1518a460d5 Rename base Graphene types to match base models 2021-08-03 14:37:39 -04:00
jeremystretch
ea86321da8 Add journal_entries to Graphene object types for all primary models 2021-08-03 13:58:08 -04:00
jeremystretch
c416fce400 Refactor base Graphene object types 2021-08-03 13:49:12 -04:00
Matt
ae28df8abd #6797: Place custom links below native controls 2021-08-03 10:25:27 -07:00
Matt
e8ba4b0564 #6797: Improve controls & custom link styling 2021-08-03 10:21:06 -07:00
Matt
53e21ceed4 #6797: Improve global search styles 2021-08-03 09:19:24 -07:00
jeremystretch
735286d3b0 Add vlan_groups to Region, SiteGroup, Site, Location, Rack, ClusterGroup, Cluster 2021-08-03 11:49:22 -04:00
jeremystretch
8ad958708f Add image_attachments to Device, Location, Rack, Site 2021-08-03 11:38:18 -04:00
Matt
58862e115c Closes #6863: Add search fields back to filter forms 2021-08-03 08:32:53 -07:00
jeremystretch
0df67dbc12 Add ip_addresses relation on InterfaceType, VMInterfaceType 2021-08-03 11:27:14 -04:00
thatmattlove
8bdfa34c7d Merge branch 'feature-object-filter' into feature 2021-08-03 06:57:54 -07:00
thatmattlove
06c730f4dc Merge branch 'feature' into feature-object-filter
# Conflicts:
#	netbox/project-static/dist/netbox-dark.css
#	netbox/project-static/dist/netbox-light.css
#	netbox/project-static/styles/netbox.scss
#	netbox/project-static/styles/select.scss
2021-08-03 06:57:22 -07:00
checktheroads
afc8d5bbbf Fix PEP8 formatting error 2021-08-02 02:31:30 -07:00
checktheroads
1de46f592c Various styling improvements 2021-08-02 02:18:31 -07:00
checktheroads
863048cda2 Deprecate collapsible advanced search and re-implement field-based filtering on object views 2021-08-01 21:24:22 -07:00
checktheroads
0b09365d0d #6797: Improve form error/django messages handling 2021-08-01 13:30:16 -07:00
checktheroads
8e3ab8d5c5 #6797: Improve global bg/color transition 2021-08-01 12:01:40 -07:00
checktheroads
9cf560ceec #6797: Improve table highlight, toast, and alert styling 2021-08-01 11:53:35 -07:00
checktheroads
c3a75d98d4 #6797: Improve sidenav state handling before load 2021-08-01 11:12:07 -07:00
checktheroads
261372289a #6797: Fix sidenav jumpy/glitchy behavior on page reload when pinned 2021-08-01 00:27:27 -07:00
checktheroads
b86edd4a20 #6797: Improve sidenav parent link color 2021-08-01 00:02:20 -07:00
checktheroads
374cf146e2 #6797: Fix login page layout issue 2021-07-31 23:56:56 -07:00
checktheroads
08ed545065 Closes #6855: Bundle and locally serve GraphiQL JS/CSS 2021-07-31 23:49:48 -07:00
checktheroads
80836c725c Fix navigation_menu typing & dataclass property defaults 2021-07-31 22:16:04 -07:00
Jeremy Stretch
9fa2acfe85 Merge pull request #6847 from netbox-community/6834-graphiql-ui
Closes #6834: Customize GraphiQL view
2021-07-30 15:23:59 -04:00
jeremystretch
3ba122afd4 Merge feature 2021-07-30 15:13:55 -04:00
checktheroads
5413263eff #6797: Properly update API select query parameters when values already exist on the element 2021-07-30 01:25:29 -07:00
checktheroads
772c76e0a4 #6797: Don't show depth indicator in API select placeholder 2021-07-30 01:03:26 -07:00
checktheroads
5463fa7390 Closes #6808: Determine option disabled status via disabled-indicator attribute 2021-07-30 00:56:54 -07:00
checktheroads
d18c83beb0 #6828: Fix various mobile UI issues 2021-07-30 00:35:38 -07:00
checktheroads
7aa89c2e73 #6797: Fix new sidenav styles 2021-07-29 18:11:48 -07:00
checktheroads
007d660ce1 Merge branch 'feature-sidebar' into feature
# Conflicts:
#	netbox/project-static/dist/netbox.js
#	netbox/project-static/dist/netbox.js.map
2021-07-29 17:39:07 -07:00
checktheroads
3752cb3e56 #6797: Implement new sidebar 2021-07-29 17:33:10 -07:00
jeremystretch
cdf8d91e1b #6797: Fit device type images to available space 2021-07-29 15:19:42 -04:00
jeremystretch
d082442851 Update REST API web UI title 2021-07-29 15:06:09 -04:00
jeremystretch
689f67b1a8 #6834: Add favicon to REST API web UI 2021-07-29 15:02:52 -04:00
jeremystretch
744f47cb98 Fixes #6846: Form-driven REST API calls should use brief mode 2021-07-29 14:50:30 -04:00
jeremystretch
81e1b7490e #6834: Add title, favicon to GraphiQL view 2021-07-29 13:48:06 -04:00
jeremystretch
22d160b1da Fix display of circuit termination provider network 2021-07-29 11:14:12 -04:00
jeremystretch
c323105696 Fixes #6827: Restore circuit termination connection dropdown 2021-07-29 11:08:15 -04:00
jeremystretch
f6746c7530 Clean up cable connection form 2021-07-29 10:48:12 -04:00
jeremystretch
52c4d54481 Clean up cable trace view 2021-07-29 10:08:43 -04:00
jeremystretch
4c3f584fa6 Fix trace component borders 2021-07-29 09:59:01 -04:00
jeremystretch
2e7d912bdd #6797: Add cable type, length to SVG trace 2021-07-29 09:49:31 -04:00
jeremystretch
33d40d4253 #6797: Improve utilization graph display for small values 2021-07-28 16:42:44 -04:00
jeremystretch
c7e0abc3fb Merge v2.11.10 2021-07-28 16:26:04 -04:00
checktheroads
5a8835f41a Merge branch 'feature' into feature-sidebar 2021-07-26 14:47:31 -07:00
checktheroads
2d32aeb972 Migrate to collapsed sidebar layout 2021-07-26 14:46:05 -07:00
jeremystretch
fc01bedd45 Fixes #6811: Fix exception when editing users 2021-07-26 09:37:58 -04:00
checktheroads
51c1f4b214 #6797: Make default border-radius less rounded 2021-07-24 18:13:08 -07:00
checktheroads
0b80d85c6c #6797: Fix API select styles 2021-07-24 18:11:01 -07:00
checktheroads
4489e130f2 #6797: Fix toast header style 2021-07-24 17:23:37 -07:00
checktheroads
e1cc00ad17 #6797: Fix <small/> element font-size 2021-07-24 17:19:47 -07:00
checktheroads
49191261a1 #6797: Fix incorrect color select label color 2021-07-24 17:13:02 -07:00
checktheroads
0479d5a02a #6797: Improve toast styles 2021-07-24 17:08:18 -07:00
checktheroads
189e733f81 #6797: Fix color flashing when server mode doesn't match select mode or client preference 2021-07-24 10:31:46 -07:00
checktheroads
bf2d535356 Fix incorrect rack elevation file name regression from 0572d03 2021-07-24 01:40:23 -07:00
checktheroads
05cfdd0b69 #6797: Fix search result layout 2021-07-24 01:21:14 -07:00
checktheroads
a60e8d3e12 #6797: Fix Safari anchor element styling issue 2021-07-24 01:07:53 -07:00
checktheroads
7b3d285884 #6797: Fix alert coloring in dark mode 2021-07-24 00:59:11 -07:00
checktheroads
5ba053a1c0 #6797: Fix duplicate ID on searchbar fields 2021-07-24 00:41:49 -07:00
checktheroads
7d5f647cd3 #6797: Improve home page shading 2021-07-24 00:38:28 -07:00
checktheroads
0572d03003 Migrate from ParcelJS to esbuild for UI bundling 2021-07-24 00:00:38 -07:00
jeremystretch
cb804eb3e1 Release v3.0-beta1 2021-07-23 08:13:07 -04:00
jeremystretch
878288fbec Merge branch 'develop' into feature 2021-07-23 08:02:21 -04:00
Jeremy Stretch
407f05629a Merge pull request #6786 from netbox-community/nav-menu-plugins
Refactor navigation menu to support plugin items
2021-07-23 08:00:13 -04:00
WillIrvine
ffae2c5f18 Fixes #6632 2021-07-23 11:08:41 +12:00
jeremystretch
8898d3b558 Update installation docs 2021-07-22 16:38:35 -04:00
jeremystretch
53c29b65bd Prep for v3.0-beta1 2021-07-22 15:07:45 -04:00
jeremystretch
8e7bcd95a4 Update release notes for v3.0 2021-07-22 14:25:30 -04:00
jeremystretch
84479925bf Shrink & center form section titles 2021-07-22 12:31:50 -04:00
jeremystretch
7bfc66e218 Fix help button height on object edit forms 2021-07-22 11:58:47 -04:00
jeremystretch
309247d487 Resize logo 2021-07-22 11:51:11 -04:00
jeremystretch
081054e08c Add missing plugin content injection tags 2021-07-22 11:40:55 -04:00
jeremystretch
adda8c4642 Tweak menu items order 2021-07-22 11:30:50 -04:00
jeremystretch
a0b17e145b Clean up nav menu template 2021-07-22 10:29:21 -04:00
jeremystretch
3f0b355717 Fix typo 2021-07-22 10:26:57 -04:00
jeremystretch
6b09c139e7 Refactor navigation menu 2021-07-22 10:21:39 -04:00
jeremystretch
03b20b00b4 Shade background of home view 2021-07-22 08:14:17 -04:00
Jeremy Stretch
108305a3e3 Merge pull request #6779 from netbox-community/jstretch-ui-work
Pending UI work for v3.0 beta
2021-07-22 08:10:44 -04:00
checktheroads
ae4f4b052e Minor theme improvements 2021-07-21 15:33:07 -07:00
jeremystretch
7be684835b Introduce an inclusion template for object comments 2021-07-21 14:20:14 -04:00
jeremystretch
a9930bd442 Optimize display of ConfigContext assigned objects 2021-07-21 14:11:42 -04:00
jeremystretch
19eafef41e General UI cleanup 2021-07-21 12:06:43 -04:00
jeremystretch
d42138384f Use shaded tabs 2021-07-21 10:13:30 -04:00
jeremystretch
ebe7779f40 Use button role names instead of color shades 2021-07-20 21:21:03 -04:00
jeremystretch
347ea4ca98 Tweak object list sizing, alignment 2021-07-20 21:16:36 -04:00
jeremystretch
f2f9c926bb Fix row header 2021-07-20 21:09:13 -04:00
checktheroads
5e1156abe2 Use display field for all API-backed select options 2021-07-20 14:17:12 -07:00
jeremystretch
803f9b6913 Merge branch 'develop' into feature 2021-07-20 17:06:18 -04:00
jeremystretch
4c31b611b1 Fix form layout for services 2021-07-20 16:51:21 -04:00
jeremystretch
b3909e62f0 Add help text for custom links 2021-07-20 16:51:21 -04:00
jeremystretch
74e0d0396a Fix breadcrumbs display for object changes 2021-07-20 16:51:21 -04:00
checktheroads
dd58ef1de5 Use 'brief=true' query parameter on API calls from API-backed select elements 2021-07-20 13:38:24 -07:00
jeremystretch
7eef726ee1 Fix filtering for platforms, tenant groups 2021-07-20 15:39:58 -04:00
jeremystretch
c0bf1576c2 Layout improvements 2021-07-20 15:30:49 -04:00
jeremystretch
e4c668c252 Split bulk edit content into tabs 2021-07-20 15:16:41 -04:00
jeremystretch
3f4e3f5f84 Fix device type buttons 2021-07-20 14:36:10 -04:00
jeremystretch
30f4eb8da0 Shrink circuit termination buttons; linkify far end termination 2021-07-20 14:01:42 -04:00
jeremystretch
328092f0ef Right-align form field labels 2021-07-20 13:55:15 -04:00
jeremystretch
a5dda0705e Standardize button colors 2021-07-20 13:46:59 -04:00
jeremystretch
ba3552b697 Tweak form widths 2021-07-20 13:21:09 -04:00
jeremystretch
b59c1c693d Restore missing created/updated times for object views 2021-07-20 13:07:18 -04:00
jeremystretch
856956afce Standardize object breadcrumbs 2021-07-20 12:14:01 -04:00
jeremystretch
d938b6621d Add missing nav menu link for rack reservations 2021-07-20 11:36:37 -04:00
jeremystretch
cc5ea61f5a Add top & bottom banners, maintenance notice 2021-07-20 11:05:19 -04:00
jeremystretch
fa617c78af Update sidebar footer links 2021-07-20 10:54:46 -04:00
checktheroads
f671b7e5e2 #6372: Improve form field styles 2021-07-20 01:26:45 -07:00
checktheroads
09066a4c6c #6372: Fix regression from 1661d1f causing API select query delays 2021-07-20 00:36:55 -07:00
checktheroads
07f34c2675 #6372: Migrate away from form-floating field styles 2021-07-20 00:16:13 -07:00
checktheroads
2b9326d75e #6372: Improve search filter dropdown styles 2021-07-19 22:11:41 -07:00
checktheroads
91246b0f81 Add icons to home stat cards 2021-07-19 22:01:05 -07:00
checktheroads
5ec0ad6913 #6372: Integrate changes from c14b546 to IP ranges form 2021-07-19 16:44:08 -07:00
checktheroads
64e6dcb23c #6372: Improve form styling 2021-07-19 16:39:16 -07:00
checktheroads
1661d1f4ca #6372: Fix query issues with & refactor API select 2021-07-19 16:39:16 -07:00
checktheroads
e3008babfe #6372: Fix static select class regression from 08f0a5d 2021-07-19 16:39:16 -07:00
checktheroads
cdc9753009 #6372: Fix bulk form action form handling 2021-07-19 16:39:16 -07:00
checktheroads
29e41e8e2b #6372: Fix sidenav active item shadow 2021-07-19 16:39:16 -07:00
checktheroads
a2158af385 #6372: Add front end error logs to gitignore 2021-07-19 16:39:16 -07:00
checktheroads
c14b546d5f #6372: Refactor Select2 naming 2021-07-19 16:39:16 -07:00
jeremystretch
29ee3e5ac0 Clean up home view stats 2021-07-19 16:57:35 -04:00
jeremystretch
011f35164a Replace changelog template code with table in home view 2021-07-19 16:46:12 -04:00
jeremystretch
47ef8b9cac Upgrade script now looks for Python path as env var 2021-07-19 15:13:30 -04:00
Jeremy Stretch
7058d6ca5a Closes #6328: Local docs build (#6769)
* Incorporate local documentation build in upgrade script

* Add docs build to CI

* Include docs build path in revision control

* Update footer dcos link

* Changelog for #6328

* Clean up errant links
2021-07-19 14:18:08 -04:00
jeremystretch
8592e0af54 Remove cache invalidation from upgrade script 2021-07-19 13:15:27 -04:00
jeremystretch
ae6b2be52c Call out dependency on v2.11+ for upgrades 2021-07-19 11:27:00 -04:00
jeremystretch
31e41f8f02 Closes #6767: Add support for Python 3.9 2021-07-19 10:43:52 -04:00
jeremystretch
717724c9f6 Update release notes 2021-07-19 10:03:42 -04:00
Jeremy Stretch
3cfb0bacf4 Merge pull request #6760 from netbox-community/834-ip-ranges
Closes #834: Add support for IP ranges
2021-07-19 09:47:19 -04:00
jeremystretch
0fe1a426c0 Add available IPs REST API endpoint for IP ranges 2021-07-19 09:32:04 -04:00
checktheroads
0503825f7b #6372: Improve sidebar footer links layout 2021-07-17 13:07:47 -07:00
checktheroads
858d12969a #6372: Migrate back to BS5 native colors, clean up rack/cable bundle process 2021-07-17 12:51:40 -07:00
jeremystretch
443172197b Fix SVG rendering with unspecified width 2021-07-16 17:09:52 -04:00
jeremystretch
05d16b0682 Add changelog for #6000 2021-07-16 17:07:42 -04:00
jeremystretch
8cf9f0d5bc Support specification of image width when rendering cable traces as SVG 2021-07-16 17:06:27 -04:00
Jeremy Stretch
2bfdaf08ee Merge pull request #6755 from netbox-community/6000-cable-trace-svg
Closes #6000: SVG rendering for cable tracing
2021-07-16 16:56:17 -04:00
jeremystretch
145be09cfd Merge branch 'feature' into 6000-cable-trace-svg 2021-07-16 16:46:32 -04:00
jeremystretch
747c065213 Move available IP/prefix endpoints to API view mixins 2021-07-16 14:48:42 -04:00
jeremystretch
8d8ac70070 Add IP range documentation 2021-07-16 13:48:57 -04:00
jeremystretch
11a14927c9 Initial work on IP ranges 2021-07-16 13:35:52 -04:00
jeremystretch
c5178fd90e Extend foreground_color() utility to support custom dark/light colors 2021-07-15 13:59:14 -04:00
jeremystretch
89662124e5 Clean up SVG image styling 2021-07-15 13:54:49 -04:00
checktheroads
337f95e269 #6372: Fix rack spacing 2021-07-15 00:56:26 -07:00
checktheroads
8614b1c74a #6372: Fix previous/next rack elevation buttons 2021-07-15 00:47:01 -07:00
checktheroads
e72982a7f8 #6372: Fix nav menu scrolling and styling 2021-07-15 00:32:28 -07:00
checktheroads
a16098d548 #6372: Fix additional bulk action button layouts 2021-07-15 00:31:12 -07:00
checktheroads
cc3bd8833a #6372: Fix missing new release alert 2021-07-14 17:55:01 -07:00
checktheroads
ab6523af3f #6372: Remove empty footer div 2021-07-14 17:19:39 -07:00
checktheroads
af92417131 #6372: Improve bulk action button layout/styling 2021-07-14 17:14:00 -07:00
checktheroads
ae5c2d49c6 #6372: Simplify & streamline table config & table filter elements 2021-07-14 16:25:59 -07:00
jeremystretch
8b571912cf Add SVG trace support for ProviderNetwork attachments 2021-07-14 15:55:18 -04:00
jeremystretch
9f615cde79 Replace CSS-based cable trace diagrams with SVG images 2021-07-14 15:29:04 -04:00
jeremystretch
ce7fa95546 Initial work on SVG support for cable tracing 2021-07-14 14:14:56 -04:00
checktheroads
7449ea28a5 #6372: Remove extra search box from object change log 2021-07-13 09:23:34 -07:00
checktheroads
fa6661e4ae Merge branch 'feature' of github.com:netbox-community/netbox into feature 2021-07-13 09:17:58 -07:00
checktheroads
bfb1b6ac0a #6372: Implement table-flush styling, improve changelog layout 2021-07-13 09:14:57 -07:00
checktheroads
6b88ed0321 #6372: Clean up project-static directory structure 2021-07-12 15:21:20 -07:00
jeremystretch
faa993acfb Use non-card tables for all tabbed views 2021-07-12 15:36:51 -04:00
jeremystretch
fbcdae9a6b Fix "Select all" boxes for object lists 2021-07-12 15:19:07 -04:00
jeremystretch
12e1681d31 Fix active tab display for prefixes 2021-07-12 14:56:00 -04:00
jeremystretch
4225e28a4b Move changelog table out of card 2021-07-12 12:12:06 -04:00
jeremystretch
23be5694d0 Move device/VM component tables outside of cards 2021-07-12 12:06:11 -04:00
jeremystretch
dc8adfc546 Clean up object titles 2021-07-12 10:57:26 -04:00
jeremystretch
5d98c3337a Simplify home view stats 2021-07-12 10:32:13 -04:00
jeremystretch
5406acf329 Merge branch 'jstretch-ui-work' into feature 2021-07-12 09:56:33 -04:00
Jeremy Stretch
7f121f7518 Merge pull request #6739 from netbox-community/6471-reset-migrations
Closes #6471: Squash database migrations up to v2.11.0
2021-07-12 09:04:54 -04:00
jeremystretch
1b132379be Clean up table sizing; remove cards 2021-07-11 21:24:36 -04:00
jeremystretch
0f99e5fcaa Clean up object list view 2021-07-10 22:06:28 -04:00
jeremystretch
726b148aa9 Clean up sidebar layout 2021-07-10 21:30:55 -04:00
jeremystretch
facf757997 Separate navigation menu structure from template tag 2021-07-10 20:44:33 -04:00
jeremystretch
fe1f221286 Log a warning when rqworker invoked without specified queues 2021-07-09 21:23:27 -04:00
jeremystretch
d3b4a72f4f Update change log 2021-07-09 21:10:51 -04:00
jeremystretch
fa47ad0095 Changelog for #6651 2021-07-09 15:37:21 -04:00
Jeremy Stretch
aa7d38a0a5 Merge pull request #6731 from maximumG/6651-plugins-rq-queues
Fixes #6651:  Add plugin's queueing system
2021-07-09 15:29:19 -04:00
jeremystretch
42b2e2717d Standardize squashed migration names 2021-07-09 13:23:43 -04:00
jeremystretch
3387282de4 Resolve migration dependencies 2021-07-09 11:51:42 -04:00
jeremystretch
c82470e4df Add re-initialized migrations for v2.11.0 2021-07-09 11:11:21 -04:00
jeremystretch
4383425060 Delete pre-2.11.0 migrations 2021-07-09 10:57:07 -04:00
Jeremy Stretch
fd58eeae1d Merge branch 'feature' into 6651-plugins-rq-queues 2021-07-09 08:43:39 -04:00
maximumG
a09e4bf82a chore: avoid the default RQ worker to listen to every queues by default and rather only listen to netbox core queues. 2021-07-09 10:03:51 +02:00
maximumG
dce3e0763f chore: documentation about netbox plugin queueing system 2021-07-09 09:42:03 +02:00
jeremystretch
bc812e4937 Closes #5223: Remove the console/power/interface connections REST API endpoints 2021-07-08 17:30:40 -04:00
jeremystretch
38d7b83ed0 Merge v2.11.9 2021-07-08 12:15:57 -04:00
Jeremy Stretch
65aaab5f38 Merge pull request #6717 from netbox-community/6713-release-checking
Closes #6713: Move release checking to the housekeeping routine
2021-07-07 22:22:02 -04:00
jeremystretch
f426ba3526 Remove the check_releases queue 2021-07-07 22:10:10 -04:00
Jeremy Stretch
028c876bca Merge pull request #6716 from netbox-community/6639-drop-cacheops
Closes #6639: Replace django-cacheops with django-redis for caching
2021-07-07 22:08:01 -04:00
jeremystretch
29299b4644 Changelog for #6713 2021-07-07 21:58:54 -04:00
jeremystretch
7c6e5a68d9 Remove the RELEASE_CHECK_TIMEOUT parameter 2021-07-07 21:55:07 -04:00
jeremystretch
fa99263918 Remove release checkng background task 2021-07-07 21:53:02 -04:00
jeremystretch
e173c8b548 Add release check to the housekeeping task 2021-07-07 21:37:35 -04:00
jeremystretch
3e19038e06 Restore CACHING_REDIS_SKIP_TLS_VERIFY; add CACHE_TIMEOUT usage warning 2021-07-07 21:17:40 -04:00
jeremystretch
2c023ef7a0 Update release check to use django-redis 2021-07-07 20:57:47 -04:00
jeremystretch
d9e27b6a82 Replace django-cacheops with django-redis 2021-07-07 20:35:59 -04:00
jeremystretch
b6ec1d9aa7 Remove cacheops workarounds & queryset caching metrics 2021-07-07 17:15:42 -04:00
jeremystretch
f683f0786e Drop caching_config from plugin configuration 2021-07-07 17:04:21 -04:00
maximumG
995aa65f16 feat: Netbox plugin can defined their own RQ queues 2021-07-07 15:26:33 +02:00
maximumG
8b76db2bca add: RQ queues for netbox core (high, default, low, check_release) 2021-07-07 15:25:53 +02:00
checktheroads
9c247d9a19 #5203: Persist Show/Hide Images state in rack view 2021-07-06 17:56:49 -07:00
checktheroads
d9a6f11c35 #6372: Implement basic state management with localStorage integration 2021-07-06 17:55:13 -07:00
checktheroads
00c4ac8d51 #6372: General cleanup 2021-07-06 17:54:24 -07:00
jeremystretch
88e382e7a1 Merge v2.11.8 changes 2021-07-06 12:10:29 -04:00
Jeremy Stretch
57fc6efd4c Merge pull request #6678 from netbox-community/2007-graphql
Closes #2007: Implement GraphQL API
2021-06-30 10:42:49 -04:00
jeremystretch
2fe734e6f9 Omit _path from CableTermination models 2021-06-30 10:20:20 -04:00
jeremystretch
e6091ee0c9 Consolidate GraphQLTestCase into APIViewTestCase 2021-06-30 10:07:33 -04:00
jeremystretch
728b3bac67 Use _list appendix for GraphQL list queries 2021-06-30 09:57:33 -04:00
jeremystretch
0d7309cb19 Add documentation for GraphQL API 2021-06-30 09:35:50 -04:00
jeremystretch
8d2f79cf24 Add configuration parameter to toggle GraphQL API 2021-06-29 13:30:38 -04:00
jeremystretch
05ba54b6d3 Add GraphQL for users and groups 2021-06-29 13:15:10 -04:00
jeremystretch
ef3cb9544a Clean up GraphQL object types & tests 2021-06-29 12:55:17 -04:00
jeremystretch
79614ed2cf Add GraphQL type for ContentType 2021-06-29 11:36:18 -04:00
jeremystretch
7deabfe9cd Extended GraphQL tests to include all fields 2021-06-29 11:20:54 -04:00
jeremystretch
bd1e019a42 Clean up token-based authentication for GraphQL 2021-06-28 16:19:02 -04:00
jeremystretch
14e27363e0 Add GraphQL for DCIM 2021-06-25 16:17:36 -04:00
jeremystretch
605b7c5b3e Add GraphQL for virtualization 2021-06-25 15:31:43 -04:00
jeremystretch
881b18f6d0 Add GraphQL for tenancy 2021-06-25 14:19:20 -04:00
jeremystretch
7256c7050a Add GraphQL for extras 2021-06-25 14:12:09 -04:00
jeremystretch
7a2a25c13a Use v3.0 enum naming 2021-06-25 14:11:41 -04:00
jeremystretch
3e0bcd58d4 Add GraphQL for IPAM 2021-06-25 10:14:35 -04:00
jeremystretch
4c209ed74c Clean up GraphQL tests 2021-06-25 10:14:06 -04:00
jeremystretch
d5675a5d4a Add support for DRF token authentication 2021-06-25 09:13:08 -04:00
jeremystretch
91d39cc0c0 Added initial GraphQL tests 2021-06-24 09:08:45 -04:00
jeremystretch
930ca8d9a1 Add support for custom field data 2021-06-24 09:08:45 -04:00
jeremystretch
6a07f66cfc Initial work on GraphQL 2021-06-24 09:08:45 -04:00
Jeremy Stretch
442b3fcc48 Merge pull request #6659 from netbox-community/6466-replace-django-admin
Closes #6646: Move extras out of Django admin UI
2021-06-24 09:04:08 -04:00
jeremystretch
6cc4f27ee3 Tables cleanup 2021-06-24 08:51:29 -04:00
jeremystretch
036a068b83 Update extras documentation 2021-06-24 08:37:06 -04:00
jeremystretch
4e0b795a3c Add UI views for webhooks 2021-06-23 21:30:23 -04:00
jeremystretch
10cbbee947 Add UI views for export templates 2021-06-23 20:56:50 -04:00
jeremystretch
276ded0119 Add UI views for custom links 2021-06-23 17:10:04 -04:00
jeremystretch
b017927c69 Add UI views for custom fields 2021-06-23 17:10:04 -04:00
checktheroads
e59d88bbe9 #6372: Fix nav-pill styling 2021-06-23 11:46:43 -07:00
checktheroads
e1391cae20 #6372: Improve sidebar styling 2021-06-23 11:39:32 -07:00
checktheroads
0b819053cf #6372: Add opacity utility classes 2021-06-23 11:39:04 -07:00
checktheroads
25b6f02091 #6372: Fix sidebar tooltip rendering 2021-06-23 11:30:58 -07:00
checktheroads
32b6bc6a74 #6372: Upgrade bootstrap to 5.0.2 2021-06-23 11:22:25 -07:00
checktheroads
18f1b93ae4 #6372: Responsive layout improvements 2021-06-23 10:57:09 -07:00
jeremystretch
c7afc9eb28 Rename custom field model forms 2021-06-23 11:53:58 -04:00
jeremystretch
3f63a02145 Rename and refactor CustomFieldForm 2021-06-23 11:53:58 -04:00
checktheroads
eb0d5c996e #6372: Implement layout improvements 2021-06-22 17:20:17 -07:00
jeremystretch
a8a9e061a1 Merge branch 'develop' into feature 2021-06-22 14:30:47 -04:00
jeremystretch
4a6278f598 Merge v2.11.7 2021-06-16 16:27:37 -04:00
jeremystretch
14f696e824 Merge branch 'develop' into feature 2021-06-14 09:23:01 -04:00
Jeremy Stretch
7c779f4f09 Merge pull request #6592 from netbox-community/5264-tokens-api-endpoint
Closes #5264: REST API endpoint for tokens
2021-06-14 09:01:20 -04:00
jeremystretch
4c4fe80697 Fix schema generation for tokens endpoint 2021-06-14 08:52:22 -04:00
jeremystretch
fdd8e33b58 Revert tweak to TokenPermissions.has_permission() 2021-06-14 08:38:10 -04:00
jeremystretch
c36b190d5d Omit REST API schema view from permissions enforcement 2021-06-11 16:24:02 -04:00
jeremystretch
37c9340499 Docs and release notes for #5264 2021-06-11 16:12:25 -04:00
jeremystretch
b038b1f613 Add a REST API endpoint to provision new tokens using username & password 2021-06-11 15:54:31 -04:00
jeremystretch
48b4bf1683 Initial work on REST API endpoint for tokens 2021-06-11 15:14:19 -04:00
jeremystretch
d87ec82fe3 Closes #6590: Introduce a nightly housekeeping command to clear expired sessions and change records 2021-06-11 10:44:17 -04:00
jeremystretch
a1ba3b567c Introduce ColorField for consistent represention of color choice fields in forms 2021-06-09 17:17:39 -04:00
jeremystretch
b3ed545d6a Closes #3682: Add color field to front and rear ports 2021-06-09 16:51:51 -04:00
jeremystretch
8a7473765e Remove obsolete reference to csv_headers 2021-06-09 16:10:41 -04:00
Jeremy Stretch
eda1c6b2c6 Merge pull request #6579 from netbox-community/6068-csv-export
Closes #6068: Clean up CSV export
2021-06-09 16:09:12 -04:00
jeremystretch
7e55b44610 Changelog for #6068 2021-06-09 15:55:38 -04:00
jeremystretch
7e18b0dd3a Remove csv_headers model attributes 2021-06-09 15:52:49 -04:00
jeremystretch
578885225f Replace 'default format' export with 'all data' 2021-06-09 15:26:02 -04:00
jeremystretch
3ec6194a47 Remove obsolete to_csv() methods 2021-06-09 15:08:49 -04:00
jeremystretch
9d3cac43b7 Modify default CSV export to render from tables 2021-06-09 15:02:31 -04:00
jeremystretch
569041a4c4 Changelog for #5963 2021-06-09 13:27:26 -04:00
Jeremy Stretch
9839885198 Merge pull request #6576 from netbox-community/5963-custom-validation
Closes #5963: Custom model validation
2021-06-09 13:21:38 -04:00
jeremystretch
18472188b9 Renumber docs from v2.12 to v3.0 2021-06-09 13:20:46 -04:00
jeremystretch
44c0dec68b Extend CustomValidator to support required, prohibited fields 2021-06-09 13:10:35 -04:00
jeremystretch
f81b3d4ed6 Rename fail() kwarg from attr to field 2021-06-09 12:11:47 -04:00
jeremystretch
c69ef95c6a Document the custom validation feature 2021-06-09 12:09:30 -04:00
jeremystretch
dfd42c9896 Document the new post_clean signal 2021-06-09 12:08:50 -04:00
jeremystretch
3bfa1cbf41 Initial work on custom model validation 2021-06-09 11:36:29 -04:00
jeremystretch
0e23038e28 Merge v2.11.5 2021-06-04 09:47:14 -04:00
jeremystretch
2d44bade4b Merge branch 'develop' into feature 2021-06-02 20:35:38 -04:00
checktheroads
e12fef7828 #6372: Shrink small buttons when inside a table 2021-05-26 16:37:43 -07:00
checktheroads
dc79f80366 #6372: Remove errant console.log statement 2021-05-26 16:33:33 -07:00
checktheroads
e004f872f9 Closes #4247: Add option to show/hide enabled/disabled interfaces on device 2021-05-26 16:32:09 -07:00
checktheroads
587335e3ba #6372: Fix legacy BS5 classes 2021-05-26 09:07:45 -07:00
checktheroads
7219e3760c #6372: Center-align body footer 2021-05-26 08:57:03 -07:00
checktheroads
d2267ecd71 #6372: NetBox logo should be centered 2021-05-26 08:55:22 -07:00
checktheroads
b159def9b2 #6372: Template cleanup & fix form width 2021-05-26 08:53:05 -07:00
checktheroads
e1eefd1165 #6372: Improve sidebar styles 2021-05-25 17:57:37 -07:00
jeremystretch
5b4dacf0f5 Merge branch 'develop' into feature 2021-05-25 13:19:17 -04:00
checktheroads
1daee79095 #6372: Fix multi-select colors in dark mode 2021-05-25 08:44:06 -07:00
checktheroads
5b68a11f01 #6372: Clone/edit/delete buttons are not top-aligned 2021-05-25 08:35:53 -07:00
checktheroads
0c8195e4f1 #6372: Objects table should be full-width 2021-05-25 08:28:58 -07:00
checktheroads
8fe795102f #6372: Fix native select styling 2021-05-25 08:26:36 -07:00
checktheroads
27a02f64b2 #6372: Device type import: JSON data field not big enough 2021-05-25 08:23:36 -07:00
checktheroads
7bb7747c67 #6372: Device import: Racked/child device tabs are not tabs 2021-05-25 08:02:27 -07:00
checktheroads
8bb47a88f8 #6372: Page should be full-width at 1280px 2021-05-25 07:59:08 -07:00
checktheroads
e8c91ea3a1 #6372: Don't autopopulate collapsible API select data, improve advanced search 2021-05-23 19:01:05 -07:00
checktheroads
429d995270 #6372: Fix object delete confirmation styles 2021-05-23 14:55:32 -07:00
checktheroads
c4bd47eb84 #6372: Form should be centered on page 2021-05-23 13:21:52 -07:00
checktheroads
1811118f28 #6372: Fix nav-pill styles on active nav-links 2021-05-23 13:08:44 -07:00
checktheroads
69ba925ee8 #6372: Object checkboxes are too small 2021-05-23 12:36:18 -07:00
checktheroads
7219c3449f #6372: Fix invalid filter form fields 2021-05-23 11:39:08 -07:00
checktheroads
a5d84c88bf Merge branch 'feature' of github.com:netbox-community/netbox into feature 2021-05-23 00:32:25 -07:00
checktheroads
da0aa38614 #6372: Move object list search panel into collapsed view & remove search field 2021-05-23 00:31:48 -07:00
checktheroads
6b1397d257 #6372: Add "add" and "import" buttons to each item as appropriate 2021-05-23 00:30:28 -07:00
checktheroads
7d640e2aab #6732: Add "add" and "import" buttons to each item as appropriate 2021-05-22 18:11:56 -07:00
checktheroads
0a01629b15 #6372: Fix toast colors in dark mode 2021-05-22 17:17:31 -07:00
checktheroads
ee2de33643 #6372: Fix footer placement 2021-05-22 16:59:55 -07:00
jeremystretch
93534db79e Clean up object.html header 2021-05-17 20:23:14 -04:00
Jeremy Stretch
805892f623 Template cleanup (#6421)
* Clean up & comment base templates

* Clean up login template & form

* Use SVG file for NetBox logo

* Simplify breadcrumbs

* Merge changelog.html into home.html

* Rename title_container block to header

* Move breadcrumbs block to object.html

* Attach names to endblock template tags

* Reorganize root-level templates into base/ and inc/

* Remove obsolete reference to Bootstrap 3.4.1
2021-05-17 16:27:27 -04:00
Daniel Sheppard
744792452f Closes: #5278 - Remove Secrets (#6397)
* Remove Secrets

* #5278: Remove secrets javascript from netbox core

* Remove userkey references

* Fix PEP8

* Remove a few more instances of secrets.  Rebundle

* Remove Secrets

Co-authored-by: checktheroads <matt@allroads.io>
2021-05-17 16:26:02 -04:00
jeremystretch
dc5c765c2a Changelog for #2434 2021-05-14 14:55:38 -04:00
Jeremy Stretch
fed0322ebf Merge pull request #6323 from netbox-community/feature-2434
Closes #2434: Show 'Create & Assign IP Address' Button when Creating …
2021-05-14 14:53:59 -04:00
checktheroads
e429ba6fa2 #2434: Fix database transaction context scoping 2021-05-14 11:21:42 -07:00
checktheroads
234475effe Merge branch 'feature' into feature-2434 2021-05-14 00:12:19 -07:00
checktheroads
7d7d06651c Merge branch 'feature' of github.com:netbox-community/netbox into feature 2021-05-14 00:10:06 -07:00
jeremystretch
43a823d0ac Closes #3665: Enable rendering export templates via REST API 2021-05-11 15:51:36 -04:00
Jeremy Stretch
96ffae3372 Merge pull request #6392 from netbox-community/4609-prefix-mark-utilized
Closes #4609: Mark prefixes as fully utilized
2021-05-11 15:12:56 -04:00
jeremystretch
ecf51406c5 Permit disabling utilization graph warning/danger thresholds 2021-05-11 14:52:27 -04:00
jeremystretch
bf56145a09 Closes #4609: Allow marking prefixes as fully utilized 2021-05-11 14:08:18 -04:00
checktheroads
8056290423 #2434: Apply conditional logic from b9a413d to overridden InterfaceCreateView.post method 2021-05-10 13:58:10 -07:00
checktheroads
892d1214b0 Merge branch 'feature' into feature-2434 2021-05-10 13:57:32 -07:00
jeremystretch
f6823b5704 Closes #6338: Decimal fields are no longer coerced to strings in REST API 2021-05-10 14:22:01 -04:00
jeremystretch
f3abf84e17 Closes #6154: Allow decimal values for cable lengths 2021-05-10 14:14:54 -04:00
jeremystretch
a6d937b366 Closes #5806: Add kilometer and mile as choices for cable length unit 2021-05-10 11:23:21 -04:00
checktheroads
b9a413d19e #2434: Fix redirection logic in generic form validation method 2021-05-08 12:32:13 -07:00
checktheroads
3436780117 #6372: Show standard form validation errors 2021-05-08 12:07:20 -07:00
checktheroads
2d2719cfb2 #2434: Refactor ComponentCreateView to use generic form validation method
New validate_form method on ComponentCreateView handles validation generically, which any post() method on ComponentCreateView can use to validate the form but handle the response differently as needed.
2021-05-08 12:01:25 -07:00
checktheroads
515aed7022 Merge branch 'feature' into feature-2434 2021-05-08 11:08:06 -07:00
checktheroads
22e484edd4 #6732: Change “Update” button to “Save” 2021-05-07 17:02:22 -07:00
checktheroads
616a598940 #6372: Utilization graph columns should have a minimum width 2021-05-07 16:57:38 -07:00
checktheroads
1a843f95b7 #6372: Fix badge & progress-bar foreground color in dark mode 2021-05-07 16:50:50 -07:00
checktheroads
32e1d7e879 #6372: Updating “per page” count does not refresh list 2021-05-07 16:30:13 -07:00
checktheroads
8c67c7efb3 #6372: Fix search filtering when selecting 'All Objects' 2021-05-07 16:21:31 -07:00
checktheroads
252bdcbbe0 #6372: Restructure theme files & build process to avoid SCSS collisions 2021-05-07 16:12:27 -07:00
checktheroads
4dbe047512 #6372: Fix select placeholder font-size 2021-05-07 14:39:57 -07:00
checktheroads
1da7c705e3 #6372: Object list text is too small 2021-05-07 14:32:41 -07:00
checktheroads
fabd751f20 #6372: Reduce padding of top-level menu items & improve home page stat badge coloring 2021-05-07 14:27:32 -07:00
checktheroads
308820b8a1 #6372: Move hostname & current time to end of page body 2021-05-07 13:45:03 -07:00
checktheroads
4fd7eaf8e0 #6372: Fix too-dark body color 2021-05-07 13:25:01 -07:00
checktheroads
789f0bc8ff #6732: Add color mode toggle to login button when not authenticated 2021-05-07 12:11:45 -07:00
checktheroads
042c65a48c #6732: Fix <title/> rendering on home page template 2021-05-07 12:05:56 -07:00
checktheroads
03a1014714 #6732: Fix rendering of stats on home page when not authenticated 2021-05-07 11:55:46 -07:00
checktheroads
6e9c81eddf #6732: Errant righthand margin on "Login" button (if not authenticated) 2021-05-07 11:43:13 -07:00
checktheroads
d7c103d77f #6732: Add color mode toggle to login screen & fix login screen layout issues 2021-05-07 11:40:20 -07:00
checktheroads
63435f2ec1 #6732: Fix search filtering
This was broken after implementing mobile screen size support in #6327
2021-05-07 11:07:06 -07:00
checktheroads
445adbd078 #6372: Border should be consistent for all elements of the search bar 2021-05-07 11:04:57 -07:00
checktheroads
0e088f11ba #6372: FIx Status badge location in attr table 2021-05-07 09:18:40 -07:00
checktheroads
e47f25ac3e #6372: code text should not be pink 2021-05-07 09:16:05 -07:00
checktheroads
df02123b1e #6372: Fix anchor tag underline style in dark mode 2021-05-07 09:09:21 -07:00
checktheroads
6a685df823 #6372: Remove duplicate babel plugin already included in @babel/preset-env 2021-05-07 09:03:45 -07:00
checktheroads
a4add7de67 #6372: Remove focus ring effect from navigation menu headers 2021-05-07 09:02:53 -07:00
checktheroads
8473820f0c #6372: Remove underline style from hyperlinks 2021-05-07 08:56:17 -07:00
jeremystretch
c777daf6e6 Merge branch 'develop' into feature 2021-05-07 10:27:23 -04:00
Jeremy Stretch
43c17b9950 Merge pull request #6352 from netbox-community/5991-remove-display_name
Closes #5991: Remove display_name
2021-05-05 08:45:46 -04:00
jeremystretch
ea5d02b1e6 Remove deprecated display_name() methods from models 2021-05-04 16:05:17 -04:00
jeremystretch
5856275347 Closes #5991: Remove display_name attribute from serializers 2021-05-04 15:56:36 -04:00
jeremystretch
534b0e4cf6 Merge branch 'develop' into feature 2021-05-04 14:25:53 -04:00
Jeremy Stretch
6899a3258a Merge pull request #6327 from netbox-community/feature-ui
Add Basic Support for Smaller Screens in New UI
2021-05-03 09:07:29 -04:00
checktheroads
04cc43b2f0 ensure 'Create & Assign IP Address' button is only shown when the component_type is 'interface' 2021-04-30 17:17:56 -07:00
checktheroads
460a203c29 Add basic support for smaller screens 2021-04-30 15:55:37 -07:00
Jeremy Stretch
79184347f9 Merge pull request #6325 from netbox-community/feature-6321
Integrate changes from #6322 (to fix #6321) into feature
2021-04-30 16:13:44 -04:00
Jeremy Stretch
be48bf06df Merge pull request #6324 from netbox-community/feature-ui
Merge various UI fixes to feature
2021-04-30 16:13:07 -04:00
checktheroads
9ad8065f75 Integrate changes from #6322 (to fix #6321) into feature 2021-04-30 12:13:43 -07:00
checktheroads
58e1a1f1d8 fix api select pagination 2021-04-30 11:29:45 -07:00
checktheroads
aee09d9119 general style improvements 2021-04-30 11:27:51 -07:00
checktheroads
de56e2b405 Closes #2434: Show 'Create & Assign IP Address' Button when Creating Interfaces 2021-04-30 11:13:38 -07:00
Matt Love
abd9ffd31d Merge pull request #6298 from checktheroads/feature
Fix #6297: update screenshot links & remove old screenshots
2021-04-27 16:55:33 -07:00
checktheroads
0b07909386 Merge branch 'feature' of https://github.com/netbox-community/netbox into feature 2021-04-27 16:33:34 -07:00
checktheroads
82b770c1aa Fix #6297: update screenshot links & remove old screenshots 2021-04-27 16:32:00 -07:00
jeremystretch
456ffb79ff Merge v2.11.2 2021-04-27 14:05:38 -04:00
jeremystretch
368c2aac24 Fix path to manage.py 2021-04-27 13:47:29 -04:00
jeremystretch
b6f70ed92a Run collecstatic when preparing test environment 2021-04-27 13:42:57 -04:00
jeremystretch
98c2914eeb Get preferences only if user is authenticated 2021-04-27 13:26:50 -04:00
jeremystretch
5b09e4ac0c Add migration for CustomLink button_class default 2021-04-27 13:25:57 -04:00
Jeremy Stretch
5d8cf22897 Merge pull request #6253 from checktheroads/feature
#5893: Upgrade Bootstrap, Remove jQuery, Improve Layout
2021-04-27 11:37:05 -04:00
checktheroads
eea26d7ece add dark mode, screenshots, and social icons to docs 2021-04-26 01:16:23 -07:00
checktheroads
06182bfce4 update docs & readme with screenshots 2021-04-26 01:15:37 -07:00
checktheroads
77bb9eaa73 fix select styles 2021-04-26 00:56:50 -07:00
checktheroads
10d1378277 don't run pycodestyle on node_modules directory 2021-04-26 00:34:25 -07:00
checktheroads
8b2f4780ed fix type error 2021-04-26 00:32:26 -07:00
checktheroads
aef513f038 improve styles and documentation 2021-04-26 00:31:51 -07:00
checktheroads
bb55df34d7 update bootstrap version 2021-04-26 00:31:03 -07:00
checktheroads
2b159fc40f implement dark mode 2021-04-25 20:11:46 -07:00
checktheroads
d7d004b48e undo home template path change 2021-04-25 20:10:41 -07:00
checktheroads
013fbf79e9 add dict.get template tag helper 2021-04-25 20:09:32 -07:00
checktheroads
8a2d4ab68c update readme screenshots 2021-04-23 11:52:42 -07:00
checktheroads
5e4878843e fix custom link rendering 2021-04-23 09:31:16 -07:00
checktheroads
be484d20a2 fix pep8 formatting 2021-04-23 07:57:33 -07:00
checktheroads
eb55761c38 Merge branch 'feature' of https://github.com/netbox-community/netbox into feature
# Conflicts:
#	netbox/project-static/js/forms.js
#	netbox/templates/dcim/location.html
#	netbox/templates/generic/object_list.html
2021-04-22 19:19:03 -07:00
checktheroads
16b57193f1 fix bulk edit styles 2021-04-22 18:58:36 -07:00
checktheroads
5bb7bf8947 properly handle select all confirmation on tables 2021-04-22 18:58:23 -07:00
checktheroads
2c9aa86bf0 fix checkbox styles 2021-04-22 18:57:43 -07:00
checktheroads
d2b915f6c2 add typed wrapper around document.getElementById 2021-04-22 18:56:37 -07:00
checktheroads
7920eff672 get non-field form errors as toast messages 2021-04-22 15:59:16 -07:00
checktheroads
30415e6220 fix template styles 2021-04-22 15:58:57 -07:00
checktheroads
21db209f47 fix issue where select fields with a pre-populated value were reset when forms were submitted, due to having the disabled attribute set. 2021-04-22 15:58:46 -07:00
checktheroads
c3c79d3715 fix rack elevation show/hide image toggle 2021-04-21 13:20:31 -07:00
checktheroads
8c3229ec38 fix device template styles 2021-04-21 13:20:09 -07:00
checktheroads
8c92cfb814 fix required label styles after migration to material design icons 2021-04-21 13:19:46 -07:00
checktheroads
3eb866f5d2 fix image attachment styles 2021-04-21 13:19:30 -07:00
checktheroads
3471c737b9 fix confirmation form styles 2021-04-21 13:19:08 -07:00
checktheroads
d164ccb6c7 fix image upload field style 2021-04-21 13:18:48 -07:00
checktheroads
ce98957be0 remove old files 2021-04-21 11:31:39 -07:00
checktheroads
fe4a9bff2d remove all bootstrap icons in favor of material design icons 2021-04-21 11:31:28 -07:00
checktheroads
024f3962b2 use getNetboxData utility function in job handling 2021-04-21 10:40:37 -07:00
checktheroads
a55316aef9 fix scripts/reports template layout 2021-04-21 10:39:56 -07:00
checktheroads
08b955f8b6 migrate napalm device status to typescript 2021-04-21 10:19:13 -07:00
jeremystretch
9476fda987 Closes #5994: Drop support for display_field argument on ObjectVar 2021-04-21 10:29:25 -04:00
jeremystretch
b509d96f18 Closes #5532: Drop support for Python 3.6 2021-04-21 10:20:09 -04:00
checktheroads
4827cd24d8 improve styles 2021-04-20 12:45:39 -07:00
checktheroads
acca69a8a9 implement table filtering on generic object list 2021-04-20 12:45:30 -07:00
checktheroads
d171e781d2 fix connection toggle button style 2021-04-20 09:38:13 -07:00
checktheroads
99f0e31810 clean up typescript initialization 2021-04-20 09:34:12 -07:00
checktheroads
0aa8fc2fc2 migrate napalm/device config to typescript 2021-04-20 01:43:36 -07:00
checktheroads
98829b209a fix device template style 2021-04-20 01:18:34 -07:00
checktheroads
f3eb0df081 migrate napalm/lldp to typescript 2021-04-20 01:18:24 -07:00
checktheroads
f83fb57d38 migrate vlan group scope selector to typescript 2021-04-19 21:30:50 -07:00
checktheroads
7d07631f12 migrate connection toggle to typescript 2021-04-19 20:48:03 -07:00
checktheroads
8737e9824f migrate url handling of tab display to typescript 2021-04-19 20:47:36 -07:00
checktheroads
ea472c844e Merge branch 'feature' of https://github.com/netbox-community/netbox into feature
# Conflicts:
#	netbox/templates/generic/object_list.html
2021-04-19 19:40:15 -07:00
checktheroads
a29e2582ed dist updates 2021-04-19 17:10:27 -07:00
checktheroads
98477ef6c6 update device/interfaces template with correct interface filtering elements 2021-04-19 17:09:42 -07:00
checktheroads
86be6aebff fix issue with option re-ordering 2021-04-19 17:09:15 -07:00
checktheroads
f9754bddf1 migrate move up/down buttons to typescript 2021-04-19 17:00:18 -07:00
checktheroads
03390815af migrate table config to typescript & update templates 2021-04-19 17:00:09 -07:00
checktheroads
82ef6f8ac5 implement generic api request function 2021-04-19 16:59:26 -07:00
checktheroads
f7c1bc71d9 migrate templates to bootstrap 5 2021-04-18 16:42:28 -07:00
checktheroads
4b0d5815c0 migrate script job checking to typescript & update templates for bootstrap 5 2021-04-18 14:17:13 -07:00
checktheroads
5c07a968fe update styles 2021-04-18 11:36:41 -07:00
checktheroads
f4ac87af3a add bootstrap mixin subclass to bulk rename form so classes are properly assigned 2021-04-18 11:36:12 -07:00
checktheroads
125965b559 migrate templates to bootstrap 5 2021-04-18 11:35:42 -07:00
checktheroads
43703b6f40 add bootstrap classes to VC membership form 2021-04-18 11:35:21 -07:00
checktheroads
7cdae0f689 add provider networks to navigation 2021-04-18 00:23:06 -07:00
checktheroads
61ce2c95b3 migrate templates to bootstrap 5 2021-04-18 00:22:52 -07:00
checktheroads
08128748a7 migrate generic modal to bootstrap 5 2021-04-17 18:35:20 -07:00
checktheroads
c9fe7f6db6 migrate cluster templates to bootstrap 5 2021-04-17 18:35:09 -07:00
checktheroads
a8cad28da7 migrate interface filtering to typescript 2021-04-17 18:16:13 -07:00
checktheroads
c035af5409 migrate virtual machine & vm interface to bootstrap 5 2021-04-17 18:15:53 -07:00
checktheroads
eb951fdaf1 migrate secrets to bootstrap 5 and deprecate jquery functions 2021-04-17 17:18:13 -07:00
checktheroads
726ab7fc05 fix user key styles 2021-04-16 17:04:08 -07:00
checktheroads
fb25c79b9c migrate yaml nav item definitions to dataclasses 2021-04-16 15:55:06 -07:00
checktheroads
3c0f4278c7 update extras templates 2021-04-16 14:58:44 -07:00
checktheroads
59256cf8b3 update cable trace styles 2021-04-15 16:53:04 -07:00
checktheroads
844186d520 fix object title style 2021-04-15 16:52:46 -07:00
checktheroads
93b6d785f3 fix circuit termination styles 2021-04-15 15:26:59 -07:00
checktheroads
0e6e9c5238 fix table config modal styles 2021-04-14 17:05:10 -07:00
checktheroads
de65ffb99d fix napalm tab layout from merge conflict 2021-04-14 16:11:25 -07:00
checktheroads
2d5472cf2a fix object list layout 2021-04-14 16:05:08 -07:00
checktheroads
c3d908126f Merge branch 'feature' of https://github.com/netbox-community/netbox into feature 2021-04-14 11:33:33 -07:00
checktheroads
4c3b0abe7b Merge branch 'feature' of https://github.com/netbox-community/netbox into feature
# Conflicts:
#	netbox/dcim/tables/template_code.py
#	netbox/netbox/views/__init__.py
#	netbox/project-static/css/base.css
#	netbox/templates/base.html
#	netbox/templates/circuits/circuit.html
#	netbox/templates/circuits/circuittermination_edit.html
#	netbox/templates/circuits/inc/circuit_termination.html
#	netbox/templates/circuits/provider.html
#	netbox/templates/dcim/device.html
#	netbox/templates/dcim/device/base.html
#	netbox/templates/dcim/device_component.html
#	netbox/templates/dcim/devicetype.html
#	netbox/templates/dcim/inc/device_napalm_tabs.html
#	netbox/templates/dcim/rack.html
#	netbox/templates/dcim/site.html
#	netbox/templates/dcim/virtualchassis.html
#	netbox/templates/extras/configcontext.html
#	netbox/templates/extras/object_journal.html
#	netbox/templates/extras/tag.html
#	netbox/templates/generic/object.html
#	netbox/templates/generic/object_list.html
#	netbox/templates/home.html
#	netbox/templates/inc/nav_menu.html
#	netbox/templates/ipam/aggregate.html
#	netbox/templates/ipam/ipaddress.html
#	netbox/templates/ipam/prefix.html
#	netbox/templates/ipam/vlan.html
#	netbox/templates/ipam/vlangroup_edit.html
#	netbox/templates/ipam/vlangroup_vlans.html
#	netbox/templates/secrets/secret.html
#	netbox/templates/tenancy/tenant.html
#	netbox/templates/users/api_tokens.html
#	netbox/templates/virtualization/cluster.html
#	netbox/templates/virtualization/vminterface_edit.html
#	netbox/utilities/forms/fields.py
#	netbox/utilities/templates/buttons/export.html
2021-04-14 11:30:15 -07:00
checktheroads
8ca2884c1c dist updates 2021-04-13 21:51:30 -07:00
checktheroads
d1d2ad6a5c bootstrap 5 class updates 2021-04-13 21:51:12 -07:00
checktheroads
21d31b5747 fix prefix table styles 2021-03-19 09:38:26 -07:00
checktheroads
1ea208ba00 fix handling of filtered-by properties 2021-03-19 09:26:39 -07:00
checktheroads
5fdf2d3416 replace rack elevation logic 2021-03-19 09:25:27 -07:00
checktheroads
5f5df97e59 dist updates 2021-03-17 23:35:05 -07:00
checktheroads
cbd4d2f99a fix journal layout 2021-03-17 23:32:08 -07:00
checktheroads
a1ac1876ad handle selection resets 2021-03-17 23:32:01 -07:00
checktheroads
58841e85db update css classes for bootstrap 5 colors 2021-03-17 23:31:15 -07:00
checktheroads
46cd22ea7e style textareas supporting markdown with monospace font 2021-03-17 23:30:39 -07:00
checktheroads
cf8dad5763 fix object journal styles 2021-03-17 22:37:13 -07:00
checktheroads
8ea2949d84 Update sidenav menu data with Locations and SiteGroups 2021-03-17 22:25:51 -07:00
checktheroads
e4af9ebc6f fix import/export styles 2021-03-17 22:25:20 -07:00
checktheroads
7a3af8de83 Merge branch 'feature' of https://github.com/netbox-community/netbox into feature
# Conflicts:
#	netbox/dcim/tables/template_code.py
#	netbox/netbox/forms.py
#	netbox/templates/dcim/cable_connect.html
#	netbox/templates/dcim/consoleport.html
#	netbox/templates/dcim/consoleserverport.html
#	netbox/templates/dcim/device.html
#	netbox/templates/dcim/device/base.html
#	netbox/templates/dcim/device_edit.html
#	netbox/templates/dcim/interface.html
#	netbox/templates/dcim/rack.html
#	netbox/templates/dcim/rack_edit.html
#	netbox/templates/dcim/site.html
#	netbox/templates/extras/configcontext.html
#	netbox/templates/extras/objectchange.html
#	netbox/templates/generic/object.html
#	netbox/templates/inc/nav_menu.html
#	netbox/templates/ipam/ipaddress_edit.html
#	netbox/templates/ipam/vrf.html
#	netbox/utilities/templates/buttons/export.html
2021-03-17 22:02:43 -07:00
checktheroads
05c0a9256d dist updates 2021-03-17 13:00:29 -07:00
checktheroads
c10b8cf55b bootstrap 5 template updates 2021-03-17 13:00:20 -07:00
checktheroads
4e837c2770 update select to handle display property 2021-03-17 12:39:35 -07:00
checktheroads
9c66e1f01b dist updates 2021-03-15 08:54:09 -07:00
checktheroads
683f75fad1 bootstrap 5 template updates 2021-03-15 08:54:01 -07:00
checktheroads
a303a0dfb7 fix form error rendering 2021-03-15 08:53:48 -07:00
checktheroads
b0d634a89e add startswith helper 2021-03-15 08:53:28 -07:00
checktheroads
f62e49c02b remove console.log 2021-03-15 08:34:35 -07:00
checktheroads
61f137866e customize file upload field 2021-03-15 07:49:59 -07:00
checktheroads
3f1714f076 fix select loading display 2021-03-15 07:49:39 -07:00
checktheroads
afce8e2516 dist updates 2021-03-14 17:32:07 -07:00
checktheroads
4e30ed9693 style fixes 2021-03-14 17:31:55 -07:00
checktheroads
7f02b9436b fix styling when element is not in a form-floating div 2021-03-14 17:31:42 -07:00
checktheroads
a237725d0d improve handling of loading data 2021-03-14 17:31:06 -07:00
checktheroads
91561e9ca5 fix search panel styling 2021-03-14 17:27:03 -07:00
checktheroads
4ab5d15ee6 update templates to bootstrap 5 classes 2021-03-14 17:26:56 -07:00
checktheroads
187f4fa4aa fix device & device component templates 2021-03-14 17:26:33 -07:00
checktheroads
3bb2b9e8f6 dist updates 2021-03-14 01:07:01 -07:00
checktheroads
59d8c0b321 handle server-side form errors 2021-03-14 01:06:51 -07:00
checktheroads
d0cb7d843d fix select data handling 2021-03-14 01:06:35 -07:00
checktheroads
991f71bf28 update templates to bootstrap 5 classes 2021-03-14 01:06:18 -07:00
checktheroads
362392d1de Merge branch 'feature' of github.com:checktheroads/netbox into feature 2021-03-13 14:26:47 -07:00
checktheroads
9e51ddd8d8 fix prefix layout 2021-03-13 14:26:12 -07:00
checktheroads
f65f924011 update templates to bootstrap 5 classes 2021-03-13 14:26:06 -07:00
checktheroads
bc4f19c967 update templates to bootstrap 5 classes 2021-03-13 14:15:23 -07:00
checktheroads
b482c30866 add dist to git 2021-03-13 13:56:40 -07:00
checktheroads
676d93e829 add UI readme 2021-03-13 13:51:55 -07:00
checktheroads
cb93953b2c clean up ui src files 2021-03-13 13:51:51 -07:00
checktheroads
4c60a602b9 bootstrap 5 template updates 2021-03-13 11:16:29 -07:00
checktheroads
912cd220cc add javascript 2021-03-13 02:31:57 -07:00
checktheroads
3b120c0372 add styles 2021-03-13 02:31:46 -07:00
checktheroads
2799d71e93 add ui dependencies 2021-03-13 02:31:28 -07:00
checktheroads
fcd7b42941 remove legacy libraries 2021-03-13 02:29:56 -07:00
checktheroads
6fe2f83435 scaffold new ui directory 2021-03-13 02:28:21 -07:00
checktheroads
94c25b0ff4 update templates & rendering for bootstrap 5 2021-03-13 02:27:32 -07:00
checktheroads
ec38ec8004 restructure home stats for new layout 2021-03-13 02:25:28 -07:00
checktheroads
1d9e55ca6e implement layout changes 2021-03-13 02:20:50 -07:00
checktheroads
9b89afd6dc begin bootstrap 5 migration, update templates 2021-03-13 02:19:42 -07:00
1924 changed files with 56983 additions and 209688 deletions

8
.gitattributes vendored
View File

@@ -1,5 +1,5 @@
*.sh text eol=lf
# Treat minified or packed JS/CSS files as binary, as they're not meant to be human-readable
*.min.* binary
*.map binary
*.pack.js binary
# Treat compiled JS/CSS files as binary, as they're not meant to be human-readable
netbox/project-static/dist/*.css binary
netbox/project-static/dist/*.js binary
netbox/project-static/dist/*.js.map binary

View File

@@ -13,11 +13,8 @@ body:
- type: input
attributes:
label: NetBox version
description: >
What version of NetBox are you currently running? (If you don't have access to the most
recent NetBox release, consider testing on our [demo instance](https://demo.netbox.dev/)
before opening a bug report to see if your issue has already been addressed.)
placeholder: v2.11.11
description: What version of NetBox are you currently running?
placeholder: v3.1.0
validations:
required: true
- type: dropdown
@@ -25,10 +22,9 @@ body:
label: Python version
description: What version of Python are you currently running?
options:
- 3.6
- 3.7
- 3.8
- 3.9
- "3.7"
- "3.8"
- "3.9"
validations:
required: true
- type: textarea

View File

@@ -14,7 +14,7 @@ body:
attributes:
label: NetBox version
description: What version of NetBox are you currently running?
placeholder: v2.11.11
placeholder: v3.1.0
validations:
required: true
- type: dropdown
@@ -30,8 +30,10 @@ body:
attributes:
label: Proposed functionality
description: >
Describe in detail the new feature or behavior you'd like to propose. Include any specific
changes to work flows, data models, or the user interface.
Describe in detail the new feature or behavior you are proposing. Include any specific changes
to work flows, data models, and/or the user interface. The more detail you provide here, the
greater chance your proposal has of being discussed. Feature requests which don't include an
actionable implementation plan will be rejected.
validations:
required: true
- type: textarea

View File

@@ -5,7 +5,8 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.6, 3.7, 3.8]
python-version: [3.7, 3.8, 3.9]
node-version: [14.x]
services:
redis:
image: redis
@@ -33,15 +34,33 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies & set up configuration
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pycodestyle coverage
ln -s configuration.testing.py netbox/netbox/configuration.py
yarn --cwd netbox/project-static
- name: Build documentation
run: mkdocs build
- name: Collect static files
run: python netbox/manage.py collectstatic --no-input
- name: Check PEP8 compliance
run: pycodestyle --ignore=W504,E501 netbox/
run: pycodestyle --ignore=W504,E501 --exclude=node_modules netbox/
- name: Check UI ESLint, TypeScript, and Prettier Compliance
run: yarn --cwd netbox/project-static validate
- name: Validate Static Asset Integrity
run: scripts/verify-bundles.sh
- name: Run tests
run: coverage run --source="netbox/" netbox/manage.py test netbox/

8
.gitignore vendored
View File

@@ -1,9 +1,13 @@
*.pyc
*.swp
npm-debug.log*
yarn-debug.log*
yarn-error.log*
/netbox/project-static/node_modules
/netbox/project-static/docs/*
!/netbox/project-static/docs/.info
/netbox/netbox/configuration.py
/netbox/netbox/ldap_config.py
/netbox/project-static/.cache
/netbox/project-static/node_modules
/netbox/reports/*
!/netbox/reports/__init__.py
/netbox/scripts/*

View File

@@ -76,14 +76,10 @@ free to add a comment with any additional justification for the feature.
(However, note that comments with no substance other than a "+1" will be
deleted. Please use GitHub's reactions feature to indicate your support.)
* Due to a large backlog of feature requests, we are not currently accepting
any proposals which substantially extend NetBox's functionality beyond its
current feature set. This includes the introduction of any new views or models
which have not already been proposed in an existing feature request.
* Before filing a new feature request, consider raising your idea on the
mailing list first. Feedback you receive there will help validate and shape the
proposed feature before filing a formal issue.
* Before filing a new feature request, consider raising your idea in a
[GitHub discussion](https://github.com/netbox-community/netbox/discussions)
first. Feedback you receive there will help validate and shape the proposed
feature before filing a formal issue.
* Good feature requests are very narrowly defined. Be sure to thoroughly
describe the functionality and data model(s) being proposed. The more effort

View File

@@ -54,11 +54,15 @@ our [contributing guide](CONTRIBUTING.md) prior to beginning any work.
### Screenshots
![Screenshot of main page](docs/media/screenshot1.png "Main page")
![Screenshot of main page (light mode)](docs/media/screenshots/home-light.png "Main page (light mode)")
![Screenshot of rack elevation](docs/media/screenshot2.png "Rack elevation")
![Screenshot of main page (dark mode)](docs/media/screenshots/home-dark.png "Main page (dark mode)")
![Screenshot of prefix hierarchy](docs/media/screenshot3.png "Prefix hierarchy")
![Screenshot of rack elevation](docs/media/screenshots/rack.png "Rack elevation")
![Screenshot of prefixes hierarchy](docs/media/screenshots/prefixes-list.png "Prefixes hierarchy")
![Screenshot of cable trace](docs/media/screenshots/cable-trace.png "Cable tracing")
### Related projects

View File

@@ -2,10 +2,6 @@
# https://github.com/django/django
Django
# Django caching using Redis
# https://github.com/Suor/django-cacheops
django-cacheops
# Django middleware which permits cross-domain API requests
# https://github.com/OttoYiu/django-cors-headers
django-cors-headers
@@ -18,6 +14,10 @@ django-debug-toolbar
# https://github.com/carltongibson/django-filter
django-filter
# Django debug toolbar extension with support for GraphiQL
# https://github.com/flavors/django-graphiql-debug-toolbar/
django-graphiql-debug-toolbar
# Modified Preorder Tree Traversal (recursive nesting of objects)
# https://github.com/django-mptt/django-mptt
django-mptt
@@ -30,6 +30,10 @@ django-pglocks
# https://github.com/korfuri/django-prometheus
django-prometheus
# Django chaching backend using Redis
# https://github.com/jazzband/django-redis
django-redis
# Django integration for RQ (Reqis queuing)
# https://github.com/rq/django-rq
django-rq
@@ -54,6 +58,10 @@ djangorestframework
# https://github.com/axnsan12/drf-yasg
drf-yasg[validation]
# Django wrapper for Graphene (GraphQL support)
# https://github.com/graphql-python/graphene-django
graphene_django
# WSGI HTTP server
# https://gunicorn.org/
gunicorn
@@ -66,6 +74,14 @@ Jinja2
# https://github.com/Python-Markdown/markdown
Markdown
# File inclusion plugin for Python-Markdown
# https://github.com/cmacmackin/markdown-include
markdown-include
# MkDocs Material theme (for documentation build)
# https://github.com/squidfunk/mkdocs-material
mkdocs-material
# Library for manipulating IP prefixes and addresses
# https://github.com/drkjam/netaddr
netaddr
@@ -78,10 +94,6 @@ Pillow
# https://github.com/psycopg/psycopg2
psycopg2-binary
# Extensive cryptographic library (fork of pycrypto)
# https://github.com/Legrandin/pycryptodome
pycryptodome
# YAML rendering library
# https://github.com/yaml/pyyaml
PyYAML
@@ -90,6 +102,14 @@ PyYAML
# https://github.com/andymccurdy/redis-py
redis
# Social authentication framework
# https://github.com/python-social-auth/social-core
social-auth-core[all]
# Django app for social-auth-core
# https://github.com/python-social-auth/social-app-django
social-auth-app-django
# SVG image rendering (used for rack elevations)
# https://github.com/mozman/svgwrite
svgwrite

View File

@@ -0,0 +1,9 @@
#!/bin/sh
# This shell script invokes NetBox's housekeeping management command, which
# intended to be run nightly. This script can be copied into your system's
# daily cron directory (e.g. /etc/cron.daily), or referenced directly from
# within the cron configuration file.
#
# If NetBox has been installed into a nonstandard location, update the paths
# below.
/opt/netbox/venv/bin/python /opt/netbox/netbox/manage.py housekeeping

View File

@@ -11,7 +11,7 @@ User=netbox
Group=netbox
WorkingDirectory=/opt/netbox
ExecStart=/opt/netbox/venv/bin/python3 /opt/netbox/netbox/manage.py rqworker
ExecStart=/opt/netbox/venv/bin/python3 /opt/netbox/netbox/manage.py rqworker high default low
Restart=on-failure
RestartSec=30

View File

@@ -1,28 +0,0 @@
# Caching
NetBox supports database query caching using [django-cacheops](https://github.com/Suor/django-cacheops) and Redis. When a query is made, the results are cached in Redis for a short period of time, as defined by the [CACHE_TIMEOUT](../configuration/optional-settings.md#cache_timeout) parameter. Within that time, all recurrences of that specific query will return the pre-fetched results from the cache.
!!! warning
In NetBox v2.11.10 and later queryset caching is disabled by default, and must be configured.
If a change is made to any of the objects returned by the query within that time, or if the timeout expires, the results are automatically invalidated and the next request for those results will be sent to the database.
## Invalidating Cached Data
Although caching is performed automatically and rarely requires administrative intervention, NetBox provides the `invalidate` management command to force invalidation of cached results. This command can reference a specific object by its type and numeric ID:
```no-highlight
$ python netbox/manage.py invalidate dcim.Device.34
```
Alternatively, it can also delete all cached results for an object type:
```no-highlight
$ python netbox/manage.py invalidate dcim.Device
```
Finally, calling it with the `all` argument will force invalidation of the entire cache database:
```no-highlight
$ python netbox/manage.py invalidate all
```

View File

@@ -1,6 +1,6 @@
# NAPALM
NetBox supports integration with the [NAPALM automation](https://napalm-automation.net/) library. NAPALM allows NetBox to serve a proxy for operational data, fetching live data from network devices and returning it to a requester via its REST API. Note that NetBox does not store any NAPALM data locally.
NetBox supports integration with the [NAPALM automation](https://github.com/napalm-automation/napalm) library. NAPALM allows NetBox to serve a proxy for operational data, fetching live data from network devices and returning it to a requester via its REST API. Note that NetBox does not store any NAPALM data locally.
The NetBox UI will display tabs for status, LLDP neighbors, and configuration under the device view if the following conditions are met:
@@ -29,7 +29,7 @@ GET /api/dcim/devices/1/napalm/?method=get_environment
## Authentication
By default, the [`NAPALM_USERNAME`](../configuration/optional-settings.md#napalm_username) and [`NAPALM_PASSWORD`](../configuration/optional-settings.md#napalm_password) configuration parameters are used for NAPALM authentication. They can be overridden for an individual API call by specifying the `X-NAPALM-Username` and `X-NAPALM-Password` headers.
By default, the [`NAPALM_USERNAME`](../configuration/dynamic-settings.md#napalm_username) and [`NAPALM_PASSWORD`](../configuration/dynamic-settings.md#napalm_password) configuration parameters are used for NAPALM authentication. They can be overridden for an individual API call by specifying the `X-NAPALM-Username` and `X-NAPALM-Password` headers.
```
$ curl "http://localhost/api/dcim/devices/1/napalm/?method=get_environment" \

View File

@@ -26,4 +26,4 @@ For the exhaustive list of exposed metrics, visit the `/metrics` endpoint on you
When deploying NetBox in a multiprocess manner (e.g. running multiple Gunicorn workers) the Prometheus client library requires the use of a shared directory to collect metrics from all worker processes. To configure this, first create or designate a local directory to which the worker processes have read and write access, and then configure your WSGI service (e.g. Gunicorn) to define this path as the `prometheus_multiproc_dir` environment variable.
!!! warning
If having accurate long-term metrics in a multiprocess environment is crucial to your deployment, it's recommended you use the `uwsgi` library instead of `gunicorn`. The issue lies in the way `gunicorn` tracks worker processes (vs `uwsgi`) which helps manage the metrics files created by the above configurations. If you're using NetBox with gunicorn in a containerized enviroment following the one-process-per-container methodology, then you will likely not need to change to `uwsgi`. More details can be found in [issue #3779](https://github.com/netbox-community/netbox/issues/3779#issuecomment-590547562).
If having accurate long-term metrics in a multiprocess environment is crucial to your deployment, it's recommended you use the `uwsgi` library instead of `gunicorn`. The issue lies in the way `gunicorn` tracks worker processes (vs `uwsgi`) which helps manage the metrics files created by the above configurations. If you're using NetBox with gunicorn in a containerized environment following the one-process-per-container methodology, then you will likely not need to change to `uwsgi`. More details can be found in [issue #3779](https://github.com/netbox-community/netbox/issues/3779#issuecomment-590547562).

View File

@@ -1,85 +1,4 @@
# Webhooks
A webhook is a mechanism for conveying to some external system a change that took place in NetBox. For example, you may want to notify a monitoring system whenever the status of a device is updated in NetBox. This can be done by creating a webhook for the device model in NetBox and identifying the webhook receiver. When NetBox detects a change to a device, an HTTP request containing the details of the change and who made it be sent to the specified receiver. Webhooks are configured in the admin UI under Extras > Webhooks.
!!! warning
Webhooks support the inclusion of user-submitted code to generate custom headers and payloads, which may pose security risks under certain conditions. Only grant permission to create or modify webhooks to trusted users.
## Configuration
* **Name** - A unique name for the webhook. The name is not included with outbound messages.
* **Object type(s)** - The type or types of NetBox object that will trigger the webhook.
* **Enabled** - If unchecked, the webhook will be inactive.
* **Events** - A webhook may trigger on any combination of create, update, and delete events. At least one event type must be selected.
* **HTTP method** - The type of HTTP request to send. Options include `GET`, `POST`, `PUT`, `PATCH`, and `DELETE`.
* **URL** - The fuly-qualified URL of the request to be sent. This may specify a destination port number if needed.
* **HTTP content type** - The value of the request's `Content-Type` header. (Defaults to `application/json`)
* **Additional headers** - Any additional headers to include with the request (optional). Add one header per line in the format `Name: Value`. Jinja2 templating is supported for this field (see below).
* **Body template** - The content of the request being sent (optional). Jinja2 templating is supported for this field (see below). If blank, NetBox will populate the request body with a raw dump of the webhook context. (If the HTTP cotent type is set to `application/json`, this will be formatted as a JSON object.)
* **Secret** - A secret string used to prove authenticity of the request (optional). This will append a `X-Hook-Signature` header to the request, consisting of a HMAC (SHA-512) hex digest of the request body using the secret as the key.
* **SSL verification** - Uncheck this option to disable validation of the receiver's SSL certificate. (Disable with caution!)
* **CA file path** - The file path to a particular certificate authority (CA) file to use when validating the receiver's SSL certificate (optional).
## Jinja2 Template Support
[Jinja2 templating](https://jinja.palletsprojects.com/) is supported for the `additional_headers` and `body_template` fields. This enables the user to convey object data in the request headers as well as to craft a customized request body. Request content can be crafted to enable the direct interaction with external systems by ensuring the outgoing message is in a format the receiver expects and understands.
For example, you might create a NetBox webhook to [trigger a Slack message](https://api.slack.com/messaging/webhooks) any time an IP address is created. You can accomplish this using the following configuration:
* Object type: IPAM > IP address
* HTTP method: `POST`
* URL: Slack incoming webhook URL
* HTTP content type: `application/json`
* Body template: `{"text": "IP address {{ data['address'] }} was created by {{ username }}!"}`
### Available Context
The following data is available as context for Jinja2 templates:
* `event` - The type of event which triggered the webhook: created, updated, or deleted.
* `model` - The NetBox model which triggered the change.
* `timestamp` - The time at which the event occurred (in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format).
* `username` - The name of the user account associated with the change.
* `request_id` - The unique request ID. This may be used to correlate multiple changes associated with a single request.
* `data` - A detailed representation of the object in its current state. This is typically equivalent to the model's representation in NetBox's REST API.
* `snapshots` - Minimal "snapshots" of the object state both before and after the change was made; provided ass a dictionary with keys named `prechange` and `postchange`. These are not as extensive as the fully serialized representation, but contain enough information to convey what has changed.
### Default Request Body
If no body template is specified, the request body will be populated with a JSON object containing the context data. For example, a newly created site might appear as follows:
```no-highlight
{
"event": "created",
"timestamp": "2021-03-09 17:55:33.968016+00:00",
"model": "site",
"username": "jstretch",
"request_id": "fdbca812-3142-4783-b364-2e2bd5c16c6a",
"data": {
"id": 19,
"name": "Site 1",
"slug": "site-1",
"status":
"value": "active",
"label": "Active",
"id": 1
},
"region": null,
...
},
"snapshots": {
"prechange": null,
"postchange": {
"created": "2021-03-09",
"last_updated": "2021-03-09T17:55:33.851Z",
"name": "Site 1",
"slug": "site-1",
"status": "active",
...
}
}
}
```
{!models/extras/webhook.md!}
## Webhook Processing

View File

@@ -0,0 +1,37 @@
# Authentication
## Local Authentication
Local user accounts and groups can be created in NetBox under the "Authentication and Authorization" section of the administrative user interface. This interface is available only to users with the "staff" permission enabled.
At a minimum, each user account must have a username and password set. User accounts may also denote a first name, last name, and email address. [Permissions](./permissions.md) may also be assigned to users and/or groups within the admin UI.
## Remote Authentication
NetBox may be configured to provide user authenticate via a remote backend in addition to local authentication. This is done by setting the `REMOTE_AUTH_BACKEND` configuration parameter to a suitable backend class. NetBox provides several options for remote authentication.
### LDAP Authentication
```python
REMOTE_AUTH_BACKEND = 'netbox.authentication.LDAPBackend'
```
NetBox includes an authentication backend which supports LDAP. See the [LDAP installation docs](../installation/6-ldap.md) for more detail about this backend.
### HTTP Header Authentication
```python
REMOTE_AUTH_BACKEND = 'netbox.authentication.RemoteUserBackend'
```
Another option for remote authentication in NetBox is to enable HTTP header-based user assignment. The front end HTTP server (e.g. nginx or Apache) performs client authentication as a process external to NetBox, and passes information about the authenticated user via HTTP headers. By default, the user is assigned via the `REMOTE_USER` header, but this can be customized via the `REMOTE_AUTH_HEADER` configuration parameter.
### Single Sign-On (SSO)
```python
REMOTE_AUTH_BACKEND = 'social_core.backends.google.GoogleOAuth2'
```
NetBox supports single sign-on authentication via the [python-social-auth](https://github.com/python-social-auth) library. To enable SSO, specify the path to the desired authentication backend within the `social_core` Python package. Please see the complete list of [supported authentication backends](https://github.com/python-social-auth/social-core/tree/master/social_core/backends) for the available options.
Most remote authentication backends require some additional configuration through settings prefixed with `SOCIAL_AUTH_`. These will be automatically imported from NetBox's `configuration.py` file. Additionally, the [authentication pipeline](https://python-social-auth.readthedocs.io/en/latest/pipeline.html) can be customized via the `SOCIAL_AUTH_PIPELINE` parameter.

View File

@@ -0,0 +1,17 @@
# Housekeeping
NetBox includes a `housekeeping` management command that should be run nightly. This command handles:
* Clearing expired authentication sessions from the database
* Deleting changelog records older than the configured [retention time](../configuration/optional-settings.md#changelog_retention)
This command can be invoked directly, or by using the shell script provided at `/opt/netbox/contrib/netbox-housekeeping.sh`. This script can be linked from your cron scheduler's daily jobs directory (e.g. `/etc/cron.daily`) or referenced directly within the cron configuration file.
```shell
sudo ln -s /opt/netbox/contrib/netbox-housekeeping.sh /etc/cron.daily/netbox-housekeeping
```
!!! note
On Debian-based systems, be sure to omit the `.sh` file extension when linking to the script from within a cron directory. Otherwise, the task may not run.
The `housekeeping` command can also be run manually at any time: Running the command outside scheduled execution times will not interfere with its operation.

View File

@@ -11,7 +11,7 @@ This will launch a lightly customized version of [the built-in Django shell](htt
```
$ ./manage.py nbshell
### NetBox interactive shell (localhost)
### Python 3.6.9 | Django 2.2.11 | NetBox 2.7.10
### Python 3.7.10 | Django 3.2.5 | NetBox 3.0
### lsmodels() will show available models. Use help(<model>) for more info.
```
@@ -194,7 +194,7 @@ To delete multiple objects at once, call `delete()` on a filtered queryset. It's
>>> Device.objects.filter(name__icontains='test').count()
27
>>> Device.objects.filter(name__icontains='test').delete()
(35, {'dcim.DeviceBay': 0, 'secrets.Secret': 0, 'dcim.InterfaceConnection': 4,
(35, {'dcim.DeviceBay': 0, 'dcim.InterfaceConnection': 4,
'extras.ImageAttachment': 0, 'dcim.Device': 27, 'dcim.Interface': 4,
'dcim.ConsolePort': 0, 'dcim.PowerPort': 0})
```

View File

@@ -1,8 +1,8 @@
# Permissions
NetBox v2.9 introduced a new object-based permissions framework, which replace's Django's built-in permissions model. Object-based permissions enable an administrator to grant users or groups the ability to perform an action on arbitrary subsets of objects in NetBox, rather than all objects of a certain type. For example, it is possible to grant a user permission to view only sites within a particular region, or to modify only VLANs with a numeric ID within a certain range.
NetBox v2.9 introduced a new object-based permissions framework, which replaces Django's built-in permissions model. Object-based permissions enable an administrator to grant users or groups the ability to perform an action on arbitrary subsets of objects in NetBox, rather than all objects of a certain type. For example, it is possible to grant a user permission to view only sites within a particular region, or to modify only VLANs with a numeric ID within a certain range.
{!docs/models/users/objectpermission.md!}
{!models/users/objectpermission.md!}
### Example Constraint Definitions

View File

@@ -71,14 +71,3 @@ To extract the saved archive into a new installation, run the following from the
```no-highlight
tar -xf netbox_media.tar.gz
```
---
## Cache Invalidation
If you are migrating your instance of NetBox to a different machine, be sure to first invalidate the cache on the original instance by issuing the `invalidate all` management command (within the Python virtual environment):
```no-highlight
# source /opt/netbox/venv/bin/activate
(venv) # python3 manage.py invalidate all
```

View File

@@ -0,0 +1,180 @@
# Dynamic Configuration Settings
These configuration parameters are primarily controlled via NetBox's admin interface (under Admin > Extras > Configuration Revisions). These setting may also be overridden in `configuration.py`; this will prevent them from being modified via the UI.
---
## ALLOWED_URL_SCHEMES
Default: `('file', 'ftp', 'ftps', 'http', 'https', 'irc', 'mailto', 'sftp', 'ssh', 'tel', 'telnet', 'tftp', 'vnc', 'xmpp')`
A list of permitted URL schemes referenced when rendering links within NetBox. Note that only the schemes specified in this list will be accepted: If adding your own, be sure to replicate all of the default values as well (excluding those schemes which are not desirable).
---
## BANNER_TOP
## BANNER_BOTTOM
Setting these variables will display custom content in a banner at the top and/or bottom of the page, respectively. HTML is allowed. To replicate the content of the top banner in the bottom banner, set:
```python
BANNER_TOP = 'Your banner text'
BANNER_BOTTOM = BANNER_TOP
```
---
## BANNER_LOGIN
This defines custom content to be displayed on the login page above the login form. HTML is allowed.
---
## CHANGELOG_RETENTION
Default: 90
The number of days to retain logged changes (object creations, updates, and deletions). Set this to `0` to retain
changes in the database indefinitely.
!!! warning
If enabling indefinite changelog retention, it is recommended to periodically delete old entries. Otherwise, the database may eventually exceed capacity.
---
## CUSTOM_VALIDATORS
This is a mapping of models to [custom validators](../customization/custom-validation.md) that have been defined locally to enforce custom validation logic. An example is provided below:
```python
CUSTOM_VALIDATORS = {
"dcim.site": [
{
"name": {
"min_length": 5,
"max_length": 30
}
},
"my_plugin.validators.Validator1"
],
"dim.device": [
"my_plugin.validators.Validator1"
]
}
```
---
## ENFORCE_GLOBAL_UNIQUE
Default: False
By default, NetBox will permit users to create duplicate prefixes and IP addresses in the global table (that is, those which are not assigned to any VRF). This behavior can be disabled by setting `ENFORCE_GLOBAL_UNIQUE` to True.
---
## GRAPHQL_ENABLED
Default: True
Setting this to False will disable the GraphQL API.
---
## MAINTENANCE_MODE
Default: False
Setting this to True will display a "maintenance mode" banner at the top of every page. Additionally, NetBox will no longer update a user's "last active" time upon login. This is to allow new logins when the database is in a read-only state. Recording of login times will resume when maintenance mode is disabled.
---
## MAPS_URL
Default: `https://maps.google.com/?q=` (Google Maps)
This specifies the URL to use when presenting a map of a physical location by street address or GPS coordinates. The URL must accept either a free-form street address or a comma-separated pair of numeric coordinates appended to it.
---
## MAX_PAGE_SIZE
Default: 1000
A web user or API consumer can request an arbitrary number of objects by appending the "limit" parameter to the URL (e.g. `?limit=1000`). This parameter defines the maximum acceptable limit. Setting this to `0` or `None` will allow a client to retrieve _all_ matching objects at once with no limit by specifying `?limit=0`.
---
## NAPALM_USERNAME
## NAPALM_PASSWORD
NetBox will use these credentials when authenticating to remote devices via the supported [NAPALM integration](../additional-features/napalm.md), if installed. Both parameters are optional.
!!! note
If SSH public key authentication has been set up on the remote device(s) for the system account under which NetBox runs, these parameters are not needed.
---
## NAPALM_ARGS
A dictionary of optional arguments to pass to NAPALM when instantiating a network driver. See the NAPALM documentation for a [complete list of optional arguments](https://napalm.readthedocs.io/en/latest/support/#optional-arguments). An example:
```python
NAPALM_ARGS = {
'api_key': '472071a93b60a1bd1fafb401d9f8ef41',
'port': 2222,
}
```
Some platforms (e.g. Cisco IOS) require an argument named `secret` to be passed in addition to the normal password. If desired, you can use the configured `NAPALM_PASSWORD` as the value for this argument:
```python
NAPALM_USERNAME = 'username'
NAPALM_PASSWORD = 'MySecretPassword'
NAPALM_ARGS = {
'secret': NAPALM_PASSWORD,
# Include any additional args here
}
```
---
## NAPALM_TIMEOUT
Default: 30 seconds
The amount of time (in seconds) to wait for NAPALM to connect to a device.
---
## PAGINATE_COUNT
Default: 50
The default maximum number of objects to display per page within each list of objects.
---
## PREFER_IPV4
Default: False
When determining the primary IP address for a device, IPv6 is preferred over IPv4 by default. Set this to True to prefer IPv4 instead.
---
## RACK_ELEVATION_DEFAULT_UNIT_HEIGHT
Default: 22
Default height (in pixels) of a unit within a rack elevation. For best results, this should be approximately one tenth of `RACK_ELEVATION_DEFAULT_UNIT_WIDTH`.
---
## RACK_ELEVATION_DEFAULT_UNIT_WIDTH
Default: 220
Default width (in pixels) of a unit within a rack elevation.

View File

@@ -1,18 +1,22 @@
# NetBox Configuration
NetBox's local configuration is stored in `$INSTALL_ROOT/netbox/netbox/configuration.py`. An example configuration is provided as `configuration.example.py`. You may copy or rename the example configuration and make changes as appropriate. NetBox will not run without a configuration file.
NetBox's local configuration is stored in `$INSTALL_ROOT/netbox/netbox/configuration.py`. An example configuration is provided as `configuration.example.py`. You may copy or rename the example configuration and make changes as appropriate. NetBox will not run without a configuration file. While NetBox has many configuration settings, only a few of them must be defined at the time of installation: these are defined under "required settings" below.
While NetBox has many configuration settings, only a few of them must be defined at the time of installation.
Some configuration parameters may alternatively be defined either in `configuration.py` or within the administrative section of the user interface. Settings which are "hard-coded" in the configuration file take precedence over those defined via the UI.
## Configuration Parameters
* [Required settings](required-settings.md)
* [Optional settings](optional-settings.md)
* [Dynamic settings](dynamic-settings.md)
* [Remote authentication settings](remote-authentication.md)
## Changing the Configuration
Configuration settings may be changed at any time. However, the WSGI service (e.g. Gunicorn) must be restarted before the changes will take effect:
The configuration file may be modified at any time. However, the WSGI service (e.g. Gunicorn) must be restarted before the changes will take effect:
```no-highlight
$ sudo systemctl restart netbox
```
Configuration parameters which are set via the admin UI (those listed under "dynamic settings") take effect immediately.

View File

@@ -13,33 +13,6 @@ ADMINS = [
---
## ALLOWED_URL_SCHEMES
Default: `('file', 'ftp', 'ftps', 'http', 'https', 'irc', 'mailto', 'sftp', 'ssh', 'tel', 'telnet', 'tftp', 'vnc', 'xmpp')`
A list of permitted URL schemes referenced when rendering links within NetBox. Note that only the schemes specified in this list will be accepted: If adding your own, be sure to replicate all of the default values as well (excluding those schemes which are not desirable).
---
## BANNER_TOP
## BANNER_BOTTOM
Setting these variables will display custom content in a banner at the top and/or bottom of the page, respectively. HTML is allowed. To replicate the content of the top banner in the bottom banner, set:
```python
BANNER_TOP = 'Your banner text'
BANNER_BOTTOM = BANNER_TOP
```
---
## BANNER_LOGIN
This defines custom content to be displayed on the login page above the login form. HTML is allowed.
---
## BASE_PATH
Default: None
@@ -52,26 +25,6 @@ BASE_PATH = 'netbox/'
---
## CACHE_TIMEOUT
Default: 0 (disabled)
The number of seconds that cached database queries will be retained before expiring.
---
## CHANGELOG_RETENTION
Default: 90
The number of days to retain logged changes (object creations, updates, and deletions). Set this to `0` to retain
changes in the database indefinitely.
!!! warning
If enabling indefinite changelog retention, it is recommended to periodically delete old entries. Otherwise, the database may eventually exceed capacity.
---
## CORS_ORIGIN_ALLOW_ALL
Default: False
@@ -144,7 +97,7 @@ In order to send email, NetBox needs an email server configured. The following i
!!! note
The `USE_SSL` and `USE_TLS` parameters are mutually exclusive.
Email is sent from NetBox only for critical events or if configured for [logging](#logging). If you would like to test the email server configuration, Django provides a convenient [send_mail()](https://docs.djangoproject.com/en/stable/topics/email/#send-mail) fuction accessible within the NetBox shell:
Email is sent from NetBox only for critical events or if configured for [logging](#logging). If you would like to test the email server configuration, Django provides a convenient [send_mail()](https://docs.djangoproject.com/en/stable/topics/email/#send-mail) function accessible within the NetBox shell:
```no-highlight
# python ./manage.py nbshell
@@ -160,14 +113,6 @@ Email is sent from NetBox only for critical events or if configured for [logging
---
## ENFORCE_GLOBAL_UNIQUE
Default: False
By default, NetBox will permit users to create duplicate prefixes and IP addresses in the global table (that is, those which are not assigned to any VRF). This behavior can be disabled by setting `ENFORCE_GLOBAL_UNIQUE` to True.
---
## EXEMPT_VIEW_PERMISSIONS
Default: Empty list
@@ -257,11 +202,21 @@ LOGGING = {
---
## LOGIN_PERSISTENCE
Default: False
If true, the lifetime of a user's authentication session will be automatically reset upon each valid request. For example, if [`LOGIN_TIMEOUT`](#login_timeout) is configured to 14 days (the default), and a user whose session is due to expire in five days makes a NetBox request (with a valid session cookie), the session's lifetime will be reset to 14 days.
Note that enabling this setting causes NetBox to update a user's session in the database (or file, as configured per [`SESSION_FILE_PATH`](#session_file_path)) with each request, which may introduce significant overhead in very active environments. It also permits an active user to remain authenticated to NetBox indefinitely.
---
## LOGIN_REQUIRED
Default: False
Setting this to True will permit only authenticated users to access any part of NetBox. By default, anonymous users are permitted to access most data in NetBox (excluding secrets) but not make any changes.
Setting this to True will permit only authenticated users to access any part of NetBox. By default, anonymous users are permitted to access most data in NetBox but not make any changes.
---
@@ -273,30 +228,6 @@ The lifetime (in seconds) of the authentication cookie issued to a NetBox user u
---
## MAINTENANCE_MODE
Default: False
Setting this to True will display a "maintenance mode" banner at the top of every page. Additionally, NetBox will no longer update a user's "last active" time upon login. This is to allow new logins when the database is in a read-only state. Recording of login times will resume when maintenance mode is disabled.
---
## MAPS_URL
Default: `https://maps.google.com/?q=` (Google Maps)
This specifies the URL to use when presenting a map of a physical location by street address or GPS coordinates. The URL must accept either a free-form street address or a comma-separated pair of numeric coordinates appended to it.
---
## MAX_PAGE_SIZE
Default: 1000
A web user or API consumer can request an arbitrary number of objects by appending the "limit" parameter to the URL (e.g. `?limit=1000`). This parameter defines the maximum acceptable limit. Setting this to `0` or `None` will allow a client to retrieve _all_ matching objects at once with no limit by specifying `?limit=0`.
---
## MEDIA_ROOT
Default: $INSTALL_ROOT/netbox/media/
@@ -313,57 +244,6 @@ Toggle the availability Prometheus-compatible metrics at `/metrics`. See the [Pr
---
## NAPALM_USERNAME
## NAPALM_PASSWORD
NetBox will use these credentials when authenticating to remote devices via the [NAPALM library](https://napalm-automation.net/), if installed. Both parameters are optional.
!!! note
If SSH public key authentication has been set up on the remote device(s) for the system account under which NetBox runs, these parameters are not needed.
---
## NAPALM_ARGS
A dictionary of optional arguments to pass to NAPALM when instantiating a network driver. See the NAPALM documentation for a [complete list of optional arguments](https://napalm.readthedocs.io/en/latest/support/#optional-arguments). An example:
```python
NAPALM_ARGS = {
'api_key': '472071a93b60a1bd1fafb401d9f8ef41',
'port': 2222,
}
```
Some platforms (e.g. Cisco IOS) require an argument named `secret` to be passed in addition to the normal password. If desired, you can use the configured `NAPALM_PASSWORD` as the value for this argument:
```python
NAPALM_USERNAME = 'username'
NAPALM_PASSWORD = 'MySecretPassword'
NAPALM_ARGS = {
'secret': NAPALM_PASSWORD,
# Include any additional args here
}
```
---
## NAPALM_TIMEOUT
Default: 30 seconds
The amount of time (in seconds) to wait for NAPALM to connect to a device.
---
## PAGINATE_COUNT
Default: 50
The default maximum number of objects to display per page within each list of objects.
---
## PLUGINS
Default: Empty
@@ -397,94 +277,11 @@ Note that a plugin must be listed in `PLUGINS` for its configuration to take eff
---
## PREFER_IPV4
Default: False
When determining the primary IP address for a device, IPv6 is preferred over IPv4 by default. Set this to True to prefer IPv4 instead.
---
## RACK_ELEVATION_DEFAULT_UNIT_HEIGHT
Default: 22
Default height (in pixels) of a unit within a rack elevation. For best results, this should be approximately one tenth of `RACK_ELEVATION_DEFAULT_UNIT_WIDTH`.
---
## RACK_ELEVATION_DEFAULT_UNIT_WIDTH
Default: 220
Default width (in pixels) of a unit within a rack elevation.
---
## REMOTE_AUTH_AUTO_CREATE_USER
Default: `False`
If true, NetBox will automatically create local accounts for users authenticated via a remote service. (Requires `REMOTE_AUTH_ENABLED`.)
---
## REMOTE_AUTH_BACKEND
Default: `'netbox.authentication.RemoteUserBackend'`
This is the Python path to the custom [Django authentication backend](https://docs.djangoproject.com/en/stable/topics/auth/customizing/) to use for external user authentication. NetBox provides two built-in backends (listed below), though custom authentication backends may also be provided by other packages or plugins.
* `netbox.authentication.RemoteUserBackend`
* `netbox.authentication.LDAPBackend`
---
## REMOTE_AUTH_DEFAULT_GROUPS
Default: `[]` (Empty list)
The list of groups to assign a new user account when created using remote authentication. (Requires `REMOTE_AUTH_ENABLED`.)
---
## REMOTE_AUTH_DEFAULT_PERMISSIONS
Default: `{}` (Empty dictionary)
A mapping of permissions to assign a new user account when created using remote authentication. Each key in the dictionary should be set to a dictionary of the attributes to be applied to the permission, or `None` to allow all objects. (Requires `REMOTE_AUTH_ENABLED`.)
---
## REMOTE_AUTH_ENABLED
Default: `False`
NetBox can be configured to support remote user authentication by inferring user authentication from an HTTP header set by the HTTP reverse proxy (e.g. nginx or Apache). Set this to `True` to enable this functionality. (Local authentication will still take effect as a fallback.)
---
## REMOTE_AUTH_HEADER
Default: `'HTTP_REMOTE_USER'`
When remote user authentication is in use, this is the name of the HTTP header which informs NetBox of the currently authenticated user. For example, to use the request header `X-Remote-User` it needs to be set to `HTTP_X_REMOTE_USER`. (Requires `REMOTE_AUTH_ENABLED`.)
---
## RELEASE_CHECK_TIMEOUT
Default: 86,400 (24 hours)
The number of seconds to retain the latest version that is fetched from the GitHub API before automatically invalidating it and fetching it from the API again. This must be set to at least one hour (3600 seconds).
---
## RELEASE_CHECK_URL
Default: None (disabled)
This parameter defines the URL of the repository that will be checked periodically for new NetBox releases. When a new release is detected, a message will be displayed to administrative users on the home page. This can be set to the official repository (`'https://api.github.com/repos/netbox-community/netbox/releases'`) or a custom fork. Set this to `None` to disable automatic update checks.
This parameter defines the URL of the repository that will be checked for new NetBox releases. When a new release is detected, a message will be displayed to administrative users on the home page. This can be set to the official repository (`'https://api.github.com/repos/netbox-community/netbox/releases'`) or a custom fork. Set this to `None` to disable automatic update checks.
!!! note
The URL provided **must** be compatible with the [GitHub REST API](https://docs.github.com/en/rest).
@@ -495,7 +292,7 @@ This parameter defines the URL of the repository that will be checked periodical
Default: `$INSTALL_ROOT/netbox/reports/`
The file path to the location where custom reports will be kept. By default, this is the `netbox/reports/` directory within the base NetBox installation path.
The file path to the location where [custom reports](../customization/reports.md) will be kept. By default, this is the `netbox/reports/` directory within the base NetBox installation path.
---
@@ -511,7 +308,7 @@ The maximum execution time of a background task (such as running a custom script
Default: `$INSTALL_ROOT/netbox/scripts/`
The file path to the location where custom scripts will be kept. By default, this is the `netbox/scripts/` directory within the base NetBox installation path.
The file path to the location where [custom scripts](../customization/custom-scripts.md) will be kept. By default, this is the `netbox/scripts/` directory within the base NetBox installation path.
---

View File

@@ -0,0 +1,110 @@
# Remote Authentication Settings
The configuration parameters listed here control remote authentication for NetBox. Note that `REMOTE_AUTH_ENABLED` must be true in order for these settings to take effect.
---
## REMOTE_AUTH_AUTO_CREATE_USER
Default: `False`
If true, NetBox will automatically create local accounts for users authenticated via a remote service. (Requires `REMOTE_AUTH_ENABLED`.)
---
## REMOTE_AUTH_BACKEND
Default: `'netbox.authentication.RemoteUserBackend'`
This is the Python path to the custom [Django authentication backend](https://docs.djangoproject.com/en/stable/topics/auth/customizing/) to use for external user authentication. NetBox provides two built-in backends (listed below), though custom authentication backends may also be provided by other packages or plugins.
* `netbox.authentication.RemoteUserBackend`
* `netbox.authentication.LDAPBackend`
---
## REMOTE_AUTH_DEFAULT_GROUPS
Default: `[]` (Empty list)
The list of groups to assign a new user account when created using remote authentication. (Requires `REMOTE_AUTH_ENABLED`.)
---
## REMOTE_AUTH_DEFAULT_PERMISSIONS
Default: `{}` (Empty dictionary)
A mapping of permissions to assign a new user account when created using remote authentication. Each key in the dictionary should be set to a dictionary of the attributes to be applied to the permission, or `None` to allow all objects. (Requires `REMOTE_AUTH_ENABLED`.)
---
## REMOTE_AUTH_ENABLED
Default: `False`
NetBox can be configured to support remote user authentication by inferring user authentication from an HTTP header set by the HTTP reverse proxy (e.g. nginx or Apache). Set this to `True` to enable this functionality. (Local authentication will still take effect as a fallback.)
---
## REMOTE_AUTH_GROUP_SYNC_ENABLED
Default: `False`
NetBox can be configured to sync remote user groups by inferring user authentication from an HTTP header set by the HTTP reverse proxy (e.g. nginx or Apache). Set this to `True` to enable this functionality. (Local authentication will still take effect as a fallback.) (Requires `REMOTE_AUTH_ENABLED`.)
---
## REMOTE_AUTH_HEADER
Default: `'HTTP_REMOTE_USER'`
When remote user authentication is in use, this is the name of the HTTP header which informs NetBox of the currently authenticated user. For example, to use the request header `X-Remote-User` it needs to be set to `HTTP_X_REMOTE_USER`. (Requires `REMOTE_AUTH_ENABLED`.)
---
## REMOTE_AUTH_GROUP_HEADER
Default: `'HTTP_REMOTE_USER_GROUP'`
When remote user authentication is in use, this is the name of the HTTP header which informs NetBox of the currently authenticated user. For example, to use the request header `X-Remote-User-Groups` it needs to be set to `HTTP_X_REMOTE_USER_GROUPS`. (Requires `REMOTE_AUTH_ENABLED` and `REMOTE_AUTH_GROUP_SYNC_ENABLED` )
---
## REMOTE_AUTH_SUPERUSER_GROUPS
Default: `[]` (Empty list)
The list of groups that promote an remote User to Superuser on Login. If group isn't present on next Login, the Role gets revoked. (Requires `REMOTE_AUTH_ENABLED` and `REMOTE_AUTH_GROUP_SYNC_ENABLED` )
---
## REMOTE_AUTH_SUPERUSERS
Default: `[]` (Empty list)
The list of users that get promoted to Superuser on Login. If user isn't present in list on next Login, the Role gets revoked. (Requires `REMOTE_AUTH_ENABLED` and `REMOTE_AUTH_GROUP_SYNC_ENABLED` )
---
## REMOTE_AUTH_STAFF_GROUPS
Default: `[]` (Empty list)
The list of groups that promote an remote User to Staff on Login. If group isn't present on next Login, the Role gets revoked. (Requires `REMOTE_AUTH_ENABLED` and `REMOTE_AUTH_GROUP_SYNC_ENABLED` )
---
## REMOTE_AUTH_STAFF_USERS
Default: `[]` (Empty list)
The list of users that get promoted to Staff on Login. If user isn't present in list on next Login, the Role gets revoked. (Requires `REMOTE_AUTH_ENABLED` and `REMOTE_AUTH_GROUP_SYNC_ENABLED` )
---
## REMOTE_AUTH_GROUP_SEPARATOR
Default: `|` (Pipe)
The Seperator upon which `REMOTE_AUTH_GROUP_HEADER` gets split into individual Groups. This needs to be coordinated with your authentication Proxy. (Requires `REMOTE_AUTH_ENABLED` and `REMOTE_AUTH_GROUP_SYNC_ENABLED` )

View File

@@ -25,7 +25,7 @@ ALLOWED_HOSTS = ['*']
## DATABASE
NetBox requires access to a PostgreSQL 9.6 or later database service to store data. This service can run locally on the NetBox server or on a remote system. The following parameters must be defined within the `DATABASE` dictionary:
NetBox requires access to a PostgreSQL 10 or later database service to store data. This service can run locally on the NetBox server or on a remote system. The following parameters must be defined within the `DATABASE` dictionary:
* `NAME` - Database name
* `USER` - PostgreSQL username

View File

@@ -1,10 +1,10 @@
# Circuits
{!docs/models/circuits/provider.md!}
{!docs/models/circuits/providernetwork.md!}
{!models/circuits/provider.md!}
{!models/circuits/providernetwork.md!}
---
{!docs/models/circuits/circuit.md!}
{!docs/models/circuits/circuittype.md!}
{!docs/models/circuits/circuittermination.md!}
{!models/circuits/circuit.md!}
{!models/circuits/circuittype.md!}
{!models/circuits/circuittermination.md!}

View File

@@ -0,0 +1,5 @@
# Contacts
{!models/tenancy/contact.md!}
{!models/tenancy/contactgroup.md!}
{!models/tenancy/contactrole.md!}

View File

@@ -1,7 +1,7 @@
# Device Types
{!docs/models/dcim/devicetype.md!}
{!docs/models/dcim/manufacturer.md!}
{!models/dcim/devicetype.md!}
{!models/dcim/manufacturer.md!}
---
@@ -30,11 +30,11 @@ Once component templates have been created, every new device that you create as
!!! note
Assignment of components from templates occurs only at the time of device creation. If you modify the templates of a device type, it will not affect devices which have already been created. However, you always have the option of adding, modifying, or deleting components on existing devices.
{!docs/models/dcim/consoleporttemplate.md!}
{!docs/models/dcim/consoleserverporttemplate.md!}
{!docs/models/dcim/powerporttemplate.md!}
{!docs/models/dcim/poweroutlettemplate.md!}
{!docs/models/dcim/interfacetemplate.md!}
{!docs/models/dcim/frontporttemplate.md!}
{!docs/models/dcim/rearporttemplate.md!}
{!docs/models/dcim/devicebaytemplate.md!}
{!models/dcim/consoleporttemplate.md!}
{!models/dcim/consoleserverporttemplate.md!}
{!models/dcim/powerporttemplate.md!}
{!models/dcim/poweroutlettemplate.md!}
{!models/dcim/interfacetemplate.md!}
{!models/dcim/frontporttemplate.md!}
{!models/dcim/rearporttemplate.md!}
{!models/dcim/devicebaytemplate.md!}

View File

@@ -1,8 +1,8 @@
# Devices and Cabling
{!docs/models/dcim/device.md!}
{!docs/models/dcim/devicerole.md!}
{!docs/models/dcim/platform.md!}
{!models/dcim/device.md!}
{!models/dcim/devicerole.md!}
{!models/dcim/platform.md!}
---
@@ -10,20 +10,30 @@
Device components represent discrete objects within a device which are used to terminate cables, house child devices, or track resources.
{!docs/models/dcim/consoleport.md!}
{!docs/models/dcim/consoleserverport.md!}
{!docs/models/dcim/powerport.md!}
{!docs/models/dcim/poweroutlet.md!}
{!docs/models/dcim/interface.md!}
{!docs/models/dcim/frontport.md!}
{!docs/models/dcim/rearport.md!}
{!docs/models/dcim/devicebay.md!}
{!docs/models/dcim/inventoryitem.md!}
{!models/dcim/consoleport.md!}
{!models/dcim/consoleserverport.md!}
{!models/dcim/powerport.md!}
{!models/dcim/poweroutlet.md!}
{!models/dcim/interface.md!}
{!models/dcim/frontport.md!}
{!models/dcim/rearport.md!}
{!models/dcim/devicebay.md!}
{!models/dcim/inventoryitem.md!}
---
{!docs/models/dcim/virtualchassis.md!}
{!models/dcim/virtualchassis.md!}
---
{!docs/models/dcim/cable.md!}
{!models/dcim/cable.md!}
In the example below, three individual cables comprise a path between devices A and D:
![Cable path](../media/models/dcim_cable_trace.png)
Traced from Interface 1 on Device A, NetBox will show the following path:
* Cable 1: Interface 1 to Front Port 1
* Cable 2: Rear Port 1 to Rear Port 2
* Cable 3: Front Port 2 to Interface 2

View File

@@ -1,18 +1,27 @@
# IP Address Management
{!docs/models/ipam/aggregate.md!}
{!docs/models/ipam/rir.md!}
{!models/ipam/aggregate.md!}
{!models/ipam/rir.md!}
---
{!docs/models/ipam/prefix.md!}
{!docs/models/ipam/role.md!}
{!models/ipam/prefix.md!}
{!models/ipam/role.md!}
---
{!docs/models/ipam/ipaddress.md!}
{!models/ipam/iprange.md!}
{!models/ipam/ipaddress.md!}
---
{!docs/models/ipam/vrf.md!}
{!docs/models/ipam/routetarget.md!}
{!models/ipam/vrf.md!}
{!models/ipam/routetarget.md!}
---
{!models/ipam/fhrpgroup.md!}
---
{!models/ipam/asn.md!}

View File

@@ -1,8 +1,8 @@
# Power Tracking
{!docs/models/dcim/powerpanel.md!}
{!docs/models/dcim/powerfeed.md!}
{!models/dcim/powerpanel.md!}
{!models/dcim/powerfeed.md!}
# Example Power Topology
![Power distribution model](../../media/power_distribution.png)
![Power distribution model](../media/power_distribution.png)

View File

@@ -1,8 +0,0 @@
# Secrets
{!docs/models/secrets/secret.md!}
{!docs/models/secrets/secretrole.md!}
---
{!docs/models/secrets/userkey.md!}

View File

@@ -1,3 +1,3 @@
# Service Mapping
{!docs/models/ipam/service.md!}
{!models/ipam/service.md!}

View File

@@ -1,12 +1,12 @@
# Sites and Racks
{!docs/models/dcim/region.md!}
{!docs/models/dcim/sitegroup.md!}
{!docs/models/dcim/site.md!}
{!docs/models/dcim/location.md!}
{!models/dcim/region.md!}
{!models/dcim/sitegroup.md!}
{!models/dcim/site.md!}
{!models/dcim/location.md!}
---
{!docs/models/dcim/rack.md!}
{!docs/models/dcim/rackrole.md!}
{!docs/models/dcim/rackreservation.md!}
{!models/dcim/rack.md!}
{!models/dcim/rackrole.md!}
{!models/dcim/rackreservation.md!}

View File

@@ -1,4 +1,4 @@
# Tenancy Assignment
{!docs/models/tenancy/tenant.md!}
{!docs/models/tenancy/tenantgroup.md!}
{!models/tenancy/tenant.md!}
{!models/tenancy/tenantgroup.md!}

View File

@@ -1,10 +1,10 @@
# Virtualization
{!docs/models/virtualization/cluster.md!}
{!docs/models/virtualization/clustertype.md!}
{!docs/models/virtualization/clustergroup.md!}
{!models/virtualization/cluster.md!}
{!models/virtualization/clustertype.md!}
{!models/virtualization/clustergroup.md!}
---
{!docs/models/virtualization/virtualmachine.md!}
{!docs/models/virtualization/vminterface.md!}
{!models/virtualization/virtualmachine.md!}
{!models/virtualization/vminterface.md!}

View File

@@ -1,4 +1,4 @@
# VLAN Management
{!docs/models/ipam/vlan.md!}
{!docs/models/ipam/vlangroup.md!}
{!models/ipam/vlan.md!}
{!models/ipam/vlangroup.md!}

View File

@@ -0,0 +1,8 @@
# Wireless Networks
{!models/wireless/wirelesslan.md!}
{!models/wireless/wirelesslangroup.md!}
---
{!models/wireless/wirelesslink.md!}

View File

@@ -0,0 +1,36 @@
{!models/extras/customfield.md!}
## Custom Fields in Templates
Several features within NetBox, such as export templates and webhooks, utilize Jinja2 templating. For convenience, objects which support custom field assignment expose custom field data through the `cf` property. This is a bit cleaner than accessing custom field data through the actual field (`custom_field_data`).
For example, a custom field named `foo123` on the Site model is accessible on an instance as `{{ site.cf.foo123 }}`.
## Custom Fields and the REST API
When retrieving an object via the REST API, all of its custom data will be included within the `custom_fields` attribute. For example, below is the partial output of a site with two custom fields defined:
```json
{
"id": 123,
"url": "http://localhost:8000/api/dcim/sites/123/",
"name": "Raleigh 42",
...
"custom_fields": {
"deployed": "2018-06-19",
"site_code": "US-NC-RAL42"
},
...
```
To set or change these values, simply include nested JSON data. For example:
```json
{
"name": "New Site",
"slug": "new-site",
"custom_fields": {
"deployed": "2019-03-24"
}
}
```

View File

@@ -45,6 +45,20 @@ Defining script variables is optional: You may create a script with only a `run(
Any output generated by the script during its execution will be displayed under the "output" tab in the UI.
By default, scripts within a module are ordered alphabetically in the scripts list page. To return scripts in a specific order, you can define the `script_order` variable at the end of your module. The `script_order` variable is a tuple which contains each Script class in the desired order. Any scripts that are omitted from this list will be listed last.
```python
from extras.scripts import Script
class MyCustomScript(Script):
...
class AnotherCustomScript(Script):
...
script_order = (MyCustomScript, AnotherCustomScript)
```
## Module Attributes
### `name`
@@ -170,14 +184,9 @@ Similar to `ChoiceVar`, but allows for the selection of multiple choices.
A particular object within NetBox. Each ObjectVar must specify a particular model, and allows the user to select one of the available instances. ObjectVar accepts several arguments, listed below.
* `model` - The model class
* `display_field` - The name of the REST API object field to display in the selection list (default: `'display'`)
* `query_params` - A dictionary of query parameters to use when retrieving available options (optional)
* `null_option` - A label representing a "null" or empty choice (optional)
!!! warning
The `display_field` parameter is now deprecated, and will be removed in NetBox v3.0. All ObjectVar instances will
instead use the new standard `display` field for all serializers (introduced in NetBox v2.11).
To limit the selections available within the list, additional query parameters can be passed as the `query_params` dictionary. For example, to show only devices with an "active" status:
```python
@@ -231,7 +240,7 @@ An IPv4 or IPv6 network with a mask. Returns a `netaddr.IPNetwork` object. Two a
!!! note
To run a custom script, a user must be assigned the `extras.run_script` permission. This is achieved by assigning the user (or group) a permission on the Script object and specifying the `run` action in the admin UI as shown below.
![Adding the run action to a permission](../../media/admin_ui_run_permission.png)
![Adding the run action to a permission](../media/admin_ui_run_permission.png)
### Via the Web UI
@@ -250,6 +259,22 @@ http://netbox/api/extras/scripts/example.MyReport/ \
--data '{"data": {"foo": "somevalue", "bar": 123}, "commit": true}'
```
### Via the CLI
Scripts can be run on the CLI by invoking the management command:
```
python3 manage.py runscript [--commit] [--loglevel {debug,info,warning,error,critical}] [--data "<data>"] <module>.<script>
```
The required ``<module>.<script>`` argument is the script to run where ``<module>`` is the name of the python file in the ``scripts`` directory without the ``.py`` extension and ``<script>`` is the name of the script class in the ``<module>`` to run.
The optional ``--data "<data>"`` argument is the data to send to the script
The optional ``--loglevel`` argument is the desired logging level to output to the console.
The optional ``--commit`` argument will commit any changes in the script to the database.
## Example
Below is an example script that creates new objects for a planned site. The user is prompted for three variables:
@@ -288,7 +313,6 @@ class NewBranchScript(Script):
switch_model = ObjectVar(
description="Access switch model",
model=DeviceType,
display_field='model',
query_params={
'manufacturer_id': '$manufacturer'
}

View File

@@ -0,0 +1,118 @@
# Custom Validation
NetBox validates every object prior to it being written to the database to ensure data integrity. This validation includes things like checking for proper formatting and that references to related objects are valid. However, you may wish to supplement this validation with some rules of your own. For example, perhaps you require that every site's name conforms to a specific pattern. This can be done using custom validation rules.
## Custom Validation Rules
Custom validation rules are expressed as a mapping of model attributes to a set of rules to which that attribute must conform. For example:
```json
{
"name": {
"min_length": 5,
"max_length": 30
}
}
```
This defines a custom validator which checks that the length of the `name` attribute for an object is at least five characters long, and no longer than 30 characters. This validation is executed _after_ NetBox has performed its own internal validation.
The `CustomValidator` class supports several validation types:
* `min`: Minimum value
* `max`: Maximum value
* `min_length`: Minimum string length
* `max_length`: Maximum string length
* `regex`: Application of a [regular expression](https://en.wikipedia.org/wiki/Regular_expression)
* `required`: A value must be specified
* `prohibited`: A value must _not_ be specified
The `min` and `max` types should be defined for numeric values, whereas `min_length`, `max_length`, and `regex` are suitable for character strings (text values). The `required` and `prohibited` validators may be used for any field, and should be passed a value of `True`.
!!! warning
Bear in mind that these validators merely supplement NetBox's own validation: They will not override it. For example, if a certain model field is required by NetBox, setting a validator for it with `{'prohibited': True}` will not work.
### Custom Validation Logic
There may be instances where the provided validation types are insufficient. NetBox provides a `CustomValidator` class which can be extended to enforce arbitrary validation logic by overriding its `validate()` method, and calling `fail()` when an unsatisfactory condition is detected.
```python
from extras.validators import CustomValidator
class MyValidator(CustomValidator):
def validate(self, instance):
if instance.status == 'active' and not instance.description:
self.fail("Active sites must have a description set!", field='status')
```
The `fail()` method may optionally specify a field with which to associate the supplied error message. If specified, the error message will appear to the user as associated with this field. If omitted, the error message will not be associated with any field.
## Assigning Custom Validators
Custom validators are associated with specific NetBox models under the [CUSTOM_VALIDATORS](../configuration/optional-settings.md#custom_validators) configuration parameter. There are three manners by which custom validation rules can be defined:
1. Plain JSON mapping (no custom logic)
2. Dotted path to a custom validator class
3. Direct reference to a custom validator class
### Plain Data
For cases where custom logic is not needed, it is sufficient to pass validation rules as plain JSON-compatible objects. This approach typically affords the most portability for your configuration. For instance:
```python
CUSTOM_VALIDATORS = {
"dcim.site": [
{
"name": {
"min_length": 5,
"max_length": 30,
}
}
],
"dcim.device": [
{
"platform": {
"required": True,
}
}
]
}
```
### Dotted Path
In instances where a custom validator class is needed, it can be referenced by its Python path (relative to NetBox's working directory):
```python
CUSTOM_VALIDATORS = {
'dcim.site': (
'my_validators.Validator1',
'my_validators.Validator2',
),
'dcim.device': (
'my_validators.Validator3',
)
}
```
### Direct Class Reference
This approach requires each class being instantiated to be imported directly within the Python configuration file.
```python
from my_validators import Validator1, Validator2, Validator3
CUSTOM_VALIDATORS = {
'dcim.site': (
Validator1,
Validator2,
),
'dcim.device': (
Validator3,
)
}
```
!!! note
Even if defining only a single validator, it must be passed as an iterable.

View File

@@ -0,0 +1,44 @@
{!models/extras/exporttemplate.md!}
## REST API Integration
When it is necessary to provide authentication credentials (such as when [`LOGIN_REQUIRED`](../configuration/optional-settings.md#login_required) has been enabled), it is recommended to render export templates via the REST API. This allows the client to specify an authentication token. To render an export template via the REST API, make a `GET` request to the model's list endpoint and append the `export` parameter specifying the export template name. For example:
```
GET /api/dcim/sites/?export=MyTemplateName
```
Note that the body of the response will contain only the rendered export template content, as opposed to a JSON object or list.
## Example
Here's an example device export template that will generate a simple Nagios configuration from a list of devices.
```
{% for device in queryset %}{% if device.status and device.primary_ip %}define host{
use generic-switch
host_name {{ device.name }}
address {{ device.primary_ip.address.ip }}
}
{% endif %}{% endfor %}
```
The generated output will look something like this:
```
define host{
use generic-switch
host_name switch1
address 192.0.2.1
}
define host{
use generic-switch
host_name switch2
address 192.0.2.2
}
define host{
use generic-switch
host_name switch3
address 192.0.2.3
}
```

View File

@@ -97,6 +97,20 @@ The recording of one or more failure messages will automatically flag a report a
To perform additional tasks, such as sending an email or calling a webhook, after a report has been run, extend the `post_run()` method. The status of the report is available as `self.failed` and the results object is `self.result`.
By default, reports within a module are ordered alphabetically in the reports list page. To return reports in a specific order, you can define the `report_order` variable at the end of your module. The `report_order` variable is a tuple which contains each Report class in the desired order. Any reports that are omitted from this list will be listed last.
```
from extras.reports import Report
class DeviceConnectionsReport(Report)
pass
class DeviceIPsReport(Report)
pass
report_order = (DeviceIPsReport, DeviceConnectionsReport)
```
Once you have created a report, it will appear in the reports list. Initially, reports will have no results associated with them. To generate results, run the report.
## Running Reports
@@ -104,7 +118,7 @@ Once you have created a report, it will appear in the reports list. Initially, r
!!! note
To run a report, a user must be assigned the `extras.run_report` permission. This is achieved by assigning the user (or group) a permission on the Report object and specifying the `run` action in the admin UI as shown below.
![Adding the run action to a permission](../../media/admin_ui_run_permission.png)
![Adding the run action to a permission](/media/admin_ui_run_permission.png)
### Via the Web UI

View File

@@ -32,19 +32,15 @@ class Foo(models.Model):
raise ValidationError()
```
## 3. Add CSV helpers
## 3. Update relevant querysets
Add the name of the new field to `csv_headers` and included a CSV-friendly representation of its data in the model's `to_csv()` method. These will be used when exporting objects in CSV format.
If you're adding a relational field (e.g. `ForeignKey`) and intend to include the data when retrieving a list of objects, be sure to include the field using `prefetch_related()` as appropriate. This will optimize the view and avoid extraneous database queries.
## 4. Update relevant querysets
## 4. Update API serializer
If you're adding a relational field (e.g. `ForeignKey`) and intend to include the data when retreiving a list of objects, be sure to include the field using `prefetch_related()` as appropriate. This will optimize the view and avoid extraneous database queries.
Extend the model's API serializer in `<app>.api.serializers` to include the new field. In most cases, it will not be necessary to also extend the nested serializer, which produces a minimal representation of the model.
## 5. Update API serializer
Extend the model's API serializer in `<app>.api.serializers` to include the new field. In most cases, it will not be necessary to also extend the nested serializer, which produces a minimal represenation of the model.
## 6. Add field to forms
## 5. Add field to forms
Extend any forms to include the new field as appropriate. Common forms include:
@@ -53,19 +49,19 @@ Extend any forms to include the new field as appropriate. Common forms include:
* **CSV import** - The form used when bulk importing objects in CSV format
* **Filter** - Displays the options available for filtering a list of objects (both UI and API)
## 7. Extend object filter set
## 6. Extend object filter set
If the new field should be filterable, add it to the `FilterSet` for the model. If the field should be searchable, remember to reference it in the FilterSet's `search()` method.
## 8. Add column to object table
## 7. Add column to object table
If the new field will be included in the object list view, add a column to the model's table. For simple fields, adding the field name to `Meta.fields` will be sufficient. More complex fields may require declaring a custom column.
## 9. Update the UI templates
## 8. Update the UI templates
Edit the object's view template to display the new field. There may also be a custom add/edit form template that needs to be updated.
## 10. Create/extend test cases
## 9. Create/extend test cases
Create or extend the relevant test cases to verify that the new field and any accompanying validation logic perform as expected. This is especially important for relational fields. NetBox incorporates various test suites, including:
@@ -77,6 +73,6 @@ Create or extend the relevant test cases to verify that the new field and any ac
Be diligent to ensure all of the relevant test suites are adapted or extended as necessary to test any new functionality.
## 11. Update the model's documentation
## 10. Update the model's documentation
Each model has a dedicated page in the documentation, at `models/<app>/<model>.md`. Update this file to include any relevant information about the new field.

View File

@@ -25,7 +25,6 @@ NetBox components are arranged into functional subsections called _apps_ (a carr
* `dcim`: Datacenter infrastructure management (sites, racks, and devices)
* `extras`: Additional features not considered part of the core data model
* `ipam`: IP address management (VRFs, prefixes, IP addresses, and VLANs)
* `secrets`: Encrypted storage of sensitive data (e.g. login credentials)
* `tenancy`: Tenants (such as customers) to which NetBox objects may be assigned
* `users`: Authentication and user preferences
* `utilities`: Resources which are not user-facing (extendable classes, etc.)

View File

@@ -10,8 +10,8 @@ The Django [content types](https://docs.djangoproject.com/en/stable/ref/contrib/
* [Change logging](../additional-features/change-logging.md) - Changes to these objects are automatically recorded in the change log
* [Webhooks](../additional-features/webhooks.md) - NetBox is capable of generating outgoing webhooks for these objects
* [Custom fields](../additional-features/custom-fields.md) - These models support the addition of user-defined fields
* [Export templates](../additional-features/export-templates.md) - Users can create custom export templates for these models
* [Custom fields](../customization/custom-fields.md) - These models support the addition of user-defined fields
* [Export templates](../customization/export-templates.md) - Users can create custom export templates for these models
* [Tagging](../models/extras/tag.md) - The models can be tagged with user-defined tags
* [Journaling](../additional-features/journaling.md) - These models support persistent historical commentary
* Nesting - These models can be nested recursively to create a hierarchy
@@ -19,8 +19,8 @@ The Django [content types](https://docs.djangoproject.com/en/stable/ref/contrib/
| Type | Change Logging | Webhooks | Custom Fields | Export Templates | Tags | Journaling | Nesting |
| ------------------ | ---------------- | ---------------- | ---------------- | ---------------- | ---------------- | ---------------- | ---------------- |
| Primary | :material-check: | :material-check: | :material-check: | :material-check: | :material-check: | :material-check: | |
| Organizational | :material-check: | :material-check: | :material-check: | :material-check: | | | |
| Nested Group | :material-check: | :material-check: | :material-check: | :material-check: | | | :material-check: |
| Organizational | :material-check: | :material-check: | :material-check: | :material-check: | :material-check: | | |
| Nested Group | :material-check: | :material-check: | :material-check: | :material-check: | :material-check: | | :material-check: |
| Component | :material-check: | :material-check: | :material-check: | :material-check: | :material-check: | | |
| Component Template | :material-check: | :material-check: | :material-check: | | | | |
@@ -41,16 +41,20 @@ The Django [content types](https://docs.djangoproject.com/en/stable/ref/contrib/
* [dcim.Site](../models/dcim/site.md)
* [dcim.VirtualChassis](../models/dcim/virtualchassis.md)
* [ipam.Aggregate](../models/ipam/aggregate.md)
* [ipam.ASN](../models/ipam/asn.md)
* [ipam.FHRPGroup](../models/ipam/fhrpgroup.md)
* [ipam.IPAddress](../models/ipam/ipaddress.md)
* [ipam.Prefix](../models/ipam/prefix.md)
* [ipam.RouteTarget](../models/ipam/routetarget.md)
* [ipam.Service](../models/ipam/service.md)
* [ipam.VLAN](../models/ipam/vlan.md)
* [ipam.VRF](../models/ipam/vrf.md)
* [secrets.Secret](../models/secrets/secret.md)
* [tenancy.Contact](../models/tenancy/contact.md)
* [tenancy.Tenant](../models/tenancy/tenant.md)
* [virtualization.Cluster](../models/virtualization/cluster.md)
* [virtualization.VirtualMachine](../models/virtualization/virtualmachine.md)
* [wireless.WirelessLAN](../models/wireless/wirelesslan.md)
* [wireless.WirelessLink](../models/wireless/wirelesslink.md)
### Organizational Models
@@ -62,7 +66,7 @@ The Django [content types](https://docs.djangoproject.com/en/stable/ref/contrib/
* [ipam.RIR](../models/ipam/rir.md)
* [ipam.Role](../models/ipam/role.md)
* [ipam.VLANGroup](../models/ipam/vlangroup.md)
* [secrets.SecretRole](../models/secrets/secretrole.md)
* [tenancy.ContactRole](../models/tenancy/contactrole.md)
* [virtualization.ClusterGroup](../models/virtualization/clustergroup.md)
* [virtualization.ClusterType](../models/virtualization/clustertype.md)
@@ -71,7 +75,9 @@ The Django [content types](https://docs.djangoproject.com/en/stable/ref/contrib/
* [dcim.Location](../models/dcim/location.md) (formerly RackGroup)
* [dcim.Region](../models/dcim/region.md)
* [dcim.SiteGroup](../models/dcim/sitegroup.md)
* [tenancy.ContactGroup](../models/tenancy/contactgroup.md)
* [tenancy.TenantGroup](../models/tenancy/tenantgroup.md)
* [wireless.WirelessLANGroup](../models/wireless/wirelesslangroup.md)
### Component Models

View File

@@ -6,16 +6,6 @@
Check `base_requirements.txt` for any dependencies pinned to a specific version, and upgrade them to their most stable release (where possible).
### Update Static Libraries
Update the following static libraries to their most recent stable release:
* Bootstrap 3
* Material Design Icons
* Select2
* jQuery
* jQuery UI
### Link to the Release Notes Page
Add the release notes (`/docs/release-notes/X.Y.md`) to the table of contents within `mkdocs.yml`, and point `index.md` to the new file.

View File

@@ -0,0 +1,11 @@
# Signals
In addition to [Django's built-in signals](https://docs.djangoproject.com/en/stable/topics/signals/), NetBox defines some of its own, listed below.
## post_clean
This signal is sent by models which inherit from `CustomValidationMixin` at the end of their `clean()` method.
### Receivers
* `extras.signals.run_custom_validators()`

View File

@@ -0,0 +1,99 @@
# Web UI Development
## Front End Technologies
The NetBox UI is built on languages and frameworks:
### Styling & HTML Elements
#### [Bootstrap](https://getbootstrap.com/) 5
The majority of the NetBox UI is made up of stock Bootstrap components, with some styling modifications and custom components added on an as-needed basis. Bootstrap uses [Sass](https://sass-lang.com/), and NetBox extends Bootstrap's core Sass files for theming and customization.
### Client-side Scripting
#### [TypeScript](https://www.typescriptlang.org/)
All client-side scripting is transpiled from TypeScript to JavaScript and served by Django. In development, TypeScript is an _extremely_ effective tool for accurately describing and checking the code, which leads to significantly fewer bugs, a better development experience, and more predictable/readable code.
As part of the [bundling](#bundling) process, Bootstrap's JavaScript plugins are imported and bundled alongside NetBox's front-end code.
!!! danger "NetBox is jQuery-free"
Following the Bootstrap team's deprecation of jQuery in Bootstrap 5, NetBox also no longer uses jQuery in front-end code.
## Guidance
NetBox generally follows the following guidelines for front-end code:
- Bootstrap utility classes may be used to solve one-off issues or to implement singular components, as long as the class list does not exceed 4-5 classes. If an element needs more than 5 utility classes, a custom SCSS class should be added that contains the required style properties.
- Custom classes must be commented, explaining the general purpose of the class and where it is used.
- Reuse SCSS variables whenever possible. CSS values should (almost) never be hard-coded.
- All TypeScript functions must have, at a minimum, a basic [JSDoc](https://jsdoc.app/) description of what the function is for and where it is used. If possible, document all function arguments via [`@param` JSDoc block tags](https://jsdoc.app/tags-param.html).
- Expanding on NetBox's [dependency policy](style-guide.md#introducing-new-dependencies), new front-end dependencies should be avoided unless absolutely necessary. Every new front-end dependency adds to the CSS/JavaScript file size that must be loaded by the client and this should be minimized as much as possible. If adding a new dependency is unavoidable, use a tool like [Bundlephobia](https://bundlephobia.com/) to ensure the smallest possible library is used.
- All UI elements must be usable on all common screen sizes, including mobile devices. Be sure to test newly implemented solutions (JavaScript included) on as many screen sizes and device types as possible.
- NetBox aligns with Bootstrap's [supported Browsers and Devices](https://getbootstrap.com/docs/5.1/getting-started/browsers-devices/) list.
## UI Development
To contribute to the NetBox UI, you'll need to review the main [Getting Started guide](getting-started.md) in order to set up your base environment.
### Tools
Once you have a working NetBox development environment, you'll need to install a few more tools to work with the NetBox UI:
- [NodeJS](https://nodejs.org/en/download/) (the LTS release should suffice)
- [Yarn](https://yarnpkg.com/getting-started/install) (version 1)
After Node and Yarn are installed on your system, you'll need to install all the NetBox UI dependencies:
```console
$ cd netbox/project-static
$ yarn
```
!!! warning "Check Your Working Directory"
You need to be in the `netbox/project-static` directory to run the below `yarn` commands.
### Bundling
In order for the TypeScript and Sass (SCSS) source files to be usable by a browser, they must first be transpiled (TypeScript → JavaScript, Sass → CSS), bundled, and minified. After making changes to TypeScript or Sass source files, run `yarn bundle`.
`yarn bundle` is a wrapper around the following subcommands, any of which can be run individually:
| Command | Action |
| :-------------------- | :---------------------------------------------- |
| `yarn bundle` | Bundle TypeScript and Sass (SCSS) source files. |
| `yarn bundle:styles` | Bundle Sass (SCSS) source files only. |
| `yarn bundle:scripts` | Bundle TypeScript source files only. |
All output files will be written to `netbox/project-static/dist`, where Django will pick them up when `manage.py collectstatic` is run.
!!! info "Remember to re-run `manage.py collectstatic`"
If you're running the development web server — `manage.py runserver` — you'll need to run `manage.py collectstatic` to see your changes.
### Linting, Formatting & Type Checking
Before committing any changes to TypeScript files, and periodically throughout the development process, you should run `yarn validate` to catch formatting, code quality, or type errors.
!!! tip "IDE Integrations"
If you're using an IDE, it is strongly recommended to install [ESLint](https://eslint.org/docs/user-guide/integrations), [TypeScript](https://github.com/Microsoft/TypeScript/wiki/TypeScript-Editor-Support), and [Prettier](https://prettier.io/docs/en/editors.html) integrations, if available. Most of them will automatically check and/or correct issues in the code as you develop, which can significantly increase your productivity as a contributor.
`yarn validate` is a wrapper around the following subcommands, any of which can be run individually:
| Command | Action |
| :--------------------------------- | :--------------------------------------------------------------- |
| `yarn validate` | Run all validation. |
| `yarn validate:lint` | Validate TypeScript code via [ESLint](https://eslint.org/) only. |
| `yarn validate:types` | Validate TypeScript code compilation only. |
| `yarn validate:formatting` | Validate code formatting of JavaScript & Sass/SCSS files. |
| `yarn validate:formatting:styles` | Validate code formatting Sass/SCSS only. |
| `yarn validate:formatting:scripts` | Validate code formatting TypeScript only. |
You can also run the following commands to automatically fix formatting issues:
| Command | Action |
| :-------------------- | :---------------------------------------------- |
| `yarn format` | Format TypeScript and Sass (SCSS) source files. |
| `yarn format:styles` | Format Sass (SCSS) source files only. |
| `yarn format:scripts` | Format TypeScript source files only. |

View File

@@ -11,9 +11,19 @@ table {
width: 100%;
}
th {
background-color: #f0f0f0;
padding: 6px;
font-weight: bold;
}
td {
padding: 6px;
}
/* Remove table header coloring. */
.md-typeset table:not([class]) th {
color: unset !important;
background-color: unset !important;
}
thead tr {
/* Colorize table headers. */
background-color: var(--md-code-bg-color);
color: var(--md-code-fg-color);
}

View File

@@ -0,0 +1,70 @@
# GraphQL API Overview
NetBox provides a read-only [GraphQL](https://graphql.org/) API to complement its REST API. This API is powered by the [Graphene](https://graphene-python.org/) library and [Graphene-Django](https://docs.graphene-python.org/projects/django/en/latest/).
## Queries
GraphQL enables the client to specify an arbitrary nested list of fields to include in the response. All queries are made to the root `/graphql` API endpoint. For example, to return the circuit ID and provider name of each circuit with an active status, you can issue a request such as the following:
```
curl -H "Authorization: Token $TOKEN" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
http://netbox/graphql/ \
--data '{"query": "query {circuit_list(status:\"active\") {cid provider {name}}}"}'
```
The response will include the requested data formatted as JSON:
```json
{
"data": {
"circuits": [
{
"cid": "1002840283",
"provider": {
"name": "CenturyLink"
}
},
{
"cid": "1002840457",
"provider": {
"name": "CenturyLink"
}
}
]
}
}
```
!!! note
It's recommended to pass the return data through a JSON parser such as `jq` for better readability.
NetBox provides both a singular and plural query field for each object type:
* `$OBJECT`: Returns a single object. Must specify the object's unique ID as `(id: 123)`.
* `$OBJECT_list`: Returns a list of objects, optionally filtered by given parameters.
For example, query `device(id:123)` to fetch a specific device (identified by its unique ID), and query `device_list` (with an optional set of filters) to fetch all devices.
For more detail on constructing GraphQL queries, see the [Graphene documentation](https://docs.graphene-python.org/en/latest/).
## Filtering
The GraphQL API employs the same filtering logic as the UI and REST API. Filters can be specified as key-value pairs within parentheses immediately following the query name. For example, the following will return only sites within the North Carolina region with a status of active:
```
{"query": "query {site_list(region:\"north-carolina\", status:\"active\") {name}}"}
```
## Authentication
NetBox's GraphQL API uses the same API authentication tokens as its REST API. Authentication tokens are included with requests by attaching an `Authorization` HTTP header in the following form:
```
Authorization: Token $TOKEN
```
## Disabling the GraphQL API
If not needed, the GraphQL API can be disabled by setting the [`GRAPHQL_ENABLED`](../configuration/optional-settings.md#graphql_enabled) configuration parameter to False and restarting NetBox.

View File

@@ -10,7 +10,6 @@ NetBox is an infrastructure resource modeling (IRM) application designed to empo
* **Connections** - Network, console, and power connections among devices
* **Virtualization** - Virtual machines and clusters
* **Data circuits** - Long-haul communications circuits and providers
* **Secrets** - Encrypted storage of sensitive credentials
## What NetBox Is Not
@@ -49,13 +48,13 @@ NetBox is built on the [Django](https://djangoproject.com/) Python framework and
| HTTP service | nginx or Apache |
| WSGI service | gunicorn or uWSGI |
| Application | Django/Python |
| Database | PostgreSQL 9.6+ |
| Database | PostgreSQL 10+ |
| Task queuing | Redis/django-rq |
| Live device access | NAPALM |
## Supported Python Versions
NetBox supports Python 3.6, 3.7, and 3.8 environments currently. (Support for Python 3.5 was removed in NetBox v2.8.)
NetBox supports Python 3.7, 3.8, and 3.9 environments currently. (Support for Python 3.6 was removed in NetBox v3.0.)
## Getting Started

View File

@@ -2,8 +2,8 @@
This section entails the installation and configuration of a local PostgreSQL database. If you already have a PostgreSQL database service in place, skip to [the next section](2-redis.md).
!!! warning
NetBox requires PostgreSQL 9.6 or higher. Please note that MySQL and other relational databases are **not** currently supported.
!!! warning "PostgreSQL 10 or later required"
NetBox requires PostgreSQL 10 or later. Please note that MySQL and other relational databases are **not** supported.
## Installation
@@ -21,9 +21,6 @@ This section entails the installation and configuration of a local PostgreSQL da
sudo postgresql-setup --initdb
```
!!! info
PostgreSQL 9.6 and later are available natively on CentOS 8.2. If using an earlier CentOS release, you may need to [install it from an RPM](https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/).
CentOS configures ident host-based authentication for PostgreSQL by default. Because NetBox will need to authenticate using a username and password, modify `/var/lib/pgsql/data/pg_hba.conf` to support MD5 authentication by changing `ident` to `md5` for the lines below:
```no-highlight
@@ -38,30 +35,36 @@ sudo systemctl start postgresql
sudo systemctl enable postgresql
```
## Database Creation
At a minimum, we need to create a database for NetBox and assign it a username and password for authentication. This is done with the following commands.
!!! danger
**Do not use the password from the example.** Choose a strong, random password to ensure secure database authentication for your NetBox installation.
Before continuing, verify that you have installed PostgreSQL 10 or later:
```no-highlight
$ sudo -u postgres psql
psql (12.5 (Ubuntu 12.5-0ubuntu0.20.04.1))
Type "help" for help.
postgres=# CREATE DATABASE netbox;
CREATE DATABASE
postgres=# CREATE USER netbox WITH PASSWORD 'J5brHrAXFLQSif0K';
CREATE ROLE
postgres=# GRANT ALL PRIVILEGES ON DATABASE netbox TO netbox;
GRANT
postgres=# \q
psql -V
```
## Database Creation
At a minimum, we need to create a database for NetBox and assign it a username and password for authentication. Start by invoking the PostgreSQL shell as the system Postgres user.
```no-highlight
sudo -u postgres psql
```
Within the shell, enter the following commands to create the database and user (role), substituting your own value for the password:
```postgresql
CREATE DATABASE netbox;
CREATE USER netbox WITH PASSWORD 'J5brHrAXFLQSif0K';
GRANT ALL PRIVILEGES ON DATABASE netbox TO netbox;
```
!!! danger "Use a strong password"
**Do not use the password from the example.** Choose a strong, random password to ensure secure database authentication for your NetBox installation.
Once complete, enter `\q` to exit the PostgreSQL shell.
## Verify Service Status
You can verify that authentication works issuing the following command and providing the configured password. (Replace `localhost` with your database server if using a remote database.)
You can verify that authentication works by executing the `psql` command and passing the configured username and password. (Replace `localhost` with your database server if using a remote database.)
```no-highlight
$ psql --username netbox --password --host localhost netbox

View File

@@ -4,7 +4,7 @@
[Redis](https://redis.io/) is an in-memory key-value store which NetBox employs for caching and queuing. This section entails the installation and configuration of a local Redis instance. If you already have a Redis service in place, skip to [the next section](3-netbox.md).
!!! note
!!! warning "Redis v4.0 or later required"
NetBox v2.9.0 and later require Redis v4.0 or higher. If your distribution does not offer a recent enough release, you will need to build Redis from source. Please see [the Redis installation documentation](https://github.com/redis/redis) for further details.
=== "Ubuntu"
@@ -21,6 +21,12 @@
sudo systemctl enable redis
```
Before continuing, verify that your installed version of Redis is at least v4.0:
```no-highlight
redis-server -v
```
You may wish to modify the Redis configuration at `/etc/redis.conf` or `/etc/redis/redis.conf`, however in most cases the default configuration is sufficient.
## Verify Service Status
@@ -28,6 +34,7 @@ You may wish to modify the Redis configuration at `/etc/redis.conf` or `/etc/red
Use the `redis-cli` utility to ensure the Redis service is functional:
```no-highlight
$ redis-cli ping
PONG
redis-cli ping
```
If successful, you should receive a `PONG` response from the server.

View File

@@ -6,8 +6,8 @@ This section of the documentation discusses installing and configuring the NetBo
Begin by installing all system packages required by NetBox and its dependencies.
!!! note
NetBox v2.8.0 and later require Python 3.6, 3.7, or 3.8.
!!! warning "Python 3.7 or later required"
NetBox v3.0 and v3.1 require Python 3.7, 3.8, or 3.9. It is recommended to install at least Python v3.8, as this will become the minimum supported Python version in NetBox v3.2.
=== "Ubuntu"
@@ -17,14 +17,19 @@ Begin by installing all system packages required by NetBox and its dependencies.
=== "CentOS"
!!! warning
CentOS 8 does not provide Python 3.7 or later via its native package manager. You will need to install it via some other means. [Here is an example](https://tecadmin.net/install-python-3-7-on-centos-8/) of installing Python 3.7 from source.
Once you have Python 3.7 or later installed, install the remaining system packages:
```no-highlight
sudo yum install -y gcc python36 python36-devel python3-pip libxml2-devel libxslt-devel libffi-devel libpq-devel openssl-devel redhat-rpm-config
sudo yum install -y gcc libxml2-devel libxslt-devel libffi-devel libpq-devel openssl-devel redhat-rpm-config
```
Before continuing with either platform, update pip (Python's package management tool) to its latest release:
Before continuing, check that your installed Python version is at least 3.7:
```no-highlight
sudo pip3 install --upgrade pip
python3 -V
```
## Download NetBox
@@ -36,23 +41,21 @@ This documentation provides two options for installing NetBox: from a downloadab
Download the [latest stable release](https://github.com/netbox-community/netbox/releases) from GitHub as a tarball or ZIP archive and extract it to your desired path. In this example, we'll use `/opt/netbox` as the NetBox root.
```no-highlight
$ sudo wget https://github.com/netbox-community/netbox/archive/vX.Y.Z.tar.gz
$ sudo tar -xzf vX.Y.Z.tar.gz -C /opt
$ sudo ln -s /opt/netbox-X.Y.Z/ /opt/netbox
$ ls -l /opt | grep netbox
lrwxrwxrwx 1 root root 13 Jul 20 13:44 netbox -> netbox-2.9.0/
drwxr-xr-x 2 root root 4096 Jul 20 13:44 netbox-2.9.0
sudo wget https://github.com/netbox-community/netbox/archive/vX.Y.Z.tar.gz
sudo tar -xzf vX.Y.Z.tar.gz -C /opt
sudo ln -s /opt/netbox-X.Y.Z/ /opt/netbox
```
!!! note
It is recommended to install NetBox in a directory named for its version number. For example, NetBox v2.9.0 would be installed into `/opt/netbox-2.9.0`, and a symlink from `/opt/netbox/` would point to this location. This allows for future releases to be installed in parallel without interrupting the current installation. When changing to the new release, only the symlink needs to be updated.
It is recommended to install NetBox in a directory named for its version number. For example, NetBox v3.0.0 would be installed into `/opt/netbox-3.0.0`, and a symlink from `/opt/netbox/` would point to this location. (You can verify this configuration with the command `ls -l /opt | grep netbox`.) This allows for future releases to be installed in parallel without interrupting the current installation. When changing to the new release, only the symlink needs to be updated.
### Option B: Clone the Git Repository
Create the base directory for the NetBox installation. For this guide, we'll use `/opt/netbox`.
```no-highlight
sudo mkdir -p /opt/netbox/ && cd /opt/netbox/
sudo mkdir -p /opt/netbox/
cd /opt/netbox/
```
If `git` is not already installed, install it:
@@ -72,23 +75,26 @@ If `git` is not already installed, install it:
Next, clone the **master** branch of the NetBox GitHub repository into the current directory. (This branch always holds the current stable release.)
```no-highlight
$ sudo git clone -b master https://github.com/netbox-community/netbox.git .
```
The screen below should be the result:
```
Cloning into '.'...
remote: Counting objects: 1994, done.
remote: Compressing objects: 100% (150/150), done.
remote: Total 1994 (delta 80), reused 0 (delta 0), pack-reused 1842
Receiving objects: 100% (1994/1994), 472.36 KiB | 0 bytes/s, done.
Resolving deltas: 100% (1495/1495), done.
Checking connectivity... done.
sudo git clone -b master --depth 1 https://github.com/netbox-community/netbox.git .
```
!!! note
Installation via git also allows you to easily try out development versions of NetBox. The `develop` branch contains all work underway for the next minor release, and the `feature` branch tracks progress on the next major release.
The `git clone` command above utilizes a "shallow clone" to retrieve only the most recent commit. If you need to download the entire history, omit the `--depth 1` argument.
The `git clone` command should generate output similar to the following:
```
Cloning into '.'...
remote: Enumerating objects: 996, done.
remote: Counting objects: 100% (996/996), done.
remote: Compressing objects: 100% (935/935), done.
remote: Total 996 (delta 148), reused 386 (delta 34), pack-reused 0
Receiving objects: 100% (996/996), 4.26 MiB | 9.81 MiB/s, done.
Resolving deltas: 100% (148/148), done.
```
!!! note
Installation via git also allows you to easily try out different versions of NetBox. To check out a [specific NetBox release](https://github.com/netbox-community/netbox/releases), use the `git checkout` command with the desired release tag. For example, `git checkout v3.0.8`.
## Create the NetBox System User
@@ -189,7 +195,7 @@ A simple Python script named `generate_secret_key.py` is provided in the parent
python3 ../generate_secret_key.py
```
!!! warning
!!! warning "SECRET_KEY values must match"
In the case of a highly available installation with multiple web servers, `SECRET_KEY` must be identical among all servers in order to maintain a persistent user session state.
When you have finished modifying the configuration, remember to save the file.
@@ -200,7 +206,7 @@ All Python packages required by NetBox are listed in `requirements.txt` and will
### NAPALM
The [NAPALM automation](https://napalm-automation.net/) library allows NetBox to fetch live data from devices and return it to a requester via its REST API. The `NAPALM_USERNAME` and `NAPALM_PASSWORD` configuration parameters define the credentials to be used when connecting to a device.
Integration with the [NAPALM automation](../additional-features/napalm.md) library allows NetBox to fetch live data from devices and return it to a requester via its REST API. The `NAPALM_USERNAME` and `NAPALM_PASSWORD` configuration parameters define the credentials to be used when connecting to a device.
```no-highlight
sudo sh -c "echo 'napalm' >> /opt/netbox/local_requirements.txt"
@@ -219,14 +225,21 @@ sudo sh -c "echo 'django-storages' >> /opt/netbox/local_requirements.txt"
Once NetBox has been configured, we're ready to proceed with the actual installation. We'll run the packaged upgrade script (`upgrade.sh`) to perform the following actions:
* Create a Python virtual environment
* Install all required Python packages
* Installs all required Python packages
* Run database schema migrations
* Builds the documentation locally (for offline use)
* Aggregate static resource files on disk
```no-highlight
sudo /opt/netbox/upgrade.sh
```
Note that **Python 3.7 or later is required** for NetBox v3.0 and later releases. If the default Python installation on your server is set to a lesser version, pass the path to the supported installation as an environment variable named `PYTHON`. (Note that the environment variable must be passed _after_ the `sudo` command.)
```no-highlight
sudo PYTHON=/usr/bin/python3.7 /opt/netbox/upgrade.sh
```
!!! note
Upon completion, the upgrade script may warn that no existing virtual environment was detected. As this is a new installation, this warning can be safely ignored.
@@ -243,30 +256,45 @@ Once the virtual environment has been activated, you should notice the string `(
Next, we'll create a superuser account using the `createsuperuser` Django management command (via `manage.py`). Specifying an email address for the user is not required, but be sure to use a very strong password.
```no-highlight
(venv) $ cd /opt/netbox/netbox
(venv) $ python3 manage.py createsuperuser
Username: admin
Email address: admin@example.com
Password:
Password (again):
Superuser created successfully.
cd /opt/netbox/netbox
python3 manage.py createsuperuser
```
## Schedule the Housekeeping Task
NetBox includes a `housekeeping` management command that handles some recurring cleanup tasks, such as clearing out old sessions and expired change records. Although this command may be run manually, it is recommended to configure a scheduled job using the system's `cron` daemon or a similar utility.
A shell script which invokes this command is included at `contrib/netbox-housekeeping.sh`. It can be copied to or linked from your system's daily cron task directory, or included within the crontab directly. (If installing NetBox into a nonstandard path, be sure to update the system paths within this script first.)
```shell
sudo ln -s /opt/netbox/contrib/netbox-housekeeping.sh /etc/cron.daily/netbox-housekeeping
```
See the [housekeeping documentation](../administration/housekeeping.md) for further details.
## Test the Application
At this point, we should be able to run NetBox's development server for testing. We can check by starting a development instance:
```no-highlight
(venv) $ python3 manage.py runserver 0.0.0.0:8000 --insecure
python3 manage.py runserver 0.0.0.0:8000 --insecure
```
If successful, you should see output similar to the following:
```no-highlight
Watching for file changes with StatReloader
Performing system checks...
System check identified no issues (0 silenced).
November 17, 2020 - 16:08:13
Django version 3.1.3, using settings 'netbox.settings'
Starting development server at http://0.0.0.0:8000/
August 30, 2021 - 18:02:23
Django version 3.2.6, using settings 'netbox.settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CONTROL-C.
```
Next, connect to the name or IP of the server (as defined in `ALLOWED_HOSTS`) on port 8000; for example, <http://127.0.0.1:8000/>. You should be greeted with the NetBox home page. Try logging in using the username and password specified when creating a superuser.
!!! note
By default RHEL based distros will likely block your testing attempts with firewalld. The development server port can be opened with `firewall-cmd` (add `--permanent` if you want the rule to survive server restarts):
@@ -274,20 +302,10 @@ Quit the server with CONTROL-C.
firewall-cmd --zone=public --add-port=8000/tcp
```
Next, connect to the name or IP of the server (as defined in `ALLOWED_HOSTS`) on port 8000; for example, <http://127.0.0.1:8000/>. You should be greeted with the NetBox home page.
!!! danger
!!! danger "Not for production use"
The development server is for development and testing purposes only. It is neither performant nor secure enough for production use. **Do not use it in production.**
!!! warning
If the test service does not run, or you cannot reach the NetBox home page, something has gone wrong. Do not proceed with the rest of this guide until the installation has been corrected.
Note that the initial user interface will be locked down for non-authenticated users.
![NetBox UI as seen by a non-authenticated user](../media/installation/netbox_ui_guest.png)
Try logging in using the superuser account we just created. Once authenticated, you'll be able to access all areas of the UI:
![NetBox UI as seen by an administrator](../media/installation/netbox_ui_admin.png)
Type `Ctrl+c` to stop the development server.

View File

@@ -14,7 +14,7 @@ While the provided configuration should suffice for most initial installations,
## systemd Setup
We'll use systemd to control both gunicorn and NetBox's background worker process. First, copy `contrib/netbox.service` and `contrib/netbox-rq.service` to the `/etc/systemd/system/` directory and reload the systemd dameon:
We'll use systemd to control both gunicorn and NetBox's background worker process. First, copy `contrib/netbox.service` and `contrib/netbox-rq.service` to the `/etc/systemd/system/` directory and reload the systemd daemon:
```no-highlight
sudo cp -v /opt/netbox/contrib/*.service /etc/systemd/system/
@@ -31,18 +31,23 @@ sudo systemctl enable netbox netbox-rq
You can use the command `systemctl status netbox` to verify that the WSGI service is running:
```no-highlight
# systemctl status netbox.service
systemctl status netbox.service
```
You should see output similar to the following:
```no-highlight
● netbox.service - NetBox WSGI Service
Loaded: loaded (/etc/systemd/system/netbox.service; enabled; vendor preset: enabled)
Active: active (running) since Tue 2020-11-17 16:18:23 UTC; 3min 35s ago
Active: active (running) since Mon 2021-08-30 04:02:36 UTC; 14h ago
Docs: https://netbox.readthedocs.io/en/stable/
Main PID: 22836 (gunicorn)
Tasks: 6 (limit: 2345)
Memory: 339.3M
Main PID: 1140492 (gunicorn)
Tasks: 19 (limit: 4683)
Memory: 666.2M
CGroup: /system.slice/netbox.service
├─22836 /opt/netbox/venv/bin/python3 /opt/netbox/venv/bin/gunicorn --pid>
├─22854 /opt/netbox/venv/bin/python3 /opt/netbox/venv/bin/gunicorn --pid>
├─22855 /opt/netbox/venv/bin/python3 /opt/netbox/venv/bin/gunicorn --pid>
├─1140492 /opt/netbox/venv/bin/python3 /opt/netbox/venv/bin/gunicorn --pid /va>
├─1140513 /opt/netbox/venv/bin/python3 /opt/netbox/venv/bin/gunicorn --pid /va>
├─1140514 /opt/netbox/venv/bin/python3 /opt/netbox/venv/bin/gunicorn --pid /va>
...
```

View File

@@ -1,6 +1,6 @@
# Installation
The installation instructions provided here have been tested to work on Ubuntu 20.04 and CentOS 8.2. The particular commands needed to install dependencies on other distributions may vary significantly. Unfortunately, this is outside the control of the NetBox maintainers. Please consult your distribution's documentation for assistance with any errors.
The installation instructions provided here have been tested to work on Ubuntu 20.04 and CentOS 8.3. The particular commands needed to install dependencies on other distributions may vary significantly. Unfortunately, this is outside the control of the NetBox maintainers. Please consult your distribution's documentation for assistance with any errors.
The following sections detail how to set up a new instance of NetBox:
@@ -11,21 +11,18 @@ The following sections detail how to set up a new instance of NetBox:
5. [HTTP server](5-http-server.md)
6. [LDAP authentication](6-ldap.md) (optional)
The video below demonstrates the installation of NetBox v2.10.3 on Ubuntu 20.04 for your reference.
The video below demonstrates the installation of NetBox v3.0 on Ubuntu 20.04 for your reference.
<iframe width="560" height="315" src="https://www.youtube.com/embed/dFANGlxXEng" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
<iframe width="560" height="315" src="https://www.youtube.com/embed/7Fpd2-q9_28" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
## Requirements
| Dependency | Minimum Version |
|------------|-----------------|
| Python | 3.6 |
| PostgreSQL | 9.6 |
| Python | 3.7 |
| PostgreSQL | 10 |
| Redis | 4.0 |
!!! note
Python 3.7 or later will be required in NetBox v3.0. Users are strongly encouraged to install NetBox using Python 3.7 or later for new deployments.
Below is a simplified overview of the NetBox application stack for reference:
![NetBox UI as seen by a non-authenticated user](../media/installation/netbox_application_stack.png)

View File

@@ -6,12 +6,12 @@ Prior to upgrading your NetBox instance, be sure to carefully review all [releas
## Update Dependencies to Required Versions
NetBox v2.9.0 and later requires the following:
NetBox v3.0 and later requires the following:
| Dependency | Minimum Version |
|------------|-----------------|
| Python | 3.6 |
| PostgreSQL | 9.6 |
| Python | 3.7 |
| PostgreSQL | 10 |
| Redis | 4.0 |
## Install the Latest Release
@@ -75,16 +75,23 @@ Once the new code is in place, verify that any optional Python packages required
sudo ./upgrade.sh
```
!!! warning
If the default version of Python is not at least 3.7, you'll need to pass the path to a supported Python version as an environment variable when calling the upgrade script. For example:
```no-highlight
sudo PYTHON=/usr/bin/python3.7 ./upgrade.sh
```
This script performs the following actions:
* Destroys and rebuilds the Python virtual environment
* Installs all required Python packages (listed in `requirements.txt`)
* Installs any additional packages from `local_requirements.txt`
* Applies any database migrations that were included in the release
* Builds the documentation locally (for offline use)
* Collects all static files to be served by the HTTP service
* Deletes stale content types from the database
* Deletes all expired user sessions from the database
* Clears all cached data to prevent conflicts with the new release
!!! note
If the upgrade script prompts a warning about unreflected database migrations, this indicates that some change has
@@ -102,5 +109,12 @@ Finally, restart the gunicorn and RQ services:
sudo systemctl restart netbox netbox-rq
```
!!! note
If upgrading from an installation that uses supervisord, please see the instructions for [migrating to systemd](migrating-to-systemd.md). The use of supervisord is no longer supported.
## Verify Housekeeping Scheduling
If upgrading from a release prior to NetBox v3.0, check that a cron task (or similar scheduled process) has been configured to run NetBox's nightly housekeeping command. A shell script which invokes this command is included at `contrib/netbox-housekeeping.sh`. It can be linked from your system's daily cron task directory, or included within the crontab directly. (If NetBox has been installed in a nonstandard path, be sure to update the system paths within this script first.)
```shell
sudo ln -s /opt/netbox/contrib/netbox-housekeeping.sh /etc/cron.daily/netbox-housekeeping
```
See the [housekeeping documentation](../administration/housekeeping.md) for further details.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 77 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 101 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 336 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 336 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 339 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 116 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 81 KiB

View File

@@ -22,13 +22,3 @@ Each cable may be assigned a type, label, length, and color. Each cable is also
## Tracing Cables
A cable may be traced from either of its endpoints by clicking the "trace" button. (A REST API endpoint also provides this functionality.) NetBox will follow the path of connected cables from this termination across the directly connected cable to the far-end termination. If the cable connects to a pass-through port, and the peer port has another cable connected, NetBox will continue following the cable path until it encounters a non-pass-through or unconnected termination point. The entire path will be displayed to the user.
In the example below, three individual cables comprise a path between devices A and D:
![Cable path](../../media/models/dcim_cable_trace.png)
Traced from Interface 1 on Device A, NetBox will show the following path:
* Cable 1: Interface 1 to Front Port 1
* Cable 2: Rear Port 1 to Rear Port 2
* Cable 3: Front Port 2 to Interface 2

View File

@@ -12,3 +12,5 @@ Some devices house child devices which share physical resources, like space and
!!! note
This parent/child relationship is **not** suitable for modeling chassis-based devices, wherein child members share a common control plane. Instead, line cards and similarly non-autonomous hardware should be modeled as inventory items within a device, with any associated interfaces or other components assigned directly to the device.
A device type may optionally specify an airflow direction, such as front-to-rear, rear-to-front, or passive. Airflow direction may also be set separately per device. If it is not defined for a device at the time of its creation, it will inherit the airflow setting of its device type.

View File

@@ -11,6 +11,17 @@ Interfaces may be physical or virtual in nature, but only physical interfaces ma
Physical interfaces may be arranged into a link aggregation group (LAG) and associated with a parent LAG (virtual) interface. LAG interfaces can be recursively nested to model bonding of trunk groups. Like all virtual interfaces, LAG interfaces cannot be connected physically.
### Wireless Interfaces
Wireless interfaces may additionally track the following attributes:
* **Role** - AP or station
* **Channel** - One of several standard wireless channels
* **Channel Frequency** - The transmit frequency
* **Channel Width** - Channel bandwidth
If a predefined channel is selected, the frequency and width attributes will be assigned automatically. If no channel is selected, these attributes may be defined manually.
### IP Address Assignment
IP addresses can be assigned to interfaces. VLANs can also be assigned to each interface as either tagged or untagged. (An interface may have only one untagged VLAN.)

View File

@@ -2,4 +2,5 @@
Racks and devices can be grouped by location within a site. A location may represent a floor, room, cage, or similar organizational unit. Locations can be nested to form a hierarchy. For example, you may have floors within a site, and rooms within a floor.
The name and facility ID of each rack within a location must be unique. (Racks not assigned to the same location may have identical names and/or facility IDs.)
Each location must have a name that is unique within its parent site and location, if any.

View File

@@ -4,6 +4,6 @@ A platform defines the type of software running on a device or virtual machine.
Platforms may optionally be limited by manufacturer: If a platform is assigned to a particular manufacturer, it can only be assigned to devices with a type belonging to that manufacturer.
The platform model is also used to indicate which [NAPALM](https://napalm-automation.net/) driver and any associated arguments NetBox should use when connecting to a remote device. The name of the driver along with optional parameters are stored with the platform.
The platform model is also used to indicate which NAPALM driver (if any) and any associated arguments NetBox should use when connecting to a remote device. The name of the driver along with optional parameters are stored with the platform.
The assignment of platforms to devices is an optional feature, and may be disregarded if not desired.

View File

@@ -1,6 +1,6 @@
# Racks
The rack model represents a physical two- or four-post equipment rack in which devices can be installed. Each rack must be assigned to a site, and may optionally be assigned to a location and/or tenant. Racks can also be organized by user-defined functional roles.
The rack model represents a physical two- or four-post equipment rack in which devices can be installed. Each rack must be assigned to a site, and may optionally be assigned to a location and/or tenant. Racks can also be organized by user-defined functional roles. The name and facility ID of each rack within a location must be unique.
Rack height is measured in *rack units* (U); racks are commonly between 42U and 48U tall, but NetBox allows you to define racks of arbitrary height. A toggle is provided to indicate whether rack units are in ascending (from the ground up) or descending order.

View File

@@ -1,3 +1,5 @@
# Regions
Sites can be arranged geographically using regions. A region might represent a continent, country, city, campus, or other area depending on your use case. Regions can be nested recursively to construct a hierarchy. For example, you might define several country regions, and within each of those several state or city regions to which sites are assigned.
Each region must have a name that is unique within its parent region, if any.

View File

@@ -1,3 +1,5 @@
# Site Groups
Like regions, site groups can be used to organize sites. Whereas regions are intended to provide geographic organization, site groups can be used to classify sites by role or function. Also like regions, site groups can be nested to form a hierarchy. Sites which belong to a child group are also considered to be members of any of its parent groups.
Each site group must have a name that is unique within its parent group, if any.

View File

@@ -2,7 +2,7 @@
A virtual chassis represents a set of devices which share a common control plane. A common example of this is a stack of switches which are connected and configured to operate as a single device. A virtual chassis must be assigned a name and may be assigned a domain.
Each device in the virtual chassis is referred to as a VC member, and assigned a position and (optionally) a priority. VC member devices commonly reside within the same rack, though this is not a requirement. One of the devices may be designated as the VC master: This device will typically be assigned a name, secrets, services, and other attributes related to managing the VC.
Each device in the virtual chassis is referred to as a VC member, and assigned a position and (optionally) a priority. VC member devices commonly reside within the same rack, though this is not a requirement. One of the devices may be designated as the VC master: This device will typically be assigned a name, services, and other attributes related to managing the VC.
!!! note
It's important to recognize the distinction between a virtual chassis and a chassis-based device. A virtual chassis is **not** suitable for modeling a chassis-based switch with removable line cards (such as the Juniper EX9208), as its line cards are _not_ physically autonomous devices.

View File

@@ -8,13 +8,15 @@ Within the database, custom fields are stored as JSON data directly alongside ea
## Creating Custom Fields
Custom fields must be created through the admin UI under Extras > Custom Fields. NetBox supports six types of custom field:
Custom fields may be created by navigating to Customization > Custom Fields. NetBox supports six types of custom field:
* Text: Free-form text (up to 255 characters)
* Long text: Free-form of any length; supports Markdown rendering
* Integer: A whole number (positive or negative)
* Boolean: True or false
* Date: A date in ISO 8601 format (YYYY-MM-DD)
* URL: This will be presented as a link in the web UI
* JSON: Arbitrary data stored in JSON format
* Selection: A selection of one of several pre-defined custom choices
* Multiple selection: A selection field which supports the assignment of multiple values
@@ -39,38 +41,3 @@ NetBox supports limited custom validation for custom field values. Following are
Each custom selection field must have at least two choices. These are specified as a comma-separated list. Choices appear in forms in the order they are listed. Note that choice values are saved exactly as they appear, so it's best to avoid superfluous punctuation or symbols where possible.
If a default value is specified for a selection field, it must exactly match one of the provided choices. The value of a multiple selection field will always return a list, even if only one value is selected.
## Custom Fields in Templates
Several features within NetBox, such as export templates and webhooks, utilize Jinja2 templating. For convenience, objects which support custom field assignment expose custom field data through the `cf` property. This is a bit cleaner than accessing custom field data through the actual field (`custom_field_data`).
For example, a custom field named `foo123` on the Site model is accessible on an instance as `{{ site.cf.foo123 }}`.
## Custom Fields and the REST API
When retrieving an object via the REST API, all of its custom data will be included within the `custom_fields` attribute. For example, below is the partial output of a site with two custom fields defined:
```json
{
"id": 123,
"url": "http://localhost:8000/api/dcim/sites/123/",
"name": "Raleigh 42",
...
"custom_fields": {
"deployed": "2018-06-19",
"site_code": "US-NC-RAL42"
},
...
```
To set or change these values, simply include nested JSON data. For example:
```json
{
"name": "New Site",
"slug": "new-site",
"custom_fields": {
"deployed": "2019-03-24"
}
}
```

View File

@@ -1,8 +1,8 @@
# Custom Links
Custom links allow users to display arbitrary hyperlinks to external content within NetBox object views. These are helpful for cross-referencing related records in systems outside of NetBox. For example, you might create a custom link on the device view which links to the current device in a network monitoring system.
Custom links allow users to display arbitrary hyperlinks to external content within NetBox object views. These are helpful for cross-referencing related records in systems outside NetBox. For example, you might create a custom link on the device view which links to the current device in a Network Monitoring System (NMS).
Custom links are created under the admin UI. Each link is associated with a particular NetBox object type (site, device, prefix, etc.) and will be displayed on relevant views. Each link is assigned text and a URL, both of which support Jinja2 templating. The text and URL are rendered with the context variable `obj` representing the current object.
Custom links are created by navigating to Customization > Custom Links. Each link is associated with a particular NetBox object type (site, device, prefix, etc.) and will be displayed on relevant views. Each link has display text and a URL, and data from the Netbox item being viewed can be included in the link using [Jinja2 template code](https://jinja2docs.readthedocs.io/en/stable/) through the variable `obj`, and custom fields through `obj.cf`.
For example, you might define a link like this:
@@ -15,7 +15,7 @@ When viewing a device named Router4, this link would render as:
<a href="https://nms.example.com/nodes/?name=Router4">View NMS</a>
```
Custom links appear as buttons at the top right corner of the page. Numeric weighting can be used to influence the ordering of links.
Custom links appear as buttons in the top right corner of the page. Numeric weighting can be used to influence the ordering of links.
!!! warning
Custom links rely on user-created code to generate arbitrary HTML output, which may be dangerous. Only grant permission to create or modify custom links to trusted users.

View File

@@ -1,6 +1,6 @@
# Export Templates
NetBox allows users to define custom templates that can be used when exporting objects. To create an export template, navigate to Extras > Export Templates under the admin interface.
NetBox allows users to define custom templates that can be used when exporting objects. To create an export template, navigate to Customization > Export Templates.
Each export template is associated with a certain type of object. For instance, if you create an export template for VLANs, your custom template will appear under the "Export" button on the VLANs list. Each export template must have a name, and may optionally designate a specific export [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) and/or file extension.
@@ -35,36 +35,3 @@ If you need to use the config context data in an export template, you'll should
The `as_attachment` attribute of an export template controls its behavior when rendered. If true, the rendered content will be returned to the user as a downloadable file. If false, it will be displayed within the browser. (This may be handy e.g. for generating HTML content.)
A MIME type and file extension can optionally be defined for each export template. The default MIME type is `text/plain`.
## Example
Here's an example device export template that will generate a simple Nagios configuration from a list of devices.
```
{% for device in queryset %}{% if device.status and device.primary_ip %}define host{
use generic-switch
host_name {{ device.name }}
address {{ device.primary_ip.address.ip }}
}
{% endif %}{% endfor %}
```
The generated output will look something like this:
```
define host{
use generic-switch
host_name switch1
address 192.0.2.1
}
define host{
use generic-switch
host_name switch2
address 192.0.2.2
}
define host{
use generic-switch
host_name switch3
address 192.0.2.3
}
```

View File

@@ -15,6 +15,3 @@ The `tag` filter can be specified multiple times to match only objects which hav
```no-highlight
GET /api/dcim/devices/?tag=monitored&tag=deprecated
```
!!! note
Tags have changed substantially in NetBox v2.9. They are no longer created on-demand when editing an object, and their representation in the REST API now includes a complete depiction of the tag rather than only its label.

View File

@@ -0,0 +1,96 @@
# Webhooks
A webhook is a mechanism for conveying to some external system a change that took place in NetBox. For example, you may want to notify a monitoring system whenever the status of a device is updated in NetBox. This can be done by creating a webhook for the device model in NetBox and identifying the webhook receiver. When NetBox detects a change to a device, an HTTP request containing the details of the change and who made it be sent to the specified receiver. Webhooks are managed under Logging > Webhooks.
!!! warning
Webhooks support the inclusion of user-submitted code to generate custom headers and payloads, which may pose security risks under certain conditions. Only grant permission to create or modify webhooks to trusted users.
## Configuration
* **Name** - A unique name for the webhook. The name is not included with outbound messages.
* **Object type(s)** - The type or types of NetBox object that will trigger the webhook.
* **Enabled** - If unchecked, the webhook will be inactive.
* **Events** - A webhook may trigger on any combination of create, update, and delete events. At least one event type must be selected.
* **HTTP method** - The type of HTTP request to send. Options include `GET`, `POST`, `PUT`, `PATCH`, and `DELETE`.
* **URL** - The fuly-qualified URL of the request to be sent. This may specify a destination port number if needed.
* **HTTP content type** - The value of the request's `Content-Type` header. (Defaults to `application/json`)
* **Additional headers** - Any additional headers to include with the request (optional). Add one header per line in the format `Name: Value`. Jinja2 templating is supported for this field (see below).
* **Body template** - The content of the request being sent (optional). Jinja2 templating is supported for this field (see below). If blank, NetBox will populate the request body with a raw dump of the webhook context. (If the HTTP cotent type is set to `application/json`, this will be formatted as a JSON object.)
* **Secret** - A secret string used to prove authenticity of the request (optional). This will append a `X-Hook-Signature` header to the request, consisting of a HMAC (SHA-512) hex digest of the request body using the secret as the key.
* **Conditions** - An optional set of conditions evaluated to determine whether the webhook fires for a given object.
* **SSL verification** - Uncheck this option to disable validation of the receiver's SSL certificate. (Disable with caution!)
* **CA file path** - The file path to a particular certificate authority (CA) file to use when validating the receiver's SSL certificate (optional).
## Jinja2 Template Support
[Jinja2 templating](https://jinja.palletsprojects.com/) is supported for the `additional_headers` and `body_template` fields. This enables the user to convey object data in the request headers as well as to craft a customized request body. Request content can be crafted to enable the direct interaction with external systems by ensuring the outgoing message is in a format the receiver expects and understands.
For example, you might create a NetBox webhook to [trigger a Slack message](https://api.slack.com/messaging/webhooks) any time an IP address is created. You can accomplish this using the following configuration:
* Object type: IPAM > IP address
* HTTP method: `POST`
* URL: Slack incoming webhook URL
* HTTP content type: `application/json`
* Body template: `{"text": "IP address {{ data['address'] }} was created by {{ username }}!"}`
### Available Context
The following data is available as context for Jinja2 templates:
* `event` - The type of event which triggered the webhook: created, updated, or deleted.
* `model` - The NetBox model which triggered the change.
* `timestamp` - The time at which the event occurred (in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format).
* `username` - The name of the user account associated with the change.
* `request_id` - The unique request ID. This may be used to correlate multiple changes associated with a single request.
* `data` - A detailed representation of the object in its current state. This is typically equivalent to the model's representation in NetBox's REST API.
* `snapshots` - Minimal "snapshots" of the object state both before and after the change was made; provided ass a dictionary with keys named `prechange` and `postchange`. These are not as extensive as the fully serialized representation, but contain enough information to convey what has changed.
### Default Request Body
If no body template is specified, the request body will be populated with a JSON object containing the context data. For example, a newly created site might appear as follows:
```json
{
"event": "created",
"timestamp": "2021-03-09 17:55:33.968016+00:00",
"model": "site",
"username": "jstretch",
"request_id": "fdbca812-3142-4783-b364-2e2bd5c16c6a",
"data": {
"id": 19,
"name": "Site 1",
"slug": "site-1",
"status":
"value": "active",
"label": "Active",
"id": 1
},
"region": null,
...
},
"snapshots": {
"prechange": null,
"postchange": {
"created": "2021-03-09",
"last_updated": "2021-03-09T17:55:33.851Z",
"name": "Site 1",
"slug": "site-1",
"status": "active",
...
}
}
}
```
## Conditional Webhooks
A webhook may include a set of conditional logic expressed in JSON used to control whether a webhook triggers for a specific object. For example, you may wish to trigger a webhook for devices only when the `status` field of an object is "active":
```json
{
"attr": "status",
"value": "active"
}
```
For more detail, see the reference documentation for NetBox's [conditional logic](../reference/conditions.md).

15
docs/models/ipam/asn.md Normal file
View File

@@ -0,0 +1,15 @@
# ASN
ASN is short for Autonomous System Number. This identifier is used in the BGP protocol to identify which "autonomous system" a particular prefix is originating and transiting through.
The AS number model within NetBox allows you to model some of this real-world relationship.
Within NetBox:
* AS numbers are globally unique
* Each AS number must be associated with a RIR (ARIN, RFC 6996, etc)
* Each AS number can be associated with many different sites
* Each site can have many different AS numbers
* Each AS number can be assigned to a single tenant

View File

@@ -0,0 +1,16 @@
# FHRP Group
A first-hop redundancy protocol (FHRP) enables multiple physical interfaces to present a virtual IP address in a redundant manner. Example of such protocols include:
* Hot Standby Router Protocol (HSRP)
* Virtual Router Redundancy Protocol (VRRP)
* Common Address Redundancy Protocol (CARP)
* Gateway Load Balancing Protocol (GLBP)
NetBox models these redundancy groups by protocol and group ID. Each group may optionally be assigned an authentication type and key. (Note that the authentication key is stored as a plaintext value in NetBox.) Each group may be assigned or more virtual IPv4 and/or IPv6 addresses.
## FHRP Group Assignments
Member device and VM interfaces can be assigned to FHRP groups, along with a numeric priority value. For instance, three interfaces, each belonging to a different router, may each be assigned to the same FHRP group to serve a common virtual IP address. Each of these assignments would typically receive a different priority.
Interfaces are assigned to FHRP groups under the interface detail view.

View File

@@ -0,0 +1,14 @@
# IP Ranges
This model represents an arbitrary range of individual IPv4 or IPv6 addresses, inclusive of its starting and ending addresses. For instance, the range 192.0.2.10 to 192.0.2.20 has eleven members. (The total member count is available as the `size` property on an IPRange instance.) Like prefixes and IP addresses, each IP range may optionally be assigned to a VRF and/or tenant.
IP also ranges share the same functional roles as prefixes and VLANs, although the assignment of a role is optional. Each IP range must be assigned an operational status, which is one of the following:
* Active - Provisioned and in use
* Reserved - Designated for future use
* Deprecated - No longer in use
The status of a range does _not_ have any impact on its member IP addresses, which may have their statuses modified separately.
!!! note
The maximum supported size of an IP range is 2^32 - 1.

View File

@@ -1,5 +0,0 @@
# Secrets
A secret represents a single credential or other sensitive string of characters which must be stored securely. Each secret is assigned to a device within NetBox. The plaintext value of a secret is encrypted to a ciphertext immediately prior to storage within the database using a 256-bit AES master key. A SHA256 hash of the plaintext is also stored along with each ciphertext to validate the decrypted plaintext.
Each secret can also store an optional name parameter, which is not encrypted. This may be useful for storing user names.

View File

@@ -1,9 +0,0 @@
# Secret Roles
Each secret is assigned a functional role which indicates what it is used for. Secret roles are customizable. Typical roles might include:
* Login credentials
* SNMP community strings
* RADIUS/TACACS+ keys
* IKE key strings
* Routing protocol shared secrets

View File

@@ -1,35 +0,0 @@
# User Keys
Each user within NetBox can associate his or her account with an RSA public key. If activated by an administrator, this user key will contain a unique, encrypted copy of the AES master key needed to retrieve secret data.
User keys may be created by users individually, however they are of no use until they have been activated by a user who already possesses an active user key.
## Supported Key Format
Public key formats supported
- PKCS#1 RSAPublicKey* (PEM header: BEGIN RSA PUBLIC KEY)
- X.509 SubjectPublicKeyInfo** (PEM header: BEGIN PUBLIC KEY)
- **OpenSSH line format is not supported.**
Private key formats supported (unencrypted)
- PKCS#1 RSAPrivateKey** (PEM header: BEGIN RSA PRIVATE KEY)
- PKCS#8 PrivateKeyInfo* (PEM header: BEGIN PRIVATE KEY)
## Creating the First User Key
When NetBox is first installed, it contains no encryption keys. Before it can store secrets, a user (typically the superuser) must create a user key. This can be done by navigating to Profile > User Key.
To create a user key, you can either generate a new RSA key pair, or upload the public key belonging to a pair you already have. If generating a new key pair, **you must save the private key** locally before saving your new user key. Once your user key has been created, its public key will be displayed under your profile.
When the first user key is created in NetBox, a random master encryption key is generated automatically. This key is then encrypted using the public key provided and stored as part of your user key. **The master key cannot be recovered** without your private key.
Once a user key has been assigned an encrypted copy of the master key, it is considered activated and can now be used to encrypt and decrypt secrets.
## Creating Additional User Keys
Any user can create his or her user key by generating or uploading a public RSA key. However, a user key cannot be used to encrypt or decrypt secrets until it has been activated with an encrypted copy of the master key.
Only an administrator with an active user key can activate other user keys. To do so, access the NetBox admin UI and navigate to Secrets > User Keys. Select the user key(s) to be activated, and select "activate selected user keys" from the actions dropdown. You will need to provide your private key in order to decrypt the master key. A copy of the master key is then encrypted using the public key associated with the user key being activated.

View File

@@ -0,0 +1,31 @@
# Contacts
A contact represent an individual or group that has been associated with an object in NetBox for administrative reasons. For example, you might assign one or more operational contacts to each site. Contacts can be arranged within nested contact groups.
Each contact must include a name, which is unique to its parent group (if any). The following optional descriptors are also available:
* Title
* Phone
* Email
* Address
## Contact Assignment
Each contact can be assigned to one or more objects, allowing for the efficient reuse of contact information. When assigning a contact to an object, the user may optionally specify a role and/or priority (primary, secondary, tertiary, or inactive) to better convey the nature of the contact's relationship to the assigned object.
The following models support the assignment of contacts:
* circuits.Circuit
* circuits.Provider
* dcim.Device
* dcim.Location
* dcim.Manufacturer
* dcim.PowerPanel
* dcim.Rack
* dcim.Region
* dcim.Site
* dcim.SiteGroup
* tenancy.Tenant
* virtualization.Cluster
* virtualization.ClusterGroup
* virtualization.VirtualMachine

View File

@@ -0,0 +1,3 @@
# Contact Groups
Contacts can be organized into arbitrary groups. These groups can be recursively nested for convenience. Each contact within a group must have a unique name, but other attributes can be repeated.

View File

@@ -0,0 +1,3 @@
# Contact Roles
Contacts can be organized by functional roles, which are fully customizable by the user. For example, you might create roles for administrative, operational, or emergency contacts.

View File

@@ -1,5 +1,5 @@
# Clusters
A cluster is a logical grouping of physical resources within which virtual machines run. A cluster must be assigned a type (technological classification), and may optionally be assigned to a cluster group, site, and/or tenant.
A cluster is a logical grouping of physical resources within which virtual machines run. A cluster must be assigned a type (technological classification), and may optionally be assigned to a cluster group, site, and/or tenant. Each cluster must have a unique name within its assigned group and/or site, if any.
Physical devices may be associated with clusters as hosts. This allows users to track on which host(s) a particular virtual machine may reside. However, NetBox does not support pinning a specific VM within a cluster to a particular host device.

View File

@@ -0,0 +1,11 @@
# Wireless LANs
A wireless LAN is a set of interfaces connected via a common wireless channel. Each instance must have an SSID, and may optionally be correlated to a VLAN. Wireless LANs can be arranged into hierarchical groups.
An interface may be attached to multiple wireless LANs, provided they are all operating on the same channel. Only wireless interfaces may be attached to wireless LANs.
Each wireless LAN may have authentication attributes associated with it, including:
* Authentication type
* Cipher
* Pre-shared key

View File

@@ -0,0 +1,3 @@
# Wireless LAN Groups
Wireless LAN groups can be used to organize and classify wireless LANs. These groups are hierarchical: groups can be nested within parent groups. However, each wireless LAN may assigned only to one group.

View File

@@ -0,0 +1,9 @@
# Wireless Links
A wireless link represents a connection between exactly two wireless interfaces. It may optionally be assigned an SSID and a description. It may also have a status assigned to it, similar to the cable model.
Each wireless link may have authentication attributes associated with it, including:
* Authentication type
* Cipher
* Pre-shared key

View File

@@ -17,12 +17,12 @@ However, keep in mind that each piece of functionality is entirely optional. For
## Initial Setup
## Plugin Structure
### Plugin Structure
Although the specific structure of a plugin is largely left to the discretion of its authors, a typical NetBox plugin looks something like this:
```no-highlight
plugin_name/
project-name/
- plugin_name/
- templates/
- plugin_name/
@@ -38,17 +38,17 @@ plugin_name/
- setup.py
```
The top level is the project root. Immediately within the root should exist several items:
The top level is the project root, which can have any name that you like. Immediately within the root should exist several items:
* `setup.py` - This is a standard installation script used to install the plugin package within the Python environment.
* `README` - A brief introduction to your plugin, how to install and configure it, where to find help, and any other pertinent information. It is recommended to write README files using a markup language such as Markdown.
* The plugin source directory, with the same name as your plugin.
* The plugin source directory, with the same name as your plugin. This must be a valid Python package name (e.g. no spaces or hyphens).
The plugin source directory contains all of the actual Python code and other resources used by your plugin. Its structure is left to the author's discretion, however it is recommended to follow best practices as outlined in the [Django documentation](https://docs.djangoproject.com/en/stable/intro/reusable-apps/). At a minimum, this directory **must** contain an `__init__.py` file containing an instance of NetBox's `PluginConfig` class.
The plugin source directory contains all the actual Python code and other resources used by your plugin. Its structure is left to the author's discretion, however it is recommended to follow best practices as outlined in the [Django documentation](https://docs.djangoproject.com/en/stable/intro/reusable-apps/). At a minimum, this directory **must** contain an `__init__.py` file containing an instance of NetBox's `PluginConfig` class.
### Create setup.py
`setup.py` is the [setup script](https://docs.python.org/3.6/distutils/setupscript.html) we'll use to install our plugin once it's finished. The primary function of this script is to call the setuptools library's `setup()` function to create a Python distribution package. We can pass a number of keyword arguments to inform the package creation as well as to provide metadata about the plugin. An example `setup.py` is below:
`setup.py` is the [setup script](https://docs.python.org/3.7/distutils/setupscript.html) we'll use to install our plugin once it's finished. The primary function of this script is to call the setuptools library's `setup()` function to create a Python distribution package. We can pass a number of keyword arguments to inform the package creation as well as to provide metadata about the plugin. An example `setup.py` is below:
```python
from setuptools import find_packages, setup
@@ -113,12 +113,26 @@ NetBox looks for the `config` variable within a plugin's `__init__.py` to load i
| `min_version` | Minimum version of NetBox with which the plugin is compatible |
| `max_version` | Maximum version of NetBox with which the plugin is compatible |
| `middleware` | A list of middleware classes to append after NetBox's build-in middleware |
| `caching_config` | Plugin-specific cache configuration
| `template_extensions` | The dotted path to the list of template extension classes (default: `template_content.template_extensions`) |
| `menu_items` | The dotted path to the list of menu items provided by the plugin (default: `navigation.menu_items`) |
All required settings must be configured by the user. If a configuration parameter is listed in both `required_settings` and `default_settings`, the default setting will be ignored.
### Create a Virtual Environment
It is strongly recommended to create a Python [virtual environment](https://docs.python.org/3/tutorial/venv.html) specific to your plugin. This will afford you complete control over the installed versions of all dependencies and avoid conflicting with any system packages. This environment can live wherever you'd like, however it should be excluded from revision control. (A popular convention is to keep all virtual environments in the user's home directory, e.g. `~/.virtualenvs/`.)
```shell
python3 -m venv /path/to/my/venv
```
You can make NetBox available within this environment by creating a path file pointing to its location. This will add NetBox to the Python path upon activation. (Be sure to adjust the command below to specify your actual virtual environment path, Python version, and NetBox installation.)
```shell
cd $VENV/lib/python3.7/site-packages/
echo /opt/netbox/netbox > netbox.pth
```
### Install the Plugin for Development
To ease development, it is recommended to go ahead and install the plugin at this point using setuptools' `develop` mode. This will create symbolic links within your Python environment to the plugin development directory. Call `setup.py` from the plugin's root directory with the `develop` argument (instead of `install`):
@@ -219,7 +233,7 @@ NetBox provides a base template to ensure a consistent user experience, which pl
For more information on how template blocks work, consult the [Django documentation](https://docs.djangoproject.com/en/stable/ref/templates/builtins/#block).
```jinja2
{% extends 'base.html' %}
{% extends 'base/layout.html' %}
{% block content %}
{% with config=settings.PLUGINS_CONFIG.netbox_animal_sounds %}
@@ -386,30 +400,30 @@ class SiteAnimalCount(PluginTemplateExtension):
template_extensions = [SiteAnimalCount]
```
## Caching Configuration
## Background Tasks
By default, all query operations within a plugin are cached. To change this, define a caching configuration under the PluginConfig class' `caching_config` attribute. All configuration keys will be applied within the context of the plugin; there is no need to include the plugin name. An example configuration is below:
By default, Netbox provides 3 differents [RQ](https://python-rq.org/) queues to run background jobs : *high*, *default* and *low*.
These 3 core queues can be used out-of-the-box by plugins to define background tasks.
Plugins can also define dedicated queues. These queues can be configured under the PluginConfig class `queues` attribute. An example configuration
is below:
```python
class MyPluginConfig(PluginConfig):
name = 'myplugin'
...
caching_config = {
'foo': {
'ops': 'get',
'timeout': 60 * 15,
},
'*': {
'ops': 'all',
}
}
queues = [
'queue1',
'queue2',
'queue-whatever-the-name'
]
```
To disable caching for your plugin entirely, set:
The PluginConfig above creates 3 queues with the following names: *myplugin.queue1*, *myplugin.queue2*, *myplugin.queue-whatever-the-name*.
As you can see, the queue's name is always preprended with the plugin's name, to avoid any name clashes between different plugins.
In case you create dedicated queues for your plugin, it is strongly advised to also create a dedicated RQ worker instance. This instance should only listen to the queues defined in your plugin - to avoid impact between your background tasks and netbox internal tasks.
```python
caching_config = {
'*': None
}
```
See the [django-cacheops](https://github.com/Suor/django-cacheops) documentation for more detail on configuring caching.
python manage.py rqworker myplugin.queue1 myplugin.queue2 myplugin.queue-whatever-the-name
```

View File

@@ -0,0 +1,122 @@
# Conditions
Conditions are NetBox's mechanism for evaluating whether a set data meets a prescribed set of conditions. It allows the author to convey simple logic by declaring an arbitrary number of attribute-value-operation tuples nested within a hierarchy of logical AND and OR statements.
## Conditions
A condition is expressed as a JSON object with the following keys:
| Key name | Required | Default | Description |
|----------|----------|---------|-------------|
| attr | Yes | - | Name of the key within the data being evaluated |
| value | Yes | - | The reference value to which the given data will be compared |
| op | No | `eq` | The logical operation to be performed |
| negate | No | False | Negate (invert) the result of the condition's evaluation |
### Available Operations
* `eq`: Equals
* `gt`: Greater than
* `gte`: Greater than or equal to
* `lt`: Less than
* `lte`: Less than or equal to
* `in`: Is present within a list of values
* `contains`: Contains the specified value
### Accessing Nested Keys
To access nested keys, use dots to denote the path to the desired attribute. For example, assume the following data:
```json
{
"a": {
"b": {
"c": 123
}
}
}
```
The following condition will evaluate as true:
```json
{
"attr": "a.b.c",
"value": 123
}
```
### Examples
`name` equals "foo":
```json
{
"attr": "name",
"value": "foo"
}
```
`name` does not equal "foo"
```json
{
"attr": "name",
"value": "foo",
"negate": true
}
```
`asn` is greater than 65000:
```json
{
"attr": "asn",
"value": 65000,
"op": "gt"
}
```
`status` is not "planned" or "staging":
```json
{
"attr": "status",
"value": ["planned", "staging"],
"op": "in",
"negate": true
}
```
## Condition Sets
Multiple conditions can be combined into nested sets using AND or OR logic. This is done by declaring a JSON object with a single key (`and` or `or`) containing a list of condition objects and/or child condition sets.
### Examples
`status` is "active" and `primary_ip` is defined _or_ the "exempt" tag is applied.
```json
{
"or": [
{
"and": [
{
"attr": "status",
"value": "active"
},
{
"attr": "primary_ip",
"value": "",
"negate": true
}
]
},
{
"attr": "tags",
"value": "exempt",
"op": "contains"
}
]
}
```

View File

@@ -1 +0,0 @@
version-2.11.md

113
docs/release-notes/index.md Normal file
View File

@@ -0,0 +1,113 @@
# Release Notes
Listed below are the major features introduced in each NetBox release. For more detail on a specific release train, see its individual release notes page.
#### [Version 3.1](./version-3.1.md) (December 2021)
* Contact Objects ([#1344](https://github.com/netbox-community/netbox/issues/1344))
* Wireless Networks ([#3979](https://github.com/netbox-community/netbox/issues/3979))
* Dynamic Configuration Updates ([#5883](https://github.com/netbox-community/netbox/issues/5883))
* First Hop Redundancy Protocol (FHRP) Groups ([#6235](https://github.com/netbox-community/netbox/issues/6235))
* Conditional Webhooks ([#6238](https://github.com/netbox-community/netbox/issues/6238))
* Interface Bridging ([#6346](https://github.com/netbox-community/netbox/issues/6346))
* Multiple ASNs per Site ([#6732](https://github.com/netbox-community/netbox/issues/6732))
* Single Sign-On (SSO) Authentication ([#7649](https://github.com/netbox-community/netbox/issues/7649))
#### [Version 3.0](./version-3.0.md) (August 2021)
* Updated User Interface ([#5893](https://github.com/netbox-community/netbox/issues/5893))
* GraphQL API ([#2007](https://github.com/netbox-community/netbox/issues/2007))
* IP Ranges ([#834](https://github.com/netbox-community/netbox/issues/834))
* Custom Model Validation ([#5963](https://github.com/netbox-community/netbox/issues/5963))
* SVG Cable Traces ([#6000](https://github.com/netbox-community/netbox/issues/6000))
* New Views for Models Previously Under the Admin UI ([#6466](https://github.com/netbox-community/netbox/issues/6466))
* REST API Token Provisioning ([#5264](https://github.com/netbox-community/netbox/issues/5264))
* New Housekeeping Command ([#6590](https://github.com/netbox-community/netbox/issues/6590))
* Custom Queue Support for Plugins ([#6651](https://github.com/netbox-community/netbox/issues/6651))
#### [Version 2.11](./version-2.11.md) (April 2021)
* Journaling Support ([#151](https://github.com/netbox-community/netbox/issues/151))
* Parent Interface Assignments ([#1519](https://github.com/netbox-community/netbox/issues/1519))
* Pre- and Post-Change Snapshots in Webhooks ([#3451](https://github.com/netbox-community/netbox/issues/3451))
* Mark as Connected Without a Cable ([#3648](https://github.com/netbox-community/netbox/issues/3648))
* Allow Assigning Devices to Locations ([#4971](https://github.com/netbox-community/netbox/issues/4971))
* Dynamic Object Exports ([#4999](https://github.com/netbox-community/netbox/issues/4999))
* Variable Scope Support for VLAN Groups ([#5284](https://github.com/netbox-community/netbox/issues/5284))
* New Site Group Model ([#5892](https://github.com/netbox-community/netbox/issues/5892))
* Improved Change Logging ([#5913](https://github.com/netbox-community/netbox/issues/5913))
* Provider Network Modeling ([#5986](https://github.com/netbox-community/netbox/issues/5986))
#### [Version 2.10](./version-2.10.md) (December 2020)
* Route Targets ([#259](https://github.com/netbox-community/netbox/issues/259))
* REST API Bulk Deletion ([#3436](https://github.com/netbox-community/netbox/issues/3436))
* REST API Bulk Update ([#4882](https://github.com/netbox-community/netbox/issues/4882))
* Reimplementation of Custom Fields ([#4878](https://github.com/netbox-community/netbox/issues/4878))
* Improved Cable Trace Performance ([#4900](https://github.com/netbox-community/netbox/issues/4900))
#### [Version 2.9](./version-2.9.md) (August 2020)
* Object-Based Permissions ([#554](https://github.com/netbox-community/netbox/issues/554))
* Background Execution of Scripts & Reports ([#2006](https://github.com/netbox-community/netbox/issues/2006))
* Named Virtual Chassis ([#2018](https://github.com/netbox-community/netbox/issues/2018))
* Changes to Tag Creation ([#3703](https://github.com/netbox-community/netbox/issues/3703))
* Dedicated Model for VM Interfaces ([#4721](https://github.com/netbox-community/netbox/issues/4721))
* REST API Endpoints for Users and Groups ([#4877](https://github.com/netbox-community/netbox/issues/4877))
#### [Version 2.8](./version-2.8.md) (April 2020)
* Remote Authentication Support ([#2328](https://github.com/netbox-community/netbox/issues/2328))
* Plugins ([#3351](https://github.com/netbox-community/netbox/issues/3351))
#### [Version 2.7](./version-2.7.md) (January 2020)
* Enhanced Device Type Import ([#451](https://github.com/netbox-community/netbox/issues/451))
* Bulk Import of Device Components ([#822](https://github.com/netbox-community/netbox/issues/822))
* External File Storage ([#1814](https://github.com/netbox-community/netbox/issues/1814))
* Rack Elevations Rendered via SVG ([#2248](https://github.com/netbox-community/netbox/issues/2248))
#### [Version 2.6](./version-2.6.md) (June 2019)
* Power Panels and Feeds ([#54](https://github.com/netbox-community/netbox/issues/54))
* Caching ([#2647](https://github.com/netbox-community/netbox/issues/2647))
* View Permissions ([#323](https://github.com/netbox-community/netbox/issues/323))
* Custom Links ([#969](https://github.com/netbox-community/netbox/issues/969))
* Prometheus Metrics ([#3104](https://github.com/netbox-community/netbox/issues/3104))
#### [Version 2.5](./version-2.5.md) (December 2018)
* Patch Panels and Cables ([#20](https://github.com/netbox-community/netbox/issues/20))
#### [Version 2.4](./version-2.4.md) (August 2018)
* Webhooks ([#81](https://github.com/netbox-community/netbox/issues/81))
* Tagging ([#132](https://github.com/netbox-community/netbox/issues/132))
* Contextual Configuration Data ([#1349](https://github.com/netbox-community/netbox/issues/1349))
* Change Logging ([#1898](https://github.com/netbox-community/netbox/issues/1898))
#### [Version 2.3](./version-2.3.md) (February 2018)
* Virtual Chassis ([#99](https://github.com/netbox-community/netbox/issues/99))
* Interface VLAN Assignments ([#150](https://github.com/netbox-community/netbox/issues/150))
* Bulk Object Creation via the API ([#1553](https://github.com/netbox-community/netbox/issues/1553))
* Automatic Provisioning of Next Available Prefixes ([#1694](https://github.com/netbox-community/netbox/issues/1694))
* Bulk Renaming of Device/VM Components ([#1781](https://github.com/netbox-community/netbox/issues/1781))
#### [Version 2.2](./version-2.2.md) (October 2017)
* Virtual Machines and Clusters ([#142](https://github.com/netbox-community/netbox/issues/142))
* Custom Validation Reports ([#1511](https://github.com/netbox-community/netbox/issues/1511))
#### [Version 2.1](./version-2.1.md) (July 2017)
* IP Address Roles ([#819](https://github.com/netbox-community/netbox/issues/819))
* Automatic Provisioning of Next Available IP ([#1246](https://github.com/netbox-community/netbox/issues/1246))
* NAPALM Integration ([#1348](https://github.com/netbox-community/netbox/issues/1348))
#### [Version 2.0](./version-2.0.md) (May 2017)
* API 2.0 ([#113](https://github.com/netbox-community/netbox/issues/113))
* Image Attachments ([#152](https://github.com/netbox-community/netbox/issues/152))
* Global Search ([#159](https://github.com/netbox-community/netbox/issues/159))
* Rack Elevations View ([#951](https://github.com/netbox-community/netbox/issues/951))

View File

@@ -121,7 +121,7 @@ A new API endpoint has been added at `/api/ipam/prefixes/<pk>/available-ips/`. A
#### NAPALM Integration ([#1348](https://github.com/netbox-community/netbox/issues/1348))
The [NAPALM automation](https://napalm-automation.net/) library provides an abstracted interface for pulling live data (e.g. uptime, software version, running config, LLDP neighbors, etc.) from network devices. The NetBox API has been extended to support executing read-only NAPALM methods on devices defined in NetBox. To enable this functionality, ensure that NAPALM has been installed (`pip install napalm`) and the `NETBOX_USERNAME` and `NETBOX_PASSWORD` [configuration parameters](https://netbox.readthedocs.io/en/stable/configuration/optional-settings/#netbox_username) have been set in configuration.py.
The [NAPALM automation](https://github.com/napalm-automation/napalm) library provides an abstracted interface for pulling live data (e.g. uptime, software version, running config, LLDP neighbors, etc.) from network devices. The NetBox API has been extended to support executing read-only NAPALM methods on devices defined in NetBox. To enable this functionality, ensure that NAPALM has been installed (`pip install napalm`) and the `NETBOX_USERNAME` and `NETBOX_PASSWORD` [configuration parameters](https://netbox.readthedocs.io/en/stable/configuration/optional-settings/#netbox_username) have been set in configuration.py.
### Enhancements

Some files were not shown because too many files have changed in this diff Show More