Compare commits

..

1423 Commits
v4.0.0 ... main

Author SHA1 Message Date
Marco Spizzuoco
d571cb4867
Closes #19902: add clip path to avoid overflow of device name, truncate text to improve centering (#19913)
Some checks are pending
CI / build (20.x, 3.10) (push) Waiting to run
CI / build (20.x, 3.11) (push) Waiting to run
CI / build (20.x, 3.12) (push) Waiting to run
2025-07-22 09:44:14 -07:00
bluikko
2129355c30 Closes #19926: Remove RHEL firewalld note
Closes: #19926
2025-07-22 08:04:53 -04:00
github-actions
b88b5b0b1b Update source translation strings
Some checks failed
Lock threads / lock (push) Has been cancelled
Close stale issues/PRs / stale (push) Has been cancelled
Close incomplete issues / stale (push) Has been cancelled
Update translation strings / makemessages (push) Has been cancelled
2025-07-16 05:06:12 +00:00
Jason Novinger
6eeb382512
Release v4.3.4 (#19887)
Some checks failed
CI / build (20.x, 3.10) (push) Has been cancelled
CI / build (20.x, 3.11) (push) Has been cancelled
CI / build (20.x, 3.12) (push) Has been cancelled
2025-07-15 12:56:11 -05:00
Jeremy Stretch
e5d6c71171
Fixes #19633: Log all evaluations of invalid event rule conditions (#19885)
Some checks are pending
CI / build (20.x, 3.10) (push) Waiting to run
CI / build (20.x, 3.11) (push) Waiting to run
CI / build (20.x, 3.12) (push) Waiting to run
* flush_events() should catch only import errors

* Fixes #19633: Log all evaluations of invalid event rule conditions

* Correct comment
2025-07-15 10:25:25 -05:00
Jeremy Stretch
f777bfee2e
Fixes #19876: Remove Markdown rendering from CustomFieldChoiceSet description field (#19877) 2025-07-15 07:55:26 -07:00
bctiemann
8b63eb64c1
Merge pull request #19860 from netbox-community/19839-nested-object-parent-export
Fixes #19839: Enable export of parent assignment for recursively nested objects
2025-07-15 08:42:43 -04:00
Jason Novinger
cff29f9551 Fixes #19413: Group custom fields in filter tab
Replaced manual rendering of custom fields in the filter tab with the
`render_custom_fields` template tag. This change ensures that custom fields are
properly grouped, addressing the issue where they were previously displayed
without their associated groups.
2025-07-15 08:41:38 -04:00
github-actions
a5c0cae112 Update source translation strings 2025-07-15 05:05:26 +00:00
Peter
2a27e475e4
Fixes #19828: Add L2VPNTerminationType to InterfaceType (#19879)
Some checks are pending
CI / build (20.x, 3.10) (push) Waiting to run
CI / build (20.x, 3.11) (push) Waiting to run
CI / build (20.x, 3.12) (push) Waiting to run
Co-authored-by: swoga <3697291+swoga@users.noreply.github.com>
2025-07-14 14:42:53 -05:00
Jason Novinger
44efa037cc
Fixes #19800: ModuleType import supports associating ModuleTypeProfile (#19803)
* Fixes #19800: ModuleType import supports associating ModuleTypeProfile

* Fixes up ModuleTypeTestCase to include bulk import testing

Also includes an additional regression assertion.

* Address PR feedback

I ultimately left the extra asserts in for test_bulk_import_objects_with_permissionsince
since the parent test is currently only testing against number of
objects successfully imported. Will file a follow up FR to improve that
test.
2025-07-14 15:22:52 -04:00
Jeremy Stretch
6c17629159 Fixes #19841: Add white background to upgrade paths image 2025-07-14 15:08:27 -04:00
Jeremy Stretch
f13d028c98
Fixes #19827: Enforce uniqueness for device role names & slugs (#19859) 2025-07-14 09:13:44 -07:00
bctiemann
f5d32b1bf1
Closes: #19793 - Nav menu link customization (#19794)
Some checks are pending
CI / build (20.x, 3.10) (push) Waiting to run
CI / build (20.x, 3.11) (push) Waiting to run
CI / build (20.x, 3.12) (push) Waiting to run
* Support menu items that are callables

* Fix quote on add button

* Clarify docstring to differentiate link and url

* Back out support for callables but keep alternate prerendered url param

* Make url a property on MenuItem/PluginMenuItem etc, overridable via a setter

* Use reverse_lazy instead of reverse

* Use reverse_lazy instead of reverse
2025-07-14 10:39:24 -04:00
Jeremy Stretch
f05897d61a
Closes #18811: Match full-form IPv6 addresses in global search (#19873)
* Closes #18811: Match full-form IPv6 addresses in global search

* Fix typo
2025-07-14 09:28:30 -05:00
Luke Anderson
b5421f1cd6 Fixes #19870: Correct Documentation Formatting for Public Demo Instance URL 2025-07-14 08:45:26 -04:00
Jeremy Stretch
23cc4f1c41 Fixes #19839: Enable export of parent assignment for recursively nested objects 2025-07-10 12:41:11 -04:00
Olexandr88
9c2cd66162 Update README.md
Some checks failed
CI / build (20.x, 3.10) (push) Has been cancelled
CI / build (20.x, 3.11) (push) Has been cancelled
CI / build (20.x, 3.12) (push) Has been cancelled
2025-07-09 10:53:40 -04:00
github-actions
f61a2964c8 Update source translation strings 2025-07-09 05:04:52 +00:00
Jason Novinger
ee94fb0b94
Closes #19550: Enhancement: Refactor rack elevations template for lazy loading /dcim/rack-elevations/ (#19823)
* Refactor rack elevation template to use htmx for dynamic loading and improved user experience

* rework to prevent dup loading

* Update netbox/templates/dcim/inc/rack_elevation.html

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>

* Update netbox/templates/dcim/inc/rack_elevation.html

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>

* Move inline styles to styles/custom/racks.css

---------

Co-authored-by: tony.nealon@wholesailnetworks.com <tony.nealon@wholesailnetworks.com>
Co-authored-by: tbotnz <tonynealon1989@gmail.com>
Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2025-07-08 11:20:04 -04:00
Harry
8fb8f4c75b
Closes #19571: Create expansion_card.json (#19689)
* Create expansion_card.json

* Update 0206_load_module_type_profiles.py

* Update expansion_card.json

Fixed
2025-07-08 08:27:48 -05:00
github-actions
e33793dc82 Update source translation strings 2025-07-03 05:04:46 +00:00
Jeremy Stretch
3b8841ee3b
Fixes #19806: Introduce JobFailed exception to allow marking background jobs as failed (#19807) 2025-07-02 14:02:49 -05:00
dieck
ea4c205a37 Upgrade documentation: have git fetch new tags
fixes #19778
2025-07-02 13:59:56 -04:00
github-actions
2a5d3abafb Update source translation strings 2025-06-27 05:03:03 +00:00
Jeremy Stretch
71e6ea5785 Release v4.3.3 2025-06-26 14:42:03 -04:00
Jason Novinger
0a9887b42f Fixes #19745: properly check IP assignment to FHRPGroup
- Expands the logic in ServiceImportForm.clean() to handle properly
  validation of FHRPGroup assignments and maintain the existing
  [VM]Interface validation checks.
- Includes an extension to ServiceTestCase.csv_data to act as a
  regression test for this behavior.
2025-06-26 12:09:14 -04:00
Tobias Genannt
3ecf29d797
Fixes #17719: User settings for table stripe (#19526)
* Fixes #17719: User setting table stripe

* Tweak user preference name

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2025-06-26 12:03:17 -04:00
Jason Novinger
c48e4f590e
Fixes #19640: restores device/vm FHRPGroupAssignment graphql filters (#19712)
* Fixes #19640: restores device/vm FHRPGroupAssignment graphql filters

* Add docstring for device_filter helper function
2025-06-26 12:00:56 -04:00
github-actions
aee83a434a Update source translation strings 2025-06-26 05:02:35 +00:00
Arthur Hanson
a17699d261
19644 Make atomic use correct database instead of default (#19651)
* 19644 set atomic transactions to appropriate database

* 19644 set atomic transactions for Job Script run

* 19644 set atomic transactions to appropriate database

* 19644 set atomic transactions to appropriate database

* 19644 fix review comments

* 19644 fix review comments
2025-06-25 15:00:26 -04:00
Jeremy Stretch
f97d07a11c
Update README & contributing guide (#19727) 2025-06-20 07:56:45 -07:00
github-actions
1fd3d390ae Update source translation strings 2025-06-20 05:02:37 +00:00
Omripresent
7dab7d730d
Fixes: #19492: Add Save Button to Script Output Window (#19721)
* Add condition to ScriptResultView.get function to generate a download
file of job output if job is completed

* Update template script_result.html adding a download button to trigger
output download in ScriptResultView.get

* Simplify conditional logic; tweak timestamp format

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2025-06-19 13:31:54 -04:00
Jason Novinger
c660f1c019 Fixes #19702: add NotificationGroup.event_rules GenericRelation
The collector we use to notify users about dependent object that will be
deleted does handle GFKs. However, a GenericRelation must be set up on
the other end.
2025-06-19 09:41:40 -04:00
github-actions
334b45f55a Update source translation strings 2025-06-17 05:02:05 +00:00
Martin Hauser
e6c1cebd34
Closes #19499 - Add WirelessLink Bulk Import Support by Device and Interface Names (#19679) 2025-06-16 11:19:56 -07:00
Arthur Hanson
a9af541e81
Fixes #19529: fix CLI running of scripts (#19698)
* 19529 fix custom script path

* 19529 fix custom script path

* 19529 fix custom script path

* 19529 fix custom script path

* 19680 add object_change migrator

* 19680 optimize migration

* 19680 optimize migration
2025-06-16 07:17:38 -05:00
github-actions
f706572113 Update source translation strings 2025-06-14 05:02:08 +00:00
Arthur Hanson
6a6286777c
Fixes #19680 fix deletion dependency order for GenericRelations (#19681)
* #19680 fix deletion dependency order for GenericRelations

* 19680 add test

* 19680 fix Collector and test

* 19680 put on changeloggingmixin

* 19680 cleanup

* 19680 cleanup

* 19680 cleanup

* 19680 skip changelog update for deleted objects

* 19680 remove print
2025-06-13 16:08:59 -05:00
Omripresent
afeddee10d
Fixes #19687: Treat cellular interface type as not connectable (#19691)
* Add cellular interface types to WIRELESS_IFACE_TYPES const
Add cable termination test for cellular interface

* Add regression tag to cellular test
2025-06-12 09:49:09 -05:00
Arthur Hanson
a48bee2a2e
19555 fix script API validation for scheduled_at (#19693)
* 19555 fix script API validation for scheduled_at

* 19555 fix script API validation for scheduled_at
2025-06-11 12:41:45 -05:00
github-actions
b9db6ebd63 Update source translation strings 2025-06-11 05:02:55 +00:00
Martin Hauser
9e0493c64c
Closes #17183 - Add Object Types Field to Tag Bulk Import Form (#19639) 2025-06-10 09:13:59 -07:00
hblandford
e3509c092a
Closes #19684: Update pyproject.toml version to 4.3.2 (#19688)
Co-authored-by: Hugh Blandford <hugh.blandford@gmail.com>
2025-06-10 09:56:55 -05:00
bctiemann
762cfc7d10
Merge pull request #19672 from netbox-community/19659-service-form-initial-data
Fixes #19659: Populate initial device/VM selection for "add a service" button
2025-06-10 08:49:23 -04:00
bctiemann
522f80ed9d
Merge pull request #19642 from pheus/17420-add-plugins-content-type-removal-instructions
Closes #17420 - Add Instructions for Cleaning up Content Types after Uninstalling a Plugin
2025-06-10 08:39:16 -04:00
github-actions
fd6062de75 Update source translation strings 2025-06-10 05:02:15 +00:00
gizmonicus
c872cce59f
Fixes: #19616: configuration_example.py has inaccurate STORAGE_BACKEND examples (#19657) 2025-06-09 11:14:52 -07:00
Jeremy Stretch
dc8267d890
Fixes #19673: Ignore custom field references when compiling table prefetches (#19674) 2025-06-09 11:12:48 -07:00
Aaron
2bfb9f4ed0
Fixes #19617: Inconsistent styling of Connect buttons (#19682) 2025-06-09 10:21:28 -04:00
Martin Hauser
dda0a55e5e
fix(ipam): Correct usage of the queryset.none method (#19678)
Ensures the `queryset.none()` method is called properly with
parentheses. This fixes a potential issue where the method would not
execute as intended, improving the stability and correctness of the
filter logic.
2025-06-09 07:45:40 -05:00
Martin Hauser
2680f855ff fix(wireless): Correct validation error field reference
Fixes the reference from `interface_a` to `interface_b` in the
validation error message for WirelessLink. Ensures the correct field is
indicated during validation errors.
2025-06-06 15:27:06 -04:00
Jeremy Stretch
6ca791850a
Closes #19668: Remove obsolete docs publication step from release checklist (#19675) 2025-06-06 13:26:43 -05:00
Jeremy Stretch
43df06f210
Fixes #19667: Fix TypeError exception when creating a new module profile type with no schema (#19671) 2025-06-06 13:25:19 -05:00
Jeremy Stretch
7e6b1bbd79 Fixes #19659: Populate initial device/VM selection for 'add a service' button 2025-06-06 12:26:05 -04:00
Jeremy Stretch
0e68901022
Release v4.3.2 (#19656)
* Release v4.3.2

* Correct strawberry-graphql version
2025-06-05 15:56:06 -04:00
Jeremy Stretch
179c06ec20
Closes #19627: Object change migrators (#19628)
* Initial work on ObjectChange data migrations

* Fix migration bug

* Add migrators for MAC address assignments

* Update reverting kwarg; allow pop() to fail

* Cross-reference MAC address migrators

* Split migrator logic across migrations

* Add missing migrator
2025-06-05 11:47:59 -04:00
mr1716
bd8cf64ded
#19638 Update Django URLs To Stable Version (#19649)
* Update Django URLs To Stable Version

* Update docs/configuration/security.md

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2025-06-05 11:38:07 -04:00
mr1716
67b42710ef
#19634 Update values to ensure consistency when referencing values set (#19635)
* Update values to ensure consistency when referencing values see\t

* Update required-parameters.md For Updated Django Link

* Update required-parameters.md to fix Django link

* Update error-reporting.md Remove Number Formatting

* Update docs/configuration/error-reporting.md

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2025-06-05 10:03:22 -04:00
github-actions
67d62a2089 Update source translation strings 2025-06-05 05:02:10 +00:00
Jason Novinger
e24fa2ee4d
Fixes #19610: FieldError when sorting Tunnel Termination on tenant (#19612) 2025-06-04 13:50:12 -07:00
bctiemann
5fe5b2e7c4
Merge pull request #19630 from netbox-community/19599-user-changelog-sorting
Fixes #19599: Prevent exception when sorting user's recent activity
2025-06-04 16:17:34 -04:00
Martin Hauser
d68f42140f
Closes #19535 - Add Project Stanza to pyproject toml (#19643)
* feat(project): Add project metadata to pyproject.toml

Introduces project metadata, including name, version, authors, and
description, to `pyproject.toml` for enhanced package definition.
Also includes URLs for source code, documentation, and issue tracking.

* docs(release): Add checklist item for Python versions in pyproject.toml

Include step to update minimum and supported Python versions
in the project metadata file as part of the release process.

* docs(release): Update checklist to include pyproject.toml versioning

Add a step to update the version in `pyproject.toml` alongside
`release.yaml`.

* feat(project): Update pyproject.toml for best practices

Refreshes metadata to resolve deprecations and follow packaging best
practices. Updates include description, license, Python versions,
classifiers, maintainers, and repository URLs for improved compliance.

* fix(project): Update repository URL key in pyproject.toml

Replaces the 'Repository' key with 'Source' in accordance with updated
metadata conventions. This ensures compliance with modern best
practices for project metadata.

* fix(project): Specify Python 3 :: Only in classifiers

Updates the Python version classifier in `pyproject.toml` to indicate
support exclusively for Python 3. This change ensures clarity in the
supported Python versions for the project metadata.
2025-06-04 14:37:18 -05:00
Jason Novinger
95d0ca56a7
Fixes #19487: fix ordering issues with CircuitTerminationTable/TunnelTerminationTable configuration (#19600)
* Fixes #19487: make CircuitTermination.termination GFK not orderable

* Add test to ensure no more broken sorting for CircuitTerminationTable

* Fix CircuitTerminationTable.site_group accessor

* Make TunnelTerminationTable.termination GFK field non-orderable
2025-06-04 11:48:23 -05:00
Martin Hauser
716acaa657
docs(plugins): Add guide for cleaning up Content Types
Provides instructions for removing stale Content Types and related
Permissions after uninstalling a plugin. Includes steps for identifying
and safely deleting stale entries to prevent issues in the permissions
management UI.
2025-06-04 17:58:29 +02:00
github-actions
ecb8656723 Update source translation strings 2025-06-04 05:02:13 +00:00
Marcus Weiner
065511fca2
Allow filtering IP addresses by family in GraphQL (#19621) 2025-06-03 11:15:55 -05:00
Jeremy Stretch
77f0eeb7bf
Fixes #19587: Occupied filter should match on interfaces terminating a wireless link (#19631) 2025-06-03 07:34:39 -07:00
mr1716
f45b671fc9
#19619 update documentation for consistency (#19620)
* Update system.md For Capitalization Consistency

* Update security.md For Consistency

* Update system.md To Improve Consistency

* Update security.md for Consistency

* Update docs/configuration/security.md

* Update docs/configuration/system.md

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2025-06-03 09:13:10 -04:00
Arthur Hanson
b1cbdbe079
19623 show description on provider account detail view (#19629)
* 19623 show description on provider account detail view

* Fix indentation

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2025-06-03 09:03:44 -04:00
Jeremy Stretch
e5e7a66cb9 Apply fix to user view as well 2025-06-03 08:58:16 -04:00
Jeremy Stretch
357ae44cde Fixes #19599: Prevent exception when sorting user's recent activity 2025-06-02 15:14:11 -04:00
mr1716
b62f2347c5
Closes #19611: Update index.md To Spell Acronym First Time It's Found (#19614)
* Update index.md To Spell Acronym First Time It's Found

* Update index.md to make lower case
2025-05-30 13:57:22 -05:00
bctiemann
0c6726d40f
Merge pull request #19570 from netbox-community/19490-jinja-template-fails-with-empty-include
Fixes #19490: restores nesting behavior of DataSource-based ConfigTemplate
2025-05-28 09:00:20 -04:00
Jason Novinger
cc099e86e1
Fixes #19520: restores ability to set Prefix.scope via API (#19588) 2025-05-27 10:32:36 -07:00
Alexander Haase
a97b438b7e
Fixes #19530: Overhaul documentation for plugin views (#19530) 2025-05-27 10:07:48 -07:00
Jason Novinger
d7672ab260 Fixes #19490: restores nesting behavior of DataSource-based ConfigTemplates
The ability to render nested templates was accidentally removed with the
implementation of #17653, which normalized the behavior of various Jinja2
template rendering actions.

This fix restores that behavior while retaining the normalized behavior.
This fix also includes regression tests to ensure this behavior is not
removed accidentally again in the future.
2025-05-23 16:34:22 -05:00
github-actions
b3d318cbe1 Update source translation strings 2025-05-23 05:02:08 +00:00
bctiemann
2804359cdd
Merge pull request #19527 from Omripresent/fix-19496
Fixes #19496: Page error on config render with empty output
2025-05-22 08:09:58 -04:00
bctiemann
e8d08c4d38
Merge pull request #19485 from Omripresent/main
Fixes: #19475 - VM Interface VLAN availibility when cluster and VLAN group scope is dcim.location
2025-05-21 20:24:45 -04:00
bctiemann
98d9e7f8d5
Merge pull request #19516 from larsen0815/patch-2
Fixes #19502: Improve upgrade instructions
2025-05-21 17:58:03 -04:00
Jeremy Stretch
51d046b1f5
Closes #19521: Clean up test suite output (#19524) 2025-05-21 09:57:32 -07:00
github-actions
88565e8f68 Update source translation strings 2025-05-20 05:02:15 +00:00
Jason Novinger
a2a8779ebc
Fixes #19415: Increased Circuit/WirelessLink distance upper limit (#19495)
* Fixes #19415: Increased Circuit/WirelessLink absolute distance upper limit

Also adds form validation that provides a useful message to the user
rather than a 500 error with potentially little information.

* Include forgotten migration files

* Remove unnecessary comments

* Remove more unnecessary comments

* Addresses PR feedback

* Gah, remove django migration header comment

* Clean up new has_field_errors mechanism, fix issue with ObjectAttribute

* Address PR feedback, revert changes to render_fieldset template tag
2025-05-19 08:38:30 -04:00
Jason Novinger
03ff535772 Fixes #19510: Re-adds IPAddressType.assigned filter 2025-05-16 15:30:07 -04:00
Omri Abu
e6d364b250 Initilize error_message to empty string
Update template branching for empty template render output
2025-05-16 14:46:43 -04:00
Omripresent
be07f222f6
Merge branch 'netbox-community:main' into main 2025-05-16 14:40:35 -04:00
larsen0815
21f5fe873c
Fixes typo 2025-05-16 15:09:52 +02:00
larsen0815
83dc65acb5
Improve upgrade instructions 2025-05-16 12:19:07 +02:00
github-actions
b6c8502408 Update source translation strings 2025-05-16 05:02:28 +00:00
Aaron
4795fab16f
Fixes #19486: Fix connection card rendering for Console Server Ports (#19498)
This fixes a visual anomaly with the console server port details page, where cards are inadvertantly nested inside each other.
2025-05-15 09:40:03 -05:00
github-actions
de2e2b5c82 Update source translation strings 2025-05-15 05:02:17 +00:00
Jeremy Stretch
cf7ab43f39
Closes #19493: Change filter() to filter_type() (#19494) 2025-05-14 08:34:25 -07:00
Renato Almeida de Oliveira
1700a9265c
Closes: #19200 Add Virtual Chassis name to pane on Device View (#19369) 2025-05-14 08:28:11 -04:00
Aaron Queen
39b03abe72 Use colored labels when displaying virtual circuit types 2025-05-14 08:03:46 -04:00
github-actions
b497b85665 Update source translation strings 2025-05-14 05:02:15 +00:00
Omri Abu
0d29e5776c Update get_for_virtualmachine to support lookup by cluster location
scope
Update test case to include location scoped cluster
2025-05-13 22:20:54 -04:00
Jeremy Stretch
cbe14b76c0 Release v4.3.1 2025-05-13 15:44:10 -04:00
Jeremy Stretch
3d1334a798
Fixes #19464: Fix bulk editing of inventory items from device view (#19477) 2025-05-13 10:23:02 -07:00
Jeremy Stretch
408550d3c7
Fixes #19463: Hide button dropdown for tables which do not support saved configs (#19481) 2025-05-13 10:22:15 -07:00
bctiemann
6b9b5c4184
Merge pull request #19456 from netbox-community/19444-contact-groups-changelog
Fixes #19444: Fix change logging for contact group assignments
2025-05-13 11:39:59 -04:00
Jeremy Stretch
59dce87ba0
Fixes #19465: Fix ability to clear assigned prefix scope in UI (#19479) 2025-05-13 10:21:06 -05:00
bctiemann
f6a85775d7
Merge pull request #19480 from netbox-community/19472-vdc-device-column
Fixes #19472: Fix device column rendering in virtual device contexts table
2025-05-13 11:12:55 -04:00
Jeremy Stretch
33887e7c69 Fixes #19472: Fix devie column rendering in virtual device contexts table 2025-05-13 10:46:41 -04:00
github-actions
b57ceca2fd Update source translation strings 2025-05-13 05:02:09 +00:00
bctiemann
8e13f2a9ec
Merge pull request #19443 from netbox-community/19440-migration-connections
Fixes #19440: Ensure data migrations use the correct database connection
2025-05-12 14:13:31 -04:00
bctiemann
6af4f5d7ee
Merge pull request #19400 from netbox-community/19397-graphql-IPRangeFilter-role
Fixes #19397: Fix filtering IP ranges by role in GraphQL API
2025-05-12 14:05:13 -04:00
bctiemann
6054f8197d
Merge pull request #19418 from netbox-community/19381-script
19381 fix data file script sync
2025-05-12 11:32:16 -04:00
github-actions
fc98294812 Update source translation strings 2025-05-10 05:02:10 +00:00
Martin Hauser
4b58678823
feat(dcim): Add 2.5 Gbps and 5 Gbps options to InterfaceSpeedChoices (#19445)
Extend `InterfaceSpeedChoices` to include 2.5 Gbps and 5 Gbps values.
This improves support for modern interface speeds and enhances API data
validation.
2025-05-09 14:02:30 -05:00
Jeremy Stretch
abeed474f6 Fixes #19444: Fix changeloggin for contact group assignments 2025-05-09 14:21:02 -04:00
Martin Hauser
d1303f49e6
Fixes #19432 - Update PostgreSQL Version in Programming Error Message (#19446) 2025-05-09 07:38:47 -07:00
Martin Hauser
127452f4d5 feat(search): Add search index for tags
Introduces a search index for the Tag model to enable global search for
Tags. Includes fields for name, slug, and description with corresponding
weight values. Display attributes are limited to the description field.

Fixes #17073
2025-05-09 08:55:05 -04:00
github-actions
2979067b65 Update source translation strings 2025-05-09 05:02:08 +00:00
Abraham Vegh
6c07aeeded Add 1000BASE-SX interface type 2025-05-08 15:45:03 -04:00
Jeremy Stretch
76aa255f07 Fixes #19440: Ensure data migrations use the correct database connection 2025-05-08 14:53:52 -04:00
dianbofa
0c04a8d301
feat(core): Add queue_name parameter to Job.enqueue() method (#19424) 2025-05-08 08:39:55 -07:00
Corubba
6665810a6d
Fixes #19361: Fix wrong graphql field data-types (#19373) 2025-05-07 08:29:52 -07:00
Jason Novinger
8baf15771a Fixes #17107: Circuit to Provider Network cabling visual bug 2025-05-07 09:28:02 -04:00
github-actions
045417c45c Update source translation strings 2025-05-07 05:02:11 +00:00
Arthur
aac333a6d4 19381 fix data file script sync 2025-05-06 11:50:02 -07:00
Andrey Tikhonov
145ee11a3f
Fixes #19309: N+1 problem on /interfaces, /ip-addresses and /prefixes requests (#19304)
* Fixes N+1 problem on /interfaces, /ip-addresses and /prefixes requests

* remove extra .all()

* more prefetch for IPAddressViewSet
2025-05-06 11:47:44 -05:00
github-actions
94618a9dfb Update source translation strings 2025-05-06 05:02:20 +00:00
mr1716
21e813cee2
#19404 Deduplicate IP Range API Serializer (#19405) 2025-05-05 14:31:12 -05:00
Étienne Brunel
2c014bade5 fix: Set qinq_role allow_null to True 2025-05-05 10:16:05 -04:00
mr1716
b17bfef7e5
Fixes #19370: Update documentation default values (#19374)
* Update security.md for default values

* Update plugins.md documentation default formatting

* Tweak punctuation

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2025-05-05 09:33:59 -04:00
Arthur Hanson
88f7b6508c
19380 call configure on embedded tables (#19390)
* 19380 call configure on  embedded tables

* 19380 call configure on  embedded tables

* 19380 call configure on  embedded tables
2025-05-05 09:29:32 -04:00
Jeremy Stretch
bd4f1e7d2f Fixes #19397: Fix filtering IP ranges by role in GraphQL API 2025-05-05 08:41:46 -04:00
Jeremy Stretch
6e49cee718
Fixes #19376: Fix FieldDoesNotExist exception when global search results include a contact (#19389) 2025-05-02 14:24:08 -05:00
Jeremy Stretch
4868818576
Fixes #19375: Fix table configuration after applying a saved table config (#19385) 2025-05-02 10:13:28 -07:00
Jeremy Stretch
7cd5dc0c84 Closes #19383: Extend security policy to provide guidance on compliance reporting 2025-05-02 10:20:57 -04:00
github-actions
aea51df06c Update source translation strings 2025-05-02 05:02:18 +00:00
Jeremy Stretch
c95098c4f0
Merge pull request #19371 from netbox-community/release-v4.3.0
Release v4.3.0
2025-05-01 12:44:46 -04:00
Jeremy Stretch
c32d1e637f Corrected v4.3.0 release notes 2025-05-01 12:24:02 -04:00
Jeremy Stretch
29f0ca6e0d Release v4.3.0 2025-05-01 10:22:40 -04:00
Jeremy Stretch
64b5867cb3 Merge branch 'main' into feature 2025-05-01 09:45:38 -04:00
github-actions
dd9000919a Update source translation strings 2025-05-01 05:02:08 +00:00
Jeremy Stretch
e5cdd8f2b0 Release v4.2.9 2025-04-30 14:31:30 -04:00
Jeremy Stretch
6202ae1236
Closes #19358: Move release info from footer to nav menu (#19360) 2025-04-30 10:44:10 -07:00
Jeremy Stretch
15c7a19fb7 Fixes #19365: Omit plugin icon from page title 2025-04-30 13:14:15 -04:00
Martin Hauser
1141ddb22a
feat(virtualization): Add Q-in-Q SVLAN to VMinterface template (#19345) 2025-04-30 08:50:28 -07:00
bctiemann
68e9da5cd9
Merge pull request #19333 from netbox-community/17405-plugin-icons
Fixes #17405: Added plugin icon to plugin list/detail
2025-04-30 10:48:42 -04:00
Jeremy Stretch
22e8de48fc
Upgrade Tabler to v1.2 (#19355) 2025-04-30 07:34:26 -07:00
bctiemann
36d71ccdd1
Merge pull request #19251 from netbox-community/17613-columns
17613 Add column support for mobile devices
2025-04-30 09:15:20 -04:00
bctiemann
fadc358329
Merge pull request #19357 from netbox-community/17319-device-and-module-type-behind-tabs
Fixes #17319: Arrange device and module type fields behind tab in com…
2025-04-30 09:09:55 -04:00
bctiemann
5274b3d727
Merge pull request #19352 from netbox-community/19351-pin-actions
Closes #19351: Pin 3rd party GitHub actions to commit hash
2025-04-30 09:02:51 -04:00
bctiemann
c0e6168d34
Merge pull request #19347 from netbox-community/19346-redirect-checks
Fixes #19346: Ensure all redirect URLs are validated
2025-04-30 09:01:55 -04:00
github-actions
01da6186eb Update source translation strings 2025-04-30 05:02:08 +00:00
Markku Leiniö
0466c8ef9b
Closes #19167: Update REST API examples (#19353)
* Closes #19167: Update REST API examples

* Fix missing description

---------

Co-authored-by: Markku Leiniö <markkuleinio@users.noreply.github.com>
2025-04-29 13:31:06 -04:00
Jason Novinger
964ae56d34 Fixes #17319: Arrange device and module type fields behind tab in component template forms 2025-04-29 12:16:05 -05:00
Jason Novinger
e2e42acf42 Add grayscale image filter
Hat tip to @pheus. Thanks!

I did end up leaving the filter function arguments as the Sass
processor complains when you try calling a filter function without
an argument. :/
2025-04-29 11:53:12 -05:00
Jason Novinger
32a4d743ee Fix KeyError 2025-04-29 11:43:36 -05:00
Jeremy Stretch
5342552054
Fixes #15739: Account for parallel cables when calculating total path length (#19356) 2025-04-29 11:32:43 -05:00
Jeremy Stretch
732f50d8da Closes #19351: Pin 3rd party GitHub actions to commit hash 2025-04-29 08:42:52 -04:00
github-actions
48a367c409 Update source translation strings 2025-04-29 05:02:15 +00:00
Jeremy Stretch
ac3c2e2de3
Closes #19348: Plug the NetBox Cloud Free tier (#19349) 2025-04-28 16:28:54 -05:00
Jeremy Stretch
e44ad8af45 Fixes #19346: Ensure all redirect URLs are validated 2025-04-28 14:27:49 -04:00
Arthur Hanson
81dfaf0d67
18706 Fix VLAN Assignment checking (#19332)
* 18706 Fix VLAN assignment checking

* 18706 add tests

* 18706 review feedback
2025-04-28 11:45:01 -04:00
Renato Almeida de Oliveira
584fff90c7
Closes #18215: Create ScriptJobTable from JobTable and add it to ScriptSourceView (#19337) 2025-04-28 09:57:48 -05:00
Renato Almeida de Oliveira
e345ca2659
Add VirtualCircuit reference to ProviderView related models (#19335) 2025-04-28 07:54:10 -07:00
bctiemann
89fd071f37
Merge pull request #19315 from netbox-community/19270-config-context-device-roles
Closes #19270: Apply config contexts from parent devices roles
2025-04-28 08:57:28 -04:00
bctiemann
a840eaf37d
Merge pull request #19326 from netbox-community/17812-nav-menu-ordering
Closes #17812: Reorder "sites" in the navigation menu
2025-04-28 08:52:06 -04:00
bctiemann
bdef00f3b0
Merge pull request #19310 from netbox-community/15971-preserve-null-filter
Fixes #15971: Preserve 'none' selection in filter form fields
2025-04-28 08:50:32 -04:00
bctiemann
f652dc7bda
Merge pull request #19301 from renatoalmeidaoliveira/19229-cant-unset-a-device-interface-vlan-mode-without-an-error
Fixes: #19229 Validade interface mode changes
2025-04-28 08:48:20 -04:00
Arthur Hanson
18ac29fdd0
18334 add location, device, site to module filters (#19312)
* 18334 add location, device, site to module filters

* 18334 add location, device, site to module filters

* 18334 add tests

* 18334 fix tests

* 18334 add site-group
2025-04-28 08:46:38 -04:00
bctiemann
fdf42860aa
Merge pull request #19282 from netbox-community/19281-fix-service-templates
Fixes #19281: Fix service template creation form
2025-04-28 08:45:53 -04:00
Jason Novinger
b31da39c4a Fix CSVModelMultipleChoiceField.clean assuming all values are str/None 2025-04-28 08:41:27 -04:00
Jeremy Stretch
0f4afbca2c
Closes #17243: Include example of image upload using REST API (#19330) 2025-04-25 15:33:46 -05:00
Jeremy Stretch
a0006632a7
Closes #19327: Remove CentOS installation instructions (#19328) 2025-04-25 13:05:08 -07:00
Jason Novinger
9173a113b7 Update compiled static files with updated NPM deps 2025-04-25 14:07:03 -05:00
Jason Novinger
afc7b35af0 Added plugin icon to plugin list/detail 2025-04-25 13:50:36 -05:00
Jeremy Stretch
37cfc50202
Fixes #19322: Correct URL paths for bulk import views (#19323) 2025-04-25 12:20:25 -05:00
Jeremy Stretch
41f475a316 Closes #17812: Reorder "sites" in the navigation menu 2025-04-25 11:37:45 -04:00
Jamie (Bear) Murphy
e8dd486132
adds related object to rack reservation changelogs (#19306) 2025-04-25 07:32:18 -07:00
Jeremy Stretch
8bd8f28cb9 Fixes #19296: Fix logic for determining default selected columns 2025-04-25 08:14:29 -04:00
github-actions
e58815bb1a Update source translation strings 2025-04-25 05:02:12 +00:00
bctiemann
bee004fc0c
Fixes: #18717 - On delete signal handling, manually save the related object in a ManyToOneRel to trigger a change record (#19308)
* On delete signal handling, manually save the related object in a ManyToOneRel to trigger a change record

* Only set remote field to None if null=True on the relation
2025-04-24 14:24:20 -05:00
Jeremy Stretch
0f7789c052 Closes #19270: Apply config contexts from parent devices roles 2025-04-24 15:09:23 -04:00
Jeremy Stretch
e1b2b4b536
Fixes #17676: Fix support for module bay creation when bulk importing module types (#19311) 2025-04-24 11:07:46 -07:00
Daniel Sheppard
f711e666c5
Fixes: #19228 - Fix ordered_scripts to only return ordered list of script objects (#19293) 2025-04-24 11:00:40 -07:00
Jeremy Stretch
47da880547 Fixes #15971: Preserve 'none' selection in filter form fields 2025-04-24 11:42:30 -04:00
mr1716
02f51bc11b
Fixes #19255: Improved documentation consistency for configuration default values (#19258) 2025-04-24 09:57:55 -04:00
Martin Hauser
88dd7a16f8 feat(circuits): Use ColoredLabelColumn for type column
Refactors the 'type' column to use ColoredLabelColumn for improved
visual distinction, aligning it with the rack roles display.
Removes the now redundant 'linkify' attribute from the column
definition.
2025-04-24 08:51:42 -04:00
Arthur Hanson
d0c2e0e52b
16238 map custom-link button colors to tabler (#19290)
* 16238 map custom-link button colors to tabler

* 16238 map custom-link button colors to tabler

* 16238 backout temp code

* 16238 optimize
2025-04-24 08:40:14 -04:00
github-actions
983e544376 Update source translation strings 2025-04-24 05:02:08 +00:00
Renato Almeida de Oliveira Zaroubin
125bce84e4 Validade interface mode changes 2025-04-24 01:47:43 +00:00
Jeremy Stretch
fbf926204e
Fixes #19204: Use DjangoJSONEncoder for Job data (#19297) 2025-04-23 15:57:48 -05:00
Jeremy Stretch
d005c470c9 Release v4.3.0-beta2 2025-04-23 14:41:46 -04:00
Arthur Hanson
0ce307c7fd
19217 debug toolbar (#19289)
* 19217 update and re-add django-debug-toolbar to INSTALLED_APPS

* 19217 remove debug if not collectstatic
2025-04-23 13:21:59 -05:00
Jeremy Stretch
6c60a4360b
Fixes #19279: Fix missing status field for inventory item bulk creation (#19283) 2025-04-23 10:49:22 -07:00
Jeremy Stretch
a83dfff736
Fixes #19264: Support table configs on child object list views (#19284)
* Fixes #19264: Support table configs on child object list views

* Clear assigned table config when resetting the configuration
2025-04-23 12:43:25 -05:00
Jeremy Stretch
dfd788c643
Fixes #19263: Render action buttons only if the record model matches the table model (#19287) 2025-04-23 09:38:11 -05:00
Artem Kotik
2c3fe9700f
Fixes #19110: Add filters by IP addresses to PrimaryIPFilterSet (#19160)
* Add primary ip filters by address

* Add tests for Device and VirtualDeviceContext models
2025-04-23 09:14:33 -05:00
bctiemann
5b86d5d52a
Merge pull request #19272 from netbox-community/19266-fix-ip-copy-button
Fixes #19266: Fix copy-to-clipboard button for IP addresses
2025-04-23 08:51:39 -04:00
Jeremy Stretch
deaff2dad8 Fixes #19281: Fix service template creation form 2025-04-23 08:47:54 -04:00
github-actions
cd3d91e7c7 Update source translation strings 2025-04-23 05:02:11 +00:00
Jeremy Stretch
6c7a0cf2b2 Merge branch 'main' into feature 2025-04-22 16:36:17 -04:00
Jeremy Stretch
d2e74e9d50 Release v4.2.8 2025-04-22 15:44:02 -04:00
Jeremy Stretch
e31b42d132 Fixes #19266: Fix copy-to-clipboard button for IP addresses 2025-04-22 14:44:26 -04:00
bctiemann
02571130b2
Merge pull request #19259 from netbox-community/18961-vc-create-ignore-vc-members
Fixes #18961: Virtual chassis form should exclude members of other VCs when adding members
2025-04-22 14:36:12 -04:00
Jeremy Stretch
46a3ce2559
Fixes #19268: Restore editing conflict protection for several object forms (#19271) 2025-04-22 11:07:03 -07:00
Jeremy Stretch
1850c21714 Fixes #19265: Strip linebreaks from URLs for logging 2025-04-22 12:48:57 -04:00
Jeremy Stretch
13ddd5fd20
Fixes #19230: Allow label reuse when creating multiple components from a pattern (#19261) 2025-04-22 08:55:31 -07:00
Jeremy Stretch
60cdf89cad
Fixes #19166: Fix bulk import support for base_choices (#19257) 2025-04-22 08:29:00 -07:00
Jeremy Stretch
77bfc40579
Closes #17136: Add read-only database support to the upgrade script (#19247) 2025-04-22 07:42:54 -07:00
Jeremy Stretch
2f8936d493 Fixes #18961: Virtual chassis form should exclude members of other VCs when adding members 2025-04-22 10:24:43 -04:00
bctiemann
e0b6a31504
Merge pull request #19256 from netbox-community/18959-cable-trace-terminations-ordering
Fixes #18959: Preserve ordering of terminations in cable traces
2025-04-22 10:08:13 -04:00
Jeremy Stretch
8567aa96e4 Remove obsolete comment 2025-04-22 09:42:17 -04:00
bctiemann
cbcd91bf6b
Merge pull request #19236 from netbox-community/19224-graphql-choices
Fixes #19224: Fix GraphQL API support for custom field choices
2025-04-22 09:35:55 -04:00
bctiemann
b8805c93b1
Merge pull request #19238 from netbox-community/19225-graphql-filters
Fixes #19225: Extend GraphQL filters
2025-04-22 09:32:28 -04:00
Jeremy Stretch
459c4bfd9d Fixes #18959: Preserve ordering of terminations in cable traces 2025-04-22 09:21:14 -04:00
Jeremy Stretch
918470a2bb Closes #19208: Ignore beta releases when fetching latest release tag 2025-04-22 08:18:23 -04:00
Arthur
c73cc0a36a 18500 fix check for cloning mixin 2025-04-22 08:14:32 -04:00
Renato Almeida de Oliveira Zaroubin
6b9b66aecb make INTERFACE_FHRPGROUPS use FHRPGROUPS _str_ representation 2025-04-22 08:06:24 -04:00
github-actions
b6d10ae6d8 Update source translation strings 2025-04-22 05:02:08 +00:00
Arthur
79ece657ec 17613 Add column support for mobile devices 2025-04-21 11:52:19 -07:00
Arthur
717b9d5232 17613 Add column support for mobile devices 2025-04-21 11:41:56 -07:00
Arthur
0fa98d3aef 17613 Add column support for mobile devices 2025-04-21 11:02:56 -07:00
Renato Almeida de Oliveira
7420c25687
Fixes: #18881 Site Groups are missing VLAN and VM related objects (#18932) 2025-04-21 09:11:01 -07:00
Jeremy Stretch
5121122350 Add missing GraphQL filters 2025-04-18 13:13:43 -04:00
Jeremy Stretch
66064be9a5 Extend filters for circuit terminations 2025-04-17 16:52:51 -04:00
Jeremy Stretch
4455c2c7dc Fixes #19224: Fix GraphQL API support for custom field choices 2025-04-17 12:22:14 -04:00
Jeremy Stretch
24d4847dc5
Fixes #19213: Fix dropdown field rendering by reverting to Tabler v1.0 (#19232) 2025-04-17 07:29:40 -07:00
github-actions
248c94bd35 Update source translation strings 2025-04-16 05:02:15 +00:00
bctiemann
96cf8d14dc
Merge pull request #19194 from netbox-community/17908-cable-trace-buttons
Closes #17908: Add trace buttons to terminations under cable view
2025-04-15 18:13:59 -04:00
bctiemann
2356a3c125
Merge pull request #19162 from alehaa/19040-copy-rendered-config
Fixes #19040: Add button to copy rendered config to clipboard
2025-04-15 18:00:47 -04:00
bctiemann
0d81007fdf
Merge pull request #19178 from netbox-community/19139-tx-force-pull
Closes #19139: Use --force when invoking tx pull
2025-04-15 17:59:58 -04:00
atownson
c108c738ae
Fixes #18669 - Populate custom field default values (#19115) 2025-04-15 13:26:03 -07:00
Martin Hauser
cac41cd093
Fixes #19196: Add Filtering by VLAN Translation Policy to Interface Filter Forms (#19199)
* feat(dcim): Add VLAN Translation Policy to Filter Form

Introduces support for VLAN Translation Policies in the Interface
Filter Form.

* feat(virtualization): Add VLAN Translation Policy to Filter Form

Introduces support for VLAN Translation Policies in the Interface
Filter Form.
2025-04-15 16:24:45 -04:00
Jeremy Stretch
27b26ec49c
Fixes #19195: Language cookie should respect SESSION_COOKIE_SECURE value (#19197) 2025-04-15 13:03:33 -07:00
Jeremy Stretch
7c2776d721
Closes #19201: Include TS source with sourcemap (#19202) 2025-04-15 14:42:40 -05:00
Martin Hauser
1f93471659
Fixes #18978 - Allow filtering of Interfaces in the GUI by 802.1Q Mode (#19183)
* feat(dcim): Add VLAN mode filter to CommonInterface

Introduces a new FilterSet for VLAN mode in CommonInterfaceFilterSet.
This allows filtering interfaces based on their VLAN mode using defined
choices.

* feat(dcim): Add VLAN mode filter to Interface FilterForm

Add a field to InterfaceFilterSet to filter interfaces by 802.1Q VLAN
mode.

* feat(virtualization): Add VLAN mode filter to VMInterface

Add a field to VMInterfaceFilterSet to filter interfaces by 802.1Q VLAN
mode.

* fix(dcim): Correct mode filter parameter type in tests

Updates the `mode` filter parameter to accept a list instead of a single
value in `test_filtersets.py`. Ensures proper count assertion for
accurate test behavior.

* feat(virtualization): Add tests for VLAN mode filtering

Introduces tests to validate filtering by `mode` for VMInterface.
Ensures correct filtering for 802.1Q VLAN mode.

* refactor(virtualization): Reorganize FieldSets in FilterSets

Splits the 'Attributes' FieldSet into two distinct FieldSets for better
clarity: 'Attributes' and 'Addressing'. This improves form organization
and makes it more intuitive for users.
2025-04-15 13:47:51 -04:00
Jeremy Stretch
d3768feb31 Closes #17908: Add trace buttons to terminations under cable view 2025-04-15 11:41:00 -04:00
Jeremy Stretch
70cc7c7563
Fixes #19169: Remove horizontal padding from highlighted text (#19181) 2025-04-15 07:13:58 -07:00
Jeremy Stretch
8b091fb219
Fixes #19189: BaseScript.load_yaml() should use SafeLoader (#19190) 2025-04-15 08:58:13 -05:00
Martin Hauser
44cb1a9139
Fixes #19056 – Add Device filtering by Location slug (#19180)
* feat(dcim): Add filter by location slug for Device

Introduces a TreeNodeMultipleChoiceFilter for filtering locations by
slug. Enhances filtering flexibility in the Device model by supporting
both ID and slug lookups.

Fixes #19056

* feat(dcim): Add Device filtering by location slug in tests

Extend test cases to include filtering by location slug. Ensures the
FilterSet works correctly with slug-based queries for locations.

Fixes #19056
2025-04-15 08:22:59 -04:00
Martin Hauser
bb9b0b8f8a
Fixes #18879 - Add prefix filtering by assigned VLAN Group (#19182)
* feat(ipam): Add VLAN group filters to IPAM FilterSet

Introduces filters for VLAN groups using both ID and slug fields.

* feat(ipam): Add VLAN group filter in IPAM FilterForm

Introduces a `vlan_group_id` filter to IPAM forms for filtering based on
VLAN groups.

* feat(ipam): Add VLAN group filtering to tests

Introduces tests for VLAN group filtering in FilterSets. This ensures
correct validation and behavior when filtering by VLAN group.
2025-04-15 07:59:32 -04:00
github-actions
785ad505ba Update source translation strings 2025-04-15 05:02:10 +00:00
Jeremy Stretch
8aacef60a3
Closes #19175: Remove outdated NetBox installation video (#19177) 2025-04-14 15:14:59 -05:00
Jeremy Stretch
d8fc052bbe Closes #19139: Use --force when invoking tx pull 2025-04-14 15:55:08 -04:00
Renato Almeida de Oliveira Zaroubin
1f79411878 Add GetRelatedModelsMixin to ClusterView 2025-04-14 15:39:49 -04:00
Jeremy Stretch
7375042f9e
Release v4.3-beta1 (#19172)
* Draft changelog for v4.3 release

* Add release notes summary & nav link

* Docs cleanup

* Update Python dependencies

* Update static assets

* Revert errant change to schema

* Fix minimum PostgreSQL version

* Misc cleanup

* Correct issue numbers in change log
2025-04-14 15:12:47 -04:00
bctiemann
186545e45f Remove #18095 from v4.2.5 release notes (#19165) 2025-04-14 13:56:37 -04:00
Jeremy Stretch
31565de93f
Fixes #19173: Fix heading text on table config form (#19174) 2025-04-14 10:14:10 -07:00
bctiemann
7abce9031b
Merge pull request #19170 from netbox-community/18287-last_sync-column
#18287: Add a `last_synced` table column
2025-04-14 11:26:40 -04:00
bctiemann
94d19e8f15
Remove #18095 from v4.2.5 release notes (#19165) 2025-04-14 07:26:37 -07:00
Jeremy Stretch
13c6602ea8
#17653: Style JSON data for config & export templates (#19171) 2025-04-14 07:25:55 -07:00
Jeremy Stretch
3444dc503d
#19002: Display boolean attributes as checkmarks (#19168) 2025-04-14 07:57:15 -05:00
Jeremy Stretch
b7740b947a #18287: Add a last_synced table column 2025-04-14 08:48:20 -04:00
Alexander Haase
f337ef1134 Add button to copy rendered config 2025-04-13 18:02:21 +02:00
Jeremy Stretch
d55f02b25f
#14591, #17841: Adjust default weighting (#19155)
* #14591, #17841: Adjust default weighting

* Fix tests
2025-04-11 14:27:55 -05:00
Arthur
978b5b0ed6 17170 ContactGroup Serializer nested and fix related objects 2025-04-11 15:13:40 -04:00
Arthur
021114071c 17608 L2VPNSerializer Status should be ChoiceField 2025-04-11 14:42:34 -04:00
Arthur
693543f0b2 18352 power outlet choicefield for API serializer 2025-04-11 13:25:46 -04:00
Arthur
811dd949a3 19073 fix display of installed plugins 2025-04-11 13:23:16 -04:00
Jeremy Stretch
5d7ed871f2
Fixes: #18783 Add a tag_id filter for all models which support tagging (#18889) (#19142) 2025-04-11 09:26:46 -07:00
Jason Novinger
f96df73093
Closes #8423: Allow assigning Service to FHRP Group, in addition to Device and VirtualMachine (#19005) 2025-04-11 07:27:31 -07:00
Jeremy Stretch
6ed41f6680
Fixes #18955: Include the "clear" button only for non-required dropdown fields (#18971)
* Include the 'clear' button only for non-required fields

* Apply the 'required' attribute for mandatory <select> fields

* Recompile static assets
2025-04-11 08:20:24 -04:00
github-actions
28e62d21a9 Update source translation strings 2025-04-11 05:02:06 +00:00
Jeremy Stretch
fc0acb020f Merge main into feature 2025-04-10 17:17:21 -04:00
Jeremy Stretch
bb5057c063
Closes #14591: Saved table configurations (#19101)
* Add SavedTableConfig

* Update table configuration logic to support TableConfigs

* Update table config link when updating table

* Correct docstring

* Misc cleanup

* Use multi-select widgets for column selection

* Return null config params for tables with no model

* Fix auto-selection of selected columns

* Update migration

* Clean up template

* Enforce enabled/shared flags

* Search/filter by table name

* Misc cleanup

* Fix population of selected columns

* Ordering field should not be required

* Enable cloning for TableConfig

* Misc cleanup

* Add model documentation for TableConfig

* Drop slug field from TableConfig

* Improve TableConfig validation

* Remove add button from TableConfig list view

* Fix ordering validation to account for leading hyphens
2025-04-10 15:48:02 -05:00
Jeremy Stretch
03f3f5c957 Release v4.2.7 2025-04-10 16:07:24 -04:00
Jeremy Stretch
fe7fb94e44 Revert "Fixes: #18783 Add a tag_id filter for all models which support taggin…"
This reverts commit 9a1d9365cd.
2025-04-10 15:42:26 -04:00
github-actions
82b9e4ca26 Update source translation strings 2025-04-10 05:02:11 +00:00
Jeremy Stretch
457fb977a7
Fixes #19122: Fix styling of the server error (500) page (#19126) 2025-04-09 14:57:25 -07:00
Jeremy Stretch
13c20957a6
Closes #18652: Run housekeeping GitHub actions only on the main repository (#19125) 2025-04-09 16:28:00 -05:00
Jason Novinger
30208549ba
Fixes #19092: scope type selection lost when editing multiple/all objects (#19102) 2025-04-09 14:55:41 -04:00
Jeremy Stretch
f8f2ad1d14
Closed #9763: Treat IP ranges as fully populated (#19064) 2025-04-09 07:30:11 -07:00
Arthur Hanson
076d16ca6b
19073 allow plugins to be marked as hidden or disabled in plugins table (#19087)
* 19073 allow plugins to be marked as hidden or disabled in plugins table

* 19073 allow plugins to be marked as hidden or disabled in plugins table

* 19073 allow plugins to be marked as hidden or disabled in plugins table

* 19073 review changes

* Rename 'unlinked' to 'static' & update docs

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2025-04-09 08:02:38 -04:00
atownson
bf286df670
Fixes #19030 - Update z-index of floating buttons (#19118)
* Increase z-index of form floating buttons

* Update netbox.css
2025-04-08 16:02:08 -05:00
Jeremy Stretch
2be257db48
Closes #19112: Configure ruff to target Python 3.10 (#19113) 2025-04-08 09:46:31 -05:00
Renato Almeida de Oliveira
fbd6d8c7fc
Closes #17653: Add function to trim whitespaces in export templates via jinja environment settings (#19078)
* Create RenderMixin, and unify template_code rendering and exporting

* Join migrations

* Add DEFAULT_MIME_TE constant

* Move RenderMixin to extras.models.mixins, Rename RenderMixin to RenderTemplateMixin

* Add render_jinja2 to __all__

* Rename ConfigTemplateFilterForm rendering FieldSet

* ConfigTemplate lint

* Simplify ExportTemplate get_context

* Fix table order, and add fields for translations

* Update Serializers

* Update forms, tables, graphQL, API

* Add extra tests for ConfigTemplate and ExportTemplate

* Documentation update

* Fix typo

* Misc cleanup

* Clean up template layouts

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2025-04-08 10:37:15 -04:00
bctiemann
3902cab925
Merge pull request #19070 from netbox-community/17166-remove-limit_choices_to
Closes #17166: Remove obsolete `limit_choices_to` argument from ForeignKey & M2M fields
2025-04-07 14:10:05 -04:00
bctiemann
2207ea1a32
Merge pull request #19046 from pheus/docs/18733-add-version-requirements-matrix
Fixes #18733: Add Dependency Version Matrix for NetBox Versions to the Upgrade Documentation
2025-04-07 14:01:54 -04:00
Martin Hauser
10e1ae8292
docs(release): Update Dependency Requirements Matrix header
Renames the "Adopt the Dependency Requirements Matrix" section to
"Update the Dependency Requirements Matrix" for clarity.
2025-04-07 17:17:26 +02:00
Martin Hauser
f8f5ab8d61
docs(release): Correct formatting in release checklist 2025-04-07 16:55:23 +02:00
bctiemann
eee932a6a5
Merge pull request #19075 from netbox-community/19004-deprecate-inventory-items
Closes #19004: Mark inventory items as deprecated in the documentation
2025-04-07 10:29:19 -04:00
bctiemann
ff26f4302c
Merge pull request #19084 from netbox-community/19083-django-52
Closes #19083: Upgrade Django to v5.2.0
2025-04-07 10:28:04 -04:00
github-actions
92317248a3 Update source translation strings 2025-04-05 05:02:12 +00:00
Jeremy Stretch
426e6439e3
Fixes #18553: Update site for VMs only if cluster has a site assigned (#19086) 2025-04-04 10:58:06 -07:00
Jeremy Stretch
621b29cd71
Closes #19035: Move the registration of core event types to the app config (#19088) 2025-04-04 11:18:42 -05:00
Jeremy Stretch
5e44e49a8a
Closes #18236: Upgrade to HTMX v2.0 (#19077) 2025-04-04 09:16:13 -05:00
Jeremy Stretch
e252cc3ce1 Closes #19083: Upgrade Django to v5.2.0 2025-04-04 09:39:04 -04:00
Jeremy Stretch
092769da7e
Closes #16058: Fix circular import involving register_model_view() (#19076) 2025-04-03 19:09:04 -07:00
Jeremy Stretch
67480dcf4f
Closes #18191: Remove duplicate SQL indexes (#19074)
* Closes #18191: Remove redundant SQL indexes

* Update developer documentation

* Add a system check for duplicate indexes
2025-04-03 15:16:57 -05:00
Jeremy Stretch
d44012963f Closes #19004: Mark inventory items as deprecated in the documentation 2025-04-03 14:49:54 -04:00
Jeremy Stretch
d93d398afa Closes #17166: Remove obsolete limit_choices_to argument from ForeignKey & M2M fields 2025-04-03 09:17:20 -04:00
github-actions
8f5d273f08 Update source translation strings 2025-04-03 05:02:01 +00:00
Martin Hauser
45779a24a4
docs(release): Update checklist with dependency requirements
Add steps to update the dependency requirements matrix for each minor
release in the release checklist. Clarify how to document changes for
system requirements and linked installation guides.

Fixes #18733
2025-04-02 21:41:36 +02:00
Martin Hauser
f17bbe610e
Fixes #19041: Call super().clean() in FrontPortCreateForm (#19051)
* fix(forms): Call super().clean() in clean methods

Adds a call to super().clean() in the clean methods of object creation
forms. This ensures base class validation logic is executed properly
before custom logic is applied.

Fixes #19041

* test(forms): Add tests for front port form validation

Introduces unit tests for validating FrontPortCreateForm behavior.
Tests include scenarios for matching and mismatched name-label pairs
to ensure proper form validation logic.

Fixes #19041

* Omit errant print statement

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2025-04-02 08:29:21 -04:00
Jeremy Stretch
6a966ee6c1
Closes #18785: Allow for custom rack/device/module airflow choices (#19054) 2025-04-01 14:06:23 -07:00
Jeremy Stretch
a00144026b
Closes #16630: Enable plugins to embed custom <head> content (#19055) 2025-04-01 14:09:49 -05:00
Jeremy Stretch
8d7889e2c0
Closes #19002: Module type profiles (#19014)
* Move Module & ModuleType models to a separate file

* Add ModuleTypeProfile & related fields

* Initial work on JSON schema validation

* Add attributes property on ModuleType

* Introduce MultipleOfValidator

* Introduce JSONSchemaProperty

* Enable dynamic form field rendering

* Misc cleanup

* Fix migration conflict

* Ensure deterministic ordering of attriubte fields

* Support choices & default values

* Include module type attributes on module view

* Enable modifying individual attributes via REST API

* Enable filtering by attribute values

* Add documentation & tests

* Schema should be optional

* Include attributes column for profiles

* Profile is nullable

* Include some initial profiles to be installed via migration

* Fix migrations conflict

* Fix filterset test

* Misc cleanup

* Fixes #19023: get_field_value() should respect null values in bound forms (#19024)

* Skip filters which do not specify a JSON-serializable value

* Fix handling of array item types

* Fix initial data in schema field during bulk edit

* Implement sanity checking for JSON schema definitions

* Fall back to filtering by string value
2025-04-01 12:05:06 -05:00
bctiemann
bad820001d
Merge pull request #19015 from netbox-community/18738-script-list-ignoring-script-order
Fixes #18738: Ensure ScriptList respects script_order option
2025-04-01 10:09:39 -04:00
Renato Almeida de Oliveira
864db469ba
Fixes: #18305 make contacts mixin available for plugins (#19029) 2025-04-01 09:03:25 -04:00
Martin Hauser
a5106b858d
docs(upgrading): Add dependency matrix for NetBox versions
Adds a dependency matrix to the upgrade guide, detailing supported
Python, PostgreSQL, and Redis versions for each NetBox release. This
helps users verify compatibility before upgrading.

Fixes #18733
2025-04-01 07:23:42 +02:00
github-actions
bbd5e9cab9 Update source translation strings 2025-04-01 05:02:06 +00:00
bctiemann
12231ad71a
Merge pull request #18997 from antoinekh/18964_fix_bulk_edit_all
Fixes #18964 Select all with bulk edit only changes the currently visible objects
2025-03-31 18:36:04 -04:00
Jeremy Stretch
88ef9ecfa3
Fixes #19023: get_field_value() should respect null values in bound forms (#19024) 2025-03-31 16:34:46 -05:00
github-actions
6f78b3d0cd Update source translation strings 2025-03-29 05:02:03 +00:00
Arthur Hanson
1508e3a770
Fixes #18245: Make DeviceRole Hierarchical (#19008)
Made DeviceRoles hierarchical, had to also change the filtersets for Device, ConfigContext and VirtualMachine to use the TreeNodeMultipleChoiceFilter.

Note: The model was changed to use NestedGroupModel, a side-effect of this is it also adds comments field, but I thought that was better then doing a one-off just for DeviceRole and having to define the fields, validators, etc.. - keeps everything DRY / consistent.

* 18981 Make Device Roles Hierarchical

* 18981 forms, serializer

* 18981 fix tests

* 18981 fix tests

* 18981 fix tests

* 18981 fix tests

* 18981 fix tests

* 18981 fix migration merge

* 18981 fix tests

* 18981 fix filtersets

* 18981 fix tests

* 18981 comments

* 18981 review changes
2025-03-28 14:32:02 -05:00
Jason Novinger
d3f42deb32
Fixes #18895: Allows VirtualCircuitTerminations as Interface connected_endpoints (#19027) 2025-03-28 08:58:09 -07:00
Jason Novinger
db4fb8f406
Fixes #18999: Allow GraphQL to represent inventory items with no set manufacturar (#19016) 2025-03-28 07:57:56 -07:00
ZPrimed
5b8eaced1a Update choices.py - add MoCA (Coaxial) 2025-03-28 08:45:04 -04:00
github-actions
ada0c7f687 Update source translation strings 2025-03-28 05:02:14 +00:00
Jeremy Stretch
b750d0dff2
Fixes #19021: Ensure consistent styling for JSON form fields (#19022) 2025-03-27 08:58:37 -05:00
Jason Novinger
e1e514251e
Fixes #18965: Ensure script list run buttons respect scripts' commit_default option (#19013)
* Fixes #18965: Script list run buttons respect scripts' commit_default

* Cleanup script .Meta access in template
2025-03-27 08:39:50 -04:00
Renato Almeida de Oliveira
7d80a45bf8
Fixes: #16144 GetReturnURLMixin Support for Plugin Views (#18996)
* Add plugin support to GetReturnURLMixin

* use get_viewname instead of resolving the name
2025-03-27 08:33:09 -04:00
github-actions
09854a3d54 Update source translation strings 2025-03-27 05:02:15 +00:00
Jason Novinger
39a96ddf3a Fixes #18738: Ensure ScriptList respects script_order option 2025-03-26 15:35:06 -05:00
atownson
be26f86b62
Added advanced object selector to custom field object and multi-object inputs (#18830) 2025-03-26 10:42:45 -07:00
Jason Novinger
fd2bcda8b8
Fixes #18991: AttributeError: NoneType object has not attribute model (#19006) 2025-03-26 10:12:45 -07:00
Arthur Hanson
7a71c7b8f8
18417 Add outer_height to racks (#18940)
* 18417 add rack outer height

* 18417 add rack outer height

* 18417 fix tests

* 18417 fix validation message

* Update netbox/dcim/filtersets.py

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>

* Update netbox/dcim/filtersets.py

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>

* Update netbox/dcim/models/racks.py

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>

* Update netbox/dcim/models/racks.py

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>

* Update netbox/dcim/models/racks.py

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>

* Update netbox/dcim/models/racks.py

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>

* 16224 review changes

* 16224 review changes

* 16224 update table display

* 18417 use TemplateColumn

* 18417 review changes

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2025-03-26 08:42:13 -04:00
github-actions
817d7efee3 Update source translation strings 2025-03-26 05:03:20 +00:00
Renato Almeida de Oliveira
9a1d9365cd
Fixes: #18783 Add a tag_id filter for all models which support tagging (#18889) 2025-03-25 08:06:22 -07:00
Antoine Keranflec'h
ada4a4b93c fix #18964 reinsert else condition 2025-03-25 08:22:59 +00:00
github-actions
64a98fd87f Update source translation strings 2025-03-25 05:02:04 +00:00
Arthur Hanson
bd8e00a935
18904 add tags to config context table (#18938)
* 18904 add tags to config context table

* 18904 tag to correct table
2025-03-24 17:02:36 -04:00
Jeremy Stretch
af5a600583
Closes #18980: Optimize update of object data when adding/removing custom fields (#18983)
* Employ native PostgreSQL functions for updating object JSON data when adding/removing custom fields

* Optimize rename_object_data()

* remove_stale_data() should validate model class
2025-03-24 12:02:54 -05:00
github-actions
8ab73501d1 Update source translation strings 2025-03-22 05:02:10 +00:00
Renato Almeida de Oliveira
447e108d97
Fixes: #18656 Unable to import IP Address and assign to FHRP Group (#18950)
* Add fhrpgroup to IPAddressImportForm

* Change fhrpgroup accessor to name

* rename fhrpgroup to fhrp_group

* Add fhrp_group to  IPAddressTestCase csv_data
2025-03-21 16:44:10 -05:00
bctiemann
e186113cb3
Merge pull request #18986 from netbox-community/release-v4.2.6
Release v4.2.6
2025-03-21 17:17:50 -04:00
Jason Novinger
40452ead62 Cleanup release notes 2025-03-21 16:03:34 -05:00
Jason Novinger
34d80beaa2 Release v4.2.6 2025-03-21 15:49:20 -05:00
Yi
b1d014b520
Fixes #18949: Add missing GraphQL ContactsMixin in types with ContactAssignments 2025-03-21 13:00:50 -05:00
github-actions
7db0765ed2 Update source translation strings 2025-03-21 05:02:02 +00:00
Jason Novinger
b8cc2d7116
Fixes #18887: Allows VMInterface object custom field on Prefix (#18945) 2025-03-20 13:55:12 -07:00
Arthur Hanson
fe7cc8cae9
Closes #16224 GraphQL Pagination (#18903)
* 16244 add pagination

* 16244 add pagination

* 16244 fix order_by pagination

* 16224 document pagination

* 16224 remove extraneous code

* 16224 missing core types

* 16224 review changes

* 16224 review changes

* 16224 review changes
2025-03-20 15:00:14 -05:00
Renato Almeida de Oliveira
d332a0c0d7
Fix sitegroup typo, VLANGroupFilterForm field didn't match between form and filterset (#18947) 2025-03-20 11:30:39 -05:00
Jason Novinger
80440fd025
Fixes #17443: Adds ExportTemplate.file_name field (#18911)
* Fixes #17443: Adds ExportTemplate.file_name field

* Addresses PR feedback

- Adds `file_name` to `ExportTemplateBulkEditForm.nullable_fields`
- Shortens max length of `ExportTemplate.file_name` to 200 chars
- Adds tests for `ExportTemplateFilterSet.file_extension`

* Fixes migration conflict caused by fix for #17841
2025-03-20 09:17:56 -04:00
Jason Novinger
f07e2dd4e2
Fixes #18944: Clearing widget type field no longer causes 500 error (#18946)
* Fixes #18944: Clearing widget type field no longer causes 500 error

* Address PR feedback, cleanup implementation
2025-03-20 09:12:05 -04:00
Renato Almeida de Oliveira
d7b9b09d56
Fixes: #18939 Allow ASN search by site-group (#18948)
* Add site_group and site_group_id to ASNFilterSet and ASNFilterForm

* Implement ASNTestCase site_group test case
2025-03-20 09:07:48 -04:00
github-actions
9da4cf31ab Update source translation strings 2025-03-20 05:02:02 +00:00
Jason Novinger
6b7d23d684
Closes #17841 Allows Tags to be displayed in specified order (#18930) 2025-03-19 10:17:35 -07:00
Jeremy Stretch
d25605c261
Closes #18751: Set the default value of ALLOW_TOKEN_RETRIEVAL to False (#18943)
* Closes #18751: Set the default value of ALLOW_TOKEN_RETRIEVAL to False

* Enable token retrieval during testing
2025-03-19 09:40:54 -05:00
bctiemann
958dcca8d6
Fix migration conflict in tenancy (#18957) 2025-03-19 09:38:10 -05:00
Renato Almeida de Oliveira
bf1a9a6e2d
Fixes: #18833 Inventory Item Bulk Import - 'InventoryItemImportForm' has no field named 'component_id'. (#18874)
* Refactor InventoryItemImportForm clean method

* Add super().clean(); renamed content_type; simplified component creation

* Fix missing component_name issue

* Update netbox/dcim/forms/bulk_import.py

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2025-03-19 09:56:42 -04:00
bctiemann
c50b1c989d
Merge pull request #18929 from netbox-community/18928-housekeeping-changelog-cleanup
Fixes #18928: Fix support for cascading deletions when cleaning up expired changelog records
2025-03-19 09:51:11 -04:00
bctiemann
cd10087b2b
Merge pull request #18859 from netbox-community/17602-comments-field-for-nested-models
Closes #17602: adds comments field to NestedGroupModel children
2025-03-19 09:50:11 -04:00
bctiemann
79b0c0f5d6
Merge pull request #18901 from netbox-community/18872-JournalEntry-kind-required
Fixes #18872: JournalEntry `kind` is a required field
2025-03-19 09:40:55 -04:00
github-actions
43840e6a72 Update source translation strings 2025-03-19 05:02:13 +00:00
bctiemann
7c152e9234
Merge pull request #18854 from netbox-community/18782-dashboard-broken-on-notification-list-widget
Fixes #18782: Misconfigured `ObjectListWidget`s now degrade gracefully
2025-03-18 14:45:23 -04:00
Arthur Hanson
af5ec19430
17170 Add ability to add contacts to multiple contact groups (#18885)
* 17170 Allow multiple Group assignments for Contacts

* 17170 update docs

* 17170 update api, detail view, graphql

* 17170 fixes

* 17170 fixes

* 17170 fixes

* 17170 fixes

* 17170 fixes

* 17170 fixes

* 17170 fix bulk import

* 17170 test fixes

* 17170 test fixes

* 17170 test fixes

* 17178 review changes

* 17178 review changes

* 17178 review changes

* 17178 review changes

* 17178 review changes

* 17178 review changes

* 17170 update migration

* 17170 bulk edit form
2025-03-18 14:05:02 -04:00
Jason Novinger
d7709a2a55 Fixes #18926: Uses correct icon for base GitHub auth 2025-03-18 08:48:27 -04:00
github-actions
dce694afa9 Update source translation strings 2025-03-18 05:02:07 +00:00
Jeremy Stretch
c5801f9881 Fixes #18928: Fix support for cascading deletions when cleaning up expired changelog records 2025-03-17 14:16:55 -04:00
Jeremy Stretch
d4f8cb72aa
Closes #18780: External database configuration (#18912) 2025-03-17 10:23:37 -07:00
bctiemann
f69de12c6d
Closes: #15842 - Option to hide local login form if SSO is in use (#18924)
Closes: #15842

Branched from #18145 by @tobiasge

Provides a new LOGIN_FORM_HIDDEN setting which allows the administrator to hide the local login form, intended only to be used when SSO is used exclusively for authentication. Note that this means local login will be impossible in the event of SSO provider issues, and can be remedied only through a change to the application config and a restart of the service.


* #15842 - Hide login form

This doesn't implement the full solution proposed in #15842 but enables
administrators to hide the login form when users should only login with a SSO
provider. To prevent a complete lockout when the SSO provider is having
issues the GET parameter `skipsso` can be added to the login URL to show
the form regardless.

* Remove skipsso backdoor

* Add warning

---------

Co-authored-by: Tobias Genannt <tobias.genannt@qbeyond.de>
2025-03-17 12:02:18 -05:00
Jeremy Stretch
f86647dc28
Fixes #18884: Handle tag assignments manually within deserialize_object (#18908) 2025-03-17 08:43:08 -07:00
Benjamin Dale
0094703609
Closes #18816:Add FC/UPC, FC/APC and FC/PC port types (#18913)
* Closes #18816:Add FC/UPC, FC/APC and FC/PC port types

* Remove release note

---------

Co-authored-by: Ben Dale <7621213-ben_dale@users.noreply.gitlab.com>
Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2025-03-17 10:39:28 -04:00
Arthur Hanson
1b4e00aeda
18896 Replace STORAGE_BACKEND with STORAGES and support Script running from S3 (#18680) 2025-03-17 07:36:34 -07:00
Jeremy Stretch
ffe035567a
Closes #18820: Bump minimum PostgreSQL version to 14 (#18909) 2025-03-14 13:45:44 -05:00
github-actions
f286449284 Update source translation strings 2025-03-14 05:02:07 +00:00
Jason Novinger
b45e256f27 Removes banner from new migrations 2025-03-13 15:43:32 -05:00
bctiemann
4f45328c77
Fixes: #18863 - Exempt MPTT-based models from centrally applying ordering on querysets (#18867) 2025-03-13 13:38:33 -07:00
Jason Novinger
06a206ee33 Extract base NestedGroupModelFilterSet with base search behavior
This can easily be extended (as in the case of LocationFilterSet) by
calling super() and ORing a filter to the queryset that is returned.
See: https://docs.djangoproject.com/en/5.1/ref/models/querysets/#or
2025-03-13 15:36:55 -05:00
Jeremy Stretch
994e7eb9f4 Fixes #18872: JournalEntry kind is a required field 2025-03-13 16:23:53 -04:00
Jason Novinger
2df68e29c9 Ensures overridden filterset search() methods include fields from OrganizationalModelFilterSet 2025-03-13 11:52:06 -05:00
Jason Novinger
1ea6f6e2ce Ensures that all new comments fields render Markdown in tables 2025-03-13 11:52:06 -05:00
Jason Novinger
c0b019b735 Adds WirelessLANGroup.comments to all the required places
- [x] 1. Add the field to the model class
- [x] 2. Generate and run database migrations
- [NA] 3. Add validation logic to clean()
- [NA] 4. Update relevant querysets
- [x] 5. Update API serializer
- [x] 6. Add fields to forms
    - [x] wireless.forms.model_forms, create/edit (e.g. model_forms.py)
    - [x] wireless.forms.bulk_edit, bulk edit
    - [x] wireless.forms.bulk_import, CSV import
    - [NA] filter (UI and API)
- [x] 7. Extend object filter set
- [NA] 8. Add column to object table (Note: was already present)
- [x] 9. Update the SearchIndex
- [x] 10. Update the UI templates
- [x] 11. Create/extend test cases
    - [NA] models
    - [x] views
    - [NA] forms
    - [x] filtersets
    - [x] api
- [NA] 12. Update the model's documentation
2025-03-13 11:52:06 -05:00
Jason Novinger
157df20ad4 Adds TenantGroup.comments to the required locations
- [x] 1. Add the field to the model class
- [x] 2. Generate and run database migrations
- [NA] 3. Add validation logic to clean()
- [NA] 4. Update relevant querysets
- [x] 5. Update API serializer
- [x] 6. Add fields to forms
    - [x] tenancy.forms.model_forms, create/edit (e.g. model_forms.py)
    - [x] tenancy.forms.bulk_edit, bulk edit
    - [x] tenancy.forms.bulk_import, CSV import
    - [NA] filter (UI and API)
- [x] 7. Extend object filter set
- [x] 8. Add column to object table
- [x] 9. Update the SearchIndex
- [x] 10. Update the UI templates
- [x] 11. Create/extend test cases
    - [NA] models
    - [x] views
    - [NA] forms
    - [x] filtersets
    - [x] api
- [NA] 12. Update the model's documentation
2025-03-13 11:52:06 -05:00
Jason Novinger
b8352260ee Adds ContactGroup.comments in the required locations
- [x] 1. Add the field to the model class
- [x] 2. Generate and run database migrations
- [NA] 3. Add validation logic to clean()
- [NA] 4. Update relevant querysets
- [x] 5. Update API serializer
- [x] 6. Add fields to forms
    - [x] tenancy.forms.model_forms, create/edit (e.g. model_forms.py)
    - [x] tenancy.forms.buld_edit, bulk edit
    - [x] tenancy.dorms.bulk_import, CSV import
    - [NA] filter (UI and API)
- [x] 7. Extend object filter set
- [x] 8. Add column to object table
- [x] 9. Update the SearchIndex
- [x] 10. Update the UI templates
- [x] 11. Create/extend test cases
    - [NA] models
    - [x] views
    - [NA] forms
    - [x] filtersets
    - [x] api
- [NA] 12. Update the model's documentation
2025-03-13 11:52:06 -05:00
Jason Novinger
ed98756f3e Adds SiteGroup.comments in the required locations
- [x] 1. Add the field to the model class
- [x] 2. Generate and run database migrations
- [NA] 3. Add validation logic to clean()
- [NA] 4. Update relevant querysets
- [x] 5. Update API serializer
- [x] 6. Add fields to forms
    - [x] dcim.forms.model_forms.LocationForm, create/edit (e.g. model_forms.py)
    - [x] dcim.forms.buld_edit.LocationBulkEditForm, bulk edit
    - [x] dcim.dorms.bulk_import.LocationImportForm, CSV import
    - [x] filter (UI and API)
- [x] 7. Extend object filter set
- [x] 8. Add column to object table
- [x] 9. Update the SearchIndex
- [x] 10. Update the UI templates
- [x] 11. Create/extend test cases
    - [NA] models
    - [x] views
    - [NA] forms
    - [x] filtersets
    - [x] api
- [x] 12. Update the model's documentation
2025-03-13 11:52:06 -05:00
Jason Novinger
9a9d6cdedb Adds Region.comments field in the required locations
- [x] 1. Add the field to the model class
- [x] 2. Generate and run database migrations
- [NA] 3. Add validation logic to clean()
- [NA] 4. Update relevant querysets
- [x] 5. Update API serializer
- [ ] 6. Add fields to forms
    - [x] dcim.forms.model_forms.RegionForm, create/edit (e.g. model_forms.py)
    - [x] dcim.forms.buld_edit.RegionBulkEditForm, bulk edit
    - [x] dcim.dorms.bulk_import.RegionImportForm, CSV import
    - [NA] filter (UI and API)
- [x] 7. Extend object filter set
- [x] 8. Add column to object table
- [x] 9. Update the SearchIndex
- [x] 10. Update the UI templates
- [x] 11. Create/extend test cases
    - [NA] models
    - [x] views
    - [NA] forms
    - [x] filtersets
    - [x] api
- [NA] 12. Update the model's documentation
2025-03-13 11:52:06 -05:00
Jason Novinger
2e2c815c91 Update Location detail UI template 2025-03-13 11:52:06 -05:00
Jason Novinger
44efd5e833 Adds Location.comments field in the required locations
- [x] 1. Add the field to the model class
- [x] 2. Generate and run database migrations
- [NA] 3. Add validation logic to clean()
- [NA] 4. Update relevant querysets
- [x] 5. Update API serializer
- [x] 6. Add fields to forms
    - [x] dcim.forms.model_forms.LocationForm, create/edit (e.g. model_forms.py)
    - [x] dcim.forms.buld_edit.LocationBulkEditForm, bulk edit
    - [x] dcim.dorms.bulk_import.LocationImportForm, CSV import
    - [x] filter (UI and API)
        - [NA] UI
            - Note: could not find any comments related things in filtersets
        - [x] API
- [x] 7. Extend object filter set
- [x] 8. Add column to object table
- [x] 9. Update the SearchIndex
- [x] 10. Update the UI templates
- [x] 11. Create/extend test cases
    - [NA] models
    - [x] views
    - [NA] forms
    - [x] filtersets
    - [x] api
- [NA] 12. Update the model's documentation
2025-03-13 11:52:06 -05:00
Jason Novinger
ae7a47ca60 Adds comments field to abstract NestedGroupModel and associated migrations
Models affected:
- dcim: `Location`, `Region`, `SiteGroup`
- tenancy`: `ContactGroup`, `TenantGroup`
- wireless: `WirelessLANGroup`
2025-03-13 11:52:06 -05:00
Jeremy Stretch
ed135102be
Fixes #18880: Delay enqueuing of background tasks until the DB transaction has been committed (#18899) 2025-03-13 11:34:12 -05:00
bctiemann
26e02ada30
Merge pull request #18822 from netbox-community/18743-django-52
Closes #18743: Upgrade to Django 5.2
2025-03-13 10:58:58 -04:00
Tobias Genannt
19703f7d69 Fixes: #18568 Update mkdocstrings and adapt config 2025-03-13 10:25:42 -04:00
Jeremy Stretch
3dda4716e7 Adapt RemoteUserMiddleware for Django 5.2 2025-03-13 09:34:00 -04:00
Jeremy Stretch
962d660c2c Closes #18743: Upgrade to Django 5.2 2025-03-13 09:34:00 -04:00
Jason Novinger
78332d44c7
Fixes #18845: restores sort behavior for DeviceTable.name column (#18861)
* Fixes #18845: restores sort behavior for DeviceTable.name column

* Remove accessor/order_by and modify DEVICE_LINK template

Thanks to @alehaa for the suggestion.

This also includes an additional `.select_related()` operation on
`DeviceListView.queryset` to avoid extra queries. Thanks to
@renatoalmeidaoliveira and @jeremystretch for pointing out the need for
this.
2025-03-13 09:22:49 -04:00
github-actions
80926cda8f Update source translation strings 2025-03-13 05:02:07 +00:00
bctiemann
d924d4eb33
Merge pull request #18886 from ITJamie/add-rackname-to-device-rack-view
Add rack title above rack view on device page
2025-03-12 19:11:22 -04:00
bctiemann
b1e7d7c76b
Merge pull request #18826 from Tishka17/fix/generic_prefetch_4.2
Prefetch interface data for REST API on netbox 4.2
2025-03-12 18:55:58 -04:00
Jeremy Stretch
092f7549ca
Fixes #18869: Ensure to_meters() always returns a clean decimal value (#18883)
* Fixes #18869: Ensure to_meters() always returns a clean decimal value

* Handle float values
2025-03-12 13:42:38 -05:00
Andrey Tikhonov
2f51dfc07a Merge branch 'fix/generic_prefetch_4.2' of github.com:Tishka17/netbox into fix/generic_prefetch_4.2 2025-03-12 19:13:34 +01:00
Andrey Tikhonov
906654d807 Fix empty line, comments 2025-03-12 19:09:46 +01:00
Renato Almeida de Oliveira
749a83d742
Change JSONField, prepare_value to output str with enclosing " (#18846) 2025-03-12 10:00:40 -07:00
Andrey Tikhonov
cdd25368e7
Merge branch 'main' into fix/generic_prefetch_4.2 2025-03-12 16:27:12 +01:00
Andrey Tikhonov
7d64d3b5ed Move GenericArrayForeignKey to fields module 2025-03-12 16:22:11 +01:00
github-actions
5e22ef59c5 Update source translation strings 2025-03-12 05:02:02 +00:00
Fabi
19d1282683
Fixes #18838: Correctly reject invalid falsy local context data (#18860)
* Correctly reject invalid falsy local context data.

* move tests
2025-03-11 14:18:42 -05:00
bctiemann
2266a8af67
Merge pull request #18804 from renatoalmeidaoliveira/18742-Location-List-and-Locations-not-Showing-Associated-VLAN-Groups
Fixes: #18742 Location List and Locations not Showing Associated VLAN Groups
2025-03-11 11:13:24 -04:00
Renato Almeida de Oliveira
5d81f911d6
Fixes: #18582 Bulk import prefixes with associated VLAN not working when multiple VLANs with the same vid exist. (#18844)
* Add site CSVModelChoiceField

* Change site field to vlan_site
2025-03-11 08:46:46 -04:00
github-actions
89e3f3d3e9 Update source translation strings 2025-03-11 05:02:10 +00:00
Jeremy Stretch
292463c0de
Closes #18857: Fix deprecation warnings (#18858) 2025-03-10 14:40:08 -07:00
Antoine Keranflec'h
a9fd191086
Fixes: #18744 Add Contact link as hyperlink (#18847)
* contact link as hyperlink

* fix(lint) add missing blank lines

* simplify by using lambda function
2025-03-10 12:49:24 -05:00
Tobias Genannt
1a60cb9884
Fixes: #18568 Update mkdocstrings and adapt config (#18841)
* Fixes: #18568 Update mkdocstrings and adapt config

* Fixed some output formatting errors

When trying to compare the output from "mkdocstrings[python-legacy]==0.27.0" and
"mkdocstrings[python]==0.28.2" I encountered some HTML errors:
- <div> inside a <p>
- unescaped non-tags <pk>
2025-03-10 13:11:35 -04:00
Jason Novinger
76c3c613a9 Adds validation for ObjectListWidget.ConfigForm.model field 2025-03-10 09:57:45 -05:00
Jason Novinger
528248b560 Fixes #18782: properly check if htmx_url is None
If this is done incorrently, then the string formatting operation turns
`htmx_url` into a string and the test in the template fails.
2025-03-10 09:52:59 -05:00
bctiemann
b5d970f7bb
Closes: #18535 - Skip incompatible plugins during startup (#18537)
* Skip incompatible plugins during startup and remove from PLUGINS

* Handle exceptions on request processors in incompatible plugins, and display status in Plugins page

* Revert "Handle exceptions on request processors in incompatible plugins, and display status in Plugins page"

This reverts commit d97bf2ab146114cc13d751878a17a383de0fd5f8.

* Resolve merge conflicts

* Skip incompatible plugins during startup and remove from PLUGINS

* Rename Installed column to Active, and add custom PluginActiveColumn with tooltip

* Fix is_installed

* Simplify plugin_config.validate syntax

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>

* Merge feature

* Revert "Merge feature"

This reverts commit d1ea60f082.

* Undo simplification

* Add failed_to_load logic

* Use a TemplateColumn for is_installed

* Remove custom column class

* Remove merge vestige

* Simplify plugin attributes for is_installed column

* Use placeholders for false values to increase legibility of the plugins table

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2025-03-10 10:51:41 -04:00
github-actions
8823b07745 Update source translation strings 2025-03-08 05:02:21 +00:00
Jeremy Stretch
c35f5f829a
Closes #7598: Enable custom field filtering for GraphQL (#18701) 2025-03-07 10:49:06 -08:00
Mika Busch
29c25e39fc
17686 config option for disk divider (#18011) 2025-03-07 10:47:27 -08:00
bctiemann
bbf4eea76c
Fixes: #18808 - Fix incorrect dependencies on squashed migrations (#18827) 2025-03-07 10:20:34 -08:00
Andrey Tikhonov
d103e13732 Removed automatic cache invalidation 2025-03-07 17:29:04 +01:00
github-actions
6d69c76b83 Update source translation strings 2025-03-07 05:02:48 +00:00
Jason Novinger
6bc9302ce5
Closes #17608: Adds L2VPN.status field (#18791) 2025-03-06 14:06:06 -08:00
bctiemann
f9c8d12a51
Add docstrings for get_queryset base class methods (#18832) 2025-03-06 11:11:55 -06:00
Renato Almeida de Oliveira
3ef7ab4416
Fixes: #18579 Add contact filters to services (#18818)
* Add Contact filter to Services

* Add ContactModelFilterForm to ProviderAccountFilterForm

* Add Contact filter support for Aggregate

* Add Contact filter support for Prefix

* Add Contact filter to IPRange

* Add Contact filter to IPAddress

* Add Contact filter to L2VPN

* Add Contact filter to TunnelGroup

* Add Contact filter to Tunnel

* Add ContactModelFilterSet to ProviderAccountFilterSet

* Fixes classes inheritance order

Setup NetBoxModelFilterSetForm as the last inherited class

Co-authored-by: Jason Novinger <jnovinger@gmail.com>

---------

Co-authored-by: Jason Novinger <jnovinger@gmail.com>
2025-03-06 09:41:41 -06:00
bctiemann
2d35cc56ed
Merge pull request #18823 from netbox-community/release-v4.2.5
Release v4.2.5
2025-03-06 10:10:13 -05:00
Andrey Tikhonov
741645c9f7 Merge branch 'develop' into fix/generic_prefetch_4.2 2025-03-06 16:05:25 +01:00
Andrey Tikhonov
d226af420b Merge branch 'develop' into fix/generic_prefetch_4.2 2025-03-06 16:02:32 +01:00
Andrey Tikhonov
5c88317745 cleanup unused imports and extra line 2025-03-06 16:01:59 +01:00
Jeremy Stretch
dffa380e5c Tweak issue ordering 2025-03-06 09:50:32 -05:00
Brian Tiemann
6d2426843b Merge remote-tracking branch 'origin/release-v4.2.5' into release-v4.2.5 2025-03-06 09:28:08 -05:00
Brian Tiemann
e72b0606ba Bump Django and add missing PRs 2025-03-06 09:27:44 -05:00
Jeremy Stretch
c933cbf11e Update translations 2025-03-06 09:00:09 -05:00
github-actions
9f1ffb54f5 Update source translation strings 2025-03-06 05:02:11 +00:00
Brian Tiemann
29b8827128 Add translation files 2025-03-05 18:52:34 -05:00
bctiemann
6efc5682cd
Override get_queryset on generic ObjectListView and NetBoxModelViewSet to reapply model-level ordering (#18805) 2025-03-05 15:52:00 -08:00
Brian Tiemann
033a960cab Fix strawberry-graphql==0.262.0 2025-03-05 18:46:30 -05:00
Brian Tiemann
9f69c46a99 NetBox v4.2.5 2025-03-05 18:43:41 -05:00
Marcus Weiner
631ff3e702
Allow primary key for nested models in OpenAPI request schemas (#18451) 2025-03-05 11:46:12 -08:00
Renato Almeida de Oliveira Zaroubin
ed6ccfb723 Add commit test in job execution 2025-03-05 09:34:18 -05:00
Renato Almeida de Oliveira Zaroubin
d3a9a6827f fix typo in VirtualCircuitFilterForm 2025-03-05 09:28:00 -05:00
github-actions
057653d362 Update source translation strings 2025-03-05 05:02:11 +00:00
Daniel Sheppard
4ab58f2da9
Fixes: #15016 - Catch AssertionError from cable trace and throw ValidationError (#16384) 2025-03-04 10:57:27 -08:00
Renato Almeida de Oliveira Zaroubin
d83c2f45bc Add vlangroup into LocationTable, LocationListView queryset and related_models in LocationView 2025-03-04 18:34:23 +00:00
Jeremy Stretch
4e65117e7c
Closes #18627: Proxy routing (#18681)
* Introduce proxy routing

* Misc cleanup

* Document PROXY_ROUTERS parameter
2025-03-04 08:24:54 -05:00
github-actions
d208ddde9a Update source translation strings 2025-03-04 05:02:19 +00:00
bctiemann
7c52698c08
Merge pull request #18748 from netbox-community/18352-add-poweroutlet-status
Closes #18352: Adds PowerOutlet.status field
2025-03-03 20:07:39 -05:00
Jason Novinger
913405a3ae Adds PowerOutlet.status to detail view
Also fixes color display in list table and detail template
2025-03-03 12:22:34 -06:00
bctiemann
0fbfc4f38c
Merge pull request #18789 from jamestiotio/18774-tag-description
Closes #18774: Set title attribute of each tag to its description
2025-03-03 11:35:33 -05:00
Jason Novinger
e86dba8fc8 Fixes #18768: allow removing secondary MACAddress from interface 2025-03-03 09:35:00 -05:00
Jeremy Stretch
77b9820577
Closes #18287: Enable periodic synchronization for data sources (#18747)
* Add sync_interval to DataSource

* Enqueue a SyncDataSourceJob when needed after saving a DataSource

* Fix logic for clearing pending jobs on interval change

* Fix lingering background tasks after modifying DataSource
2025-03-03 09:29:40 -05:00
atownson
3e1d4369ba
Closes #17944: Allow filtering of ObjectVar and MultiObjectVar script inputs (#18725)
* Add the advanced object selector to the ObjectVar and MultiObjectVar script inputs

* Fix formatting issue
2025-03-03 09:20:04 -05:00
James Raphael Tiovalen
06b5ff2e4a
Closes #18774: Set title attribute of each tag to its description 2025-03-02 18:40:40 +08:00
github-actions
3b1daaaad6 Update source translation strings 2025-03-01 05:02:06 +00:00
Jeremy Stretch
63a167f130
Fixes #15924: Fix API interface patch tagged all mode (#18759)
* Fixes: #15924 - Prevent API payload from allowing tagged_vlans while interface mode is set to taged-all

* Prevent cleanup of tagged_vlans when no tagged_vlans set on interface

* Fix test errors

* Remove accidental debug statements

* Update validation to model clean method instead of serializer

* Remove clearing of tagged vlans from `save()`

* Make changes to validation to account for M2M not being available under model in addition to not being able to check incoming vlans under same model.

* Optimize untagged vlan check

* Re-ordering statements in validators

* Forgot to call super().clean()

* Adjust logic for form and serializer.  Add tests

* Fix test failure

* Fix ruff errors

* Fix test by removing now invalid test

* Update serializer, form and tests

* Optimize API test for vlan fields

* Optimize API serializer logic

---------

Co-authored-by: Daniel Sheppard <dans@dansheps.com>
2025-02-28 11:01:48 -05:00
Jason Novinger
09d867adc3
Fixes #18758: Enable sorting by Account count on prodiver list (#18763) 2025-02-28 07:28:09 -08:00
Jason Novinger
2ae84ce9fb Adds initial PowerOutletForm tests 2025-02-27 15:02:14 -06:00
Jeremy Stretch
cf7e2c8dc9 Closes #17424: Add custom visibility toggle to ViewTab 2025-02-27 10:41:10 -05:00
Jason Novinger
2dcf2d203c Extend filterset/model tests to cover PowerOutlet.status 2025-02-26 17:09:56 -06:00
Jason Novinger
8efcbddb37 Updates PowetOutler docs to include new status field 2025-02-26 16:51:07 -06:00
Jason Novinger
f2a09333d7 Updates PowerOutletIndex to display status field in results
This seemed inline with status fields on other model search indexes
2025-02-26 16:44:54 -06:00
Jason Novinger
1d5c67a0a8 Adds PowerOutlet.status field to PowerOutlet model tables 2025-02-26 16:44:03 -06:00
Jason Novinger
9556b0c480 Adds status field to PowerOutletSerializer 2025-02-26 16:42:44 -06:00
Jason Novinger
d9d7955c19 For #18352, adds PowerOutlet.status field to forms and filtersets 2025-02-26 16:38:11 -06:00
Jason Novinger
dbac09349b For #18352, adds choices, model field, migration
Adds:
- dcim.choices.PowerOutletStatusChoices
- dcim.models.device_components.PowerOutlet.status field with `choices`
  set to PowerOutletStatusChoices
- adds migration for PowerOutlet.status field
- updates breaking view tests
2025-02-26 16:36:09 -06:00
Jeremy Stretch
7aba6500dd Fixes #18141: Fix quick-add support for plugin models 2025-02-26 14:25:38 -05:00
Daniel Sheppard
b9b42cd3b4
Fixes: #15924 - Prevent API payload from allowing tagged_vlans while interface mode is set to tagged-all (#17211) 2025-02-26 09:28:02 -08:00
github-actions
787a2dd7c2 Update source translation strings 2025-02-26 05:02:07 +00:00
Marcus Weiner
c81f4da780
Fix definition of vid_ranges in VLANGroup so it shows up in the OpenAPI schema (#18237) 2025-02-25 16:34:15 -08:00
Renato Almeida de Oliveira
cffb99cec5
Fixes: #17796 Custom Field Choices -> Create & Add Another causes IndexError (#18631) 2025-02-25 14:44:10 -08:00
bctiemann
8dc2154cc3
Merge pull request #18704 from alehaa/18095-inherit-contacts
Fixes 18095: inherit contacts
2025-02-25 16:08:32 -05:00
Brian Tiemann
3b894f9ccb Handle null table in TableConfigForm 2025-02-25 12:59:26 -05:00
Alexander Haase
effc23f5bb Optimize contact lookup query 2025-02-25 18:36:16 +01:00
bctiemann
ae5314ffa7
Merge pull request #18650 from tobiasge/18635-fix-version-identifier
Close #18635: Show only the semantic version
2025-02-25 12:19:26 -05:00
Jeremy Stretch
26c7c8f08d
Closes #18623: Upgrade Tabler to v1.0 (#18624)
* Upgrade Tabler to v1.0

* Fix navigation menu colors

* Reduce table column heading font size
2025-02-25 12:13:53 -05:00
Jeremy Stretch
f7fdf07949
Closes #17793: Introduce a REST API endpoint for tagged objects (#18679)
* Closes #17793: Introduce a REST API endpoint for tagged objects

* Add missing object_id filter to TaggedItemFilterSet
2025-02-25 12:06:44 -05:00
Alexander Haase
bf836c9bc2
Fixes 17357: Use virtual chassis name as fallback for device (#18710) 2025-02-25 07:55:00 -08:00
bctiemann
4a4596d5e8
Merge pull request #18721 from atownson/issue_18403
Closes #18403: Do not retrieve the data field from Job objects unless needed
2025-02-25 10:24:42 -05:00
Mathias Guillemot
d1712c45bb
Closes: #18434 - Add SPB in L2VPN (#18523)
* Add SPB in L2VPN

* Change category as Other

Co-authored-by: Daniel Sheppard <dans@dansheps.com>

---------

Co-authored-by: Daniel Sheppard <dans@dansheps.com>
2025-02-25 10:06:07 -05:00
atownson
48b825c64a
Closes #18024: Add URL pattern for scripts to reference them by module.name (#18723)
* Add URL pattern for scripts to reference them by module.name

* Change _get_script function name and syntax

* Fix formatting issue
2025-02-25 09:39:39 -05:00
Jeremy Stretch
7e669d1a14 Closes #18072: Remove support for single model registration from PluginTemplateExtension 2025-02-25 09:32:48 -05:00
bctiemann
4fb42ac7b3
Merge pull request #18724 from netbox-community/18605-prefix-vlan-assignment-display
Fixes #18605: only VLANs at selected Site are shown in VLAN select
2025-02-25 09:31:48 -05:00
bctiemann
a8b4024016
Merge pull request #18491 from antoinekh/17542-Contact_Assignment_to_vpn_tunnels
#17542 contact assignment to vpn tunnels
2025-02-25 09:23:14 -05:00
Arthur Hanson
08b2fc424a
18296 Add Tenancy to VLAN Groups (#18690)
* 18296 add tenant to vlan groups

* 18296 add tenant to vlan groups

* 18296 add tenant to vlan groups

* 18296 add tenant to vlan groups

* 18296 review changes
2025-02-25 09:13:30 -05:00
Antoine Keranflec'h
a6c07e6a35 fix contact wrong model assignment 2025-02-25 13:53:50 +01:00
Antoine Keranflec'h
59cd5bc653 fix double line breaks 2025-02-25 09:15:55 +01:00
Antoine Keranflec'h
bda4f314a4
Merge branch 'netbox-community:main' into 17542-Contact_Assignment_to_vpn_tunnels 2025-02-25 09:09:13 +01:00
Tobias Genannt
2eaee8bf45 Close #18635: Show only the semantic version
This modifies the 'netbox-version' to only show the semantic version of Netbox
and adds 'netbox-full-version' to show the full version.

Related issues:
- https://github.com/netbox-community/netbox/issues/15908
- https://github.com/netbox-community/ansible_modules/issues/1381
2025-02-25 07:07:14 +01:00
github-actions
2a56c08bc8 Update source translation strings 2025-02-25 05:02:09 +00:00
Brian Tiemann
beb0aff656 Add VLAN Translation Policy to bulk edit forms and tables for Interface and VMInterface 2025-02-24 13:55:40 -05:00
Jason Novinger
64270d6a4e Fixes #18605: only VLANs at selected Site are shown in VLAN select 2025-02-24 11:29:31 -06:00
github-actions
fba4141ce3 Update source translation strings 2025-02-24 15:18:11 +00:00
Jeremy Stretch
a4ecb82330 Clarify error message 2025-02-24 10:14:52 -05:00
atownson
5a3e213fb4 Do not retrieve the data field from Job objects unless needed 2025-02-24 09:07:16 -06:00
Andrey Tikhonov
83ca0ef955 Add missed init 2025-02-24 15:43:07 +01:00
Andrey Tikhonov
9c3e7f2c5d Cleanup 2025-02-24 15:38:19 +01:00
Andrey Tikhonov
7794c6cfcb Fix link peers 2025-02-24 15:28:45 +01:00
Andrey Tikhonov
8dc1d68aee port generic field to 4.2 2025-02-24 15:20:18 +01:00
Alexander Haase
ca6b686b88 Limit inherited contacts to model 2025-02-22 00:06:44 +01:00
bctiemann
c4304d059c
Merge pull request #18703 from netbox-community/release-v4.2.4
Release v4.2.4
2025-02-21 15:34:15 -05:00
Brian Tiemann
fee66438f3 Fix django-htmx version 2025-02-21 15:19:54 -05:00
Brian Tiemann
0f52712468 Release v4.2.4 2025-02-21 15:15:14 -05:00
Jeremy Stretch
fbaa82df7b Fixes #18674: Fix form reset when selecting a value from a speed selection dropdown 2025-02-21 14:04:50 -05:00
mr1716
9c1358e6e7 #18698 Correct REST Wikipedia URL In Documentation 2025-02-21 09:34:16 -05:00
github-actions
63b7145baa Update source translation strings 2025-02-21 05:02:07 +00:00
Jeremy Stretch
ef89fc1264 Closes #18071: Remvoe legacy staged changes functionality 2025-02-20 16:50:37 -05:00
Jeremy Stretch
bcd974210d Update Transifex resource slug 2025-02-20 12:53:25 -05:00
Jason Novinger
ed79e3bbf4 Fixes #18619: shift-select selects hidden items
This also fixes the inverse, when a range is unselected via shift-click,
previously checked checkboxes that are hidden are not changed.
2025-02-20 10:17:43 -05:00
Alexander Haase
b5bc0bad38 Cover multitable inheritance in serialization
During serialization, custom fields may be available to a model due to
multi-table inheritance, but might not be available in serialized data
because only direct fields of the model are covered. Now this attribute
is only used if available in serialized data. Models using multi-table
inheritance must modify their serialize_object() method to cover parent
serialization.
2025-02-20 10:09:35 -05:00
Jason Novinger
2a44affd03
Fixes #18594: asn_count sort in Sites list (#18634)
* Fixes #18594: asn_count sort in Sites list

* Fixes similar issue in `circuits.views.ProviderListView`

Thanks @bctiemann for point this out!
2025-02-20 10:01:04 -05:00
Jamie Murphy
d9066d6cff add device rack title 2025-02-19 22:02:59 +00:00
github-actions
57ef44706a Update source translation strings 2025-02-19 05:02:03 +00:00
Alexander Haase
72adda1197 Allow exclusion of inherited contacts 2025-02-18 23:08:47 +01:00
Alexander Haase
d5316de9c8 Move contact queryset into model 2025-02-18 23:02:57 +01:00
Jason Novinger
70dddb673b
Fixes #18585: filtering circuits by location (#18641)
* Fixes #18585: filtering circuits by location

This also fixes a related issue where selected filter is not shown in
the filter form.

Changes:
- Adds `CircuitFilterSet.location_id` field to enable filtering with
  incoming GET params
- Adds `CirciotFilterForm.location_id` field to enable filtering from
  list form
- Adds `location_id` to the Location fieldset on `CircuitFilterForm`

* Adds test for new CircuitFilterset.location_id filter
2025-02-18 13:33:05 -05:00
Alexander Haase
6c6cb321bf
Fixes 18555: Fix model URL generator for plugins (#18607)
* Fix model URL generator for plugins

* Fix reverse accessor warning

* Revert "Fix reverse accessor warning"

This reverts commit f07642bb99.

* Add URL test case for regular models

* Split dummy models

Instead of using a single model for testing, one is used for testing the
plugin API and a dedicated one is used for testing the NetBox plugin
model features.

* Fix filterset test case error

* Rename test module

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2025-02-18 09:11:32 -05:00
Renato Almeida de Oliveira
11514bfb21
Fixes: #18584 Add rack types column to manufacturers table (#18636)
* Add racktype_count annotation to list view queryset, create the LinkedCountColumn in ManufacturerTable

* Add Manufacturer field to RackTypeFilterForm
2025-02-18 08:41:12 -05:00
Alexander Haase
701f40e2a8 Show parent contacts for nested models
When contacts of a nested model are displayed, the contacts of the
parents are also displayed.
2025-02-16 20:04:12 +01:00
github-actions
c324d23634 Update source translation strings 2025-02-15 05:02:03 +00:00
Alexander Haase
f9431f1c29 Replace DurationChoices by JobIntervalChoices 2025-02-14 14:42:27 -05:00
Renato Almeida de Oliveira Zaroubin
b1ac20ac19 Update ModuleBay instance name before saving it 2025-02-14 14:22:29 -05:00
github-actions
f8022040b2 Update source translation strings 2025-02-12 05:02:12 +00:00
Tobias Genannt
8114492673 Close #18357: Display author name for plugins 2025-02-11 12:19:43 -05:00
Renato Almeida de Oliveira
154b3a7abb
Fixes: 18593 - "Create & Add Another" broken for new IP addresses (#18602)
* update IPAddressEditView get_extra_addanother_params

* Simplify get_extra_addanother_params
2025-02-11 08:31:40 -05:00
github-actions
015ef25ca0 Update source translation strings 2025-02-10 18:34:35 +00:00
Alexander Haase
3e1cc0d7f3
Fixes 18208: Consolidate rendering configuration templates (#18604) 2025-02-10 11:03:08 -05:00
Alexander Haase
e1d1aab4bd Omit empty related models 2025-02-10 10:56:09 -05:00
Matej Vadnjal
299bde9653 use script form's cleaned data when calling script from CLI
so ObjectVar and other field values have proper types in script's data variable
2025-02-10 09:46:59 -05:00
Alexander Haase
4b98f74943
Fixes 18247: Fix dark mode button classes (#18617) 2025-02-10 09:42:08 -05:00
Jeremy Stretch
a33fb2a0a9 Closes #17918: Fix styling of "tagged items" list under tag view 2025-02-10 09:00:55 -05:00
github-actions
13dc6854c2 Update source translation strings 2025-02-08 05:02:19 +00:00
Antoine Keranflec'h
e475386936
Fixes: #18408 add STATUS_PAUSED to VirtualMachine (#18595)
* feat(vm): add extra status

* keep only usefull status

---------

Co-authored-by: Antoine Keranflec'h <antoine.keranflech@worldline.com>
2025-02-07 16:41:45 -05:00
Jeremy Stretch
0b194e363e Docs cleanup 2025-02-07 15:33:37 -05:00
github-actions
72e93b04da Update source translation strings 2025-02-07 05:02:00 +00:00
Renato Almeida de Oliveira
7794b6718a
Fixes: #18013 - All saved filters showing up for Change Log table, regardless of defined object type (#18551)
* Setup ObjectChangeFilterForm __init__ to add query_param to filter_id

* code lint, move __init__ to end of class

* Move filter_id widget setup to SavedFiltersMixin, and add model attributes to Models FilterForms

* Add missing model declarations for filter forms

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2025-02-06 17:21:46 -05:00
Renato Almeida de Oliveira
efa939d0c2
Fixes: #18241 - Script results log_threshold should default to Default (#18501)
* Changed LogLevelChoices order; Changed ScriptResultView to select LogLevelChoices to LOG_DEFAULT and setup the html template to put (All) in the last one

* Change LogLevelChoices in ScriptResultView get_table method

* Remove default option, add Default string to INFO

* Fix scripts.py and reports.py to reflect removing DEFAULT level

* fix linting
2025-02-06 16:30:25 -05:00
Jeremy Stretch
697610db94 Closes #18541: Document support for auth_required attribute on PluginMenuItem 2025-02-06 14:45:25 -05:00
Jeremy Stretch
8e91db0394 Misc cleanup of the release checklist 2025-02-05 11:40:53 -05:00
Arthur
d202b3529d Merge branch 'main' into feature 2025-02-04 13:05:40 -08:00
bctiemann
260adfc9e7
Merge pull request #18569 from netbox-community/release-v4.2.3
Release 4.2.3
2025-02-04 15:35:45 -05:00
Brian Tiemann
9391f48d62 Update static bundle 2025-02-04 15:20:08 -05:00
Brian Tiemann
6e165435e2 Release 4.2.3 2025-02-04 15:09:37 -05:00
Jeremy Stretch
75417c9cd5 Closes #17587: Add release_track attribute to PluginConfig 2025-02-03 13:54:52 -05:00
Jeremy Stretch
43841939a0 Closes #18540: Track installed plugins in registry 2025-02-03 13:42:32 -05:00
mr1716
29f405d27e #18496 Fixing Broken Link For Custom Links Documentation 2025-02-03 10:12:29 -05:00
Jeremy Stretch
f829f34b43
Closes #18559: Add a build parameter to ReleaseInfo (#18560)
* Closes #18559: Add a build parameter to ReleaseInfo

* Adjust dataclass typing
2025-02-03 09:44:00 -05:00
github-actions
0b794de40e Update source translation strings 2025-02-01 05:02:11 +00:00
Brian Tiemann
b2bc842f1c Remove 'provider' from VirtualCircuitIndex.display_attrs 2025-01-31 14:42:39 -05:00
Brian Tiemann
c8decf4c21 Add auth_required attrib on PluginMenuItem 2025-01-31 14:40:49 -05:00
Renato Almeida de Oliveira Zaroubin
e12a5d2edc Add get_extra_addanother_params method in IPAddressEditView 2025-01-31 14:33:26 -05:00
bctiemann
4c5fbb7326
Merge pull request #18544 from renatoalmeidaoliveira/18154-make-BaseTable-aware-default_user_preferences-annon-users
FIX #18154 - Cannot change default table preferences for anonymous users
2025-01-31 14:25:20 -05:00
mr1716
8aecf53d0e #18513 Updating Documentation Relating To Strawberry-Django Links 2025-01-31 14:14:48 -05:00
Renato Almeida de Oliveira Zaroubin
7d6089775e remove extra line 2025-01-31 18:48:50 +00:00
Renato Almeida de Oliveira Zaroubin
f5bdf7b593 Simplify Anon user logic 2025-01-31 18:03:55 +00:00
Antoine Keranflec'h
2a8728544c fix(pep) fix pep8 compliancy 2025-01-31 08:48:35 +01:00
Renato Almeida de Oliveira Zaroubin
62148bb83c Check if DEFAULT_USER_PREFERENCES are configured 2025-01-30 21:51:37 +00:00
Renato Almeida de Oliveira Zaroubin
22af6dd05f Add default user preferences tables testing in BaseTable 2025-01-30 21:09:36 +00:00
github-actions
5514df9dee Update source translation strings 2025-01-30 05:02:02 +00:00
Brian Tiemann
5cd7c6d167 Add <meta> tag reflecting settings.HOSTNAME 2025-01-29 12:50:08 -05:00
bctiemann
9ac79ebbdf
Merge pull request #18516 from tobiasge/dont-fail-on-debug
Fix #18515: Don't fail in DEBUG mode
2025-01-28 15:20:52 -05:00
bctiemann
e6c0519ada
Merge pull request #18517 from mr1716/main
#18512 Update required-parameters spelling
2025-01-28 15:17:59 -05:00
Tobias Genannt
07403f690a Fix #18515: Don't fail in DEBUG mode
When no Redis server is reachable management commands failed without
this try...except block.
2025-01-28 19:40:22 +01:00
mr1716
80e466dab7
#18512 Update required-parameters spelling 2025-01-28 09:06:37 -05:00
Brian Tiemann
34fa3835be NB-717 Update dashboard news feed URL to eliminate multiple 301 redirects 2025-01-28 08:26:35 -05:00
Brian Tiemann
7a6bb34d21 Reword references to develop and master branches 2025-01-28 08:26:05 -05:00
github-actions
968214b64a Update source translation strings 2025-01-28 05:02:09 +00:00
bctiemann
cf64f3cc43
Merge pull request #18444 from netbox-community/18433-fix-macaddress-primary-for-interface
Fixes: #18433 - Fix missing is_primary property on MACAddress model
2025-01-27 13:50:28 -05:00
Daniel Sheppard
ee5d7cfe31
Merge branch 'main' into 18433-fix-macaddress-primary-for-interface 2025-01-27 12:11:37 -06:00
Antoine Keranflec'h
f83e55e1db
Merge branch 'netbox-community:main' into 17542-Contact_Assignment_to_vpn_tunnels 2025-01-25 14:19:25 +01:00
Jeremy Stretch
57fa1dd18d Add remaining issue types 2025-01-24 10:20:43 -05:00
Jeremy Stretch
b2b47ac740 Closes #18484: Exempt changes to GitHub templates from CI 2025-01-24 09:47:40 -05:00
Jeremy Stretch
313f44646b Assign GitHub issue type on creation 2025-01-24 09:33:04 -05:00
Brian Tiemann
c2daa70099 Fix typo in Site Groups docs 2025-01-24 08:10:39 -05:00
Brian Tiemann
5fce4eef8e Add note about \l command 2025-01-24 08:09:10 -05:00
Brian Tiemann
b1e7530295 Add warning about UTF8 encoding in PostgreSQL 2025-01-24 08:09:10 -05:00
github-actions
da9b452327 Update source translation strings 2025-01-24 05:02:20 +00:00
bctiemann
31efd1fe57
Merge pull request #18452 from netbox-community/18449-fix-formatting-errors
Fixes: #18449 - Clean up some formatting errors
2025-01-23 19:51:42 -05:00
bctiemann
a8168899b8
Merge pull request #18450 from netbox-community/18447-fix-legacy-macaddress-sorting
Fixes: #18447 - Fix sorting by `mac_address` field
2025-01-23 19:50:12 -05:00
bctiemann
e02ae72f0c
Merge pull request #18445 from netbox-community/18436-fix-unassign-mac-with-primary
Fixes: #18436 - Prevent unassigning mac address when primary on an interface
2025-01-23 19:45:53 -05:00
Daniel Sheppard
3219609253 Change to @cached_property 2025-01-23 18:30:54 -06:00
Daniel Sheppard
adcb6bebd2 Remove mac_address from tables. 2025-01-22 14:14:56 -06:00
Daniel Sheppard
ad4e4e89a7 Update VirtualMachineVMInterfaceTable 2025-01-21 11:15:33 -06:00
Daniel Sheppard
c56a39a168 Fixes: #18449 - Clean up some formatting errors 2025-01-21 10:44:46 -06:00
Daniel Sheppard
d1914595f6 Fixes: #18447 - Fix sorting by mac_address field
* Disable sorting by `mac_address` for legacy `mac_address` field for Device and VM Interfaces
* Ensure `primary_mac_address` field is included in field list for Device and VM Interfaces
2025-01-21 10:15:33 -06:00
Jeremy Stretch
b913661297 Fixes #18438: Specify batch_size for migrations which run bulk_update() 2025-01-21 09:48:35 -05:00
Daniel Sheppard
bec97df242 Fix Tests 2025-01-20 23:44:36 -06:00
Daniel Sheppard
22e320084a Update UI to disable interface assignment when assigned as primary 2025-01-20 23:06:29 -06:00
Daniel Sheppard
277acd3a31 Fixes: #18436 - Prevent unassigning mac address when primary on an interface 2025-01-20 22:49:55 -06:00
Daniel Sheppard
51a79505fe Fixes: #18433 - Fix missing is_primary property on MACAddress model 2025-01-20 22:21:36 -06:00
github-actions
d11deb6678 Update source translation strings 2025-01-18 05:02:12 +00:00
Jeremy Stretch
f845b2cf07 Release v4.2.2 2025-01-17 15:05:09 -05:00
atownson
2ed4a2b005
Fixes: #18369 - Remove the json filter for protection rules (#18388)
* Remove the json filter for protection rules

* Configure PROTECTION_RULE config attribute to use ConfigJSONEncoder as serializer

* Tweak getattr()

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2025-01-17 14:02:12 -05:00
Jeremy Stretch
5b9210dfa5 Fixes #18392: Exclude config contexts assigned to locations for VMs 2025-01-17 13:14:05 -05:00
Jeremy Stretch
4a13664e0f Closes #18425: Remove the triage priority field from GitHub issue templates 2025-01-17 11:06:17 -05:00
Jeremy Stretch
a9f3c74b0c Fixes #18379: Ensure RSS feed content within dashboard widget is sanitized 2025-01-17 10:25:22 -05:00
Brian Tiemann
50b7f46fc0 Migrate DEFAULT_FILE_STORAGE to STORAGES 2025-01-17 09:04:51 -05:00
Brian Tiemann
07ad4c1321 Make GFK scope field sortable=False on tables where it appears 2025-01-17 08:52:12 -05:00
bctiemann
4a1fea3504
Fixes: #18336 - Perform Rack object validation of u_height and starting_unit on rack_type if present (#18395)
* Perform Rack object validation of u_height and starting_unit on rack_type if present

* Calculate effective values before doing validation
2025-01-17 08:45:17 -05:00
bctiemann
993d8f1480
Fixes: #18373 - Fix validation of site in Assign Device to Cluster flow (#18375)
* Fix validation of site in Assign Device to Cluster flow

* Validate Location as well as Site scope
2025-01-17 08:35:17 -05:00
bctiemann
c3efa2149c
Fixes: #18350 - Remove 'site' and 'provider_network' from CircuitTerminationIndex.display_attrs (#18351)
* Remove 'site' and 'provider_network' from CircuitTerminationIndex.display_attrs

* Use '_site' and '_provider_network' in display_attrs

* Replace private fields with 'termination'
2025-01-17 08:28:43 -05:00
Jeremy Stretch
a75fa53d4d Closes #18348: Disable legacy pre-commit hook script 2025-01-13 08:50:34 -05:00
Jeremy Stretch
e75d327f38 Fixes #18376: Include tagged VLANs in interfaces list for Q-in-Q interfaces 2025-01-10 09:10:34 -05:00
github-actions
a79d869bd8 Update source translation strings 2025-01-10 05:02:08 +00:00
Brian Tiemann
32422d1683 Don't cache CACHE_KEY_CATALOG_ERROR if ISOLATED_DEPLOYMENT is True 2025-01-09 15:21:27 -05:00
Jeremy Stretch
571f604ce8 Fixes #18368: Restore missing fields on REST API serializer for MAC addresses 2025-01-09 14:53:03 -05:00
Jeremy Stretch
b12c8c880f
Fixes #18363: Fix assignment of MAC addresses to interfaces via REST API (#18367)
* Fixes #18363: Fix assignment of MAC addresses to interfaces via REST API

* Add missing API & view tests
2025-01-09 13:55:19 -05:00
Jeremy Stretch
b11f179527 Closes #18362: Create a system job for census reporting 2025-01-09 11:56:09 -05:00
Brian Tiemann
80e1fd02bb Update docs to indicate PostgreSQL 13+ requirement 2025-01-09 10:58:51 -05:00
github-actions
4090afbf24 Update source translation strings 2025-01-09 05:02:09 +00:00
Jeremy Stretch
d04fc11c61
Release v4.2.1 (#18346)
* Release v4.2.1

* Add changelog for #18282
2025-01-08 10:19:28 -05:00
Brian Tiemann
f6b8c1966d Use order_by to change ordering behavior of VLAN column rather than changing accessor 2025-01-08 09:54:00 -05:00
Brian Tiemann
4456c488f1 Change PrefixTable.vlan to represent the VLAN ID rather than the VLAN object, to enable more useful sorting by VLAN ID rather than site-grouped VLAN objects 2025-01-08 09:54:00 -05:00
Jeremy Stretch
53aa2c8624 Fixes #18329: Pin strawberry-graphql-django to v0.52.0 to resolve upstream bug 2025-01-08 08:59:54 -05:00
github-actions
ffac0974dd Update source translation strings 2025-01-08 05:02:12 +00:00
bctiemann
e518f08604
Fixes: #18316 - Fix PrefixIndex reference to 'site' (#18322)
* Fix PrefixIndex reference to 'site'

* Fix ClusterIndex reference to 'site' and add 'scope' to WirelessLANIndex
2025-01-07 10:47:05 -05:00
Tobias Genannt
4ae5529362 Fix #18314: Use get to avoid KeyError 2025-01-07 10:39:55 -05:00
Jeremy Stretch
ef6c89ee5d Fixes #18324: Correct filter names for certain related object listings 2025-01-07 10:34:35 -05:00
Jeremy Stretch
9c960c2387 Fixes #18318: Correct navigation breadcrumbs for module type UI view 2025-01-07 10:28:22 -05:00
github-actions
ed541220e8 Update source translation strings 2025-01-07 05:02:25 +00:00
Jeremy Stretch
14cec518f5 Closes #18311: Update minimum required version of PostgreSQL 2025-01-06 17:04:13 -05:00
Jeremy Stretch
9d82a668a4 Release v4.2.0 2025-01-06 16:13:24 -05:00
Jeremy Stretch
b7610971c0
Closes #13366: Update documentation for main branch (#18309)
* Closes #13366: Update documentation for main branch

* Clarify wording
2025-01-06 15:29:03 -05:00
Jeremy Stretch
ab0a1f0bbc
Merge pull request #18308 from netbox-community/feature
Prep for v4.2.0 release
2025-01-06 14:02:29 -05:00
Jeremy Stretch
5d1070796d Merge branch 'develop' into feature 2025-01-06 13:42:57 -05:00
Jeremy Stretch
83d62315cc
Closes #18153: Introduce virtual circuit types (#18300)
* Closes #18153: Introduce virtual circuit types

* Fix TagTestCase

* Fix GraphQL API test
2025-01-06 13:37:43 -05:00
Jeremy Stretch
ab8fc3de5e Merge branch 'master' into develop 2025-01-06 11:25:43 -05:00
Jeremy Stretch
67657efe1c Release v4.1.11 2025-01-06 11:24:29 -05:00
bctiemann
c9ee699633
Fixes: #18263 - Iterate through a freshly queried set of CableTerminations to find endpoints in update_connected_endpoints (#18264)
* Iterate through a freshly queried set of CableTerminations to find endpoints in update_connected_endpoints

* Add defensive break if q_filter has not been populated
2025-01-06 09:54:13 -05:00
Brian Tiemann
89d7487197 Update some detail views with prefetch_related from 'site' to 'scope' 2025-01-06 09:48:14 -05:00
github-actions
40f22533d1 Update source translation strings 2025-01-04 05:02:13 +00:00
Jeremy Stretch
c3b0de3ebd
Closes #18281: Support group assignment for virtual circuits (#18291)
* Rename circuit to member on CircuitGroupAssignment

* Support group assignment for virtual circuits

* Update release notes

* Introduce separate nav menu heading for circuit groups

* Add generic relations for group assignments

* Remove obsolete code

* Clean up bulk import & extend tests
2025-01-03 13:42:47 -05:00
bctiemann
e8e3981da5
Fixes: #18289 - Add 'created' and 'last_updated' fields to ModuleTypeTable (#18292)
* Add 'created' and 'last_updated' fields to ModuleTypeTable for consistency

* Add 'created' and 'last_updated' fields to ModuleTable for consistency
2025-01-03 12:35:04 -05:00
Jeremy Stretch
b9abb3200c Fixes #18271: Require only encryption OR authentication algorithm when creating an IPSec proposal via REST API 2025-01-03 12:33:58 -05:00
Jeremy Stretch
10748edc3a Fixes #18222: Include action data from event rule in webhook and custom script data 2025-01-03 09:39:05 -05:00
Jeremy Stretch
6f4bec7644 Fixes #18278: Restore missing columns on MACAddressTable 2024-12-30 14:00:29 -05:00
bctiemann
0cda10a204
Fixes: #18203 - Validate that scope is selected if scope type is specified (#18254)
* Validate that a scope has been selected if a scope_type is specified, on CachedScopeMixin models

* Cleaner logic

* Call super().clean() after validating scope_type/scope
2024-12-30 12:36:46 -05:00
Jeremy Stretch
685264c757 Merge branch 'develop' into feature 2024-12-30 12:30:34 -05:00
Thor Selmer Dreier-Hansen
f03489f58e
Add distinct() to filtering VLANs by assigned interface (#18274) 2024-12-27 15:11:51 -05:00
Jeremy Stretch
c6452b33d8
Merge pull request #18267 from netbox-community/develop
Release v4.1.10
2024-12-23 11:42:29 -05:00
Jeremy Stretch
16917133b2
Merge branch 'master' into develop 2024-12-23 11:24:38 -05:00
Jeremy Stretch
28eada13d3 Release v4.1.10 2024-12-23 10:59:52 -05:00
Tobias Genannt
6ddd3cc779 #18260 - Add context managers to registry 2024-12-23 10:27:25 -05:00
bctiemann
1a631dd7cc
Merge pull request #18258 from netbox-community/develop
Release v4.1.9
2024-12-18 10:08:23 -05:00
Brian Tiemann
8c07978042 Merge branch 'master' into develop 2024-12-18 09:47:37 -05:00
bctiemann
7e3d8e9c3b
Merge pull request #18253 from netbox-community/release-v4.1.9
Release v4.1.9
2024-12-18 09:40:44 -05:00
Jeremy Stretch
e396097f3c Release v4.1.9 2024-12-17 15:59:39 -05:00
bctiemann
8d6cec408c
Fixes: #17868 - Handle orphaned cable condition gracefully in SVG rendering (#18244)
* Handle condition gracefully where an empty object list is passed in to draw_far_objects (e.g. orphaned cable where attached device has been deleted)

* Move continue statement to right after draw_far_objects

* Preferable falsy syntax

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>

* Check far_ends rather than altering draw_far_objects

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-12-17 15:39:29 -05:00
bctiemann
e7fcbffaf3
Fixes: #16757 - Use table_htmx.html for assigning ipaddresses (#18226)
* Use table_htmx.html for assigning ipaddresses

* Add disable_htmx property on ObjectChildrenView to allow IP assignment flow to avoid htmx fragmentary rendering on object save

* Revert "Add disable_htmx property on ObjectChildrenView to allow IP assignment flow to avoid htmx fragmentary rendering on object save"

This reverts commit fa8f2ac377.
2024-12-17 14:46:52 -05:00
Jeremy Stretch
0b9ead3e8b Closes #18224: Apply all registered request processors when running custom scripts 2024-12-16 11:54:42 -05:00
bctiemann
13c26ccb0c
Fixes: #18184 - Gracefully handle unavailable internet connection on RSS feed dashboard widget if ISOLATED_DEPLOYMENT is set (#18186)
* Suppress adding the RSS feed widget to the dashboard if ISOLATED_DEPLOYMENT is set

* Add config option on RSSFeedWidget to specify requires_internet and to display a more appropriate error if ISOLATED_DEPLOYMENT is set

* Remove skipping behavior from utils.py

* Add required=False
2024-12-16 11:46:28 -05:00
Jeremy Stretch
aa56b99566
Closes #18045: Enable adding a new MAC to an interface via quick add (#18200)
* Closes #18045: Enable adding a new MAC to an interface via quick add

* Misc cleanup
2024-12-16 10:57:09 -05:00
Brian Tiemann
c0fec28b2a Handle editing IPAddresses on VMInterfaces without parent.oob_ip 2024-12-16 10:17:22 -05:00
Kay Schroeder
382e246b2c Added the cable -> CableType-Annotation in CableTerminationType. 2024-12-16 10:14:16 -05:00
Pieter Lambrecht
fff4ec78ad set disabled interface backgroundcolor to $gray-400 2024-12-16 10:12:15 -05:00
github-actions
8951aa815f Update source translation strings 2024-12-13 05:02:21 +00:00
Jeremy Stretch
39ca3ce571 Merge branch 'develop' into feature 2024-12-12 12:13:45 -05:00
Jeremy Stretch
b89601d93d
Merge pull request #18221 from netbox-community/develop
Release v4.1.8
2024-12-12 10:52:47 -05:00
Jeremy Stretch
e63fe23af8 Release v4.1.8 2024-12-12 10:37:21 -05:00
Jeremy Stretch
2da1a754c4 Fixes #18213: Enable searching for ASN ranges by name 2024-12-12 09:03:27 -05:00
bctiemann
abfa28dc56
Fixes: #18150 - Get pagination limit with default 0 (#18151)
* Wait until job1 is scheduled before enqueueing job2

* Clamp limit=0 to default_limit

* Handle unspecified limit explicitly so as to return min(PAGINATE_COUNT, MAX_PAGE_SIZE)

* Revert original min()

* Coerce MAX_PAGE_SIZE to be at least PAGINATE_COUNT

* Raise ImproperlyConfigured error if MAX_PAGE_SIZE < PAGINATE_COUNT

* Revert test behavior

* Revert "Revert test behavior"

This reverts commit 5087a1111a.

* Revert "Raise ImproperlyConfigured error if MAX_PAGE_SIZE < PAGINATE_COUNT"

This reverts commit 5dd93c096d.
2024-12-12 09:00:46 -05:00
Jeremy Stretch
8e427e57ea
Closes #18211: Enable dynamic registration of request processors (#18212)
* Closes #18211: Enable dynamic registration of request processors

* Tweak syntax
2024-12-12 08:36:56 -05:00
bctiemann
dbaa9c1ce1
Fixes: #18021 - Clear Swagger/drf-spectacular API cache on startup (#18174)
* Clear Swagger API cache on startup

* Clear entire Redis cache on startup if DEBUG=True
2024-12-12 08:16:28 -05:00
github-actions
bd5e7a8d1a Update source translation strings 2024-12-12 05:02:17 +00:00
Pl0xym0r
a15ff294dd
fixes 17465 : add racktype on bulkimport and bulkedit of racks (#18077)
* fixes 17465 add racktype on bulkimport and bulkedit of racks

* Make width & u_height optional when setting rack_type on import

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-12-11 13:16:10 -05:00
Alexander Haase
26f8c3aae3
Closes 18061: Hide traceback from rendered device config (#18127)
* Hide traceback from rendered device config

When an exception occurs during device configuration rendering, it
usually doesn't contain information about the template being rendered,
but rather the trace of how the template was rendered. Since this could
confuse users and expose internal server information, it is now hidden.

* Improve error message display; replicate changes for VMs

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-12-11 10:28:42 -05:00
bctiemann
cc51e7032b
Fixes: #17820 - Store default values from custom fields on newly created module components (#18084)
* Store default values from custom fields on newly created module components

* Invert if/for lines to avoid repetition
2024-12-11 09:14:17 -05:00
bctiemann
0219dd7a70
Fixes: #18192 - Use assigned_object instead of interface in display_attrs (#18199)
* Use assigned_object instead of interface in display_attrs

* Remove mac_address
2024-12-11 08:26:48 -05:00
Jeremy Stretch
edc9852229 Fixes #18194: Always pass POST data to bulk edit form 2024-12-10 16:23:30 -05:00
jchambers2012
001f06cc9a
Fixes 18183 - Hide Light/Dark Mode and Login Info from Printed Pages (#18185)
* Fixes Print Render

* Suppress the mobile view when printing
2024-12-10 10:31:45 -05:00
github-actions
4017d0ca35 Update source translation strings 2024-12-10 05:02:13 +00:00
Joel McGuire
21962b3488
fix #17960 by adding 6 more tunnel encap options (#18097)
* fix #17960

* updated post feedback

---------

Co-authored-by: Joel L. McGuire <joel.mcguire@ccr.net>
2024-12-09 15:03:00 -05:00
Pl0xym0r
7a92c20576
Fixes 17889: Add checkbox oob ip for ipaddress form (#18057)
* fixes 17889 : add checkbox oob ip for ipaddress

* Minor cleanup

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-12-09 13:35:58 -05:00
Pl0xym0r
3326a6543c
Closes #17071: Add is_oob parameter on bulk_import ipaddress (#17975)
* add is_oob parameter on bulk_import ipaddress

* Tweak wording

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-12-09 10:58:35 -05:00
Daniel Sheppard
674af4d6bc
Fixes: #14044 - Allow regex renaming of unnamed devices (#17212)
* Fixes: #14044 - Allow regex renaming of unnamed devices

* Allow regex renaming of unnamed devices (already allowed actually)
* Catch errors relating to unnamed devices or integrity errors as a result of the rename process

* Move validation to ensure all renames are eligible

* Update to treat null name an empty string
2024-12-09 09:27:41 -05:00
Jeremy Stretch
8c9bb73ff7 Fixes #17810: Disable DRF's native unique constraint checks 2024-12-05 13:35:47 -05:00
Rob Duffy
327ad8cfc9
Fixes #17490: Config Template unable to dynamically include templates (#18106)
* Fixes #17490: Config Template unable to dynamically include templates

* Cast the generator returned by find_referenced_templates() to an iterable to avoid exhausting it on the check for None

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>

* Apply the path__in filter to avoid duplicating code

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>

* Remove extra if None not in referenced_templates

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-12-04 21:11:12 -05:00
Martin Rødvand
1e845e6b46
Add status to rack elevation device tooltip (#18083)
* Add status to rack elevation device tooltip

* Use get method for status display

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-12-04 20:59:58 -05:00
github-actions
b4265b74f4 Update source translation strings 2024-12-03 14:23:39 +00:00
Jeremy Stretch
954b5e9ddf Use the housekeeping app to update translation sources 2024-12-03 09:18:40 -05:00
Arthur Hanson
d122c334fd 18044 enable alert for plugins in script 2024-12-02 12:23:00 -05:00
Jeremy Stretch
ce365dab0a Release v4.2-beta1 2024-12-02 10:00:56 -05:00
Jeremy Stretch
a998893f7e #16547: Update buildschema management command 2024-12-02 09:46:47 -05:00
Jeremy Stretch
27d970df41 Update UI dependencies 2024-12-02 09:32:38 -05:00
Jeremy Stretch
678d89d406 Update documentation for v4.2 2024-11-26 12:38:29 -05:00
Jeremy Stretch
99339501cd Merge branch 'develop' into feature 2024-11-26 12:23:13 -05:00
Jeremy Stretch
d511ba487d #13086: Add virtual circuit to InterfaceTable 2024-11-26 12:20:59 -05:00
Jeremy Stretch
3ee951b0d0 Fix missing/incorrect documentation links 2024-11-26 10:45:30 -05:00
Jeremy Stretch
64e56cd7c8 #16971: Improve example in documentation 2024-11-26 10:35:30 -05:00
Arthur Hanson
a24576f126
7848 Add RQ API (#17938)
* 7848 Add Background Tasks (RQ) to API

* 7848 Tasks

* 7848 cleanup

* 7848 add worker support

* 7848 switch to APIView

* 7848 Task detail view

* 7848 Task enqueue, requeue, stop

* 7848 Task enqueue, requeue, stop

* 7848 Task enqueue, requeue, stop

* 7848 tests

* 7848 tests

* 7848 OpenAPI doc generation

* 7848 OpenAPI doc generation

* 7848 review changes

* 7848 viewset

* 7848 viewset

* 7848 fix tests

* 7848 more viewsets

* 7848 fix docstring

* 7848 review comments

* 7848 review comments - get all tasks

* 7848 queue detail view

* 7848 cleanup

* 7848 cleanup

* 7848 cleanup

* 7848 cleanup

* Rename viewsets for consistency w/serializers

* Misc cleanup

* 7848 review changes

* 7848 review changes

* 7848 add test

* 7848 queue detail view

* 7848 fix tests

* 7848 fix the spectacular test failure

* 7848 fix the spectacular test failure

* Misc cleanup

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-11-26 10:01:06 -05:00
Jeremy Stretch
9b4b56febc #13428: Misc cleanup 2024-11-26 09:56:33 -05:00
Jeremy Stretch
d093b21bc0 #17761: Set null=True on Site.time_zone 2024-11-25 16:50:53 -05:00
Jeremy Stretch
b841875f63 #16783: Misc cleanup 2024-11-25 15:30:15 -05:00
Jeremy Stretch
f17545788f #16547: Reorder API serializer fields for Circuit 2024-11-25 15:26:20 -05:00
Jeremy Stretch
17189456c9 #13086: Include button to terminate virtual circuit on interfaces table 2024-11-25 14:51:59 -05:00
Jeremy Stretch
b45b8f3a4d #7336: Correct API test 2024-11-25 14:02:45 -05:00
Jeremy Stretch
dd29c0ede5 #16136: Remove obsolete accommodation for Django admin UI 2024-11-25 13:35:15 -05:00
Jeremy Stretch
02cbdc10f2 #9604: Remove provider_network from CircuitTerminationSerializer & CircuitCircuitTerminationSerializer 2024-11-25 13:28:17 -05:00
Jeremy Stretch
6d65d92c38 #7336: Misc cleanup 2024-11-25 13:26:17 -05:00
Jeremy Stretch
5afa6d7964 Closed #18093: Remove redirects for pre-v4.1 virtual disk views 2024-11-25 10:32:31 -05:00
Jeremy Stretch
24b76792a9 Closed #18091: Include summary for v4.1 release 2024-11-25 10:32:03 -05:00
Jeremy Stretch
0946a536f3 #4867: Misc cleanup 2024-11-25 09:56:02 -05:00
Jeremy Stretch
14d769a501 Draft v4.2 release notes 2024-11-22 13:39:52 -05:00
Jeremy Stretch
ff7a59db2e Closes #17752: Rename URL paths for bulk import to *_bulk_import 2024-11-22 12:51:06 -05:00
Jeremy Stretch
343a4af591
Closes #18022: Extend linter (ruff) to enforce line length limit (120 chars) (#18067)
* Enable E501 rule
* Configure ruff formatter
* Reformat migration files to fix line length violations
* Fix various E501 errors
* Move table template code to template_code.py & ignore E501 errors
* Reformat raw SQL
2024-11-21 15:58:11 -05:00
Jeremy Stretch
f08e36e538 Merge branch 'develop' into feature 2024-11-21 14:00:57 -05:00
Jeremy Stretch
9c7f2ec98c
Merge pull request #18064 from netbox-community/develop
Release v4.1.7
2024-11-21 13:51:35 -05:00
Jeremy Stretch
3b3990a4e6 Release v4.1.7 2024-11-21 13:36:20 -05:00
bctiemann
6fb476081e
Fixes: #17459 - Ensure help text on component create forms shows both bulk edit and substitution token instructions (#17931)
* Move {module} substitution help text to main ComponentCreateForm.__init__ so it applies to all component types, and fix formatting

* Simplify help text replacement string for component forms with 'module' field

* Reuse help text string in both ComponentCreateForm and ModularComponentTemplateForm

* Remove help text override from regular (direct) object creation of device components

* Re-add space

* Tweak help text

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-11-21 12:32:24 -05:00
bctiemann
4f7bfc836c
Fixes: #17950 - Handle InvalidJobOperation error in job enqueueing test (#18062)
* Wait until job1 exists in Redis before enqueueing job2

* Job can exist but not have status

* Catch InvalidJobOperation and use as trigger for retry

* Catch InvalidJobOperation when deleting/canceling job

* Remove testing code
2024-11-21 11:51:30 -05:00
Jeremy Stretch
b40ffcccb9 Update source translation strings 2024-11-21 10:51:26 -05:00
Joel McGuire
1e5d19927a
Interface type change fixing #17934 (#18025)
* fix #17934 adding 1000base-LX

* add extra space

---------

Co-authored-by: Joel L. McGuire <joel.mcguire@ccr.net>
2024-11-21 10:47:55 -05:00
Alexander Haase
09a0e579fa
Fixes: #17923, #17921 - Fix non-null constraint for script execution (#17932)
* Fix non-null constraint for script execution

With c34a0e2, validation of job object fields is enabled, so ScriptJob
must not set required fields to empty strings. This commit reverts
b18f193 and (hopefully) fixes this issue not only for UI views, but for
all interactions with scripts.

Fixes: #17923

* Fix name of recurring jobs

For recurring jobs, the name must be passed to the next job object when
the job is rescheduled.
2024-11-21 08:43:59 -05:00
Daniel Sheppard
9ccbb08e29
Fixes: #18037 - Bound VLANGroup VLAN ID max by VLAN_VID_MAX (#18041)
* Fixes: #18037 - Bound VLANGroup VLAN ID max by `VLAN_VID_MAX`

* Correct exception string

* Validate min & max VID values

* Fix min/max VID validation

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-11-20 16:03:56 -05:00
Jeremy Stretch
a0b4b0afe0
Closes #18023: Employ register_model_view() for list views (#18029)
* Extend register_model_view() to enable registering list views

* Register circuits list views with register_model_view()

* Register core list views with register_model_view()

* Fix bulk_edit & bulk_delete URL paths

* Register dcim list views with register_model_view() (WIP)

* Register dcim list views with register_model_view()

* Register extras list views with register_model_view()

* Register ipam list views with register_model_view()

* Register tenancy list views with register_model_view()

* Register users list views with register_model_view()

* Register virtualization list views with register_model_view()

* Register vpn list views with register_model_view()

* Register wireless list views with register_model_view()

* Add change note for register_model_view()
2024-11-20 15:54:37 -05:00
Matt Skalecki
eb645ee900 Hide sensitive_parameters from datasource view even for high privilege users 2024-11-20 14:38:10 -05:00
bctiemann
e36f23ed03
Fixes: #18038 - Ensure DeviceType._abs_weight is stored as an integer (#18039)
* Coerce _abs_weight to int to prevent disagreement with PositiveBigIntegerField deserialization

* Perform coercion in to_grams
2024-11-20 14:33:50 -05:00
Daniel Sheppard
13bd2ed767
Closes: #17795 - Add concurrency to CI (#18042)
* Closes: #17795 - Add concurrency to CI

* Add comment to demonstrate functionality
2024-11-19 14:38:11 -05:00
Jeremy Stretch
d2168b107f
Closes #13086: Virtual circuits (#17933)
* WIP

* Add API tests

* Add remaining tests

* Add model docs

* Show virtual circuit connections on interfaces

* Misc cleanup per PR feedback

* Renumber migration

* Support nested terminations for virtual circuit bulk import
2024-11-19 10:58:39 -05:00
Brian Tiemann
7376314821 Access _site of cluster instead of site 2024-11-18 17:05:42 -05:00
bctiemann
353214098b
4867 multiple mac addresses (#17902)
* Create MACAddress model and migrations to convert existing .mac_address fields to standalone objects

* Add migrations

* All views/filtering working and documentation done; no unit tests yet

* Redo migrations following VLAN Translation

* Remove mac_address filter fields and add table columns for device/vm

* Remove unnecessary "bulk rename"

* Fix filterset tests for Device

* Fix filterset tests for Interface

* Fix tests on single-object forms

* Fix serializer tests

* Fix filterset tests for VMInterface

* Fix filterset tests for Device and VirtualMachine

* Move new field check into lookup_map iteration

* Fix general MACAddress filter tests

* Add GraphQL types/filters/schema

* Fix bulk edit/create tests (bulk editing Interfaces will be unsupported because of inheritance from ComponentBulkEditForm)

* Make mac_address read_only on InterfaceSerializer/VMInterfaceSerializer

* Undo unrelated work

* Cleanup unused IPAddress derived stuff

* API endpoints

* Add serializer objects to interface serializers

* Clean up unnecessary bulk create forms/views/routes

* Add SearchIndex and adjust indexable fields for Interface and VMInterface

* Reorganize MACAddress classes out of association with DeviceComponents

* Move MACAddressSerializer

* Enforce saving only a single is_primary MACAddress per interface/vminterface

* Perform is_primary validation on MACAddress model and just check if one already exists for the interface

* Remove form-level validation

* Fix check for current is_primary setting when reassigning

* Model cleanup

* Documentation notes and cleanup

* Simplify serializer and add ip_addresses

* Add to VMInterfaceSerializer too

* Style cleanup

* Standardize "MAC Address" instead of "MAC"

* Remove unused views

* Add is_primary field for bulk edit

* HTML cleanup and add copy-to-clipboard button

* Remove mac_address from Interface and VMInterface bulk-edit forms

* Add device and VM filtering

* Use combined assigned_object_parent in table to match structure of IPAddressTable

* Add GFK fields to MACAddressSerializer

* Reorganize "Addressing" sections to remove from proximity to "Device Components" and related groupings

* Clean up migrations

* Misc cleanup

* Add filterset test

* Remove mac_address field from interface forms

* Designate primary MAC address via a ForeignKey on the interface models

* Add serializer fields for primary_mac_address

* Update docs

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-11-18 15:11:24 -05:00
Jeremy Stretch
b4f15092db
Closes #5858: Implement a quick-add UI widget for related objects (#18016)
* WIP

* Misc cleanup

* Add warning re: nested quick-adds
2024-11-18 14:44:57 -05:00
Arthur Hanson
9fe6685562
17929 Add Scope Mixins to Prefix (#17930)
* 17929 Add Scope Mixins to Prefix

* 17929 Add Scope Mixins to Prefix

* 17929 fixes for tests

* 17929 merge latest scope changes

* 12596 review changes

* 12596 review changes

* 12596 review changes

* 12596 review changes

* 12596 review changes

* 12596 review changes

* 17929 fix migrations
2024-11-15 14:55:46 -05:00
Arthur Hanson
6ab0792f02
Closes #11279: Replace _name natural key sorting with collation (#18009)
* 11279 add collation

* 11279 add collation

* 11279 add collation

* 11279 add collation

* 11279 fix tables /tests

* 11279 fix tests

* 11279 refactor VirtualDisk

* Clean up migrations

* Misc cleanup

* Correct errant file inclusion

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-11-15 09:32:09 -05:00
Arthur Hanson
75aeaab8ee
12596 Add Allocated Resources to Cluster API (#17956)
* 12596 Add Allocated Resources to Cluster API

* 12596 Add Allocated Resources to Cluster API

* 12596 Add Allocated Resources to Cluster API

* 12596 Add Allocated Resources to Cluster API

* 12596 review changes

* 12596 review changes
2024-11-15 07:55:32 -05:00
Joel L. McGuire
0ff0edd477 fix typo in #17970 2024-11-14 08:06:52 -05:00
github-actions
05daa16aed Update source translation strings 2024-11-13 05:02:11 +00:00
Jeremy Stretch
256d69d08b Update changelog 2024-11-12 15:56:29 -05:00
Jeremy Stretch
9c532c7d89
Fixes #17986: Correct label for disk size when bulk editing virtual machines (#17992)
* Fixes #17986: Correct label for disk size when bulk editing virtual machines

* Correct label for VirtualDisk.size
2024-11-12 14:53:57 -05:00
Jeremy Stretch
c34fea6c9b Fixes #17969: Fix system info export when a config revision exists 2024-11-12 14:35:10 -05:00
Jeremy Stretch
2ed0534117 Fixes #17963: Fix selection of all listed objects during bulk edit 2024-11-12 14:33:57 -05:00
Jeremy Stretch
954e29aec3
Fixes #17972: Force evaluation of LOGIN_REQUIRED when requesting static media (#17990) 2024-11-12 12:19:37 -05:00
Antoine Keranflec'h
113c8d1d85
Merge branch 'netbox-community:develop' into 17542-Contact_Assignment_to_vpn_tunnels 2024-11-12 14:17:05 +01:00
github-actions
494d410847 Update source translation strings 2024-11-08 05:02:01 +00:00
Jeremy Stretch
03d413565f Fix linter error 2024-11-07 14:10:15 -05:00
Jeremy Stretch
a183048891 Closes #17951: Extend Ruff ruleset 2024-11-07 11:52:02 -05:00
Arthur Hanson
812ce8471a
10711 Add Scope to WirelessLAN (#17877)
* 7699 Add Scope to Cluster

* 7699 Serializer

* 7699 filterset

* 7699 bulk_edit

* 7699 bulk_import

* 7699 model_form

* 7699 graphql, tables

* 7699 fixes

* 7699 fixes

* 7699 fixes

* 7699 fixes

* 7699 fix tests

* 7699 fix graphql tests for clusters reference

* 7699 fix dcim tests

* 7699 fix ipam tests

* 7699 fix tests

* 7699 use mixin for model

* 7699 change mixin name

* 7699 scope form

* 7699 scope form

* 7699 scoped form, fitlerset

* 7699 review changes

* 7699 move ScopedFilterset

* 7699 move CachedScopeMixin

* 7699 review changes

* 10711 Add Scope to WirelessLAN

* 10711 Add Scope to WirelessLAN

* 10711 Add Scope to WirelessLAN

* 10711 Add Scope to WirelessLAN

* 10711 Add Scope to WirelessLAN

* 7699 review changes

* 7699 refactor mixins

* 7699 _sitegroup -> _site_group

* 7699 update docstring

* fix model

* remove old constants, update filtersets

* 10711 fix GraphQL

* 10711 fix API

* 10711 add tests

* 10711 review changes

* 10711 add tests

* 10711 add scope to detail template

* 10711 add api test

* Extend CSV test data

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-11-07 10:28:02 -05:00
Pl0xym0r
fe0ae39903
Closes: #17871 - Add cluster on bulkedit device (#17920)
* 17871 add cluster on bulkedit device

* Make cluster assignment nullable; reorder imports

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-11-07 09:26:14 -05:00
bctiemann
f873735dd4
Closes: #15239 - Allow adding/removing tagged VLANs in bulk editing of Interfaces (#17524)
* Allow adding/removing tagged VLANs in bulk editing of Interfaces

* Move vlan/interface-specific field operations to an overrideable method

* Ensure interfaces are MODE_TAGGED before adding/removing tagged vlans

* Add docstring for generic extra_object_field_operations

* Move tagging ops into post_save_operations and use a TabbedGroup in the form
2024-11-07 09:14:33 -05:00
Jeremy Stretch
6035ad139a
Closes #16903: Update release process to use Transifex CLI client (#17916)
* Closes #16903: Update release process to use Transifex CLI client

* Add token environment variable to tx command
2024-11-07 08:57:02 -05:00
Arthur Hanson
27d15615b3
17898 upgrade to django-rq v3 (#17911)
* 17898 upgrade to django-rq v3

* Unpin base requirements

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-11-01 15:14:11 -04:00
Alexander Haase
4bba92617d
Closes #16971: Add system jobs (#17716)
* Fix check for existing jobs

If a job is to be enqueued once and no specific scheduled time is
specified, any scheduled time of existing jobs will be valid. Only if a
specific scheduled time is specified for 'enqueue_once()' can it be
evaluated.

* Allow system jobs to be registered

A new registry key allows background system jobs to be registered and
automatically scheduled when rqworker starts.

* Test scheduling of system jobs

* Fix plugins scheduled job documentation

The documentation reflected a non-production state of the JobRunner
framework left over from development. Now a more practical example
demonstrates the usage.

* Allow plugins to register system jobs

* Rename system job metadata

To clarify which meta-attributes belong to system jobs, each of them is
now prefixed with 'system_'.

* Add predefined job interval choices

* Remove 'system_enabled' JobRunner attribute

Previously, the 'system_enabled' attribute was used to control whether a
job should run or not. However, this can also be accomplished by
evaluating the job's interval.

* Fix test

* Use a decorator to register system jobs

* Specify interval when registering system job

* Update documentation

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-11-01 14:56:08 -04:00
Jeremy Stretch
81f00fd03a Fixes #17895: Ensure GraphiQL UI resources are served locally 2024-11-01 14:51:41 -04:00
Arthur Hanson
6dc75d8db1
7699 Add Scope to Cluster (#17848)
* 7699 Add Scope to Cluster

* 7699 Serializer

* 7699 filterset

* 7699 bulk_edit

* 7699 bulk_import

* 7699 model_form

* 7699 graphql, tables

* 7699 fixes

* 7699 fixes

* 7699 fixes

* 7699 fixes

* 7699 fix tests

* 7699 fix graphql tests for clusters reference

* 7699 fix dcim tests

* 7699 fix ipam tests

* 7699 fix tests

* 7699 use mixin for model

* 7699 change mixin name

* 7699 scope form

* 7699 scope form

* 7699 scoped form, fitlerset

* 7699 review changes

* 7699 move ScopedFilterset

* 7699 move CachedScopeMixin

* 7699 review changes

* 7699 review changes

* 7699 refactor mixins

* 7699 _sitegroup -> _site_group

* 7699 update docstring

* Misc cleanup

* Update migrations

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-11-01 14:18:23 -04:00
Jeremy Stretch
8767fd8186
Closes #13428: Q-in-Q VLANs (#17822)
* Initial work on #13428 (QinQ)

* Misc cleanup; add tests for Q-in-Q fields

* Address PR feedback
2024-10-31 14:17:06 -04:00
Jeremy Stretch
58bc388457
Merge pull request #17909 from netbox-community/develop
Release v4.1.6
2024-10-31 13:50:45 -04:00
Jeremy Stretch
74315080a3 Release v4.1.6 2024-10-31 13:31:11 -04:00
Arthur Hanson
a8eb455f3e
9604 Add Termination to CircuitTermination (#17821)
* 9604 add scope type to CircuitTermination

* 9604 add scope type to CircuitTermination

* 9604 add scope type to CircuitTermination

* 9604 model_forms

* 9604 form filtersets

* 9604 form bulk_import

* 9604 form bulk_edit

* 9604 serializers

* 9604 graphql

* 9604 tests and detail template

* 9604 fix migration merge

* 9604 fix tests

* 9604 fix tests

* 9604 fix table

* 9604 updates

* fix tests

* fix tests

* fix tests

* fix tests

* fix tests

* fix tests

* fix tests

* 9604 remove provider_network

* 9604 fix tests

* 9604 fix tests

* 9604 fix forms

* 9604 review changes

* 9604 scope->termination

* 9604 fix _circuit_terminations

* 9604 fix _circuit_terminations

* 9604 sitegroup -> site_group

* 9604 update docs

* 9604 fix form termination side reference

* Misc cleanup

* Fix terminations in circuits table

* Fix missing imports

* Clean up termination attrs display

* Add termination & type to CircuitTerminationTable

* Update cable tracing logic

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-10-31 09:55:08 -04:00
Jeremy Stretch
7580aa0781 Add professional support link 2024-10-31 09:24:38 -04:00
github-actions
4ca2b21a70 Update source translation strings 2024-10-31 05:02:35 +00:00
bctiemann
f74a9a1c76
Fixes: #7336 - VLAN Translation (#17745)
* VLANTranslationPolicy and VLANTranslationRule models and all associated UI classes

* Change VLANTranslationPolicy to a PrimaryModel and make name unique

* Add serializer classes to InterfaceSerializer

* Remake migrations

* Add GraphQL typing

* Skip tagged models in test

* Missing migration

* Remove get_absolute_url methods

* Remove package-lock.json

* Rebuild migration and add constraints and field options

* Rebuild migrations

* Use DynamicModelChoiceField for policy field

* Make vlan_translation_policy fields on filtersets more consistent with existing __name convention

* Add vlan_translation_table to VMInterface detail page

* Add vlan_translation_policy to VMInterfaceSerializer

* Move vlan_translation_policy fields to model and filterset mixins

* Protect in-use policies against deletion

* Add vlan_translation_policy to fields in VMInterfaceSerializer

* Cleanup indentation

* Remove unnecessary ordering column

* Rebuild migrations

* Search methods and registration

* Ensure 'id' column is present by default

* Add graphql types/filters/schema for VLANTranslationRule

* Filterset tests

* View tests

* API and viewset tests (incomplete)

* Add tags to VLANTranslationRuleForm

* Complete viewset tests for VLANTranslationRule

* Make VLANTranslationRule.policy nullable (but still required)

* Revert "Make VLANTranslationRule.policy nullable (but still required)"

This reverts commit 4c1bb437ef.

* Revert nullability

* Explicitly prefetch policy in graphql

* Documentation of new and affected models

* Add note about select_related in graphql

* Rework policy/rule documentation

* Move vlan_translation_policy into 802.1Q Switching fieldset

* Remove redundant InterfaceVLANTranslationTable

* Conditionally include vlan_translation_table in interface.html and vminterface.html

* Add description field to VLANTranslationRule

* Define vlan_translation_table conditionally

* Add policy (name) filter to VLANTranslationRuleFilterSet

* Revert changes to adding-models.md (moved to another PR)

* Dynamic table for linked rules in vlantranslationpolicy.html

* Misc cleanup

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-10-30 17:09:46 -04:00
Jeremy Stretch
19c5c32965 Merge branch 'develop' into feature 2024-10-30 13:10:47 -04:00
Jeremy Stretch
1e5f79a8ed Fixes #17884: Fix translation support for certain tab headings 2024-10-30 08:48:37 -04:00
Jeremy Stretch
f00a93c066 Fixes #17700: Fix warning when no scripts are found within a script module 2024-10-30 08:47:46 -04:00
Arthur Hanson
5f94dff815 17885 fix script running by providing script name to job 2024-10-29 16:47:15 -04:00
Brian Tiemann
572aad0e20 Update adding-models.md to reflect changes to get_absolute_url 2024-10-29 09:15:24 -04:00
github-actions
576498955f Update source translation strings 2024-10-29 05:02:05 +00:00
Arthur Hanson
99904c1518 Merge branch 'develop' into feature 2024-10-28 14:29:48 -07:00
Jeremy Stretch
58d9057ccd
Merge pull request #17876 from netbox-community/develop
Release v4.1.5
2024-10-28 17:20:29 -04:00
Jeremy Stretch
813347121e Release v4.1.5 2024-10-28 16:59:44 -04:00
transifex-integration[bot]
c383086aac
Updates for project NetBox (#17875)
* Translate django.po in cs

100% translated source file: 'django.po'
on 'cs'.

* Translate django.po in de

100% translated source file: 'django.po'
on 'de'.

* Translate django.po in es

100% translated source file: 'django.po'
on 'es'.

* Translate django.po in it

100% translated source file: 'django.po'
on 'it'.

* Translate django.po in tr

100% translated source file: 'django.po'
on 'tr'.

* Translate django.po in fr

100% translated source file: 'django.po'
on 'fr'.

* Translate django.po in ja

100% translated source file: 'django.po'
on 'ja'.

* Translate django.po in pt

100% translated source file: 'django.po'
on 'pt'.

* Translate django.po in da

100% translated source file: 'django.po'
on 'da'.

* Translate django.po in nl

100% translated source file: 'django.po'
on 'nl'.

* Translate django.po in zh

100% translated source file: 'django.po'
on 'zh'.

* Translate django.po in ru

100% translated source file: 'django.po'
on 'ru'.

* Translate django.po in uk

100% translated source file: 'django.po'
on 'uk'.

* Translate django.po in pl

100% translated source file: 'django.po'
on 'pl'.

---------

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
2024-10-28 16:50:34 -04:00
Jeremy Stretch
dba6e532c4 Pin django-rq to <3.0 2024-10-28 16:18:11 -04:00
Jeremy Stretch
f0eb8b9c64 Pin rq to LESS THAN v2.0 2024-10-28 16:13:34 -04:00
Jeremy Stretch
f56843333d Pin rq to <2.0 2024-10-28 16:07:50 -04:00
Jeremy Stretch
8279eaff5b Update source translation strings 2024-10-28 15:22:19 -04:00
bctiemann
ca210168df
Fixes: #17358 - Ensure correct comparison of overlapping IPRanges (#17391)
* Add new INET lookups for net_host_lt/gt/lte/gte comparisons irrespective of subnet inclusion

* Refactor Lookup subclasses to be more DRY

* Move comparison_sql to class attribute

* Add HostAsInet(Transform) to perform cast

* Remove unnecessary Lookup comparison classes

* Chain Host and Inet instead of making a new transform
2024-10-28 15:07:59 -04:00
Arthur Hanson
476194f0aa
17460 make ModuleType / DeviceType bulk buttons consistent (#17463)
* 17460 make ModuleType / DeviceType bulk buttons consistent

* 17460 refactor moduletype/devicetype to use standardized object_children

* 17460 refactor moduletype/devicetype to use standardized object_children

* 17460 refactor moduletype/devicetype to use standardized object_children
2024-10-28 15:04:45 -04:00
Alexander Haase
69e1394fef Fix job field validation
Previously, fields in the Job model were not validated when the job was
created. Now 'full_clean()' is called before saving the job to ensure
valid data.
2024-10-28 13:40:20 -04:00
Jeremy Stretch
ac12eae0b7 Fix issue templates 2024-10-24 16:41:14 -04:00
xee8ai
ce67d2c13b Fix ambiguous shebang in netbox/manage.py. 2024-10-24 09:04:49 -04:00
Jeremy Stretch
97eb5bda50 Closes #17832: Don't validate terminations on Cable instance when importing from serialzied data 2024-10-24 08:28:30 -04:00
Jeremy Stretch
6251296776 Remove subjective priority reasons 2024-10-24 08:27:01 -04:00
Jeremy Stretch
ef1fdf0a01 Closes #17761: Store empty CharField choices as null 2024-10-21 13:12:05 -04:00
Jeremy Stretch
5940f5fa61 Changelog for #17374, #17635, #17774, #17802, #17789 2024-10-21 10:35:59 -04:00
github-actions
bb06b733c4 Update source translation strings 2024-10-19 05:02:04 +00:00
Jeremy Stretch
75270c1aef
Closes #6414: Enable assigning prefixes to various object types (#17692)
* Replace site FK on Prefix with scope GFK

* Add denormalized relations

* Update prefix filters

* Add generic relations for Prefix

* Update GraphQL type for Prefix model

* Fix tests; misc cleanup

* Remove prefix_count from SiteSerializer

* Remove site field from PrefixBulkEditForm

* Restore scope filters for prefixes

* Fix scope population on PrefixForm init

* Show scope type

* Assign scope during bulk import of prefixes

* Correct handling of GenericForeignKey in PrefixForm

* Add prefix counts to all scoped objects

* Fix migration; linter fix

* Add limit_choices_to on scope_type

* Clean up cache_related_objects()

* Enable bulk editing prefix scope
2024-10-18 15:45:22 -04:00
Ali Al-Ebrahim
1c4a1e075d Update README.md to point to NetBox logo URL
The NetBox logo is referenced at https://github.com/netbox-community/netbox/blob/develop/docs/netbox_logo.svg but that no longer exists as the logo has been changed to https://github.com/netbox-community/netbox/blob/develop/docs/netbox_logo_dark.svg (or _light.svg -- should add handling for that but seems like overkill)

Updated the README to reflect this to properly render the logo.
2024-10-18 14:54:07 -04:00
Jeremy Stretch
c78da79ce6 Merge branch 'develop' into feature 2024-10-18 13:18:11 -04:00
Jeremy Stretch
538f3255a7 Closes #17789: Use a single scope field for VLANGroup bulk edit 2024-10-18 13:16:24 -04:00
Arthur Hanson
b9c6def8ab
15093 Allow plugins to register events pipeline (#17717)
* 15093 add events_pipeline registration to plugins

* 15093 use list

* 15093 add documentation

* Update docs/configuration/index.md

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>

* Update docs/configuration/miscellaneous.md

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>

* 15093 review changes

* 15093 review changes

* Formatting & readability

* 15093 review changes

* 15093 add test

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-10-18 12:47:16 -04:00
Arthur Hanson
a2cd4d0983
17635 fix script AbortTransaction (#17764)
* 17635 fix script AbortTransaction

* 17635 review changes
2024-10-18 10:55:17 -04:00
Arthur Hanson
e13bc0694d
17374 correct background color in dark mode for active list item (#17792)
Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-10-18 10:48:15 -04:00
bctiemann
d8c5147e02
Fixes: #17732 - Add a background-color to img elements in docs to ensure readability in dark mode (#17790)
* Add a background-color to img elements in docs to ensure readability in dark mode

* Limit style changes to those within CMS content blocks; update colors of main netbox_logo.svg

* Add a white stroke to the main logo

* Add light & dark mode versions of the NetBox logo

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-10-18 10:47:05 -04:00
Alexander Haase
ac9f561372 Fix social auth for Entra ID
Previously Azure AD was renamed to Entra ID. However, as django social
auth didn't change its API, just the display names must be changed but
not the API names.
2024-10-18 10:45:34 -04:00
atownson
5ddbacaa1f
Fixes #17802 - Added opaque background to Rename buttons (#17805)
* Added btn-float class to the Rename button

* Added btn-float class to the Rename button
2024-10-18 09:49:17 -04:00
Ian Bishop
e6f41f73f7
Add instructions for authenticating using Google oauth2 (#17527)
* Add instructions for authenticating using Google oauth2

Signed-off-by: Ian Bishop <151477169+ianb-mp@users.noreply.github.com>

* Add navigation link

* Misc cleanup

---------

Signed-off-by: Ian Bishop <151477169+ianb-mp@users.noreply.github.com>
Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-10-18 09:36:29 -04:00
Jeremy Stretch
a8ec06687a Reomove obsolete nested serializers 2024-10-18 08:16:30 -04:00
Jeremy Stretch
6aeb553391 Closes #17029: Deprecate PluginTemplateExtension.model 2024-10-18 08:15:31 -04:00
github-actions
110b2b3d97 Update source translation strings 2024-10-18 05:02:11 +00:00
Jeremy Stretch
6a316df787 Closes #17789: Use a single scope field for VLANGroup bulk edit 2024-10-17 15:39:42 -04:00
github-actions
9f7743e5da Update source translation strings 2024-10-17 05:03:07 +00:00
Jeremy Stretch
33bc1320c4 Changelog for #177109, #17740, #17749, #17754, #17759 2024-10-16 16:57:10 -04:00
Arthur Hanson
27a39339df
17464 fix margins for custom-field markdown description (#17775)
* 17464 fix margins for custom-field markdown description

* 17464 fix margins for custom-field markdown description

* 17464 review changes

* 17464 update comments
2024-10-16 16:53:21 -04:00
Arthur Hanson
5b8ef2eb44 17778 update node.js 2024-10-16 16:37:55 -04:00
Brian Tiemann
81108e405f Add webp to the list of acceptable extensions for handling filenames in image_upload 2024-10-16 16:30:21 -04:00
Arthur Hanson
82de559317
17754 fix per-page on version history (#17766)
* 17754 fix per-page on version history

* 17754 remove htmx table

* Use non-HTMX template for static tables

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-10-16 14:15:36 -04:00
corubba
532dbabbab Fixes #17749: Add missing graphql fields 2024-10-16 13:40:38 -04:00
Artem Kotik
e8e95f5e97 Add job timeout handling in JobRunner for periodic jobs 2024-10-16 13:11:05 -04:00
Arthur Hanson
aa3f4cb5f5 17710 remove cached fields from CableTermination GraphQL 2024-10-16 13:05:41 -04:00
Arthur Hanson
35307d213f 17468 add warning to documentation about overriding custom script properties 2024-10-16 12:57:26 -04:00
Jeremy Stretch
e7bd0e53d7 Closes #17776: Add support for different HTTP methods to HTMXSelect 2024-10-16 12:56:46 -04:00
Jeremy Stretch
e370cadcef Merge branch 'develop' into feature 2024-10-16 08:13:43 -04:00
github-actions
dbc52dc6c7 Update source translation strings 2024-10-16 05:02:10 +00:00
Jeremy Stretch
4deb6e5968
Merge pull request #17763 from netbox-community/develop
Release v4.1.4
2024-10-15 13:59:27 -04:00
Jeremy Stretch
d2cbdfe7d7 Release v4.1.4 2024-10-15 13:42:25 -04:00
Jeremy Stretch
5c5a53bf3f subscriptions_enabled was removed in strawberry-graphql v0.245.0 2024-10-15 13:38:51 -04:00
transifex-integration[bot]
75225c6c75
Updates for project NetBox (#17762)
* Translate django.po in cs

100% translated source file: 'django.po'
on 'cs'.

* Translate django.po in fr

100% translated source file: 'django.po'
on 'fr'.

* Translate django.po in uk

100% translated source file: 'django.po'
on 'uk'.

* Translate django.po in it

100% translated source file: 'django.po'
on 'it'.

* Translate django.po in de

100% translated source file: 'django.po'
on 'de'.

* Translate django.po in zh

100% translated source file: 'django.po'
on 'zh'.

* Translate django.po in da

100% translated source file: 'django.po'
on 'da'.

* Translate django.po in ja

100% translated source file: 'django.po'
on 'ja'.

* Translate django.po in es

100% translated source file: 'django.po'
on 'es'.

* Translate django.po in nl

100% translated source file: 'django.po'
on 'nl'.

* Translate django.po in ru

100% translated source file: 'django.po'
on 'ru'.

* Translate django.po in pl

100% translated source file: 'django.po'
on 'pl'.

* Translate django.po in tr

100% translated source file: 'django.po'
on 'tr'.

* Translate django.po in pt

100% translated source file: 'django.po'
on 'pt'.

---------

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
2024-10-15 13:30:35 -04:00
Jeremy Stretch
aab96565f2
Merge pull request #17523 from atownson/issue_16009
Closes #16009 - Added styling to form templates to enable floating button groups
2024-10-15 13:16:02 -04:00
Jeremy Stretch
ba4b5fed0b Merge branch 'develop' into issue_16009 2024-10-15 12:55:48 -04:00
Erik Hetland
111a1ad888 Fixes #17400: Handle cablepaths directly via multiple single-position rear ports 2024-10-15 12:28:46 -04:00
github-actions
55fad2f533 Update source translation strings 2024-10-12 05:02:27 +00:00
Jeremy Stretch
dfce55ceff Changelog for #17614, #17644, #17713 2024-10-11 16:16:07 -04:00
Arthur Hanson
fcc498641f
17644 fix login icon size (#17730)
* 17644 fix login icon size

* 17644 fix login icon size

* 17644 review changes
2024-10-11 16:06:31 -04:00
Arthur Hanson
9a655d80e1
17614 Disallow removal of virtual chassis from device if set as master (#17731)
* 17614 Disallow removal of virtual chassis from device if set as master

* 17614 review changes

* 17614 review changes
2024-10-11 16:04:42 -04:00
Jeremy Stretch
a964645c0a Closes #16248: Replace git commit hook script with pre-commit 2024-10-11 15:55:02 -04:00
Jeremy Stretch
727de0fb59 Remove unused imports 2024-10-11 12:27:39 -04:00
Jeremy Stretch
b99c356d1d Fix migrations conflict 2024-10-11 11:36:56 -04:00
Jeremy Stretch
256b5dc676 Merge branch 'develop' into feature 2024-10-11 11:29:36 -04:00
Jeremy Stretch
7ac6dff96d
Closes #17733: Replace pycodestyle with ruff (#17734)
* Resolve F541 errors

* Resolve F841 errors

* Resolve F811 errors

* Resolve F901 errors

* Resolve E714 errors

* Ignore F821 errors for GraphQL mixins

* Replace pycodestyle with ruff

* Move ignores to ruff.toml
2024-10-11 07:43:46 -04:00
github-actions
1e6f222475 Update source translation strings 2024-10-11 05:02:14 +00:00
Arthur Hanson
4e763462e6
17713 fix underscore in datasource.sync (#17729) 2024-10-10 16:08:48 -04:00
Jeremy Stretch
e59f776e02
Closes #17725: Clean up import statements (#17728)
* #17725: Resolve all F401 errors

* Tweak noqa designation
2024-10-10 14:52:47 -04:00
Arthur Hanson
65687851fe
16547 Add distance to Circuit (#17629)
* 16547 Add distance to Circuit

* 16547 fix test cases

* 16547 fix test cases

* 16547 add distance to API, forms, tables

* 16547 fixes

* 16547 fixes

* 16547 review changes

* 16547 review changes

* Clean up DistanceColumn

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-10-10 14:37:33 -04:00
Jeremy Stretch
bc597c3c5d Closes #17472: Deprecate the staged changes API 2024-10-10 14:32:39 -04:00
Arthur Hanson
ed1327eeb7
16546 define get_absolute_url method in NetBoxModel (#17693)
* 16546 define get_absolute_url method in NetBoxModel

* 16546 define get_absolute_url method in NetBoxModel

* 16546 define get_absolute_url method in NetBoxModel

* 16546 move get_absolute_url to NetBoxFeatureSet

* 16546 fix CircuitTermination

* Fix linebreaks

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-10-10 09:59:19 -04:00
Antoine Keranflec'h
5b2241aaaf fix(17542) add contact to tunnels 2024-10-10 15:38:48 +02:00
Arthur Hanson
3f469b0b0a
17476 Upgrade to Django 5.1 (#17620)
* 17476 Upgrade to Django 5.1

* 16136 fix migrations

* 17476 update remove GFK from fields

* 17476 fix

* 17476 update django to bugfix release

* fix comma
2024-10-10 09:08:58 -04:00
github-actions
e3c3ca191c Update source translation strings 2024-10-10 05:02:05 +00:00
Jeremy Stretch
8e636c5427 Changelog for #17216, #17562, #17636 2024-10-09 16:07:13 -04:00
Jeremy Stretch
f851bd80b9 Add triage priority to issue templates 2024-10-09 15:59:40 -04:00
gellis713
ec89a9b106
Fix parsing of extra_choices (#17691)
* Align strawberry resolver with expected return type

* Align test data with expected representation of extra_choices in CustomFieldChoiceSet model

---------

Co-authored-by: Griffin Ellis <griffin.ellis@pico.net>
2024-10-09 10:30:40 -04:00
Craig Askings
2172ddde61
Add EVPN-VPWS to L2VPNTypeChoices (#17694)
* Add EVPN-VPWS to the availbable L2VPN Connection Types

* Updated documentation to reference the new L2VPN type.
2024-10-09 10:28:53 -04:00
Daniel Sheppard
23e6534060 Fixes: #17636 - Correct typo in Power Outlet Template form for Power Port field 2024-10-09 10:18:49 -04:00
github-actions
ccb2480e98 Update source translation strings 2024-10-08 05:02:15 +00:00
Jeremy Stretch
ebd6c59934 Changelog for #17079, #17566, #17648, #17655 2024-10-07 10:53:27 -04:00
Daniel Sheppard
2fd23f35c8
Fixes: #17648 - Fix exception thrown in Job.delete() when no object_type specified (#17657)
* Fixes: #17648 - Fix exception thrown in `Job.delete()` when no object_type specified

* Remove unrelated fix

* Change back elif to if

* Remove unused imports

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-10-07 08:59:48 -04:00
Thor Selmer Dreier-Hansen
364826d2d8
limits vlans on interface tables (#17662)
* limits vlans on interface tables

* limits vlans on interface tables

* limits vlans on interface tables

* limits vlans on interface tables
2024-10-07 08:45:53 -04:00
Daniel Sheppard
4b6e8a9e75
Fixes: #17566 - Fix issue Job.get_absolute_url() to prevent exception being thrown if no object_type is set (#17661)
* Fixes: #17566 - Fix issue `Job.get_absolute_url()` to prevent exception being thrown if no object_type is set

* Add back whitespace after statements

* Remove whitespace.  Change to if statement
2024-10-07 08:35:47 -04:00
Costas Drongos
66d792e0d8 fixes: 17079 add more device airflow choices 2024-10-07 08:32:02 -04:00
Jeremy Stretch
74727786c1 Update changelog 2024-10-07 08:03:14 -04:00
github-actions
8e802abf0d Update source translation strings 2024-10-04 05:02:12 +00:00
Jeremy Stretch
fec0badd5a
Closes #17669: Enable filtering VLANs by assigned interface (#17674)
* Closes #17669: Enable filtering VLANs by assigned interface

* Add tests
2024-10-03 13:56:26 -04:00
bctiemann
ce04ec20e8
Fixes: #17663 - Only remove extraneous attributes from extra if changing to a BooleanFilter (#17670)
* Only remove extraneous attributes from extra if changing to a BooleanField

* Add tests for MultipleChoiceField icontains and negation

* Use enum in test consistently

* Reorganize tests

* Add __empty test to base filter lookup tests

* Fix test name

* Change var name for clarity
2024-10-03 13:50:07 -04:00
Arthur Hanson
dda7837069 17671 fix RackType search 2024-10-03 13:30:03 -04:00
Alexander Haase
bfcae8088d Rename Microsoft Azure AD to Entra ID
Occurrences of the old term have been replaced by the new term. However,
the documentation still needs some work to reflect the new Entra ID
screenshots and terminology.
2024-10-03 13:25:48 -04:00
Jeremy Stretch
f11dc00fae
Change attr_type from list to str for MultipleChoiceFilter (#17638) 2024-10-03 13:24:00 -04:00
Daniel Sheppard
648aeaaf14 Closes: #11671 - Add position display to cable trace 2024-10-03 13:20:44 -04:00
Arthur Hanson
1969f0dc71 fix migrations 2024-10-02 12:52:27 -07:00
Jeremy Stretch
6ea0c0c3e9
Merge pull request #17658 from netbox-community/develop
Release v4.1.3
2024-10-02 10:10:06 -04:00
Jeremy Stretch
6a6154f02f Release v4.1.3 2024-10-02 14:41:09 +01:00
Jeremy Stretch
5b2f2e1da6 Remove old logos 2024-10-02 14:16:39 +01:00
Arthur Hanson
2c68aca344
17195 Add color to PowerOutlet (#17623)
* 17195 Add color to PowerOutlet

* 17195 Add color to PowerOutlet

* Reorder serializer fields

* Misc cleanup

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-10-02 08:51:41 -04:00
github-actions
23f94839ad Update source translation strings 2024-10-02 05:01:57 +00:00
Arthur Hanson
92d8aa583a
Add support for socks connection to Git backend (#17640)
* Add support for socks connection to Git backend

* cleanup socks detection

* add documentation for installing python_socks

* dont need lower()

* cleanup

* refactor Socks to utilities

* fix imports

* fix missing comma

* Update docs/features/synchronized-data.md

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>

* review feedback

* Update docs/features/synchronized-data.md

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>

* review changes

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-10-01 12:11:44 -04:00
github-actions
d9028f9202 Update source translation strings 2024-10-01 05:02:14 +00:00
Arthur Hanson
8cd0a3215c
16783 Add status field to InventoryItem (#17627)
* 16783 Add status field to InventoryItem

* 16783 fix tests

* 16783 fix tests

* 16783 review changes
2024-09-30 18:26:14 -04:00
Jeremy Stretch
976f9310f9 Changelog for #17558 2024-09-30 14:59:39 -04:00
Arthur Hanson
a9fee5cd32
17558 raise validation error if removing used choice from ChoiceSet (#17591)
* 17558 raise validation error if removing choice from choiceset that is currently used

* 17558 raise validation error if removing choice from choiceset that is currently used

* 17558 raise validation error if removing choice from choiceset that is currently used

* 17558 add tests

* 17558 add tests

* Tightened up choice evaluation logic a bit; cleaned up test

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-09-30 13:17:01 -04:00
DM3740
5013a6c692
Fixes: #17612 : Update ASN types in asn.md (#17625)
* Update asn.md

There are no 64-bit AS Numbers - 16- and 32-bit only :
https://www.iana.org/assignments/as-numbers/as-numbers.xhtml

* Update docs/models/ipam/asn.md

Co-authored-by: bluikko <14869000+bluikko@users.noreply.github.com>

---------

Co-authored-by: bluikko <14869000+bluikko@users.noreply.github.com>
2024-09-27 16:20:49 -04:00
Arthur Hanson
c60a0f4f56
16136 remove Django Admin (#17619)
* 16136 remove Django Admin

* 16136 fix plugin test

* 16136 fix migrations

* Revert "16136 fix migrations"

This reverts commit 80296fa1ec.

* Remove obsolete admin module from dummy plugin

* Remove obsolete admin site configuration

* Remove unused import statement

* Remove obsolete admin module

* Misc cleanup

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-09-27 08:33:02 -04:00
github-actions
8624734610 Update source translation strings 2024-09-27 05:01:59 +00:00
Jeremy Stretch
ead6e637f4
Merge pull request #17626 from netbox-community/develop
Release v4.1.2
2024-09-26 16:31:22 -04:00
Jeremy Stretch
b4e181c015 Release v4.1.2 2024-09-26 16:13:57 -04:00
transifex-integration[bot]
2a8b11de8e
Updates for project NetBox (#17624)
* Translate django.po in fr

100% translated source file: 'django.po'
on 'fr'.

* Translate django.po in it

100% translated source file: 'django.po'
on 'it'.

* Translate django.po in ru

100% translated source file: 'django.po'
on 'ru'.

* Translate django.po in de

100% translated source file: 'django.po'
on 'de'.

* Translate django.po in uk

100% translated source file: 'django.po'
on 'uk'.

* Translate django.po in nl

100% translated source file: 'django.po'
on 'nl'.

* Translate django.po in ja

100% translated source file: 'django.po'
on 'ja'.

* Translate django.po in pl

100% translated source file: 'django.po'
on 'pl'.

* Translate django.po in tr

100% translated source file: 'django.po'
on 'tr'.

* Translate django.po in cs

100% translated source file: 'django.po'
on 'cs'.

* Translate django.po in zh

100% translated source file: 'django.po'
on 'zh'.

* Translate django.po in da

100% translated source file: 'django.po'
on 'da'.

* Translate django.po in pt

100% translated source file: 'django.po'
on 'pt'.

* Translate django.po in es

100% translated source file: 'django.po'
on 'es'.

---------

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
2024-09-26 16:08:01 -04:00
Costas Drogos
dee8e6f733 Fixes: #17611: Fix a ValidationError message 2024-09-26 16:04:17 -04:00
bctiemann
e93719e4f9
Fixes: #17360 - Ensure model is defined when rendering bulk_edit_button (#17535)
* Ensure model is defined when rendering bulk_edit_button

* Move model check to inner conditional

* Set model in context

* Return child_model instead of model for use in bulk_edit_button
2024-09-26 15:36:42 -04:00
bctiemann
52a0b454c0
Fixes: #17497 - Handle invalid accessor fields in bulk import forms (#17594)
* Add handling for FieldError to CSVModelChoiceField.to_python to handle invalid accessor field

* manufacturer & default_platform should be CSVModelChoiceFields

* Fix string translation

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-09-26 15:31:07 -04:00
Arthur Hanson
0ec632e548
17419 fix MPTT issue with migrations for nested module bays (#17553)
* 17419 rebuild module bay tree on upgrade

* 17419 rebuild module bay tree on upgrade

* 17419 use get_model
2024-09-26 15:24:32 -04:00
Brian Tiemann
cc6f21ded2 Change manufacturer to a CSVModelChoiceField in DeviceTypeImportForm 2024-09-26 15:17:28 -04:00
Jeremy Stretch
b4dd71d578 Fixes #17511: Restore consistent font support for non-Latin characters 2024-09-26 14:59:10 -04:00
Arthur Hanson
9bccc11c28 17604 fix cluster disk space display 2024-09-26 14:58:00 -04:00
Alexander Haase
5485b04bcd Add interface type SFP (100 Base-FX) 2024-09-26 14:55:08 -04:00
Alexander Haase
68bd37a08f Add return URL to available IPs table link
As with other buttons to create objects, the 'x IPs available' button
in tables now returns to this URL after the IP address has been created.
2024-09-26 14:51:11 -04:00
Jeremy Stretch
85396866bc Fixes #17601: Record change to terminating object when disconnecting a cable 2024-09-25 10:20:31 -04:00
github-actions
50df0a1073 Update source translation strings 2024-09-25 05:02:13 +00:00
Jeremy Stretch
01db481bc3 Update changelog 2024-09-24 17:14:02 -04:00
bctiemann
cfb5696d29
Fixes: #17126 - Respect the weight unit of the DeviceType when displaying the Device detail (#17579)
* Respect the weight unit of the DeviceType when displaying the Device details

* Reuse the same weight formatting construct as in rack.html, and add placeholder in rack if empty
2024-09-24 16:53:39 -04:00
Arthur Hanson
8420af8562
17569 Add help text to VLAN Group that is not saved on the interface (#17578)
* 17569 Add help text to VLAN Group that is not saved on the interface

* 17569 review changes
2024-09-24 16:49:41 -04:00
iamk3
b7df06ae7f create 802.15.4 interface type 2024-09-24 10:18:19 -04:00
Arthur Hanson
88abb6902d 17537 add name field to ASN Range Search 2024-09-24 10:05:04 -04:00
bctiemann
116a423d8f
Closes: #16837 - Fix type__empty filter in character-based filters (#17574)
* Fix type__empty filter in character-based filters

* Add tests
2024-09-24 10:02:49 -04:00
Arthur Hanson
9c9c4fbd6e
17501 fix showing last run of script execution in list view (#17581)
* 17501 fix showing last run of script job execution in list view

* 17501 fix showing last run of script job execution in list view
2024-09-24 09:45:38 -04:00
Arthur Hanson
896b5b9b74 17555 fix interface filter on device for hide-disconnected 2024-09-24 09:31:52 -04:00
Jeremy Stretch
dd0774d8d4 Update changelog 2024-09-24 09:23:14 -04:00
Jeremy Stretch
b46a89640f Closes #17577: Reference ModelState when determining whether an object is being created 2024-09-24 09:14:07 -04:00
atownson
3c36549ff1 Satisfy prettier check 2024-09-23 14:59:16 -05:00
atownson
6d5af67da8 Update TS styling 2024-09-23 13:42:37 -05:00
atownson
1bfb6e6f34 Added null check for the button group 2024-09-23 13:26:47 -05:00
atownson
0cf8264c0e Fix TS import 2024-09-23 13:16:05 -05:00
atownson
1e03eb4eb8 Added TypeScript to handle conditionally floating the object list forms 2024-09-23 13:06:46 -05:00
atownson
3b8a3dc66a Added style classes to represent left and right justified floating button groups 2024-09-23 13:04:44 -05:00
atownson
30e67047d3 #16009 Removed floating div background and moved filter form buttons outside of card 2024-09-20 11:02:59 -05:00
github-actions
6b219a279b Update source translation strings 2024-09-20 05:02:25 +00:00
bctiemann
2dd5c82845
Fixes: #15408 - Add primary_ip4 and primary_ip6 to bulk import form for VDC (#17509)
* Add primary_ip4 and primary_ip6 to bulk import form for VDC

* Specify IPAddress querysets with address field accessor and labels

* Filter primary_ip4/ip6 querysets to only those IPs available on the device

* Fix comment

* Make ipv6 help text more correct

* Shorten IPv6 example

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-09-19 13:51:24 -04:00
Arthur Hanson
f4d4483050 17517 fix cable creation when switching device type 2024-09-19 13:24:49 -04:00
Jeremy Stretch
7de5efda2a Merge branch 'develop' into issue_16009 2024-09-19 13:09:44 -04:00
bctiemann
8deaaae44b
Fixes: #17083 - Wrap labels in a div to reduce inadvertently clickable area to their left in forms (#17525)
* Wrap labels in a div to reduce inadvertently clickable area to their left in forms

* Set form label to be inline-block
2024-09-19 13:07:36 -04:00
Arthur Hanson
6d0a3485a1 17522 enable localization of user preference form 2024-09-19 10:11:56 -04:00
Arthur Hanson
8e6a15a25e 14201 allow searching for ASN with prefix AS 2024-09-19 10:08:54 -04:00
Arthur Hanson
44c7786cd9 17521 fix error message toast color in dark mode 2024-09-19 10:04:04 -04:00
github-actions
f7dd09da08 Update source translation strings 2024-09-18 05:02:30 +00:00
Jeremy Stretch
3000407a5f Closes #16669: Include a notice when rendering docs locally 2024-09-17 14:44:51 -04:00
atownson
8715f6fe87 #16009 Added btn-float-group style class and added to form templates for floating button groups 2024-09-17 13:36:05 -05:00
Jeremy Stretch
7167f20ca5 Increase stale PR timer from 15 to 30 days 2024-09-17 09:29:59 -04:00
Jonathan Senecal
c79c664e96 Update choices.py to add C39 Type outlets
(cherry picked from commit e92d0ec2e642b00506a64c1333e95cea8a36feae)
2024-09-17 09:28:21 -04:00
Arthur Hanson
f5d6f5d997 17406 allow deletion of plugin custom field if plugin removed 2024-09-17 09:26:33 -04:00
Arthur Hanson
48ca5d4d7e 17406 allow deletion of plugin custom field if plugin removed 2024-09-17 09:26:33 -04:00
Daniel Sheppard
893adef79c Fixes: #17492 - Change methods on NetBox*HyperlinkedIdentityField to use get_viewname 2024-09-17 09:21:18 -04:00
Jeremy Stretch
bdf182ffd6 Increase operations limit for stale action 2024-09-16 11:49:15 -04:00
Jeremy Stretch
65f81ab81d Closes #17482: Ignore Branch & StagedChange in nbshell 2024-09-16 09:10:21 -04:00
Jeremy Stretch
fa1e89d3d2 Closes #17477: Upgrade tabler to 1.0.0-beta21 2024-09-16 08:45:44 -04:00
Jeremy Stretch
0e34fba922
Merge pull request #17478 from netbox-community/develop
Release v4.1.1
2024-09-12 14:51:13 -04:00
Jeremy Stretch
15a106b663
Merge branch 'master' into develop 2024-09-12 14:35:39 -04:00
Jeremy Stretch
18935687ae Release v4.1.1 2024-09-12 14:28:56 -04:00
transifex-integration[bot]
84ea437345
Updates for project NetBox (#17474)
* Translate django.po in cs

100% translated source file: 'django.po'
on 'cs'.

* Translate django.po in nl

100% translated source file: 'django.po'
on 'nl'.

* Translate django.po in ru

100% translated source file: 'django.po'
on 'ru'.

* Translate django.po in pl

100% translated source file: 'django.po'
on 'pl'.

* Translate django.po in es

100% translated source file: 'django.po'
on 'es'.

* Translate django.po in pt

100% translated source file: 'django.po'
on 'pt'.

* Translate django.po in da

100% translated source file: 'django.po'
on 'da'.

* Translate django.po in ja

100% translated source file: 'django.po'
on 'ja'.

* Translate django.po in uk

100% translated source file: 'django.po'
on 'uk'.

* Translate django.po in de

100% translated source file: 'django.po'
on 'de'.

* Translate django.po in fr

100% translated source file: 'django.po'
on 'fr'.

* Translate django.po in it

100% translated source file: 'django.po'
on 'it'.

* Translate django.po in tr

100% translated source file: 'django.po'
on 'tr'.

* Translate django.po in zh

100% translated source file: 'django.po'
on 'zh'.

---------

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
2024-09-12 14:16:39 -04:00
Jeremy Stretch
b3e4d3c346 Remove markdown-include 2024-09-12 13:56:27 -04:00
Jeremy Stretch
5ce8b6b825 Delete obsolete static resources 2024-09-12 13:43:26 -04:00
Jeremy Stretch
5486e9238d Ignore blocked PRs 2024-09-12 13:00:42 -04:00
Jeremy Stretch
114b8a2860 Fixes #17437: Fix exception when specifying a bridge relationship on an interface template 2024-09-12 10:22:43 -04:00
Arthur Hanson
52299faecd 17333 don't prefetch jobs on script api call 2024-09-12 09:12:03 -04:00
Arthur Hanson
ee7ac6f041
17444 fix event rules jobs enqueue (#17458)
* 17444 fix event rules jobs enqueue

* 17444 fix event rules jobs enqueue

* 17444 fix event rules jobs enqueue

* 17444 cleanup

* 17444 cleanup
2024-09-12 08:42:29 -04:00
Arthur Hanson
c0d5d98df2 17457 Make NumericArrayFilter optional 2024-09-12 08:31:02 -04:00
github-actions
af5fb8f923 Update source translation strings 2024-09-12 05:02:14 +00:00
pl0xym0r
213eb610de Fixes #17362: Fix unicity of VRF returned by filter_present_in_vrf function 2024-09-11 09:43:21 -04:00
Arthur Hanson
5f32b23c35 17410 only add debug middleware if DEBUG 2024-09-11 08:53:41 -04:00
Brian Tiemann
bf7b8b2458 Fix migration dependencies for 3.7->4.1 path 2024-09-11 08:51:31 -04:00
Brian Tiemann
89604ceade Add a step to the release checklist documentation for testing migrations on all supported upgrade paths 2024-09-11 08:40:32 -04:00
github-actions
ce372ce7a6 Update source translation strings 2024-09-11 05:02:05 +00:00
Arthur Hanson
353db09656
17422 update custom field group display tag (#17423)
* 17422 update custom field group display tag

* 17422 review changes
2024-09-10 14:02:03 -04:00
Jeremy Stretch
ce38484bf3 Changelog for #16926, #17066, #17347, #17387, #17414 2024-09-10 09:31:46 -04:00
Arthur Hanson
81a1280b65
17414 allow single vlan in vlan group (#17418)
* 17414 allow single vlan in vlan group

* 17414 add test
2024-09-10 09:03:50 -04:00
amit177
93eea95735 Add NEMA L22-20 2024-09-10 08:48:38 -04:00
github-actions
0c2861e02c Update source translation strings 2024-09-10 05:02:11 +00:00
bchow
43b949779d
Closes #16926 Adds various USB cable types to front/rear ports and cable choices (#16951)
* Closes #16926 Adds various USB cable types to front/rear ports and cable choices

* Closes #16926 Changes USB cable types to reflect versions-physical differences. Updated human readable labels on USB front/rear ports to match style of usb console ports

* Closes #16926 Removes USB cable type choices in favor of single, generic 'USB' cable
2024-09-09 10:49:04 -04:00
Arthur Hanson
aca693b1c3 17066 fix put/patch for Script OpenAPI docs 2024-09-09 08:33:21 -04:00
MA Gang
7ab2ebcb75 Disable Directory Browsing for Static file path in Apache2 config 2024-09-09 08:21:05 -04:00
Peter Eckel
16f74f7b03 Fixed view permissions for ObjectChange 2024-09-05 12:58:37 -04:00
Jeremy Stretch
76ff329c6a Closes #17384: Reorder GitHub issue templates 2024-09-05 12:57:04 -04:00
Arthur Hanson
ed1b8bc88d 16349 add warning to custom script docs 2024-09-05 12:52:16 -04:00
github-actions
684cdda8f4 Update source translation strings 2024-09-05 05:02:14 +00:00
Jeremy Stretch
2a1710b82c Changelog for #17332, #17353, #17354, #17364 2024-09-04 17:05:24 -04:00
Arthur Hanson
7404caed3a
17353 make map buttons consistent (#17371)
* 17353 make map buttons consistent

* 17353 fix margin
2024-09-04 17:01:16 -04:00
Jeremy Stretch
5c33aa8bdd Fixes #17332: Restore pagination for object list dashboard widgets 2024-09-04 16:20:19 -04:00
Arthur Hanson
8cc0616019
17354 fix import with custom-field (#17368)
* 17354 fix import with custom-field

* 17354 change to use kwargs
2024-09-04 16:15:44 -04:00
github-actions
886d635524 Update source translation strings 2024-09-04 05:02:15 +00:00
Jeremy Stretch
7bc0d34196
Merge pull request #17350 from netbox-community/develop
Release v4.1.0
2024-09-03 15:09:35 -04:00
Jeremy Stretch
9cfb3bf24d Release v4.1.0 2024-09-03 14:45:28 -04:00
Jeremy Stretch
8707c44a85
Merge pull request #17349 from netbox-community/feature
Move to v4.1
2024-09-03 14:18:51 -04:00
Jeremy Stretch
16dfafa35b Update changelog 2024-09-03 13:56:29 -04:00
Jeremy Stretch
39c5f57c1e Fix broken link 2024-09-03 13:36:39 -04:00
Jeremy Stretch
7c0bdf3fb8 #17289: Document new default configuration 2024-09-03 12:17:56 -04:00
Jeremy Stretch
a777850702 Merge branch 'develop' into feature 2024-09-03 11:59:59 -04:00
Jeremy Stretch
0b120e6ad2
Merge pull request #17346 from netbox-community/develop
Release v4.0.11
2024-09-03 10:50:46 -04:00
Jeremy Stretch
e174a8af09 Release v4.0.11 2024-09-03 10:33:47 -04:00
Jeremy Stretch
77d1dc4807 Compile translations 2024-09-03 10:16:26 -04:00
dependabot[bot]
2f1798c7de Bump micromatch from 4.0.5 to 4.0.8 in /netbox/project-static
Bumps [micromatch](https://github.com/micromatch/micromatch) from 4.0.5 to 4.0.8.
- [Release notes](https://github.com/micromatch/micromatch/releases)
- [Changelog](https://github.com/micromatch/micromatch/blob/master/CHANGELOG.md)
- [Commits](https://github.com/micromatch/micromatch/compare/4.0.5...4.0.8)

---
updated-dependencies:
- dependency-name: micromatch
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-03 10:12:50 -04:00
transifex-integration[bot]
52b7f62b10
Updates for project NetBox (#17345)
* Translate django.po in es

100% translated source file: 'django.po'
on 'es'.

* Translate django.po in ru

100% translated source file: 'django.po'
on 'ru'.

* Translate django.po in ja

100% translated source file: 'django.po'
on 'ja'.

* Translate django.po in cs

100% translated source file: 'django.po'
on 'cs'.

* Translate django.po in da

100% translated source file: 'django.po'
on 'da'.

* Translate django.po in nl

100% translated source file: 'django.po'
on 'nl'.

* Translate django.po in de

100% translated source file: 'django.po'
on 'de'.

* Translate django.po in pl

100% translated source file: 'django.po'
on 'pl'.

* Translate django.po in it

100% translated source file: 'django.po'
on 'it'.

* Translate django.po in tr

100% translated source file: 'django.po'
on 'tr'.

* Translate django.po in uk

100% translated source file: 'django.po'
on 'uk'.

* Translate django.po in pt

100% translated source file: 'django.po'
on 'pt'.

* Translate django.po in fr

100% translated source file: 'django.po'
on 'fr'.

* Translate django.po in zh

100% translated source file: 'django.po'
on 'zh'.

---------

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
2024-09-03 10:11:56 -04:00
Brian Candler
7a2ff96abe
Hide exception in ObjectCountsWidget for models without a xxx_list view function (#17342)
* Hide exception in ObjectCountsWidget for models without a `xxx_list` view function

Fixes #17341

* Disable hyperlink for invalid view names

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-09-03 09:38:06 -04:00
Jeremy Stretch
814b699204 Fixes #17323: Associate job with script object when executed using runscript command 2024-09-03 09:20:18 -04:00
bctiemann
ce33e0bc0c
Fixes: #17320 - New screenshots for 4.1 UI (#17331)
* New screenshots for 4.1

* Remove footer info

* Add bookmarks to dashboard to match previous

* Reverse ordering of bookmarks

* Fix colors of cables in cable-trace.png

* New screenshots for 4.1

* Recapture screenshots with better rendering gradient

* Better sidebar on cable-trace.png
2024-09-03 09:03:41 -04:00
Jeremy Stretch
d18a853baa Fixes #17337: Fix ordering of virtual device contexts by device name 2024-09-03 08:58:13 -04:00
Arzhel Younsi
b2bbdbf1d9 runscript: use the previously defined "user"
There is already a logic set earlier in the code to define "user" if --user is passed as parameter, and default to the user with the lowest ID no none is provided.
This patch uses this "user" to run the job instead of always applying the default.
2024-09-03 08:42:37 -04:00
Jeremy Stretch
56f110c2a9
Closes #17288: Limit the number of aliases within a GraphQL API requests to 10 (#17329)
* Closes #17288: Limit the number of aliases within a GraphQL API request to 10

* Introduce GRAPHQL_MAX_ALIASES config parameter
2024-09-02 09:30:41 -04:00
Jeremy Stretch
31d5d8c395
Fixes #17301: Fix script module edit & delete button styling (#17328) 2024-09-02 08:38:16 -04:00
Arthur Hanson
00874ac9e7
17289 enforce minimum password strength (#17299)
* 17289 add password validation

* 17289 add password validation

* 17289 fix tests

* 17289 fix tests

* Update netbox/utilities/password_validation.py

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>

* Update netbox/utilities/password_validation.py

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>

* Update netbox/utilities/password_validation.py

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>

* 17289 update tests

* 17289 remove common password check

* 17289 fix user create

* 17289 revert _post_clean

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-08-30 17:23:01 -04:00
Daniel Sheppard
4fead1c85f
Fixes: #17310 - Properly restrict GraphQL related object queries (#17312)
* Fixes: #17310 - Fix GraphQL restriction of related objects

* Fix some failing tests

* Fix test
2024-08-30 14:22:58 -04:00
Jeremy Stretch
b4dd57f3c7
#8198: Rename CustomField.validation_unique to unique (#17325)
* #8198: Rename CustomField.validation_unique to unique

* Update CustomField model documentation
2024-08-30 13:44:03 -04:00
Arthur Hanson
8fff4e2a5d
12826 make RackType.form_factor required (#17327)
* 12826 make RackType.form_factor required

* 12826 fix tests
2024-08-30 13:43:07 -04:00
Jeremy Stretch
6db29880cc Update changelog 2024-08-30 13:31:41 -04:00
Arthur Hanson
829bef041d
11969 remove airflow from racktype (#17324)
* 11969 remove airflow from racktype

* 11969 remove airflow from racktype

* 11969 update docs

* 11969 fix rack edit

* Rename migration

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-08-30 13:30:51 -04:00
Jeremy Stretch
b797fcc03d Closes #17318: Include provider in nested API representation of circuits 2024-08-30 13:13:33 -04:00
Jeremy Stretch
af93b47f94 #17051: Tag ISOLATED_DEPLOYMENT as a v4.1 feature 2024-08-30 10:19:22 -04:00
Jeremy Stretch
10a74492f6 #17143: Update docs for nested serializer use 2024-08-30 10:18:29 -04:00
Jeremy Stretch
a6b1f97525 #16782: Fix help text on form field 2024-08-30 09:36:27 -04:00
Jeremy Stretch
a09c1667ff #15106: Put distance & distance_unit on same line in model form 2024-08-30 08:40:16 -04:00
github-actions
91ad3f22a3 Update source translation strings 2024-08-30 05:02:15 +00:00
Jeremy Stretch
cdf2fdee83 #14692: Correct VirtualDisk model docs 2024-08-29 16:48:48 -04:00
Arthur Hanson
2f53dc0095 17302 fix log level filtering 2024-08-29 15:58:13 -04:00
Arthur Hanson
a9a926cc72 17306 fix vlan group utilization 2024-08-29 15:56:06 -04:00
Jeremy Stretch
00d8eb40fc
#11969: Cleanup (#17308)
* Shorten choice constant names

* Add filter tests for airflow
2024-08-29 15:47:11 -04:00
Jeremy Stretch
db6246a437
#10500: Cleanup (#17305)
* Use MPTTColumn for module bays

* Fix return URLs

* Omit extraneous relationships from nested serializers

* Add note re: v4.1
2024-08-29 15:38:53 -04:00
Jeremy Stretch
9a11191ac5 #7025: Cleanup 2024-08-29 15:38:16 -04:00
Jeremy Stretch
6f7bf5baf4 Merge branch 'develop' into feature 2024-08-29 10:51:38 -04:00
Jeremy Stretch
31f167d0f9 PRVB 2024-08-29 09:51:06 -04:00
Jeremy Stretch
e93e9ac4a0
Merge pull request #17297 from netbox-community/develop
Release v4.0.10
2024-08-29 09:47:31 -04:00
Jeremy Stretch
97cd6b89fd Release v4.0.10 2024-08-29 09:25:58 -04:00
transifex-integration[bot]
3684e011e6
Updates for project NetBox (#17296)
* Translate django.po in cs

100% translated source file: 'django.po'
on 'cs'.

* Translate django.po in es

100% translated source file: 'django.po'
on 'es'.

* Translate django.po in de

100% translated source file: 'django.po'
on 'de'.

* Translate django.po in da

100% translated source file: 'django.po'
on 'da'.

* Translate django.po in fr

100% translated source file: 'django.po'
on 'fr'.

* Translate django.po in it

100% translated source file: 'django.po'
on 'it'.

* Translate django.po in uk

100% translated source file: 'django.po'
on 'uk'.

* Translate django.po in pt

100% translated source file: 'django.po'
on 'pt'.

* Translate django.po in zh

100% translated source file: 'django.po'
on 'zh'.

* Translate django.po in ja

100% translated source file: 'django.po'
on 'ja'.

* Translate django.po in nl

100% translated source file: 'django.po'
on 'nl'.

* Translate django.po in tr

100% translated source file: 'django.po'
on 'tr'.

* Translate django.po in pl

100% translated source file: 'django.po'
on 'pl'.

* Translate django.po in ru

100% translated source file: 'django.po'
on 'ru'.

---------

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
2024-08-29 09:21:52 -04:00
Jeremy Stretch
a9fd5bbf55 Fix broken intra-page links 2024-08-29 09:13:02 -04:00
Jeremy Stretch
e325a4b2e0 Update change log 2024-08-29 09:01:23 -04:00
bctiemann
a150e5d561
Fixes: #16905 - Allow filtering on Device Status in InventoryItemTable (#17260)
* Add device_status as filtering option (and configurable column) for InventoryItemTable

* Add device_status to common superclasses for Device Components, and refactor ChoiceFieldColumn to support a "color" callable allowing get_FOO_color behavior to be overridden

* Remove unnecessary 'device_status' in fields

* Add unit tests for device_status
2024-08-29 08:10:30 -04:00
Jeremy Stretch
8282a6ddfe Fixes #17279: Do not regenerate key when updating a token via REST API 2024-08-29 07:51:09 -04:00
github-actions
07b1362b5e Update source translation strings 2024-08-29 05:02:20 +00:00
Jeremy Stretch
e3e351d1f0 Fixes #17278: Rebuild the tree after bulk editing MPTT-enabled object types 2024-08-28 16:25:36 -04:00
Jeremy Stretch
50839fcb6b Fixes #16756: Fix table pagination for custom script results 2024-08-28 16:24:16 -04:00
Arthur Hanson
cac92352ca 17286 fix add member to virtual chassis 2024-08-28 12:29:04 -04:00
Daniel Sheppard
0464dacf7e
Fixes: #16292 - Properly restrict GraphQL queries for querys with pk set (#17244)
* Fixes: #16292 - Properly restrict GraphQL queries for querys with pk set

* Update netbox/netbox/settings.py

* Apply schema adaptations across all apps

* Extend GraphQL API tests

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-08-28 12:23:25 -04:00
github-actions
cf62178471 Update source translation strings 2024-08-28 05:02:04 +00:00
Jeremy Stretch
c3276b7d2e Update changelog 2024-08-27 17:09:16 -04:00
Arthur Hanson
7bae448eaf
16733 fix bulk edit/delete buttons with quick search (#17130)
* 16733 fix bulk edit/delete buttons with quick search

* 16733 fix bulk edit/delete buttons with quick search

* 16733 fix bulk edit/delete buttons with quick search

* Wrap bulk action buttons with .bulk-action-buttons for replacement via HTMX

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-08-27 16:50:05 -04:00
mcmehrtens
5ebdb7c9d2 Closes #17007: Center SSO if display name is an empty string 2024-08-27 16:41:40 -04:00
Arthur Hanson
0157ac6c9b
17186 change custom link button color from outline-dark to outline-se… (#17248)
* 17186 change custom link button color from outline-dark to outline-secondary

* 17186 change choice to default

* 17186 change choice to default

* 17186 change choice to default

* Misc cleanup

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-08-27 15:08:39 -04:00
Arthur Hanson
d23b9370f6
17219 fix custom validator display if function (#17247)
* 17219 fix custom validator display if function

* 17219 fix custom validator display if function

* 17219 use custom json encoder

* Fix system config export

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-08-27 14:19:16 -04:00
Jeremy Stretch
c2d67fa17e
Closes #17256: Fix translation support in VLAN group scope assignment form (#17270)
* Closes #17256: Fix translation support in VLAN group scope assignment form

* Disable scope field if scope type not selected; update label on type change

* Reset selected scope object when changing scope type
2024-08-27 13:58:56 -04:00
Arthur Hanson
4f225b4e56
16670 fix OpenAPI schema generation with nested serializers (#17078)
* 16670 fix OpenAPI schema generation with nested serializers

* 16670 fix comment

* Add comment; misc cleanup

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-08-27 12:57:14 -04:00
Jeremy Stretch
263664ae52 Update changelog 2024-08-27 12:08:02 -04:00
Arthur Hanson
0238aeec22
16959 Fix filter reset button (#17154)
* 16959 fix filter reset button

* 16959 fix filter reset button

* Move reset button initialization logic to initFormElements()

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-08-27 12:01:16 -04:00
Arthur Hanson
3fee28cd5e
16946 return empty queryset if filterset is not valid (#17015)
* 16946 raise error if filterset is not valid

* 16946 cleanup

* 16946 change to None qs return and add test

* Remove obsolete logic

* Clean up test case

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-08-27 10:59:14 -04:00
Jeremy Stretch
515d041560 Fixes #17230: Ensure consistent rendering for all dashboard widget colors 2024-08-27 10:14:07 -04:00
Jonathan Senecal
8bea914163 Update related_objects.html 2024-08-27 09:35:21 -04:00
Jeremy Stretch
420613daed Fixes #16385: Restore support for white, gray, and black background colors 2024-08-27 09:12:40 -04:00
github-actions
fd013d6c5c Update source translation strings 2024-08-27 05:02:05 +00:00
bctiemann
a7f83de8c4
Fixes: #16973 - Resolve $user token to User.id for use in permissions based on custom fields (#17268)
* Resolve $user token to User.id for use in permissions based on custom fields

* Cleaner type check

* Simplify User object check by updating tokens instead of resolved values
2024-08-26 16:41:58 -04:00
Jeremy Stretch
ee0af15073 Update changelog 2024-08-26 15:41:12 -04:00
Arthur Hanson
35e2cf9cec
17117 change caret to html entity to fix safari performacne issue (#17246)
* change caret to html entity to fix safari performacne issue

* change caret to html entity to fix safari performacne issue

* 17117 use material icon

* 17117 use material icon

* 17117 use material icon

* 17117 fix vertical align

* Add comments & tweak padding

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-08-26 15:36:04 -04:00
bctiemann
1d2ea90fd4
Fixes: #17108 - Update isotime and isodate filters to be timezone-aware (#17267)
* Update isotime and isodate filters to be timezone-aware for display in templates (particularly Scripts)

* Handle naive datetimes gracefully
2024-08-26 14:37:20 -04:00
bctiemann
dab27695b9
Add styling to rendered-markdown class to clamp height and add scrollbar (#17237)
* Add clamp_height to the markdown filter which limits max height to 200 (scrollable) on the container div

* Remove clamp_height option, apply scrolling style to all markdown divs inside td's
2024-08-23 09:35:01 -04:00
Jeremy Stretch
91df0c0686 Closes #17221: Extend ObjectEditView to support HTMX requests 2024-08-23 08:26:19 -04:00
github-actions
d4dd86eb04 Update source translation strings 2024-08-23 05:02:05 +00:00
Brian Tiemann
5bd4fc862d Add a Devices column with device_count hyperlink (via count_related) to SiteListView 2024-08-22 13:03:49 -04:00
Brian Tiemann
85f8364cd7 Set ImageAttachmentSerializer.image_width and image_height to read_only 2024-08-22 10:59:52 -04:00
bctiemann
8903e4649c
Fixes: #17072 - Make active links of phone and email in Contact Assignments table (#17233)
* Add linkify_email and apply with linkify_phone to ContactAssignmentTable

* Use EmailColumn instead of linkify_email
2024-08-22 10:57:53 -04:00
Brian Tiemann
38a26a7908 Add "facility" field to LocationFilterForm 2024-08-22 10:56:27 -04:00
Arthur Hanson
fb6c7d7619
17174 add version to plugin catalog (#17192)
* 17174 add version to plugin catalog

* Retain the created & updated columns for optional use

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-08-19 12:01:54 -04:00
Arthur Hanson
3412139acc
17193 update logo in Readme (#17194)
* 17193 update logo in Readme

* 17193 update logo in Readme

* 17193 remove .png

* 17194 favicon, apple
2024-08-19 11:22:40 -04:00
Jeremy Stretch
96802b4edb Remove automatic triage assignment 2024-08-19 08:31:31 -04:00
github-actions
e656e2da24 Update source translation strings 2024-08-17 05:03:01 +00:00
Arthur Hanson
c457f01b19
16640 fix JSON custom field save nul (#16713)
* 16640 fix JSON custom field save nul

* 16640 explicitly check against None

* 16640 convert JSON field from str to dict
2024-08-16 10:29:57 -04:00
Jeremy Stretch
8e70e3ad20 Update release checklist for v4.1 2024-08-15 12:59:44 -04:00
Jeremy Stretch
33e8e04281 Update change log 2024-08-15 12:36:53 -04:00
Jeremy Stretch
1504fb5ac2 Closes #17173: Update GraphQL web front end dependencies 2024-08-15 12:05:26 -04:00
Jeremy Stretch
dd3166a4ed
Fixes #17097: Record static object representation when calling NotificationGroup.notify() (#17161)
* Fixes #17097: Record static object representation when calling NotificationGroup.notify()

* Redirect to notifications list when marking as read notifications for deleted objects

* Link to object in notifications dropdown only for non-destructive events
2024-08-15 12:04:19 -04:00
Jeremy Stretch
b6071a80d9 Closes #16574: Add last_synced time to REST API serializer for data sources 2024-08-15 10:20:21 -04:00
Arthur Hanson
93a13ce311
17169 use config_name for matching in plugin catalog (#17172)
* 17169 use config_name for matching

* 17169 remove cache buster
2024-08-15 10:18:34 -04:00
Arthur Hanson
122522a625 17163 Fix services list on IPAddress view 2024-08-15 10:06:37 -04:00
Arthur Hanson
a3befd0abe 17159 fix plugin install instructions 2024-08-15 09:59:31 -04:00
Jeremy Stretch
51c3d94725 Merge branch 'develop' into feature 2024-08-15 08:46:54 -04:00
Jeremy Stretch
e3d681be54 Closes #17143: Deprecate the use of dedicated nested API serializers 2024-08-15 08:00:33 -04:00
Jeremy Stretch
234b4027b0 Fixes #17098: Prevent automatic deletion of related notifications when deleting an object 2024-08-15 07:59:16 -04:00
Jeremy Stretch
277b7039d8 Closes #16245: Update frontend developer dependencies 2024-08-15 07:56:54 -04:00
github-actions
e2dfa63df6 Update source translation strings 2024-08-15 05:02:02 +00:00
Alexander Haase
c6c0ab2828 Fix job details view 2024-08-14 12:01:43 -04:00
Jeremy Stretch
8b91fb8d2d Merge branch 'develop' into feature 2024-08-14 10:54:31 -04:00
Jeremy Stretch
370c1209f4 PRVB 2024-08-14 10:27:03 -04:00
Jeremy Stretch
09d6b9c62f
Merge pull request #17157 from netbox-community/develop
Release v4.0.9
2024-08-14 10:23:47 -04:00
Jeremy Stretch
4747cdef0b Bump version to v4.0.9 for release 2024-08-14 10:06:44 -04:00
Jeremy Stretch
f3f1aa3841 Release v4.0.9 2024-08-14 09:30:41 -04:00
transifex-integration[bot]
727cb65c50
Updates for project NetBox (#17153)
* Translate django.po in ru

100% translated source file: 'django.po'
on 'ru'.

* Translate django.po in de

100% translated source file: 'django.po'
on 'de'.

* Translate django.po in ja [Manual Sync]

98% of minimum 1% translated source file: 'django.po'
on 'ja'.

Sync of partially translated files: 
untranslated content is included with an empty translation 
or source language content depending on file format

* Translate django.po in fr [Manual Sync]

98% of minimum 1% translated source file: 'django.po'
on 'fr'.

Sync of partially translated files: 
untranslated content is included with an empty translation 
or source language content depending on file format

* Translate django.po in es [Manual Sync]

98% of minimum 1% translated source file: 'django.po'
on 'es'.

Sync of partially translated files: 
untranslated content is included with an empty translation 
or source language content depending on file format

* Translate django.po in pt [Manual Sync]

98% of minimum 1% translated source file: 'django.po'
on 'pt'.

Sync of partially translated files: 
untranslated content is included with an empty translation 
or source language content depending on file format

* Translate django.po in tr [Manual Sync]

98% of minimum 1% translated source file: 'django.po'
on 'tr'.

Sync of partially translated files: 
untranslated content is included with an empty translation 
or source language content depending on file format

* Translate django.po in it [Manual Sync]

98% of minimum 1% translated source file: 'django.po'
on 'it'.

Sync of partially translated files: 
untranslated content is included with an empty translation 
or source language content depending on file format

* Translate django.po in zh [Manual Sync]

99% of minimum 1% translated source file: 'django.po'
on 'zh'.

Sync of partially translated files: 
untranslated content is included with an empty translation 
or source language content depending on file format

* Translate django.po in pl [Manual Sync]

98% of minimum 1% translated source file: 'django.po'
on 'pl'.

Sync of partially translated files: 
untranslated content is included with an empty translation 
or source language content depending on file format

* Translate django.po in nl [Manual Sync]

98% of minimum 1% translated source file: 'django.po'
on 'nl'.

Sync of partially translated files: 
untranslated content is included with an empty translation 
or source language content depending on file format

* Translate django.po in uk [Manual Sync]

99% of minimum 1% translated source file: 'django.po'
on 'uk'.

Sync of partially translated files: 
untranslated content is included with an empty translation 
or source language content depending on file format

* Translate django.po in cs [Manual Sync]

98% of minimum 1% translated source file: 'django.po'
on 'cs'.

Sync of partially translated files: 
untranslated content is included with an empty translation 
or source language content depending on file format

* Translate django.po in da [Manual Sync]

98% of minimum 1% translated source file: 'django.po'
on 'da'.

Sync of partially translated files: 
untranslated content is included with an empty translation 
or source language content depending on file format

* Translate django.po in zh

100% translated source file: 'django.po'
on 'zh'.

* Translate django.po in cs

100% translated source file: 'django.po'
on 'cs'.

* Translate django.po in da

100% translated source file: 'django.po'
on 'da'.

* Translate django.po in nl

100% translated source file: 'django.po'
on 'nl'.

* Translate django.po in fr

100% translated source file: 'django.po'
on 'fr'.

* Translate django.po in it

100% translated source file: 'django.po'
on 'it'.

* Translate django.po in ja

100% translated source file: 'django.po'
on 'ja'.

* Translate django.po in pl

100% translated source file: 'django.po'
on 'pl'.

* Translate django.po in pt

100% translated source file: 'django.po'
on 'pt'.

* Translate django.po in es

100% translated source file: 'django.po'
on 'es'.

* Translate django.po in tr

100% translated source file: 'django.po'
on 'tr'.

* Translate django.po in uk

100% translated source file: 'django.po'
on 'uk'.

---------

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
2024-08-14 09:28:28 -04:00
Arthur Hanson
872af72b8e
16073 set default custom fields on CSV import (#17152)
* 16073 set default custom fields on CSV import

* 16073 add test case

* Remove second for loop

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-08-14 08:22:14 -04:00
Jeremy Stretch
5a9f9af2fa Fixes #16871: Sanitize device ID when bulk editing components to prevent exception 2024-08-14 07:43:10 -04:00
github-actions
09d36469dd Update source translation strings 2024-08-14 05:02:17 +00:00
Jeremy Stretch
8789aaaa39 Changelog for #16692, #17006, #17124, #17131, #17144 2024-08-13 16:12:58 -04:00
Jeremy Stretch
d5c1a5acda Fixes #17144: Avoid displaying duplicate pop-up messages 2024-08-13 15:36:15 -04:00
PieterL75
6feb8bf0e3
add 'vlan' to prefix bulk edit (#17142)
* add 'vlan' to prefix bulk edit

* Move VLAN fields to a separate field set in bulk edit form

---------

Co-authored-by: Pieter Lambrecht <pieter.lambrecht@accenture.com>
Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-08-13 09:54:07 -04:00
Jeremy Stretch
9e54cfe340 Fixes #17131: Fix exception when creating object-type custom field without selecting related object type 2024-08-13 08:14:16 -04:00
github-actions
6a663e2a3e Update source translation strings 2024-08-13 05:02:12 +00:00
Matthew Mehrtens
7c9a77b77f
17006 Add Wi-Fi 7 IEEE 802.11be (#17125)
* Add .devcontainer to .gitignore

* Closes #17006: Add Wi-Fi 7 IEEE 802.11be

* Revert out-of-scope change

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-08-12 08:03:46 -04:00
github-actions
81fe12a7d9 Update source translation strings 2024-08-11 05:02:11 +00:00
Jeremy Stretch
9c7002f691 Fixes #17124: BaseTable should follow reverse one-to-one relationships when prefetching related objects 2024-08-10 11:58:14 -04:00
Jeremy Stretch
20967bf88d Changelog for #13459, #16176, #17038, #17064 2024-08-10 11:49:34 -04:00
Arthur Hanson
34d20fccd5
17036 international messages (#17041)
* 17036 international messages

* 17036 fix typo

* 17036 fix _

* Misc cleanup & fixes

* More cleanup

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-08-10 11:47:06 -04:00
Arthur Hanson
f6c1642116 16176 Add UI for multi-termination cables 2024-08-10 10:30:56 -04:00
Arthur Hanson
b7b0ab16f5 17064 fix markdown padding for first line 2024-08-10 10:28:01 -04:00
Arthur Hanson
6ae3af2f26
13459 Fix OpenAPI type for TreeNodeMultipleChoiceFilter (#17095)
* 13459 Correct OpenAPI type for TreeNodeMultipleChoiceFilter

* 13459 Correct OpenAPI type for TreeNodeMultipleChoiceFilter
2024-08-10 10:24:02 -04:00
Jeremy Stretch
6c845bd5de
Update CONTRIBUTING.md
Add warning about intentionally submitting duplicate issues
2024-08-06 07:53:43 -04:00
Jeremy Stretch
23490d3336 Release v4.1-beta1 2024-08-05 13:34:05 -04:00
github-actions
75a0b53aeb Update source translation strings 2024-08-05 13:14:41 -04:00
Arthur Hanson
796b9e84af
Closes #10500: Introduce support for nested modules (#16983)
* 10500 add ModularComponentModel

* 10500 add ModularComponentModel

* 10500 add to forms

* 10500 add to serializer, tables

* 10500 template

* 10500 add docs

* 10500 check recursion

* 10500 fix graphql

* 10500 fix conflicting migration from merge

* 10500 token resolution

* 10500 don't return reverse

* 10500 don't return reverse / optimize

* Add ModuleTypeModuleBaysView

* Fix replication of module bays on new modules

* Clean up tables & templates

* Adjust uniqueness constraints

* Correct URL

* Clean up docs

* Fix up serializers

* 10500 add filterset tests

* 10500 add nested validation to Module

* Misc cleanup

* 10500 ModuleBay recursion Test

* 10500 ModuleBay recursion Test

* 10500 ModuleBay recursion Test

* 10500 ModuleBay recursion Test

* Enable MPTT for module bays

* Fix tests

* Fix validation of module token in component names

* Misc cleanup

* Merge migrations

* Fix table ordering

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-08-05 13:13:59 -04:00
Jeremy Stretch
57fe2071a4 #15621: Support notifications for deletion of a subscribed object 2024-08-02 11:34:56 -04:00
Arthur Hanson
ca63aed9ee
17061 add new models to docs (#17062)
* 17061 add new models to docs

* Reorder; remove CircuitGroupAssignment

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-08-02 10:00:51 -04:00
Jeremy Stretch
02dd1a3970
Feature UI (#17069)
* 16649 general contrast issues (#16759)

* fixes #16647: navigation contrast issues updated

* fixes #16651: table contrast issues new

* fixed #16649: general contrast issues

* fixes #16649: feedback changes

---------

Co-authored-by: Andrew Gormley <Andrew@MacBook-Pro-3.local>
Co-authored-by: Andrew Gormley <Andrew@MacBook-Pro-3.broadband>

* 16648 dashboard contrast issues (#16824)

* fixed #16648: dashboard contrast issues

* reinstate amendment to 16649

* fixed #16648: created gridstack override and removed inline bug fix

---------

Co-authored-by: Andrew Gormley <Andrew@MacBook-Pro-3.local>

* fixed #16853: accessibility issues

* fixed #16847: updated font (#16848)

* fixed #16847: updated font

* fixed #16847: changed font to local and added current font as fallback

* fixed #16847: removed inter and added padding to page header

---------

Co-authored-by: Andrew Gormley <Andrew@MacBook-Pro-3.local>
Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>

* 16849 document hierarchy issues (#16875)

* fixed #16849: h elements not in sequential order

* fixed #16849: Lists do not contain only li elements

* fixed #16849: fixed h hierarchy on rack object pages

* Remove standalone h5 classes

* Remove unnecessary line breaks

---------

Co-authored-by: Andrew Gormley <Andrew@MacBook-Pro-3.local>
Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>

* 16650 button contrast issues (#16845)

* fixed #16650: button contrast issues

* fixed #16650: green bg text contrast issue

* Revert errant JS resource updates

* Revert custom button colors

* Fix indentation

---------

Co-authored-by: Andrew Gormley <Andrew@MacBook-Pro-3.local>
Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>

* 16907 web UI refresh (#16915)

* closes #16907: web ui refresh

* closes #16907: changed default widget color to primary color

* closes #16907: removed comma

* Revert dashboard widget color changes

* Rename logo images for consistency

* Restore original dashboard widget config

* Remove .navbar-brand-autodark from logo

* Restore logo file names

---------

Co-authored-by: Andrew Gormley <Andrew@MacBook-Pro-3.local>
Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>

* 16394 distinguish product edition (#16924)

* closes #16907: web ui refresh

* closes #16907: changed default widget color to primary color

* closes #16907: removed comma

* closes #16394: distinguish product edition

* Revert dashboard changes

* Clean up redundant styling (merge error)

* removed labs logo and added sub text for all editions

* fixed motif bug

* Fix "flashing" of side nav under dark mode

* Use title case for edition label

* altered edition text style

---------

Co-authored-by: Andrew Gormley <Andrew@MacBook-Pro-3.local>
Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>

* Query release features to toggle commercial theme

* fixes dark mode primary button contrast issue

* fixes #16913: hidden admin nav link (#16978)

Co-authored-by: Andrew Gormley <Andrew@MacBook-Pro-3.local>
Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>

* fixed 16852: misc accessbility problems (#16977)

* fixed 16852: misc accessbility problems

* Restore tooltip text

* Add translation support

* Add missing i18n

---------

Co-authored-by: Andrew Gormley <Andrew@MacBook-Pro-3.local>
Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>

* fixes issues in #16850 (#16986)

* fixes issues in #16850: issue 3 and 5

* Add link text for 'clear' button on table column

* Translate aria label

---------

Co-authored-by: Andrew Gormley <Andrew@MacBook-Pro-3.local>
Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>

* Use alternate footer links for commercial releases

* Remove Inter font

* Adjust base font weight to 500

* Retain default text color for hyperlinks inside tables

* Logo & edition cleanup

* Move dashboard styling

* Misc cleanup

* Remove unused styles

* Misc cleanup & refactoring

---------

Co-authored-by: Andrew Gormley <andrewgormley91@gmail.com>
Co-authored-by: Andrew Gormley <Andrew@MacBook-Pro-3.local>
Co-authored-by: Andrew Gormley <Andrew@MacBook-Pro-3.broadband>
2024-08-02 09:36:38 -04:00
Jeremy Stretch
f3da529399
Closes #14656: Dynamically render form fields depending on custom field type (#17068) 2024-08-02 08:14:01 -04:00
Jeremy Stretch
472fbdc654
Closes #17051: Introduce the ISOLATED_DEPLOYMENT config parameter (#17067)
* Closes #17051: Introduce ISOLATED_DEPLOYMENT config parameter

* Revert omission of external footer links
2024-08-02 08:05:08 -04:00
github-actions
597fc926c0 Update source translation strings 2024-08-02 05:02:14 +00:00
Jeremy Stretch
80fc9abb03 16927: Move JobRunner from utilities to netbox 2024-08-01 14:18:33 -04:00
Jeremy Stretch
8e6987edbf #16388: Move change logging signal handlers into core 2024-08-01 12:58:11 -04:00
Arthur Hanson
e32cfdf88c
17034 Add error handling to Plugins Catalog API (#17035)
* 17034 add error handling to plugins catalog API

* 17034 refactor from review feedback

* 17034 refactor from review feedback

* Misc cleanup

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-08-01 10:30:41 -04:00
Jeremy Stretch
bf17485290 Fix export of system data & include plugins 2024-08-01 09:36:23 -04:00
Jeremy Stretch
149c80a10e Merge branch 'develop' into feature 2024-08-01 09:16:01 -04:00
Jeremy Stretch
0b77b3372c Rename DeviceType.get_full_name to full_name 2024-08-01 09:14:03 -04:00
bubu
fa2b3bcfcc Adjust HTML template for Chinese translation order. 2024-08-01 09:08:06 -04:00
Arthur Hanson
d6f2fc7d29
17058 RackType name -> model (#17059)
* 17058 RackType name -> model

* 17058 RackType name -> model

* 17058 fix tests

* 17058 fix tests
2024-08-01 09:06:51 -04:00
Arthur Hanson
dc173a5508 17038 fix export system data 2024-08-01 08:47:26 -04:00
Arthur Hanson
408f8b4964 17054 upgrade sass to upgrade braces 2024-08-01 08:43:50 -04:00
Jeremy Stretch
c51e91dddd Closes #17048: Replace all calls to get_user_model() with direct imports of User 2024-08-01 08:17:51 -04:00
Arthur Hanson
1a6406632a For #12826 add tests to RackTest filtersets for manufacturer and DeviceType 2024-08-01 13:59:20 +07:00
Arthur Hanson
77d0e9032a fix internationalization for string 2024-08-01 13:12:58 +07:00
Jeremy Stretch
28b867bde4 Documentation updates for v4.1 2024-07-31 16:26:21 -04:00
Jeremy Stretch
a49a74236b #16886: Misc cleanup 2024-07-31 16:02:20 -04:00
Jeremy Stretch
6e59db7310 #16886: Updated documentation for event types 2024-07-31 15:54:31 -04:00
Jeremy Stretch
d1e16013f0 #16886: Rename Event to EventType 2024-07-31 15:39:05 -04:00
Jeremy Stretch
5cfa2bb561 #15621: Add feature documentation for user notifications 2024-07-31 15:11:40 -04:00
Jeremy Stretch
2168a73a2d Display manufacturer & model of module type on module view 2024-07-31 14:40:05 -04:00
Jeremy Stretch
8d585031d8 Misc cleanup 2024-07-31 14:06:35 -04:00
Jeremy Stretch
da7d47d3ed Add manufacturer filter for Rack; extend RackFilterForm 2024-07-31 14:06:07 -04:00
Jeremy Stretch
047d717532 Add missing table columns 2024-07-31 14:04:51 -04:00
Jeremy Stretch
52692d49b6 #9627: Fix calculation of available VIDs 2024-07-31 12:28:19 -04:00
Arthur Hanson
a3edc0472a
17032 Convert Virtual Disk Size from GB -> MB (#17033)
* 17032 Convert Virtual Disk size from GB -> MB

* 17032 update migration

* 17032 update migration

* 17032 update migration

* 17032 update migration

* Omit redundant method

* Merge migrations

* Tweak column header

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-07-31 10:03:25 -04:00
Jeremy Stretch
954eadcdc5 #15908: Introduce FeatureSet dataclass for tracking release features 2024-07-30 16:39:46 -04:00
Jeremy Stretch
845888c24e #14731: Misc cleanup 2024-07-30 15:11:35 -04:00
Jeremy Stretch
a63bb6dba6 #8984: Tweak ordering of log levels; fix invalid level handling 2024-07-30 14:49:42 -04:00
Jeremy Stretch
5f87724072 #8198: Fix validation bug 2024-07-30 14:25:47 -04:00
Jeremy Stretch
dbd503bcc8 #7025: Misc cleanup 2024-07-30 13:50:42 -04:00
Alexander Haase
d3a3a6ba46
15692: Introduce background jobs (#16927)
* Introduce reusable BackgroundJob framework

A new abstract class can be used to implement job function classes. It
handles the necessary logic for starting and stopping jobs, including
exception handling and rescheduling of recurring jobs.

This commit also includes the migration of data source jobs to the new
framework.

* Restore using import_string for jobs

Using the 'import_string()' utility from Django allows the job script
class to be simplified, as module imports no longer need to avoid loops.
This should make it easier to queue and maintain jobs.

* Use SyncDataSourceJob for management command

Instead of maintaining two separate job execution logics, the same job
is now used for both background and interactive execution.

* Implement BackgroundJob for running scripts

The independent implementations of interactive and background script
execution have been merged into a single BackgroundJob implementation.

* Fix documentation of model features

* Ensure consitent code style

* Introduce reusable ScheduledJob

A new abstract class can be used to implement job function classes that
specialize in scheduling. These use the same logic as regular
BackgroundJobs, but ensure that they are only scheduled once at any given
time.

* Introduce reusable SystemJob

A new abstract class can be used to implement job function classes that
specialize in system background tasks (e.g. synchronization or
housekeeping). In addition to the features of the BackgroundJob and
ScheduledJob classes, these implement additional logic to not need to be
bound to an existing NetBox object and to setup job schedules on plugin
load instead of an interactive request.

* Add documentation for jobs framework

* Revert "Use SyncDataSourceJob for management"

This partially reverts commit db591d4. The 'run_now' parameter of
'enqueue()' remains, as its being used by following commits.

* Merge enqueued status into JobStatusChoices

* Fix logger for ScriptJob

* Remove job name for scripts

Because scripts are already linked through the Job Instance field, the
name is displayed twice. Removing this reduces redundancy and opens up
the possibility of simplifying the BackgroundJob framework in future
commits.

* Merge ScheduledJob into BackgroundJob

Instead of using separate classes, the logic of ScheduledJob is now
merged into the generic BackgroundJob class. This allows reusing the
same logic, but dynamically deciding whether to enqueue the same job
once or multiple times.

* Add name attribute for BackgroundJob

Instead of defining individual names on enqueue, BackgroundJob classes
can now set a job name in their meta class. This is equivalent to other
Django classes and NetBox scripts.

* Drop enqueue_sync_job() method from DataSource

* Import ScriptJob directly

* Relax requirement for Jobs to reference a specific object

* Rename 'run_now' arg on Job.enqueue() to 'immediate'

* Fix queue lookup in Job enqueue

* Collapse SystemJob into BackgroundJob

* Remove legacy JobResultStatusChoices

ChoiceSet was moved to core in 40572b5.

* Use queue 'low' for system jobs by default

System jobs usually perform low-priority background tasks and therefore
can use a different queue than 'default', which is used for regular jobs
related to specific objects.

* Add test cases for BackgroundJob handling

* Fix enqueue interval jobs

As the job's name is set by enqueue(), it must not be passed in handle()
to avoid duplicate kwargs with the same name.

* Honor schedule_at for job's enqueue_once

Not only can a job's interval change, but so can the time at which it is
scheduled to run. If a specific scheduled time is set, it will also be
checked against the current job schedule. If there are any changes, the
job is rescheduled with the new time.

* Switch BackgroundJob to regular methods

Instead of using a class method for run(), a regular method is used for
this purpose. This gives the possibility to add more convenience methods
in the future, e.g. for interacting with the job object or for logging,
as implemented for scripts.

* Fix background tasks documentation

* Test enqueue in combination with enqueue_once

* Rename background jobs to tasks (to differentiate from RQ)

* Touch up docs

* Revert "Use queue 'low' for system jobs by default"

This reverts commit b17b2050df.

* Remove system background job

This commit reverts commits 4880d81 and 0b15ecf. Using the database
'connection_created' signal for job registration feels a little wrong at
this point, as it would trigger registration very often. However, the
background job framework is prepared for this use case and can be used
by plugins once the auto-registration of jobs is solved.

* Fix runscript management command

Defining names for background jobs was disabled with fb75389. The
preceeding changes in 257976d did forget the management command.

* Use regular imports for ScriptJob

* Rename BackgroundJob to JobRunner

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-07-30 13:31:21 -04:00
Jeremy Stretch
dde84b47da Flesh out v4.1 changelog 2024-07-29 20:58:29 -04:00
samk-acw
650898719e
Fixes #16782: Add object filtering for custom fields (#16994)
* Fixes #16782: Add object filtering for custom fields

* Add validation for related_object_filter

* Extend documentation & misc cleanup

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-07-29 15:45:48 -04:00
github-actions
f949aa334b Update source translation strings 2024-07-27 05:02:14 +00:00
Jeremy Stretch
a12fdd6e2d Merge branch 'develop' into feature 2024-07-26 16:39:58 -04:00
Jeremy Stretch
8bfcb1c816 PRVB 2024-07-26 16:25:32 -04:00
Jeremy Stretch
630c6fb43d Merge branch 'master' into develop 2024-07-26 16:24:55 -04:00
Jeremy Stretch
c8b4faefcb Update static assets 2024-07-26 16:20:46 -04:00
Jeremy Stretch
cbf84a6b95 Release v4.0.8 2024-07-26 16:20:46 -04:00
Jeremy Stretch
173c339993 Update import statements for Strawberry 0.236.0 2024-07-26 16:20:46 -04:00
transifex-integration[bot]
5ebdf7fc0f Updates for project NetBox (#17004)
* Translate django.po in de

100% translated source file: 'django.po'
on 'de'.

* Translate django.po in pt

100% translated source file: 'django.po'
on 'pt'.

* Translate django.po in zh

100% translated source file: 'django.po'
on 'zh'.

* Translate django.po in pl

100% translated source file: 'django.po'
on 'pl'.

* Translate django.po in ja

100% translated source file: 'django.po'
on 'ja'.

* Translate django.po in nl

100% translated source file: 'django.po'
on 'nl'.

* Translate django.po in cs

100% translated source file: 'django.po'
on 'cs'.

* Translate django.po in uk

100% translated source file: 'django.po'
on 'uk'.

---------

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
2024-07-26 16:20:46 -04:00
Jonathan Senecal
0d30ab3462 Use provider_id instead of account_id in url_params 2024-07-26 16:20:46 -04:00
Jeremy Stretch
17ddbdd3b8 Changelog for #16933, #16943, #16964 2024-07-26 16:20:46 -04:00
Jeremy Stretch
cb59f6e6f7 Fixes #16964: Ensure configured password validators are enforced (#16990)
* Closes #16964: Validate password when creating a new user or updating password for an existing user

* Add serializer validation & tests

---------

Co-authored-by: Nishant Gaglani <nishantgaglani@gmail.com>
2024-07-26 16:20:46 -04:00
Jeremy Stretch
93cebae55c Remove jeffgdotorg from triage rotation 2024-07-26 16:20:46 -04:00
github-actions
2620d6067a Update source translation strings 2024-07-26 16:20:46 -04:00
Jeremy Stretch
3c9d173139 Closes #16933: Enable toggling true/false marks on BooleanColumn 2024-07-26 16:20:46 -04:00
Jeremy Stretch
181fe0a3cc Closes #16943: Expand navigation breadcrumbs on job view to include parent object 2024-07-26 16:20:46 -04:00
github-actions
70b2451209 Update source translation strings 2024-07-26 16:20:46 -04:00
Jeremy Stretch
dab07d653f Closes #16929: Add version & user details as data attributes (#16939)
* Closes #16929: Add version & user details as data attributes

* Fix typo
2024-07-26 16:20:46 -04:00
Benjamin Dale
8b2f9bf700 Update CONTRIBUTING.md
The GitHub reactions icon has been moved from the top right to the bottom left of messages in Issues - I was going insane trying to find it, so this might help someone in the future ; )
2024-07-26 16:20:46 -04:00
Jeremy Stretch
8f54724ac1 Changelog for #16402, #16536, #16624, #16819 2024-07-26 16:20:46 -04:00
Arthur Hanson
c9452db6cf 16819 highlight parent device in rack (#16881)
* 16819 highlight parent device in rack

* 16819 review changes
2024-07-26 16:20:46 -04:00
Eric Oswald
a9dadfd179 Fix incorrect import in rest-api.md 2024-07-26 16:20:46 -04:00
Thomas Fargeix
5019a67a61 Fixes 16536 - Fix filtering of device component by device role (#16553)
* Fixes 16536 - Fix filtering of device component by device role

Rename role and role_id fields to device_role and device_role_id in
DeviceComponentFilterSet

* Update tests for DeviceComponentFilterSet

* Use device_role filter name for DeviceComponentFilterSetTests

* Add test_device_role test in InventoryItemTestCase
2024-07-26 16:20:46 -04:00
Fabian Geisberger
95347cfd0f Fixes #16624: Set allow_null=True on method fields that can return None 2024-07-26 16:20:46 -04:00
Arthur Hanson
eb74393070 16402 remove links from script result table 2024-07-26 16:20:46 -04:00
github-actions
874677b359 Update source translation strings 2024-07-26 16:20:46 -04:00
Jeremy Stretch
3cde4da4a9 Changelog for #14640, #14792, #15660, #15696, #16793 2024-07-26 16:20:46 -04:00
transifex-integration[bot]
0b1b9caea4 Updates for project NetBox (#16888)
* Translate django.po in pt

100% reviewed source file: 'django.po'
on 'pt'.

* Translate django.po in es

100% translated source file: 'django.po'
on 'es'.

* Translate django.po in de

100% translated source file: 'django.po'
on 'de'.

* Translate django.po in fr

100% translated source file: 'django.po'
on 'fr'.

* Translate django.po in ru

100% translated source file: 'django.po'
on 'ru'.

* Translate django.po in ja

100% translated source file: 'django.po'
on 'ja'.

* Translate django.po in it

100% translated source file: 'django.po'
on 'it'.

* Translate django.po in cs

100% translated source file: 'django.po'
on 'cs'.

* Translate django.po in zh

100% translated source file: 'django.po'
on 'zh'.

* Translate django.po in nl

100% translated source file: 'django.po'
on 'nl'.

* Translate django.po in da

100% translated source file: 'django.po'
on 'da'.

* Translate django.po in uk

100% translated source file: 'django.po'
on 'uk'.

* Translate django.po in pl

100% translated source file: 'django.po'
on 'pl'.

* Translate django.po in tr

100% translated source file: 'django.po'
on 'tr'.

---------

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
2024-07-26 16:20:46 -04:00
Jeff Gehlbach
2969c4188c Added CS, DA, IT, NL, and PL, minus the .po and .mo starting point files (#16810)
* Added CS, DA, IT, NL, and PL, minus the .po and .mo starting point files

* Add initial PO files for new languages

* Revert updates to EN django.po

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-07-26 16:20:46 -04:00
github-actions
68013cb554 Update source translation strings 2024-07-26 16:20:46 -04:00
Jeremy Stretch
5c272f8e6e Changelog for #15375, #16357, #16760, #16838, #16867 2024-07-26 16:20:46 -04:00
Jeremy Stretch
e51d67c72a Update contact email 2024-07-26 16:20:46 -04:00
the.friendly.net
0e0d6172a4 Fixes #16760: datasource git on local file system fails (#16872)
* Fixes #16760: datasource git on local file system fails

* Fixes #16760: datasource git on local file system fails

* Set depth & quiet parameters only if using a remote URL

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-07-26 16:20:46 -04:00
Jeff Gehlbach
b3fbcb3afc Small additions and tweaks to release checklist from releasing v4.0.7 2024-07-26 16:20:46 -04:00
Arthur Hanson
4f60b26bf3 16838 show extra_buttons if no actions defined 2024-07-26 16:20:46 -04:00
Arthur Hanson
0bc17850fd 16867 render dashboard if model no longer available 2024-07-26 16:20:46 -04:00
Arthur Hanson
30b9fcf4f8 16357 clone tenant and type for cable 2024-07-26 16:20:46 -04:00
Théophile Bastian
ef5c0256f8 SSO: custom name for identity providers (#16732) 2024-07-26 16:20:46 -04:00
github-actions
db081e2b5e Update source translation strings 2024-07-26 16:20:46 -04:00
Jeremy Stretch
11f13bf2a4 PRVB 2024-07-26 16:20:46 -04:00
Jeremy Stretch
7b5e8d5f2a Update static assets 2024-07-26 15:47:57 -04:00
Jeremy Stretch
303c1ce00c Release v4.0.8 2024-07-26 15:37:05 -04:00
Jeremy Stretch
b4240cdd67 Update import statements for Strawberry 0.236.0 2024-07-26 15:35:08 -04:00
transifex-integration[bot]
1e7a71969e
Updates for project NetBox (#17004)
* Translate django.po in de

100% translated source file: 'django.po'
on 'de'.

* Translate django.po in pt

100% translated source file: 'django.po'
on 'pt'.

* Translate django.po in zh

100% translated source file: 'django.po'
on 'zh'.

* Translate django.po in pl

100% translated source file: 'django.po'
on 'pl'.

* Translate django.po in ja

100% translated source file: 'django.po'
on 'ja'.

* Translate django.po in nl

100% translated source file: 'django.po'
on 'nl'.

* Translate django.po in cs

100% translated source file: 'django.po'
on 'cs'.

* Translate django.po in uk

100% translated source file: 'django.po'
on 'uk'.

---------

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
2024-07-26 15:34:47 -04:00
Jonathan Senecal
f3d1924453 Use provider_id instead of account_id in url_params 2024-07-26 15:10:25 -04:00
Arthur Hanson
0a1ce79154
16992 remove TODO for NetBox 4.1 (#16993)
* 16992 remove TODO for NetBox 4.1

* 16992 fix custom validator

* Remove obsolete LegacyScriptRedirectView

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-07-26 09:46:16 -04:00
Jeremy Stretch
4d55d7d964 Changelog for #16933, #16943, #16964 2024-07-26 08:01:08 -04:00
Jeremy Stretch
d8c7282fdb
Fixes #16964: Ensure configured password validators are enforced (#16990)
* Closes #16964: Validate password when creating a new user or updating password for an existing user

* Add serializer validation & tests

---------

Co-authored-by: Nishant Gaglani <nishantgaglani@gmail.com>
2024-07-26 07:58:14 -04:00
Jeremy Stretch
22319b2cce Closes #16988: Move rack nav menu items to a dedicated section 2024-07-26 07:57:29 -04:00
Arthur Hanson
e62a42286a
11969 airflow (#16967)
* 11960 Add airflow

* 11960 Add airflow

* 11960 fix tests

* 11960 fix racktype form

* 11969 different choices type

* 11969 update docs

* 11969 fix racktype copy

* 11969 fix

* Misc cleanup & reordering of form fields

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-07-25 15:14:02 -04:00
Arthur Hanson
1d6987bca0
14731 plugins catalog (#16763)
* 14731 plugin catalog

* 14731 detal page

* 14731 plugin table

* 14731 cleanup

* 14731 cache API results

* 14731 fix install name

* 14731 filtering

* 14731 filtering

* 14731 fix detail view

* 14731 fix detail view

* 14731 sort / status

* 14731 sort / status

* 14731 cleanup detail view

* 14731 htmx plugin list

* 14731 align quicksearch

* 14731 remove pytz

* 14731 change to table

* 14731 change to table

* 14731 remove status from table

* 14731 quick search

* 14731 cleanup

* 14731 cleanup

* Employ datetime_from_timestamp() to parse timestamps

* 14731 review changes

* 14731 move to plugins.py file

* 14731 use dataclasses

* 14731 review changes

* Tweak table columns

* Use is_staff (for now) to evaluate user permission for plugin views

* Use table for ordering

* 7025 change to api fields

* 14731 tweaks

* Remove filtering for is_netboxlabs_supported

* Misc cleanup

* Update logic for determining whether to display plugin installation instructions

* 14731 review changes

* 14731 review changes

* 14731 review changes

* 14731 add user agent string, proxy settings

* Clean up templates

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-07-25 14:58:48 -04:00
Jeremy Stretch
8409ca9fd2 Closes #16928: Add help center button to top nav 2024-07-25 13:16:31 -04:00
Jeremy Stretch
909ee7d543 Closes #14861: Standardize URL path for virtual disks 2024-07-25 13:12:53 -04:00
Jeremy Stretch
cc72a58c1e Remove jeffgdotorg from triage rotation 2024-07-24 17:15:53 -04:00
Arthur Hanson
8237c6accc
7025 circuit redundancy (#16945)
* 7025 CircuitRedundancyGroups

* 7025 CircuitRedundancyGroups api

* 7025 CircuitRedundancyGroups api

* 7025 CircuitRedundancyGroups tests

* 7025 CircuitRedundancyGroup -> CircuitGroup

* 7025 add tenancy

* 7025 linkify name

* 7025 missing file

* 7025 circuitgroupassignment

* 7025 base group assignment working

* 7025 assignments

* 7025 fix forms/tests for CircuitGroup

* 7025 fix api tests

* 7025 view tests

* 7025 CircuitGroupAssignment tests

* 7025 fix typo

* 7025 fix typo

* 7025 fix tests

* 7025 remove m2m

* 7025 add count to serializer

* 7025 fix test

* 7025 documentation

* 7025 review comments

* 7025 review comments

* 7025 add search index

* Make CircuitPriorityChoices extensible

* Add group assignment table to circuit view

* Misc cleanup

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-07-24 12:24:44 -04:00
Jeremy Stretch
f7fdfdd925 #16866: Fix handling of job start/stop events 2024-07-22 13:47:48 -04:00
Jeremy Stretch
44a9350986
Closes #16886: Dynamic event types (#16938)
* Initial work on #16886

* Restore GraphQL filter

* Remove namespace

* Add Event documentation

* Use MultipleChoiceField for event_types

* Fix event_types field class on EventRuleImportForm

* Fix tests

* Simplify event queue handling logic

* Misc cleanup
2024-07-22 08:12:04 -04:00
github-actions
36df9228a6 Update source translation strings 2024-07-20 05:02:12 +00:00
Jeremy Stretch
4a53a96541 #15908: Add features attribute to ReleaseInfo 2024-07-19 17:04:06 -04:00
Jeremy Stretch
1acb9902e7 #16359: Include plugin nav content on mobile view 2024-07-19 16:21:46 -04:00
Jeremy Stretch
424dda5be6 Closes #16933: Enable toggling true/false marks on BooleanColumn 2024-07-19 07:54:41 -04:00
Jeremy Stretch
3028f262cc Closes #16943: Expand navigation breadcrumbs on job view to include parent object 2024-07-19 07:52:27 -04:00
github-actions
11cadf3a8a Update source translation strings 2024-07-19 05:02:01 +00:00
Jeremy Stretch
965e78125a Closes #16884: Remove ID column from ObjectChangeTable defaults 2024-07-18 21:44:12 -04:00
Jeremy Stretch
954d0cfcd0
Closes #16929: Add version & user details as data attributes (#16939)
* Closes #16929: Add version & user details as data attributes

* Fix typo
2024-07-18 12:39:23 -04:00
Benjamin Dale
0830ebb34a Update CONTRIBUTING.md
The GitHub reactions icon has been moved from the top right to the bottom left of messages in Issues - I was going insane trying to find it, so this might help someone in the future ; )
2024-07-16 20:12:17 -04:00
Jeremy Stretch
b2c5a4639c Introduce datetime_from_timestamp() utility function 2024-07-16 12:21:50 -04:00
Arthur Hanson
cf1024a12b
9627 use ArrayField on VLANGroup for allowed VLANs (#16710)
* 9627 initial commit

* 9627 numeric range field

* 9627 numeric range field

* 9627 numeric range field

* 9627 numeric range field

* 9627 add stuff for utilization calc

* 9627 update views

* 9627 fixes

* 9627 available_vlans

* 9627 available_vlans

* 9627 fixes

* 9627 bulk import / edit

* 9627 test fixes

* 9627 test fixes

* 9627 update validation

* 9627 fix tests

* 9627 fix tests

* 9627 fix tests

* 9627 fix tests

* 9627 fix tests

* 9627 fix tests

* 9627 review changes

* 9627 temp vlan_id filter

* Clean up labels

* Remove annotate_vlan_ranges() from VLANGroupQuerySet

* Misc cleanup

* Implement contains_vid filter

* Serialize VID ranges as integer lists in REST API

* Remove default value from vlan_id_ranges

* 9627 fix typo in test

* Require vlan_id_ranges & set default value

* Fix logic for upper range boundaries

* Add field to VLANGroup model documentation

* Rename vlan_id_ranges to vid_ranges

* Fix computation of available VLAN IDs

* Clean up migration

* Add tests for range utility functions

* Clean up add_available_vlans()

* Misc cleanup, add test for VID validation

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-07-16 10:47:18 -04:00
Arthur Hanson
5a6ffde67e
12826 Add Rack Type (#16739)
* 12826 add RackType

* 12826 add forms, filters, tables

* 12826 add to menu

* 12826 remove role

* 12826 add api/serializers

* 12826 add tests and fixes

* 12826 fix tests

* 12826 fix tests

* 12826 fix tests

* 12826 fix tests

* 12826 add device_type to device and instantiation

* 12826 test device creation

* 12826 add slug

* 12826 fix tests

* 12826 fix slug field

* 12826 prevent modification of rack fields if rack_type set

* 12826 update rack fields on rack_type edit

* Misc cleanup

* Update model docs

* Add manufacturer field to RackType

* Add test for mounting_depth

* Rename 'type' to 'form_factor'

* Create base classes for Rack & RackType models, serializers

* Hide RackType-defined fields on RackForm when a rack type is set

* Establish a base filter form for Rack & RackType

* Clean up RackType attr inheritance

* Clean up templates

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-07-16 08:58:22 -04:00
Jeremy Stretch
b0e7294bc1
Closes #15621: User notifications (#16800)
* Initial work on #15621

* Signal receiver should ignore models which don't support notifications

* Flesh out NotificationGroup functionality

* Add NotificationGroup filters for users & groups

* Separate read & dimiss actions

* Enable one-click dismissals from notifications list

* Include total notification count in dropdown

* Drop 'kind' field from Notification model

* Register event types in the registry; add colors & icons

* Enable event rules to target notification groups

* Define dynamic choices for Notification.event_name

* Move event registration to core

* Add more job events

* Misc cleanup

* Misc cleanup

* Correct absolute URLs for notifications & subscriptions

* Optimize subscriber notifications

* Use core event types when queuing events

* Standardize queued event attribute to event_type; change content_type to object_type

* Rename Notification.event_name to event_type

* Restore NotificationGroupBulkEditView

* Add API tests

* Add view & filterset tests

* Add model documentation

* Fix tests

* Update notification bell when notifications have been cleared

* Ensure subscribe button appears only on relevant models

* Notifications/subscriptions cannot be ordered by object

* Misc cleanup

* Add event icon & type to notifications table

* Adjust icon sizing

* Mute color of read notifications

* Misc cleanup
2024-07-15 14:24:11 -04:00
Jeremy Stretch
95cb7b2c34 Changelog for #16402, #16536, #16624, #16819 2024-07-15 09:12:36 -04:00
Arthur Hanson
dde77c83b4
16819 highlight parent device in rack (#16881)
* 16819 highlight parent device in rack

* 16819 review changes
2024-07-15 09:09:26 -04:00
Eric Oswald
e216bebd41 Fix incorrect import in rest-api.md 2024-07-13 10:28:43 -04:00
Jeremy Stretch
1c2336be60
Closes #16776: Extend PluginTemplateExtension to render custom alerts for objects (#16889)
* Closes #16776: Extend PluginTemplateExtension to render custom alerts for objects

* Fix bug in _get_registered_content()
2024-07-12 09:52:07 -04:00
Thomas Fargeix
d39acfd3f2
Fixes 16536 - Fix filtering of device component by device role (#16553)
* Fixes 16536 - Fix filtering of device component by device role

Rename role and role_id fields to device_role and device_role_id in
DeviceComponentFilterSet

* Update tests for DeviceComponentFilterSet

* Use device_role filter name for DeviceComponentFilterSetTests

* Add test_device_role test in InventoryItemTestCase
2024-07-12 09:13:33 -04:00
Fabian Geisberger
4ea4e57f33 Fixes #16624: Set allow_null=True on method fields that can return None 2024-07-12 09:03:40 -04:00
Arthur Hanson
377543cd9c 16402 remove links from script result table 2024-07-12 08:31:32 -04:00
github-actions
a8827c8472 Update source translation strings 2024-07-12 05:02:03 +00:00
Jeremy Stretch
b2ca6df50a Changelog for #14640, #14792, #15660, #15696, #16793 2024-07-11 14:21:41 -04:00
transifex-integration[bot]
ab6ddd50a8
Updates for project NetBox (#16888)
* Translate django.po in pt

100% reviewed source file: 'django.po'
on 'pt'.

* Translate django.po in es

100% translated source file: 'django.po'
on 'es'.

* Translate django.po in de

100% translated source file: 'django.po'
on 'de'.

* Translate django.po in fr

100% translated source file: 'django.po'
on 'fr'.

* Translate django.po in ru

100% translated source file: 'django.po'
on 'ru'.

* Translate django.po in ja

100% translated source file: 'django.po'
on 'ja'.

* Translate django.po in it

100% translated source file: 'django.po'
on 'it'.

* Translate django.po in cs

100% translated source file: 'django.po'
on 'cs'.

* Translate django.po in zh

100% translated source file: 'django.po'
on 'zh'.

* Translate django.po in nl

100% translated source file: 'django.po'
on 'nl'.

* Translate django.po in da

100% translated source file: 'django.po'
on 'da'.

* Translate django.po in uk

100% translated source file: 'django.po'
on 'uk'.

* Translate django.po in pl

100% translated source file: 'django.po'
on 'pl'.

* Translate django.po in tr

100% translated source file: 'django.po'
on 'tr'.

---------

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
2024-07-11 14:20:06 -04:00
Jeff Gehlbach
499da4fdcf
Added CS, DA, IT, NL, and PL, minus the .po and .mo starting point files (#16810)
* Added CS, DA, IT, NL, and PL, minus the .po and .mo starting point files

* Add initial PO files for new languages

* Revert updates to EN django.po

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-07-11 14:04:36 -04:00
github-actions
4fa396716e Update source translation strings 2024-07-11 05:02:02 +00:00
Jeremy Stretch
6f3a2a599f Changelog for #15375, #16357, #16760, #16838, #16867 2024-07-10 09:16:23 -04:00
Jeremy Stretch
960d2b82b7 Update contact email 2024-07-10 09:14:20 -04:00
the.friendly.net
f2e1de027f
Fixes #16760: datasource git on local file system fails (#16872)
* Fixes #16760: datasource git on local file system fails

* Fixes #16760: datasource git on local file system fails

* Set depth & quiet parameters only if using a remote URL

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-07-10 09:10:28 -04:00
Jeff Gehlbach
bf97138c78 Small additions and tweaks to release checklist from releasing v4.0.7 2024-07-10 08:45:36 -04:00
Arthur Hanson
30d711d24a 16838 show extra_buttons if no actions defined 2024-07-10 08:43:27 -04:00
Arthur Hanson
2a8bec1cbf 16867 render dashboard if model no longer available 2024-07-10 08:39:40 -04:00
Arthur Hanson
013139aa20 16357 clone tenant and type for cable 2024-07-10 08:34:48 -04:00
Théophile Bastian
4ca1494127
SSO: custom name for identity providers (#16732) 2024-07-10 13:09:03 +07:00
github-actions
70311a9db5 Update source translation strings 2024-07-10 05:02:10 +00:00
Jeremy Stretch
02ae91589d Merge branch 'develop' into feature 2024-07-09 15:16:05 -04:00
Jeremy Stretch
dd413b248a PRVB 2024-07-09 13:49:24 -04:00
Jeff Gehlbach
3f67b5d8cb
Merge pull request #16859 from netbox-community/develop
Release v4.0.7
2024-07-09 13:43:51 -04:00
Jeff Gehlbach
596514ce74 Release v4.0.7 2024-07-09 13:27:13 -04:00
transifex-integration[bot]
aafb26662a
Updates for project NetBox (#16811)
* Translate django.po in pt

100% reviewed source file: 'django.po'
on 'pt'.

* Translate django.po in fr [Manual Sync]

12% of minimum 1% reviewed source file: 'django.po'
on 'fr'.

Sync of partially translated files: 
untranslated content is included with an empty translation 
or source language content depending on file format

* Translate django.po in pt [Manual Sync]

100% reviewed source file: 'django.po'
on 'pt'.

* Translate django.po in de [Manual Sync]

78% of minimum 1% reviewed source file: 'django.po'
on 'de'.

Sync of partially translated files: 
untranslated content is included with an empty translation 
or source language content depending on file format

* Translate django.po in tr [Manual Sync]

7% of minimum 1% reviewed source file: 'django.po'
on 'tr'.

Sync of partially translated files: 
untranslated content is included with an empty translation 
or source language content depending on file format

* Translate django.po in ru [Manual Sync]

30% of minimum 1% reviewed source file: 'django.po'
on 'ru'.

Sync of partially translated files: 
untranslated content is included with an empty translation 
or source language content depending on file format

* Translate django.po in zh [Manual Sync]

16% of minimum 1% reviewed source file: 'django.po'
on 'zh'.

Sync of partially translated files: 
untranslated content is included with an empty translation 
or source language content depending on file format

---------

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
2024-07-09 13:18:19 -04:00
Jeremy Stretch
4c797bf755 Update dependencies for v4.0.7 2024-07-09 13:05:57 -04:00
Jeremy Stretch
aceed94787 Changelog for #14554, #16721, #16758, #16802, #16808, #16817, #16843 2024-07-09 12:19:39 -04:00
Martin
6a1245c792
Fixes #16758: Create language cookie if required (#16764)
* Fixes #16758: Create language cookie if required

* Align language cookie with session lifetime
2024-07-09 08:51:12 -04:00
Mattias L
96ff796b94
Allowed configuration of Sentry send_default_pii parameter (#16803)
* Allowed configuration of Sentry send_default_pii parameter.

Also changed default value of send_default_pii to False to avoid sending sensitive data to Sentry.

Closes #16802

* Order alphabetically & link to Sentry parameter documentation

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-07-09 08:39:43 -04:00
locklearxd
d8d66581cc potential fix for IKE policy mode issue with version2 2024-07-09 08:35:02 -04:00
Jeremy Stretch
7564f6f538 Fixes #16808: Correct event type of webhooks emitted upon object deletion immediately following a modification 2024-07-09 08:17:46 -04:00
github-actions
f2e3c1a219 Update source translation strings 2024-07-09 05:02:43 +00:00
Arzhel Younsi
22348cdbfc
Extend STORAGE_BACKEND config to support Swift (#16319)
* Extend STORAGE_BACKEND config to support Swift

Requires django-storage-swift >= 1.4.0 when used.

Bug: T310717
Change-Id: I67cf439e9152608cbba3a3de4173d54ba5fbddc2

* Update system.md from suggestions

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>

* Update settings.py from suggestions

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>

* Update system.md from suggestions 2

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>

* Remove SWIFT storage from configuration_example.py

* Load swift config as global instead of monkey path

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-07-08 12:04:17 -04:00
Adam Brutsaert
f4532dd4ab Closes #16817: Added 200 & 400 Gbps selections for circuit commit rate 2024-07-04 11:31:10 -04:00
Jeremy Stretch
e02796a64e Fixes #16721: Fix errant API request after deselecting a rack in device edit form 2024-07-04 10:28:52 -04:00
Jeremy Stretch
9ab7960a66 Changelog for #16679, #16716, #16779, #16780, #16791, #16796, #16806, #16807, #16813 2024-07-04 10:00:50 -04:00
Jeremy Stretch
7a88810a23 Fixes #16780: IKE proposal created via REST API should not require authentication_algorithm 2024-07-04 09:32:01 -04:00
Jeremy Stretch
a518579916 Fixes #16796: Allow assignment of VM with no site to a cluster with a site 2024-07-04 09:14:07 -04:00
Jeremy Stretch
e9dd5aa17b Fixes #16806: Fix redirect URL when creating contact assignments with "add another" button 2024-07-04 08:50:22 -04:00
Jeremy Stretch
8026f79cbb Fixes #16813: Fix ordering of bookmarks in dashboard widget when filtering by object type 2024-07-04 08:23:05 -04:00
github-actions
cf38c7724e Update source translation strings 2024-07-04 05:02:06 +00:00
Jeremy Stretch
12cd2a7d6f Changelog for #8984, #15156, #16580, #16726 2024-07-03 16:30:02 -04:00
Jeremy Stretch
616f6f6165 #16726: Fix cotent registration bug 2024-07-03 16:20:00 -04:00
Jeremy Stretch
b18a6b7c59
Fixes #16779: Fix saved filter selection for child object lists (#16789)
* Fixes #16779: Fix saved filter selection for child object lists

* Omit label_suffix
2024-07-03 08:51:30 -04:00
RobertH1993
98748d901b Closes #16716, add NAT IP to device view for OOB IP 2024-07-03 08:48:24 -04:00
Jeremy Stretch
a704708caa Fixes #16679: Avoid overwriting custom JSON fields during bulk edit 2024-07-03 08:42:37 -04:00
Jeremy Stretch
224f157b75 Fixes #16807: Fix layout of VLAN edit form when custom fields are present 2024-07-03 08:31:25 -04:00
Jeremy Stretch
94c2e7582e Closes #16791: Add 200 & 400 Gbps selections for circuit termination port speed 2024-07-03 08:28:12 -04:00
github-actions
4857a87be5 Update source translation strings 2024-07-02 05:02:15 +00:00
Arthur Hanson
5ac5135dbc
8984 Allow script log to be filtered (#16446)
* 8984 filter by script log level

* 8984 filter log list

* 8984 add dropdown

* 8984 add dropdown

* 8984 fix button color

* Update netbox/extras/views.py

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>

* 8984 review changes

* 8984 review changes

* 8984 review changes

* Clean up log threshold selector

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-07-01 16:04:29 -04:00
Jeremy Stretch
82d8de32df Closes #16726: Extend PluginTemplateExtension to allow registering multiple models 2024-07-01 15:25:27 -04:00
Jeremy Stretch
d3d27d8111 Changelog for #16424, #16523, #16654, #16657, #16689, #16714, #16723, #16725, #16735, #16747 2024-07-01 09:40:21 -04:00
Elliott Balsley
e2596587fa
fix: allow cloning field value of 0 (#16741)
* fix: allow cloning field value of 0

* Fix evaluation of False value

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-07-01 09:22:09 -04:00
siku4
a12259fae7 fix: add missing parent field to inventory item import form 2024-07-01 09:20:49 -04:00
Peter Eckel
753ba5d3f4
Do not delete all search indexes when reindexing specific models (#16755)
* Do not delete all search indexes when reindexing specific models

* Clear all indexes only if neither --lazy nor a list of models are
  specified for "manage.py reindex"

* Otherwise, clear the index for a model immediately before rebuilding
  it

* Separated clearing from re-indexing the search cache
2024-07-01 09:12:02 -04:00
Jeremy Stretch
b5d8e657ad Fixes #16523: Restore highlighting of current device in virtual chassis members panel 2024-07-01 08:48:01 -04:00
github-actions
67983c6a75 Update source translation strings 2024-07-01 05:02:10 +00:00
prryplatypus
a00ed4b74d Quote VIRTUALENV 2024-06-30 15:21:46 -04:00
Tobias Genannt
a896b14c08 Fixes #16689: Load correct configuration
Loads the the current configuration if no ConfigRevisions are saved to
the database.
2024-06-30 15:20:26 -04:00
Julio-Oliveira-Encora
2c64a52d7d Added default:"0" to total_count in object_list.html 2024-06-30 15:10:38 -04:00
Peter Eckel
96338c002b Updated the documentation section about removing plugins 2024-06-30 15:08:11 -04:00
Julio Oliveira at Encora
00d23a0cff
16725 - The admin section should always come last in the navigation menu (#16762)
* I replaced `append` with `insert` into menu.py to make the admin section appear last in the navigation menu.

* Clean up ordering logic

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-06-30 11:30:39 -04:00
github-actions
c7dcded74f Update source translation strings 2024-06-27 05:02:05 +00:00
Jeremy Stretch
c22463f4aa
Closes #16580: Remove AUTH_EXEMPT_PATHS (#16662)
* Closes #16580: Remove AUTH_EXEMPT_PATHS

* Misc cleanup
2024-06-26 12:05:38 -04:00
Julio Oliveira at Encora
c506f60f12
16424 - Allow filtering of Devices by Cluster and Cluster Group (#16674)
* Allow filtering Devices by Cluster and Cluster Group.

* Allow filtering Devices by Cluster and Cluster Group.

* Added tests for cluster and cluster_groups filterset.

* Add missing filter & complete tests

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-06-26 10:13:32 -04:00
Julio Oliveira at Encora
b241c97e00
Was added to searching support languages other than English for objec… (#16706)
* Was added to searching support languages other than English for object types(s).

* Fix SearchForm field label translation

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-06-26 09:54:15 -04:00
Julio Oliveira at Encora
b605dfcba0
16704 - Define a default help_text for ColorField (#16708)
* Added `help_text` to ColorField.

* Addressed PR comment to remove the redundant help_text from all the forms where ColorField was used.

* Add space before example value

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-06-26 09:14:08 -04:00
Jeff Gehlbach
33004dfab0 Added missing CDN cache clearing step to release checklist in docs 2024-06-25 16:21:32 -04:00
Arthur Hanson
52546608f6
15156 Add display_url to REST API (#16412)
* 15156 add display_url to REST API

* 15156 fix view name

* 15156 fix typo

* 15156 fix tests

* 15156 add url display_url to base class

* 15156 add url display_url to base class

* 15156 add url display_url to base class

* 15156 review changes

* 15156 review changes

* 15156 review changes

* 15156 review changes

* 15156 remove bogus code

* 15156 remove bogus code

* 15156 review changes

* 15156 review changes

* 15156 review changes

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-06-25 09:59:58 -04:00
Jeremy Stretch
2b4577e365
Closes #8198: Custom field uniqueness (#16661)
* Closes #8198: Implement ability to enforce custom field uniqueness

* Add missing form fields & table columns for validation attributes

* Remove obsolete code
2024-06-25 08:37:10 -04:00
github-actions
65e40603ff Update source translation strings 2024-06-25 05:01:53 +00:00
Jeremy Stretch
08ac5cd52c Merge branch 'develop' into feature 2024-06-24 15:40:43 -04:00
Jeremy Stretch
7702b0ebb0 PRVB 2024-06-24 15:04:46 -04:00
Jeremy Stretch
b1d1b51304
Merge pull request #16707 from netbox-community/develop
Release v4.0.6
2024-06-24 15:00:57 -04:00
Jeremy Stretch
4ae1a1ffe9 Recompile JS assets 2024-06-24 14:46:15 -04:00
Jeremy Stretch
8107d72961 Release v4.0.6 2024-06-24 14:37:26 -04:00
transifex-integration[bot]
63239d7d9f
Updates for project NetBox (#16687)
* Translate django.po in pt

100% reviewed source file: 'django.po'
on 'pt'.

* Translate django.po in pt

100% reviewed source file: 'django.po'
on 'pt'.

* Translate django.po in pt

100% reviewed source file: 'django.po'
on 'pt'.

* Translate django.po in pt

100% reviewed source file: 'django.po'
on 'pt'.

* Translate django.po in pt

100% reviewed source file: 'django.po'
on 'pt'.

* Translate django.po in pt

100% reviewed source file: 'django.po'
on 'pt'.

* Translate django.po in pt

100% reviewed source file: 'django.po'
on 'pt'.

* Translate django.po in pt

100% reviewed source file: 'django.po'
on 'pt'.

* Translate django.po in pt

100% reviewed source file: 'django.po'
on 'pt'.

* Translate django.po in pt

100% reviewed source file: 'django.po'
on 'pt'.

* Translate django.po in pt

100% reviewed source file: 'django.po'
on 'pt'.

* Translate django.po in pt

100% reviewed source file: 'django.po'
on 'pt'.

* Translate django.po in pt

100% reviewed source file: 'django.po'
on 'pt'.

* Translate django.po in pt

100% reviewed source file: 'django.po'
on 'pt'.

* Translate django.po in pt

100% reviewed source file: 'django.po'
on 'pt'.

* Translate django.po in pt

100% reviewed source file: 'django.po'
on 'pt'.

* Translate django.po in pt

100% reviewed source file: 'django.po'
on 'pt'.

* Translate django.po in pt

100% reviewed source file: 'django.po'
on 'pt'.

* Translate django.po in pt

100% reviewed source file: 'django.po'
on 'pt'.

* Translate django.po in pt

100% reviewed source file: 'django.po'
on 'pt'.

* Translate django.po in pt

100% reviewed source file: 'django.po'
on 'pt'.

* Translate django.po in pt

100% reviewed source file: 'django.po'
on 'pt'.

* Translate django.po in pt

100% reviewed source file: 'django.po'
on 'pt'.

* Translate django.po in pt

100% reviewed source file: 'django.po'
on 'pt'.

* Translate django.po in pt

100% reviewed source file: 'django.po'
on 'pt'.

* Translate django.po in pt

100% reviewed source file: 'django.po'
on 'pt'.

* Translate django.po in pt

100% reviewed source file: 'django.po'
on 'pt'.

* Translate django.po in pt

100% reviewed source file: 'django.po'
on 'pt'.

* Translate django.po in pt

100% reviewed source file: 'django.po'
on 'pt'.

* Translate django.po in pt

100% reviewed source file: 'django.po'
on 'pt'.

* Translate django.po in pt

100% reviewed source file: 'django.po'
on 'pt'.

* Translate django.po in pt

100% reviewed source file: 'django.po'
on 'pt'.

* Translate django.po in pt

100% reviewed source file: 'django.po'
on 'pt'.

* Translate django.po in pt

100% reviewed source file: 'django.po'
on 'pt'.

* Translate django.po in pt

100% reviewed source file: 'django.po'
on 'pt'.

* Translate django.po in pt

100% reviewed source file: 'django.po'
on 'pt'.

* Translate django.po in pt

100% reviewed source file: 'django.po'
on 'pt'.

* Translate django.po in fr [Manual Sync]

12% of minimum 1% reviewed source file: 'django.po'
on 'fr'.

Sync of partially translated files: 
untranslated content is included with an empty translation 
or source language content depending on file format

* Translate django.po in pt [Manual Sync]

100% reviewed source file: 'django.po'
on 'pt'.

* Translate django.po in ru [Manual Sync]

30% of minimum 1% reviewed source file: 'django.po'
on 'ru'.

Sync of partially translated files: 
untranslated content is included with an empty translation 
or source language content depending on file format

* Translate django.po in de [Manual Sync]

75% of minimum 1% reviewed source file: 'django.po'
on 'de'.

Sync of partially translated files: 
untranslated content is included with an empty translation 
or source language content depending on file format

* Translate django.po in tr [Manual Sync]

7% of minimum 1% reviewed source file: 'django.po'
on 'tr'.

Sync of partially translated files: 
untranslated content is included with an empty translation 
or source language content depending on file format

---------

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
2024-06-24 14:28:24 -04:00
Jeremy Stretch
5f3e147634 Changelog for #15717, #16149, #16252, #16273, #16307, #16702 2024-06-24 12:46:11 -04:00
Jeremy Stretch
bfd023c6a9 Fixes #16702: Fix validation of return_url query parameter 2024-06-24 12:34:35 -04:00
Jeremy Stretch
f4ac23d868 Closes #16700: Audit usage of mark_safe() for consistent escaping 2024-06-24 12:33:54 -04:00
Jeremy Stretch
8b62e40874 Closes #16307: Enable calling log_* methods on Script without a log message 2024-06-24 10:45:33 -04:00
Tobias Genannt
dbcd89c8ed Closes #16273: Add search box to menu on mobile 2024-06-24 10:06:35 -04:00
Jeremy Stretch
00d9a865c0 Closes #16367: Update census URL 2024-06-24 08:17:25 -04:00
Jeremy Stretch
ab3fd0049b Closes #16686: Relete obsolete OpenAPI definitions 2024-06-24 08:16:24 -04:00
github-actions
3e6249387a Update source translation strings 2024-06-22 05:02:11 +00:00
Arthur Hanson
85fd232614
16149 add (optional) obj hyperlink to script list table (#16271)
* 16149 add (optional) obj hyperlink to script list table

* 16149 add (optional) obj hyperlink to script list table

* 16149 review feedback

* 16149 review changes
2024-06-21 10:04:52 -04:00
Arthur Hanson
dda0b0bbd1
16252 only show results count if paginator (#16269)
* 16252 only show results count if paginator

* 16252 hack in table page count

* 16252 review changes
2024-06-21 09:48:41 -04:00
Jeff Gehlbach
3542057839 Remove dead link to project-stats anchor. Fixes #16621 2024-06-21 08:25:48 -04:00
github-actions
cb72b921ae Update source translation strings 2024-06-21 05:02:10 +00:00
Ryan Gillespie
582ede8ed3
Fixes #15717 - Unable to assign a VM in Site to Cluster without Site (#15763)
* Fixes #15717: Allow VM with Site to Cluster without Site

* Fixes #15717: Allow VM with Site to Cluster without Site

* Fixes #15717: Allow VM with Site to Cluster without Site

* Fixes #15717: Allow VM with Site to Cluster without Site

* Fixes #15717: Allow VM with Site to Cluster without Site
2024-06-20 10:59:17 -04:00
Jeff Gehlbach
32e219c70a Interim fix to SECURITY.md: Remove non-working email address 2024-06-20 09:43:23 -04:00
github-actions
7a5e8a80ea Update source translation strings 2024-06-19 05:02:34 +00:00
Jeremy Stretch
6819186bb6 Start release notes for v4.1 2024-06-18 13:43:33 -04:00
Jeremy Stretch
9d28af42b2 Update changelog for #15348, #16416, #16444, #16450, #16452, #16460, #16512, #16542 2024-06-18 13:33:05 -04:00
Julio Oliveira at Encora
81292df048
Feature 15348 - Quick Access Saved Filters (#15862)
* Added dropdown for Saved Filters.

* Added dropdown for Saved Filters.

* Added dropdown for Saved Filters.

* Fixed linter issues in savedFiltersSelect.ts

* Fixed linter issues in netbox.ts

* Fixed linter issues in netbox.ts

* Removed the blue tag with the filters when saved filters is selected.

* Adjusts in table_controls_htmx.html to vertical height of the Quick Search match to the dropdown.

* Adjusts in table_controls_htmx.html to vertical height of the Quick Search match to the dropdown.

* Adjusts in table_controls_htmx.html to vertical height of the Quick Search match to the dropdown.

* Minor adjusts in savedFiltersSelect.ts

* Addressed PR comment.

* Addressed PR comment.

* Addressed PR comment.

* Omit saved filters from 'applied filters'; clean up form widget

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-06-18 11:58:54 -04:00
Arthur Hanson
207c91ef6b 16460 remove spaces from telephone dialing 2024-06-18 08:30:40 -04:00
Arthur Hanson
cd9244fd4f
16416 enable dark/light toggle in mobile view (#16635)
* 16416 enable dark/light toggle in mobile view

* 16416 move to inc file
2024-06-18 08:28:18 -04:00
Jeremy Stretch
973bd0ed75
Fixes #16512: Restore a user's preferred language on login (#16628) 2024-06-18 08:17:08 -04:00
github-actions
1eebb98b56 Update source translation strings 2024-06-18 05:02:24 +00:00
Jeremy Stretch
388ba3d736 #16388: Rename database indexes & constraints 2024-06-17 13:47:30 -04:00
Jeremy Stretch
d2a8e52585 Fixes #16444: Disable ordering circuits list by A/Z termination 2024-06-17 12:49:00 -04:00
Jeremy Stretch
b077c664e3 Fixes #16542: Fix bulk form operations when HTMX is enabled 2024-06-17 11:35:49 -04:00
Jeremy Stretch
6f35a2ac2b Fixes #16452: Fix sizing of buttons within object attribute panels 2024-06-17 11:35:10 -04:00
Jeremy Stretch
9559349541 Fixes #16450: Rack unit filter should be case-insensitive 2024-06-17 11:33:17 -04:00
Arthur Hanson
91dcecbd07
15106 Add Length Field to Wireless Link (#16528)
* 15106 add wireles link length

* 15106 add wireles link length

* 15106 add wireless link length

* 15106 add tests

* 15106 rename length -> distance

* 15106 rename length -> distance

* 15106 review comments

* 15106 review comments

* 15106 fix form

* 15106 length -> distance
2024-06-17 09:19:49 -04:00
Jeremy Stretch
e12edd7420 #16388: Fix migration bug 2024-06-17 08:36:03 -04:00
Arthur Hanson
6abad9c20c 16586 add .python-version to gitignore 2024-06-17 08:04:29 -04:00
Jeremy Stretch
853d990c03
Closes #16388: Move change logging resources from extras to core (#16545)
* Initial work on #16388

* Misc cleanup
2024-06-17 08:03:06 -04:00
github-actions
c8aac13cee Update source translation strings 2024-06-15 05:02:20 +00:00
Jeremy Stretch
49971dd7db Changelog for #13925, #14829, #15794, #16143, #16256, #16454 2024-06-14 10:56:03 -04:00
Jeremy Stretch
b2360b62b5 Fixes #13925: Support 'zulu' style timestamps for custom fields 2024-06-14 10:38:09 -04:00
github-actions
a597ad849e Update source translation strings 2024-06-13 05:02:20 +00:00
Jeremy Stretch
83da49cfa3 Update release checklist to include building public docs 2024-06-12 12:28:27 -04:00
Arthur Hanson
c6553c45dd
7537 add serial number to virtual machines (#16407)
* 7537 add serial number to virtual machines

* 7537 add migration

* 7537 add sn to search

* 7537 add to model documentation

* 8984 move serializer field

* 8984 add to detail view and search index

* 7537 serial_number -> serial

* 7537 fix migration

* Add missing serial field

* Give serial field higher precedence for search

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-06-12 10:15:16 -04:00
Alexander Haase
5353f83710
15794 Make "related objects" dynamic (#15876)
* Closes #15794: Make "related objects" dynamic

Instead of hardcoding relationships between models for the detail view,
they are now dynamically generated.

* Fix related models call

* Remove extra related models hook

Instead of providing a rarely used hook method, additional related
models can now be passed directly to the lookup method.

* Fix relations view for ASNs

ASNs have ManyToMany relationships and therefore can't used automatic
resolving. Explicit relations have been restored as before.

* Add method call keywords for clarification

* Cleanup related models

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-06-12 09:46:41 -04:00
Julio Oliveira at Encora
763d65bed9
Added current time zone to render method in DateTimeColumn (#16323) 2024-06-12 09:23:49 -04:00
github-actions
fbe64cb9a4 Update source translation strings 2024-06-12 05:02:10 +00:00
Julio Oliveira at Encora
d85cf9ee0d
16256 - Allow alphabetical ordering of bookmarks on dashboard (#16426)
* Added alphabetical ordering of bookmarks.

* Addressed PR comments.

* Rename choice constants & fix unrelated typo

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-06-11 09:21:24 -04:00
Arthur Hanson
c1d7696b2a
14692 Convert VM disk size (#16434)
* 14692 convert disk size to MB

* 14692 fix list display

* 14692 fix migration

* Update netbox/virtualization/migrations/0039_convert_disk_size.py

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-06-11 09:19:57 -04:00
Jeremy Stretch
eb3d423077 Fixes #16454: Roll back django-debug-toolbar version to avoid DNS looukp bug 2024-06-10 12:56:32 -04:00
github-actions
56b6b1b9d8 Update source translation strings 2024-06-08 05:02:21 +00:00
Jeremy Stretch
4da5bd6ed1 #15908: Update upgrade.sh 2024-06-07 14:36:41 -04:00
Arthur Hanson
c7176e86fc
15410 removed deprecated filters (#16410)
* 15410 removed legacy filters

* 15410 fix tests

* 15410 fix tests
2024-06-07 14:08:30 -04:00
Jeremy Stretch
e820c145f3 Skip CI for commits that only update translations 2024-06-07 13:50:58 -04:00
Jeremy Stretch
c6bd714a04
Closes #15908: Establish canonical & local sources for release info (#16420)
* Closes #15908: Establish canonical & local sources for release info

* Update references to settings.VERSION
2024-06-07 13:41:48 -04:00
Julio Oliveira at Encora
5788b6cb28
Fixes #14829 Simple condition (without and/or) does not work in event rule (#14870) 2024-06-07 07:45:19 -07:00
github-actions
83dc92ed2d Update source translation strings 2024-06-07 05:02:09 +00:00
Arthur
1952d3e63a Merge branch 'develop' into feature 2024-06-06 11:17:43 -07:00
Jeremy Stretch
c4640534f9 PRVB 2024-06-06 12:02:30 -04:00
Jeremy Stretch
e68b83907b
Merge pull request #16432 from netbox-community/develop
Release v4.0.5
2024-06-06 11:59:00 -04:00
Jeremy Stretch
2682f03a6b Re-bundle static assets 2024-06-06 11:42:47 -04:00
Jeremy Stretch
2304df84d5 Merge branch 'master' into develop 2024-06-06 11:36:08 -04:00
Jeremy Stretch
5530556626
Merge pull request #16429 from netbox-community/develop
Release v4.0.5
2024-06-06 11:31:54 -04:00
Jeremy Stretch
e4d240ace2 Release v4.0.5 2024-06-06 10:55:30 -04:00
transifex-integration[bot]
58f22eec37
Updates for project NetBox (#16346)
* Translate django.po in de [Manual Sync]

74% of minimum 1% reviewed source file: 'django.po'
on 'de'.

Sync of partially translated files: 
untranslated content is included with an empty translation 
or source language content depending on file format

* Translate django.po in de [Manual Sync]

74% of minimum 1% reviewed source file: 'django.po'
on 'de'.

Sync of partially translated files: 
untranslated content is included with an empty translation 
or source language content depending on file format

* Translate django.po in ru [Manual Sync]

30% of minimum 1% reviewed source file: 'django.po'
on 'ru'.

Sync of partially translated files: 
untranslated content is included with an empty translation 
or source language content depending on file format

* Translate django.po in pt [Manual Sync]

2% of minimum 1% reviewed source file: 'django.po'
on 'pt'.

Sync of partially translated files: 
untranslated content is included with an empty translation 
or source language content depending on file format

* Translate django.po in fr [Manual Sync]

12% of minimum 1% reviewed source file: 'django.po'
on 'fr'.

Sync of partially translated files: 
untranslated content is included with an empty translation 
or source language content depending on file format

* Translate django.po in tr [Manual Sync]

7% of minimum 1% reviewed source file: 'django.po'
on 'tr'.

Sync of partially translated files: 
untranslated content is included with an empty translation 
or source language content depending on file format

---------

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
2024-06-06 10:27:06 -04:00
Julio Oliveira at Encora
7e1b3d0b54
15873 - Make Cluster resource counters more readable (#15900)
* Created "convert_byte_size" method to convert the memory and disk size according to unit informed.
Changed "get_extra_context" method from "ClusterView" to use the method above and convert all the disks and memories from VMs to normalize the units.

* Changed decimal size for memory_sum and disk_sum

* Added test for convert_byte_size.

* Fixed

* Addressed PR comments.
Changed humanize_megabytes in helpers.py

* Addressed PR comments.
Changed humanize_megabytes in helpers.py

* Linter issues for helpers.py

* Changed humanize_megabytes

* Changed humanize_megabytes

* Changed humanize_megabytes

* Added the title to display the value in MB when mouseover.

* Addressed PR comment.

* Addressed PR comment.

* Rewrite sizing logic

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-06-06 09:37:29 -04:00
Julio Oliveira at Encora
3acf3b51ee
Fixes: #14567 - Export current view of IP Addresses (#15659)
* Added javascript and htmx to change the url.

* Added javascript and htmx to change the url

* Addressed PR comments

* Added Netbox.js and netbox.js.map

* Addressed PR comments

* Addressed PR comments

* Addressed PR comments

* Addressed PR comments

* Addressed PR comments

* Addressed PR comments

* Addressed PR comments

* Addressed PR comments

* Linter Issues

* Fix assets issue

* Fix assets issue

* Addressed PR comment.
It was added clearLinkParams to clear button.

* Added passive:true to search.ts

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-06-06 09:35:27 -04:00
Arthur Hanson
8f87c72eaa
16050 Show script python_class name and description (#16185)
* 16050 Show script python_class name and description

* 16050 change to use Meta.description

* 16050 change to use Meta.description

* 16050 remove module name customization from docs
2024-06-06 09:05:59 -04:00
Louis Jarasius
18b43408ec
Fixes #16274: Dark mode highlight color (#16355)
* Increase ::selection background-color aplha

* Improve comment for override

* Add compiled CSS

* Only override on dark theme
2024-06-06 08:44:32 -04:00
Julio Oliveira at Encora
b10fb67ce9
Fixed error when the active Config is deleted and rest only one to restore. (#16408) 2024-06-05 12:23:36 -07:00
Jeremy Stretch
50169365a9 Closes #16359: Add navbar() method to PluginTemplateExtension 2024-06-05 12:34:12 -04:00
Jeremy Stretch
c27cb6f153 Fix styling of object jobs table 2024-06-05 09:02:05 -04:00
github-actions
81f0a40505 Update source translation strings 2024-06-05 05:02:18 +00:00
Jeremy Stretch
4242546270 Fixes #16376: Log changes on terminating objects when attaching a cable 2024-06-04 14:37:33 -04:00
Julio Oliveira at Encora
87109f5539
16315 - Cant filter changelog by object type (no results found) (#16324)
* Replaced "api=/api/extras/content-types/" with "/api/extras/object-types/" for JournalEntryFilterForm and ObjectChangeFilterForm.

* Addressed PR comment.

* Correct feature classifications

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-06-04 09:37:08 -04:00
Daniel Sheppard
8ab9afb8db
Fixes: #16083 - Add font-variant-ligatures setting to disable ligatur… (#16383)
* Fixes: #16083 - Add font-variant-ligatures setting to disable ligatures on chromium

* Fix comment

* Disable ligatures on input fields

* Condense rules & apply to all elements

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-06-04 09:02:38 -04:00
Jamie (Bear) Murphy
7be003f5a0
Allow plugins to extend objectchange view (#16371)
* allow plugins to extend objectchangeview with panels

* replace tabs with spaces

* Update netbox/templates/extras/objectchange.html

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>

* Eliminate excessive vertical margin

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-06-04 08:49:08 -04:00
github-actions
291e0665d0 Update source translation strings 2024-06-04 05:02:13 +00:00
Arthur Hanson
8e48e939aa
16261 fix graphql lookup for MultiValueCharFilter fields (#16354)
* 16261 fix graphql lookup for MultiValueCharFilter fields

* 16261 fix graphql lookup for MultiValueCharFilter fields

* 16261 fixup test

* 16261 fixup test

* Omit redundant assignment

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-06-03 10:24:01 -04:00
Daniel Sheppard
fdad59c8cc
Fixes: #16039 - Fix row highlighting on device components and VM interfaces (#16044)
* Fix row highlighting

* Minor fix for VMInterfaces

* Move duplicated dicts into inheritable meta class

* Add CableTerminationTable.Meta class for inheritance of the row_attrs to each descendant Meta class.
2024-06-03 08:47:53 -04:00
Jeremy Stretch
24d02cb381 Fixes #15194: Prevent enqueuing duplicate events for an object 2024-06-03 08:34:26 -04:00
Jeremy Stretch
602754439a Update workflows to use most recent release of each action 2024-06-03 08:01:50 -04:00
github-actions
e18e6cf756 Update source translation strings 2024-06-01 05:02:24 +00:00
Jeremy Stretch
0dde0b506e Fixes #16312: Fix object list navigation for dashboard widgets 2024-05-31 13:16:41 -04:00
Jeremy Stretch
26a856f57c Changelog for #13422, #14810, #15489, #16202, #16286, #16290 2024-05-31 10:29:53 -04:00
Jeremy Stretch
e095ec6860 Fixes #13422: Rebuild MPTT trees for applicable models when merging staged changes 2024-05-31 10:07:07 -04:00
Jeremy Stretch
05c69f84e6 Enable scheduled runs 2024-05-30 10:43:54 -04:00
github-actions
05d3224c33 Update source translation strings 2024-05-30 14:23:18 +00:00
Jeremy Stretch
4ad74587e5 Fix action permissions 2024-05-30 10:21:02 -04:00
Jeremy Stretch
153341c1b7 Install gettext 2024-05-30 10:14:43 -04:00
Jeremy Stretch
f5aa34bb37 Add GitHub action to run makemessages 2024-05-30 09:56:56 -04:00
Jeremy Stretch
a3c4984623 Skip CI if changes are limited to non-code paths 2024-05-30 08:37:24 -04:00
Jeremy Stretch
67165a9f91 Remove abhi1693 from issue triage rotation 2024-05-29 11:37:25 -04:00
Arthur Hanson
4d924a9041
16202 fix mapit button for internationalized decimal seperator (#16270)
* 16202 fix mapit button for internationalized decimal seperator

* 16202 revert untranslate

* 16202 revert untranslate
2024-05-29 10:22:59 -04:00
Jeremy Stretch
a094719d23 Closes #16290: Capture entire object in changelog data 2024-05-29 09:34:22 -04:00
Jeremy Stretch
418389c577 Update translations workflow documentation 2024-05-29 09:14:02 -04:00
Markku Leiniö
f1bf4c8758 Closes #16297: Add uwsgi.ini in .gitignore 2024-05-28 12:12:33 -04:00
Arthur
0bfb9777be 14810 add contacts to service 2024-05-28 09:44:41 -04:00
Arthur
360f3bc01b 16284 fix plugin forms doc 2024-05-28 09:07:32 -04:00
Arthur
8a91252d51 16286 fix provider account search 2024-05-28 09:06:34 -04:00
Julio-Oliveira-Encora
eb3adc050d Added 1000-Base-TX to the choices.py 2024-05-28 09:01:15 -04:00
Jeremy Stretch
103c08c2d2 Update exempt issue labels for stale action 2024-05-22 15:39:24 -04:00
Jeremy Stretch
806ff646e2 PRVB 2024-05-22 14:57:39 -04:00
Jeremy Stretch
3f345cdbee
Merge pull request #16247 from netbox-community/develop
Release v4.0.3
2024-05-22 14:56:03 -04:00
Jeremy Stretch
99b8f589cf Release v4.0.3 2024-05-22 14:10:00 -04:00
transifex-integration[bot]
ec510d865f
Updates for file netbox/translations/en/LC_MESSAGES/django.po (#16243)
* Translate django.po in es

100% translated source file: 'django.po'
on 'es'.

* Translate django.po in pt

100% translated source file: 'django.po'
on 'pt'.

* Translate django.po in ja

100% translated source file: 'django.po'
on 'ja'.

* Translate django.po in de

100% translated source file: 'django.po'
on 'de'.

* Translate django.po in uk

100% translated source file: 'django.po'
on 'uk'.

* Translate django.po in ru

100% translated source file: 'django.po'
on 'ru'.

* Translate django.po in fr

100% translated source file: 'django.po'
on 'fr'.

* Translate django.po in tr

100% translated source file: 'django.po'
on 'tr'.

* Translate django.po in zh

100% translated source file: 'django.po'
on 'zh'.

---------

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
2024-05-22 13:54:49 -04:00
Jeremy Stretch
cd3dea7ca9 Update origin strings for translation 2024-05-22 13:42:22 -04:00
Arthur Hanson
753c4021eb
14948 add has_virtual_device_contexts filter to device (#16209)
* 14948 add has_virtual_device_cnotexts filter to device

* 14948 make singular

* 14948 add test
2024-05-22 11:51:15 -04:00
Arthur Hanson
8e4466812d
16145 Use module.ScriptName to call Script API instead of PK (#16170)
* 16145 script api use module.script name instead of pk

* 16145 fix test

* 16145 allow both pk and script name

* 16145 update doc string

* Simplify retrieval logic

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-05-22 10:42:36 -04:00
Jeremy Stretch
83d3de276b Fixes #16232: Fix inclusion of bulk action checkboxes on dynamic tables 2024-05-22 10:35:19 -04:00
Jeremy Stretch
97f8f94ebb Changelog for #13764, #14653, #15082, #15603, #15962, #16164, #16173, #16228 2024-05-21 16:53:17 -04:00
Rémi NICOLE
60f5dd7b51
Support Redis Unix sockets (#16227)
* Fixes #15962: support Redis Unix sockets

* Clean up language & remove obsolete note

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-05-21 16:51:28 -04:00
Arthur Hanson
5b83d7040f
14653 Add Inventory Item column to all Device components tables (#16210)
* 14653 Add Inventory Item column to all Device components tables

* 14653 add inventory_items to base class
2024-05-21 16:40:35 -04:00
Jeremy Stretch
a3b34c7a78 Fixes #16228: Fix permissions enforcement for GraphQL queries of users & groups 2024-05-21 16:38:37 -04:00
Jeremy Stretch
902c61bf47 Rename environment variable controlling public docs build 2024-05-21 15:22:40 -04:00
Jeremy Stretch
09c1228712 Fixes #16216: Fix validation of JournalEntry when referenced by a custom field 2024-05-21 10:59:10 -04:00
Jeremy Stretch
02755d43d5 Define separate stale & close timers for PRs 2024-05-21 10:52:23 -04:00
Jeremy Stretch
44771d1221 Fixes #16139: Ensure input buttons use standard font family 2024-05-21 10:25:34 -04:00
Arthur Hanson
88461f9d7a
14250 add BPON to interface types (#16208)
* 14250 add BPON to interface types

* 14250 remove huwai specific from PON

* Reorder choices & fix typo

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-05-21 10:08:54 -04:00
Julio Oliveira at Encora
ade6d2e11b
16117 - Allow filtering by VLAN in Prefixes (#16204)
* Updated clean method on DynamicModelMultipleChoiceField to return the name.

* Updated VLAN section name
2024-05-21 10:07:58 -04:00
Julio Oliveira at Encora
b0520b9e60
Fixes #15603 - Added 5G to Cellular choices in dcim/choices.py. (#15677)
* Added 5G to Cellular choices in dcim/choices.py.

* Added 4G for Cellular choices.
2024-05-21 10:02:09 -04:00
Julio-Oliveira-Encora
85ca750ad7 Changed "clean_extra_choices" in "CustomFieldChoiceSetForm" to strip the space for value and label. 2024-05-21 09:59:24 -04:00
Arthur
17799df72e 13764 Add contacts to IP views 2024-05-21 09:06:49 -04:00
Jeremy Stretch
233b9029e1 Remove start date restriction from stale check for incomplete issues 2024-05-20 11:36:35 -04:00
devon-mar
5e92dac4ac Fix pagination when pagination.per_page is "" 2024-05-20 10:29:24 -04:00
Julio-Oliveira-Encora
6c51b89502 Updated clean method on DynamicModelMultipleChoiceField to return the name. 2024-05-20 08:37:31 -04:00
Jeremy Stretch
558a9beda2 Changelog for #12984, #13293, #14953, #14982, #15353, #15496, #16138 2024-05-17 16:23:02 -04:00
arcticash
9751ce6cb3 Moving the Molex connectors into their own category for better UX - expansion on #12984 2024-05-17 16:18:32 -04:00
arcticash
270a1da601 Adding Molex Micro-Fit connectors to power outlet choices to fix #12984 2024-05-17 16:18:32 -04:00
arcticash
46d12fbe2e Adding Molex Micro-Fit connectors to power plug choices to fix #12984 2024-05-17 16:18:32 -04:00
Sami Tahri
79b9ef7d0c fix: SerializedPKRelatedField schema now use nested serializer or response 2024-05-17 16:16:21 -04:00
Arthur Hanson
97a37576fc
14953 fix serializers when using add_related_count (#16158)
* 14953 fix serializers when using add_related_count

* 14953 update comments

* Set default=0 for annotated count fields

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-05-17 15:50:39 -04:00
Arthur Hanson
b2d2a23c26
15496 Add circuit termination to menu and associated forms (#15980)
* 15496 base changes

* 15496 detail view template

* 15496 tweaks

* 15496 bulk views

* 15496 filterset

* 15496 optimize qs

* 15496 bulk edit

* 15496 bulk import

* 15496 update tests

* Update netbox/templates/circuits/circuittermination.html

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>

* 15496 review changes

* 15496 template include

* 15496 expand filters

* 15496 split import form

* 15496 split import form

* 15496 add test for circuit bulk import with termiantions

* Add test for provider filters

* Rename provider column

* Fix test

* Misc cleanup

* Fix test

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-05-17 15:30:10 -04:00
Arthur Hanson
d060b380c9
16138 fix user/group permissions (#16152)
* 16138 change view perms

* 16138 add migration of group perms

* 16138 update users and groups in perm selection
2024-05-17 15:07:19 -04:00
Arthur Hanson
58da5c1252
15353 add better script error message (#15441)
* 15353 add better script error message

* Simplify _get_script_class() & add docstring

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-05-17 14:54:30 -04:00
Jeremy Stretch
4b2f26a800 Correct label name 2024-05-16 14:08:28 -04:00
Jeremy Stretch
cfe010007f Enable stale bot for incomplete issues 2024-05-16 14:04:37 -04:00
Jeremy Stretch
755513a148 #16127: Ignore local_settings.py 2024-05-15 17:05:39 -04:00
Jeremy Stretch
d78a86afac Drop Repography stats from README (malfunctioning) 2024-05-15 17:02:01 -04:00
Jeremy Stretch
dba36fafa7 Enable translation support for Chinese, German, and Ukrainian 2024-05-15 16:36:30 -04:00
transifex-integration[bot]
b666b10f14
Updates for file netbox/translations/en/LC_MESSAGES/django.po (#16151)
* Translate django.po in ja

100% translated source file: 'django.po'
on 'ja'.

* Translate django.po in uk

100% translated source file: 'django.po'
on 'uk'.

* Translate django.po in de

100% translated source file: 'django.po'
on 'de'.

* Translate django.po in zh

100% translated source file: 'django.po'
on 'zh'.

---------

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
2024-05-15 16:28:52 -04:00
Jeremy Stretch
0b7804c01c Fixes #13293: Limit interface selector for IP address to current device/VM 2024-05-14 14:48:47 -04:00
Jeremy Stretch
69545fd82d PRVB 2024-05-14 11:26:19 -04:00
Jeremy Stretch
cca1b0a897
Merge pull request #16132 from netbox-community/develop
Release v4.0.2
2024-05-14 11:20:56 -04:00
Jeremy Stretch
70c0aec53a Release v4.0.2 2024-05-14 11:02:17 -04:00
Jeremy Stretch
beb9b96395 Changelog for #16096, #16107, #16123, #16124, #16127 2024-05-14 10:35:00 -04:00
Jeremy Stretch
e5ab48e3c5 Fixes #16123: Fix custom script execution via REST API 2024-05-14 10:31:55 -04:00
Jeremy Stretch
c95dd0b4d1 Update translations 2024-05-14 09:30:28 -04:00
Jeremy Stretch
34f8bf7caf Update source strings for translations 2024-05-14 09:22:27 -04:00
Anton
1feb3742e2
add ENABLE_TRANSLATION setting to optionally turn translation off (#16096)
* add USE_I18N setting

* change setting name to ENABLE_TRANSLATION

* raise a warning in the UI when translation is disabled

* Misc cleanup

* Rename to TRANSLATION_ENABLED for consistency with other settings

---------

Co-authored-by: Anton Myasnikov <anton.myasnikov@nordigy.ru>
Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-05-14 09:21:00 -04:00
Jeremy Stretch
829bae6b29 Fixes #16124: Fix GraphQL API support for querying virtual machine interfaces 2024-05-14 09:15:57 -04:00
Jeremy Stretch
fcc8eccb6c Closes #16127: Enable loading local settings 2024-05-14 09:14:40 -04:00
Jeremy Stretch
c117218332 Fix permissions for stalebot (see actions/stale #1131) 2024-05-14 08:20:31 -04:00
Jeremy Stretch
b8a8db09ed
Closes #16107: Set LOGIN_REQUIRED to True by default (#16122)
* Closes #16107: Set LOGIN_REQUIRED to True by default

* Update tests
2024-05-14 07:53:19 -04:00
Jeremy Stretch
b67eda403a Changelog for #15119, #16077, #16078, #16090, #16101 2024-05-13 19:15:40 -04:00
Arthur Hanson
b291aa4312
16078 make GraphQL NumberFilter optional (#16115)
* 16078 make GraphQL NumberFilter optional

* 16078 add tests for graphql filtering

* 16078 add tests for graphql filtering

* 16078 add tests for graphql filtering
2024-05-13 19:01:30 -04:00
Jeremy Stretch
e6ccea0168 Refactor & expand search view tests 2024-05-13 18:56:44 -04:00
Jeremy Stretch
a20ccfee7e Update queryset resolution methods for compatibility with Django 5.0 2024-05-13 18:56:44 -04:00
Jeremy Stretch
c7850b586b Fixes #16101: Fix initial loading of pagination widget for dynamic object tables 2024-05-13 18:55:13 -04:00
Jeremy Stretch
e0f138dea2 Closes #16070: Set default template for ObjectChildrenView 2024-05-13 15:21:52 -04:00
Arthur
5be14b0ee2 16110 fix typo 2024-05-13 15:20:33 -04:00
Julio-Oliveira-Encora
dffd52d6b0 Added Cluster category and cluster, cluster_group for VLAN Group filters. 2024-05-13 15:16:01 -04:00
Markku Leiniö
4b91e79d1e
Closes #16090: Show NetBox version if plugin validation fails (#16094)
* Closes #16090: Show NetBox version if plugin validation fails

* Shorten error message

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-05-13 09:37:40 -04:00
Arthur
111cbe5b7c 16077 fix display of config revision 2024-05-13 09:33:30 -04:00
Jeremy Stretch
4a64a3f6e0 PRVB 2024-05-09 16:03:13 -04:00
Jeremy Stretch
a3f7dc0423
Merge pull request #16072 from netbox-community/develop
Release v4.0.1
2024-05-09 16:02:03 -04:00
Jeremy Stretch
ab62f416de
Merge branch 'master' into develop 2024-05-09 15:48:45 -04:00
Jeremy Stretch
9cd0a0d872 Release v4.0.1 2024-05-09 15:41:20 -04:00
Jeremy Stretch
d847f02434 Correct link 2024-05-09 15:39:48 -04:00
Arthur Hanson
8d11f8aa7c
14121 update plugin development docs for pyproject.toml (#15952)
* 14121 update plugin development docs for pyproject.toml

* 14121 review feedback

* Update docs/plugins/development/index.md

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>

* 14121 remove setup.py references

* 14121 add cookiecutter reference

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-05-09 15:06:19 -04:00
Jeremy Stretch
9d4932b221 Fixes #16061: Omit hidden fields from event rule form 2024-05-09 15:01:53 -04:00
Abhimanyu Saharan
e438ddb405
Adds 2.5 and 10g (#16068)
* adds 2.5 and 10g #15451

* Tweak constant names for consistency w/peers

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-05-09 14:58:24 -04:00
Arthur Hanson
a953ff20f9
15973 fix switch type on cable edit (#16049)
* 15973 fix switch type on cable edit

* 15973 fix cable add from device
2024-05-09 14:54:38 -04:00
Abhimanyu Saharan
08923d77d1 adds vms tab on device object view #15328 2024-05-09 14:33:31 -04:00
Markku Leiniö
2a06e1990a Closes #16056: Add binary-path configuration in uwsgi.ini 2024-05-09 13:11:11 -04:00
Jeremy Stretch
9f940150fc Closes #16010: Enable Prometheus middleware only if metrics are enabled 2024-05-09 10:47:33 -04:00
Jeremy Stretch
e055e0a222 Fixes #15968: Avoid resizing quick search field to display clear button 2024-05-09 10:46:41 -04:00
teapot
f40fb6a707 Fixes #16051: Wrap empty_text with gettext_lazy() 2024-05-09 08:09:53 -04:00
Arthur Hanson
1a56e8e23b
15148 add copy button to config context (#15954)
* 15148 add copy button to config context

* Merge configcontext_format.html into configcontext_data.html

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-05-09 08:06:53 -04:00
Markku Leiniö
0cc2963e6f
Closes #16043: Add 'die-on-term = true' to fix stopping uWSGI (#16045)
* Closes #16043: Add 'die-on-term = true' to fix stopping uWSGI

* Fix spelling
2024-05-08 14:51:54 -04:00
Arthur Hanson
56ea7b8714
16014 Update incorrect django-graphene reference and add link to filtering docs. (#16015)
* 16014 change ref from django-graphene to django-strawberry

* 16014 add references to filtering syntax

* 16014 remove graphene reference

* 16014 remove graphene reference

* Remove obsolete reference to Graphene

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-05-08 14:29:54 -04:00
Jeremy Stretch
6e658d43dc #15999: Additional cleanup 2024-05-08 14:06:48 -04:00
Arnold
6ff349dbac Putting field labels above fields 2024-05-08 14:06:04 -04:00
Daniel Sheppard
d7d97b1b52 Return an empty dict if the module cannot be loaded 2024-05-08 13:29:39 -04:00
Markku Leiniö
d7f652bcc7 Closes #16034: Disable uWSGI logging 2024-05-08 12:02:23 -04:00
Jeremy Stretch
313b6e624c Remove duplicate column definition from ReportResultsTable 2024-05-08 11:59:36 -04:00
Arthur
0df3787796 16031 make script result message display markdown 2024-05-08 11:43:20 -04:00
Jeremy Stretch
5c68fc9202 Fixes #16020: Include Python version on system UI view 2024-05-08 10:35:38 -04:00
Jeremy Stretch
ff8dabe8d9 Fixes #16025: Fix execution of scripts via the runscript management command 2024-05-08 10:30:47 -04:00
Markku Leiniö
5c5c0e1e43 Fixes #16032: Specify the WSGI module to load in uwsgi.ini 2024-05-08 10:28:35 -04:00
Jeremy Stretch
b87d1eca98 Fixes #16016: Correct typo 2024-05-08 10:15:43 -04:00
teapot
db823634cf Fixes #16027: Correct typo in error message 2024-05-08 09:42:20 -04:00
Jeremy Stretch
195dbaed00 Fixes #16017: Bump Django to 5.0.6 2024-05-07 21:33:13 -04:00
Jeremy Stretch
a9a012daf0 Fixes #16011: Fix site tenant assignment by PK via REST API 2024-05-07 16:35:11 -04:00
Jeremy Stretch
4d40699f2c Fixes #15995: Permit nullable fields referenced by unique constraints to be omitted from REST API requests 2024-05-07 15:33:14 -04:00
Jeremy Stretch
ccf32244d3 Fixes #16003: Enable cache busting on upgrade for setmode.js 2024-05-07 11:10:19 -04:00
Jeremy Stretch
9316f48a20 Fixes #15982: Restore the "assign IP" tab 2024-05-07 10:43:49 -04:00
Jeremy Stretch
acc2add845
Fixes #15977: Hide all admin menu items for non-authenticated users (#15978)
* Fixes #15977: Hide all admin menu items for non-authenticated users

* Account for absence of auth_required on PluginMenuItem
2024-05-07 10:37:42 -04:00
Tobias Genannt
b4486b4d30 Fix #15992: Removed integrations for sentry-sdk
According to the Sentry Python SDK documentation setting the
integrations manually is only needed when the integration configuration
needs to be changed.

See: https://docs.sentry.io/platforms/python/integrations/django/#options
2024-05-07 09:11:36 -04:00
Jeremy Stretch
d7592744d4 Update supported Python versions for v4.0 2024-05-06 16:41:16 -04:00
Jeremy Stretch
fbcec97328 PRVB 2024-05-06 15:28:43 -04:00
1220 changed files with 294671 additions and 253648 deletions

View File

@ -1,5 +1,6 @@
---
name: ✨ Feature Request
type: Feature
description: Propose a new NetBox feature or enhancement
labels: ["type: feature", "status: needs triage"]
body:
@ -14,7 +15,7 @@ body:
attributes:
label: NetBox version
description: What version of NetBox are you currently running?
placeholder: v4.0.0
placeholder: v4.3.4
validations:
required: true
- type: dropdown
@ -24,6 +25,7 @@ body:
- Data model extension
- New functionality
- Change to existing functionality
- Other
validations:
required: true
- type: textarea

View File

@ -1,5 +1,6 @@
---
name: 🐛 Bug Report
type: Bug
description: Report a reproducible bug in the current release of NetBox
labels: ["type: bug", "status: needs triage"]
body:
@ -26,7 +27,7 @@ body:
attributes:
label: NetBox Version
description: What version of NetBox are you currently running?
placeholder: v4.0.0
placeholder: v4.3.4
validations:
required: true
- type: dropdown
@ -34,10 +35,9 @@ body:
label: Python Version
description: What version of Python are you currently running?
options:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
- "3.12"
validations:
required: true
- type: textarea

View File

@ -1,5 +1,6 @@
---
name: 📖 Documentation Change
type: Documentation
description: Suggest an addition or modification to the NetBox documentation
labels: ["type: documentation", "status: needs triage"]
body:

View File

@ -1,5 +1,6 @@
---
name: 🌍 Translation
type: Translation
description: Request support for a new language in the user interface
labels: ["type: translation"]
body:

View File

@ -1,5 +1,6 @@
---
name: 🏡 Housekeeping
type: Housekeeping
description: A change pertaining to the codebase itself (developers only)
labels: ["type: housekeeping"]
body:

View File

@ -1,5 +1,6 @@
---
name: 🗑️ Deprecation
type: Deprecation
description: The removal of an existing feature or resource
labels: ["type: deprecation"]
body:

View File

@ -2,11 +2,14 @@
blank_issues_enabled: false
contact_links:
- name: 📖 Contributing Policy
url: https://github.com/netbox-community/netbox/blob/develop/CONTRIBUTING.md
url: https://github.com/netbox-community/netbox/blob/main/CONTRIBUTING.md
about: "Please read through our contributing policy before opening an issue or pull request."
- name: ❓ Discussion
url: https://github.com/netbox-community/netbox/discussions
about: "If you're just looking for help, try starting a discussion instead."
- name: 👔 Professional Support
url: https://netboxlabs.com/netbox-enterprise/
about: "Professional support is available for NetBox Enterprise or Cloud."
- name: 🌎 Correct a Translation
url: https://explore.transifex.com/netbox-community/netbox/
about: "Spot an incorrect translation? You can propose a fix on Transifex."

View File

@ -1,21 +0,0 @@
# auto-assign-issue (https://github.com/marketplace/actions/auto-assign-issue)
name: Issue assignment
on:
issues:
types: [opened]
permissions:
issues: write
jobs:
auto-assign:
runs-on: ubuntu-latest
steps:
- uses: pozil/auto-assign-issue@v1
if: "contains(github.event.issue.labels.*.name, 'status: needs triage')"
with:
# Weighted assignments
assignees: arthanson:3, jeffgdotorg:3, jeremystretch:3, abhi1693, DanSheps
numOfAssignee: 1
abortIfPreviousAssignees: true

View File

@ -1,7 +1,29 @@
name: CI
on: [push, pull_request]
on:
push:
paths-ignore:
- '.github/ISSUE_TEMPLATE/**'
- '.github/PULL_REQUEST_TEMPLATE.md'
- 'contrib/**'
- 'docs/**'
- 'netbox/translations/**'
pull_request:
paths-ignore:
- '.github/ISSUE_TEMPLATE/**'
- '.github/PULL_REQUEST_TEMPLATE.md'
- 'contrib/**'
- 'docs/**'
- 'netbox/translations/**'
permissions:
contents: read
# Add concurrency group to control job running
concurrency:
group: ${{ github.event_name }}-${{ github.ref }}-${{ github.actor }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
@ -10,7 +32,7 @@ jobs:
strategy:
matrix:
python-version: ['3.10', '3.11', '3.12']
node-version: ['18.x']
node-version: ['20.x']
services:
redis:
image: redis
@ -34,12 +56,12 @@ jobs:
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
@ -47,7 +69,7 @@ jobs:
run: npm install -g yarn
- name: Setup Node.js with Yarn Caching
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: yarn
@ -60,7 +82,7 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pycodestyle coverage tblib
pip install ruff coverage tblib
- name: Build documentation
run: mkdocs build
@ -72,7 +94,7 @@ jobs:
run: python netbox/manage.py makemigrations --check
- name: Check PEP8 compliance
run: pycodestyle --ignore=W504,E501 --exclude=node_modules netbox/
run: ruff check netbox/
- name: Check UI ESLint, TypeScript, and Prettier Compliance
run: yarn --cwd netbox/project-static validate

View File

@ -0,0 +1,33 @@
# close-stale-issues (https://github.com/marketplace/actions/close-stale-issues)
name: Close incomplete issues
on:
schedule:
- cron: '15 4 * * *'
workflow_dispatch:
permissions:
actions: write
issues: write
jobs:
stale:
if: github.repository == 'netbox-community/netbox'
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v9
with:
close-issue-message: >
This issue is being closed as no further information has been provided. If
you would like to revisit this topic, please first modify your original post
to include all the requested detail, and then ask that the issue be reopened.
days-before-stale: 7
days-before-close: 7
only-issue-labels: 'status: revisions needed'
operations-per-run: 100
remove-stale-when-updated: false
stale-issue-label: 'pending closure'
stale-issue-message: >
This is a reminder that additional information is needed in order to further
triage this issue. If the requested details are not provided, the issue will
soon be closed automatically.

View File

@ -7,27 +7,30 @@ on:
workflow_dispatch:
permissions:
actions: write
issues: write
pull-requests: write
jobs:
stale:
if: github.repository == 'netbox-community/netbox'
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v9
with:
# General parameters
operations-per-run: 200
remove-stale-when-updated: false
# Issue parameters
close-issue-message: >
This issue has been automatically closed due to lack of activity. In an
effort to reduce noise, please do not comment any further. Note that the
core maintainers may elect to reopen this issue at a later date if deemed
necessary.
close-pr-message: >
This PR has been automatically closed due to lack of activity.
days-before-stale: 90
days-before-close: 30
exempt-issue-labels: 'status: accepted,status: blocked,status: needs milestone'
operations-per-run: 100
remove-stale-when-updated: false
days-before-issue-stale: 90
days-before-issue-close: 30
exempt-issue-labels: 'status: accepted,status: backlog,status: blocked'
stale-issue-label: 'pending closure'
stale-issue-message: >
This issue has been automatically marked as stale because it has not had
@ -36,7 +39,14 @@ jobs:
issues may receive direct feedback. **Do not** attempt to circumvent this
process by "bumping" the issue; doing so will result in its immediate closure
and you may be barred from participating in any future discussions. Please see
our [contributing guide](https://github.com/netbox-community/netbox/blob/develop/CONTRIBUTING.md).
our [contributing guide](https://github.com/netbox-community/netbox/blob/main/CONTRIBUTING.md).
# Pull request parameters
close-pr-message: >
This PR has been automatically closed due to lack of activity.
days-before-pr-stale: 30
days-before-pr-close: 15
exempt-pr-labels: 'status: blocked'
stale-pr-label: 'pending closure'
stale-pr-message: >
This PR has been automatically marked as stale because it has not had

View File

@ -13,9 +13,10 @@ permissions:
jobs:
lock:
if: github.repository == 'netbox-community/netbox'
runs-on: ubuntu-latest
steps:
- uses: dessant/lock-threads@v5
- uses: dessant/lock-threads@1bf7ec25051fe7c00bdd17e6a7cf3d7bfb7dc771 # v5.0.1
with:
issue-inactive-days: 90
pr-inactive-days: 30

View File

@ -0,0 +1,55 @@
name: Update translation strings
on:
schedule:
- cron: '0 5 * * *'
workflow_dispatch:
permissions:
contents: write
env:
LOCALE: "en"
jobs:
makemessages:
if: github.repository == 'netbox-community/netbox'
runs-on: ubuntu-latest
env:
NETBOX_CONFIGURATION: netbox.configuration_testing
steps:
- name: Create app token
uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: 1076524
private-key: ${{ secrets.HOUSEKEEPING_SECRET_KEY }}
- name: Check out repo
uses: actions/checkout@v4
with:
token: ${{ steps.app-token.outputs.token }}
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.11
- name: Install system dependencies
run: sudo apt install -y gettext
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run makemessages
run: python netbox/manage.py makemessages -l ${{ env.LOCALE }}
- name: Commit changes
uses: EndBug/add-and-commit@a94899bca583c204427a224a7af87c02f9b325d5 # v9.1.4
with:
add: 'netbox/translations/'
default_author: github_actions
message: 'Update source translation strings'

3
.gitignore vendored
View File

@ -17,12 +17,15 @@ yarn-error.log*
/venv/
/*.sh
local_requirements.txt
local_settings.py
!upgrade.sh
fabfile.py
gunicorn.py
uwsgi.ini
netbox.log
netbox.pid
.DS_Store
.idea
.coverage
.vscode
.python-version

44
.pre-commit-config.yaml Normal file
View File

@ -0,0 +1,44 @@
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.9
hooks:
- id: ruff
name: "Ruff linter"
args: [ netbox/ ]
- repo: local
hooks:
- id: django-check
name: "Django system check"
description: "Run Django's internal check for common problems"
entry: python netbox/manage.py check
language: system
pass_filenames: false
types: [python]
- id: django-makemigrations
name: "Django migrations check"
description: "Check for any missing Django migrations"
entry: python netbox/manage.py makemigrations --check
language: system
pass_filenames: false
types: [python]
- id: mkdocs-build
name: "Build documentation"
description: "Build the documentation with mkdocs"
files: 'docs/'
entry: mkdocs build
language: system
pass_filenames: false
- id: yarn-validate
name: "Yarn validate"
description: "Check UI ESLint, TypeScript, and Prettier compliance"
files: 'netbox/project-static/'
entry: yarn --cwd netbox/project-static validate
language: system
pass_filenames: false
- id: verify-bundles
name: "Verify static asset bundles"
description: "Ensure that any modified static assets have been compiled"
files: 'netbox/project-static/'
entry: scripts/verify-bundles.sh
language: system
pass_filenames: false

12
.tx/config Executable file
View File

@ -0,0 +1,12 @@
[main]
host = https://app.transifex.com
[o:netbox-community:p:netbox:r:034999968a7366ba27a8bdf1ab63bf42]
file_filter = netbox/translations/<lang>/LC_MESSAGES/django.po
source_file = netbox/translations/en/LC_MESSAGES/django.po
type = PO
minimum_perc = 0
resource_name = django.po
replace_edited_strings = false
keep_translations = false

View File

@ -8,7 +8,7 @@
</h3>
<h3>
:jigsaw: <a href="#jigsaw-creating-plugins">Create a plugin</a> &middot;
:rescue_worker_helmet: <a href="#rescue_worker_helmet-become-a-maintainer">Become a maintainer</a> &middot;
:briefcase: <a href="#briefcase-looking-for-a-job">Work with us!</a> &middot;
:heart: <a href="#heart-other-ways-to-contribute">Other ideas</a>
</h3>
</div>
@ -40,7 +40,7 @@ NetBox users are welcome to participate in either role, on stage or in the crowd
* First, ensure that you're running the [latest stable version](https://github.com/netbox-community/netbox/releases) of NetBox. If you're running an older version, it's likely that the bug has already been fixed.
* Next, search our [issues list](https://github.com/netbox-community/netbox/issues?q=is%3Aissue) to see if the bug you've found has already been reported. If you come across a bug report that seems to match, please click "add a reaction" in the top right corner of the issue and add a thumbs up (:thumbsup:). This will help draw more attention to it. Any comments you can add to provide additional information or context would also be much appreciated.
* Next, search our [issues list](https://github.com/netbox-community/netbox/issues?q=is%3Aissue) to see if the bug you've found has already been reported. If you come across a bug report that seems to match, please click "add a reaction" in the bottom left corner of the issue and add a thumbs up ( :thumbsup: ). This will help draw more attention to it. Any comments you can add to provide additional information or context would also be much appreciated.
* If you can't find any existing issues (open or closed) that seem to match yours, you're welcome to [submit a new bug report](https://github.com/netbox-community/netbox/issues/new?label=type%3A+bug&template=bug_report.yaml). Be sure to complete the entire report template, including detailed steps that someone triaging your issue can follow to confirm the reported behavior. (If we're not able to replicate the bug based on the information provided, we'll ask for additional detail.)
@ -56,7 +56,9 @@ intake policy](https://github.com/netbox-community/netbox/wiki/Issue-Intake-Poli
## :bulb: Feature Requests
* First, check the GitHub [issues list](https://github.com/netbox-community/netbox/issues?q=is%3Aissue) to see if the feature you have in mind has already been proposed. If you happen to find an open feature request that matches your idea, click "add a reaction" in the top right corner of the issue and add a thumbs up (:thumbsup:). This ensures that the issue has a better chance of receiving attention. Also feel free to add a comment with any additional justification for the feature.
* First, check the GitHub [issues list](https://github.com/netbox-community/netbox/issues?q=is%3Aissue) to see if the feature you have in mind has already been proposed. If you happen to find an open feature request that matches your idea, click "add a reaction" in the top right corner of the issue and add a thumbs up ( :thumbsup: ). This ensures that the issue has a better chance of receiving attention. Also feel free to add a comment with any additional justification for the feature.
* Please don't submit duplicate issues! Sometimes we reject feature requests, for various reasons. Even if you disagree with those reasons, please **do not** submit a duplicate feature request. It is very disrepectful of the maintainers' time, and you may be barred from opening future issues.
* If you have a rough idea that's not quite ready for formal submission yet, start a [GitHub discussion](https://github.com/netbox-community/netbox/discussions) instead. This is a great way to test the viability and narrow down the scope of a new feature prior to submitting a formal proposal, and can serve to generate interest in your idea from other community members.
@ -82,7 +84,7 @@ intake policy](https://github.com/netbox-community/netbox/wiki/Issue-Intake-Poli
* It's very important that you not submit a pull request until a relevant issue has been opened **and** assigned to you. Otherwise, you risk wasting time on work that may ultimately not be needed.
* New pull requests should generally be based off of the `develop` branch, rather than `master`. The `develop` branch is used for ongoing development, while `master` is used for tracking stable releases. (If you're developing for an upcoming minor release, use `feature` instead.)
* New pull requests should generally be based off of the `main` branch. This branch, in keeping with the [trunk-based development](https://trunkbaseddevelopment.com/) approach, is used for ongoing development and bug fixes and always represents the newest stable code, from which releases are periodically branched. (If you're developing for an upcoming minor release, use `feature` instead.)
* In most cases, it is not necessary to add a changelog entry: A maintainer will take care of this when the PR is merged. (This helps avoid merge conflicts resulting from multiple PRs being submitted simultaneously.)
@ -107,21 +109,9 @@ Do you have an idea for something you'd like to build in NetBox, but might not b
Check out our [plugin development tutorial](https://github.com/netbox-community/netbox-plugin-tutorial) to get started!
## :rescue_worker_helmet: Become a Maintainer
## :briefcase: Looking for a Job?
We're always looking for motivated individuals to join the maintainers team and help drive NetBox's long-term development. Some of our most sought-after skills include:
* Python development with a strong focus on the [Django](https://www.djangoproject.com/) framework
* Expertise working with PostgreSQL databases
* Javascript & TypeScript proficiency
* A knack for web application design (HTML & CSS)
* Familiarity with git and software development best practices
* Excellent attention to detail
* Working experience in the field of network operations & engineering
We generally ask that maintainers dedicate around four hours of work to the project each week on average, which includes both hands-on development and project management tasks such as issue triage. Maintainers are also encouraged (but not required) to attend our bi-weekly Zoom call to catch up on recent items.
Interested? You can contact our lead maintainer, Jeremy Stretch, at jeremy@netbox.dev or on the [NetDev Community Slack](https://netdev.chat/). We'd love to have you on the team!
At [NetBox Labs](https://netboxlabs.com/), we're always looking for highly skilled and motivated people to join our team. While NetBox is a core part of our product lineup, we have an ever-expanding suite of solutions serving the network automation space. Check out our [current openings](https://netboxlabs.com/careers/) to see if you might be a fit!
## :heart: Other Ways to Contribute

View File

@ -1,13 +1,17 @@
<div align="center">
<img src="https://raw.githubusercontent.com/netbox-community/netbox/develop/docs/netbox_logo.svg" width="400" alt="NetBox logo" />
<img src="https://raw.githubusercontent.com/netbox-community/netbox/main/docs/netbox_logo_light.svg" width="400" alt="NetBox logo" />
<p><strong>The cornerstone of every automated network</strong></p>
<a href="https://github.com/netbox-community/netbox/releases"><img src="https://img.shields.io/github/v/release/netbox-community/netbox" alt="Latest release" /></a>
<a href="https://github.com/netbox-community/netbox/blob/master/LICENSE.txt"><img src="https://img.shields.io/badge/license-Apache_2.0-blue.svg" alt="License" /></a>
<a href="https://github.com/netbox-community/netbox/blob/main/LICENSE.txt"><img src="https://img.shields.io/badge/license-Apache_2.0-blue.svg" alt="License" /></a>
<a href="https://github.com/netbox-community/netbox/graphs/contributors"><img src="https://img.shields.io/github/contributors/netbox-community/netbox?color=blue" alt="Contributors" /></a>
<a href="https://github.com/netbox-community/netbox/stargazers"><img src="https://img.shields.io/github/stars/netbox-community/netbox?style=flat" alt="GitHub stars" /></a>
<a href="https://explore.transifex.com/netbox-community/netbox/"><img src="https://img.shields.io/badge/languages-7-blue" alt="Languages supported" /></a>
<a href="https://github.com/netbox-community/netbox/actions/workflows/ci.yml"><img src="https://github.com/netbox-community/netbox/workflows/CI/badge.svg?branch=master" alt="CI status" /></a>
<p></p>
<a href="https://explore.transifex.com/netbox-community/netbox/"><img src="https://img.shields.io/badge/languages-15-blue" alt="Languages supported" /></a>
<a href="https://github.com/netbox-community/netbox/actions/workflows/ci.yml"><img src="https://github.com/netbox-community/netbox/actions/workflows/ci.yml/badge.svg" alt="CI status" /></a>
<p>
<strong><a href="https://netboxlabs.com/community/">NetBox Community</a></strong> |
<strong><a href="https://netboxlabs.com/netbox-cloud/">NetBox Cloud</a></strong> |
<strong><a href="https://netboxlabs.com/netbox-enterprise/">NetBox Enterprise</a></strong>
</p>
</div>
NetBox exists to empower network engineers. Since its release in 2016, it has become the go-to solution for modeling and documenting network infrastructure for thousands of organizations worldwide. As a successor to legacy IPAM and DCIM applications, NetBox provides a cohesive, extensive, and accessible data model for all things networked. By providing a single robust user interface and programmable APIs for everything from cable maps to device configurations, NetBox serves as the central source of truth for the modern network.
@ -17,7 +21,6 @@ NetBox exists to empower network engineers. Since its release in 2016, it has be
<a href="#why-netbox">Why NetBox?</a> |
<a href="#getting-started">Getting Started</a> |
<a href="#get-involved">Get Involved</a> |
<a href="#project-stats">Project Stats</a> |
<a href="#screenshots">Screenshots</a>
</p>
@ -82,11 +85,6 @@ NetBox automatically logs the creation, modification, and deletion of all manage
* The [official documentation](https://docs.netbox.dev) offers a comprehensive introduction.
* Check out [our wiki](https://github.com/netbox-community/netbox/wiki/Community-Contributions) for even more projects to get the most out of NetBox!
<p align="center">
<a href="https://netboxlabs.com/netbox-cloud/"><img src="docs/media/misc/netbox_cloud.png" alt="NetBox Cloud" /></a><br />
Looking for a managed solution? Check out <strong><a href="https://netboxlabs.com/netbox-cloud/">NetBox Cloud</a></strong> or <strong><a href="https://netboxlabs.com/netbox-enterprise/">NetBox Enterprise</a></strong>!
</p>
## Get Involved
* Follow [@NetBoxOfficial](https://twitter.com/NetBoxOfficial) on Twitter!
@ -95,16 +93,6 @@ NetBox automatically logs the creation, modification, and deletion of all manage
* Contributions from the community are encouraged and appreciated! Check out our [contributing guide](CONTRIBUTING.md) to get started.
* [Share your idea](https://plugin-ideas.netbox.dev/) for a new plugin, or [learn how to build one](https://github.com/netbox-community/netbox-plugin-tutorial) yourself!
## Project Stats
<p align="center">
<a href="https://github.com/netbox-community/netbox/commits"><img src="https://images.repography.com/29023055/netbox-community/netbox/recent-activity/whQtEr_TGD9PhW1BPlhlEQ5jnrgQ0KJpm-LlGtpoGO0/3Kx_iWUSBRJ5-AI4QwJEJWrUDEz3KrX2lvh8aYE0WXY_timeline.svg" alt="Timeline graph"></a>
<a href="https://github.com/netbox-community/netbox/issues"><img src="https://images.repography.com/29023055/netbox-community/netbox/recent-activity/whQtEr_TGD9PhW1BPlhlEQ5jnrgQ0KJpm-LlGtpoGO0/3Kx_iWUSBRJ5-AI4QwJEJWrUDEz3KrX2lvh8aYE0WXY_issues.svg" alt="Issues graph"></a>
<a href="https://github.com/netbox-community/netbox/pulls"><img src="https://images.repography.com/29023055/netbox-community/netbox/recent-activity/whQtEr_TGD9PhW1BPlhlEQ5jnrgQ0KJpm-LlGtpoGO0/3Kx_iWUSBRJ5-AI4QwJEJWrUDEz3KrX2lvh8aYE0WXY_prs.svg" alt="Pull requests graph"></a>
<a href="https://github.com/netbox-community/netbox/graphs/contributors"><img src="https://images.repography.com/29023055/netbox-community/netbox/recent-activity/whQtEr_TGD9PhW1BPlhlEQ5jnrgQ0KJpm-LlGtpoGO0/3Kx_iWUSBRJ5-AI4QwJEJWrUDEz3KrX2lvh8aYE0WXY_users.svg" alt="Top contributors"></a>
<br />Stats via <a href="https://repography.com">Repography</a>
</p>
## Screenshots
<p align="center">

View File

@ -14,9 +14,15 @@ Administrators are encouraged to adhere to industry best practices concerning th
* Prohibit access to your database from clients other than the NetBox application
* Keep your deployment updated to the most recent stable release
## Compliance Reporting
Please note that security compliance reports (e.g. SOC 2) are provided by NetBox Labs only to customers using NetBox Cloud or NetBox Enterprise. They are not available to users of self-hosted NetBox Community Edition.
If you would like to consider upgrading to NetBox Cloud or Enterprise, please contact `sales@netboxlabs.com`.
## Reporting a Suspected Vulnerability
If you believe you've uncovered a security vulnerability and wish to report it confidentially, you may do so via email. Please note that any reported vulnerabilities **MUST** meet all the following conditions:
If you believe you've uncovered a security vulnerability and wish to report it confidentially, you may do so by emailing `security@netboxlabs.com`. Please ensure that your report meets all the following conditions:
* Affects the most recent stable release of NetBox, or a current beta release
* Affects a NetBox instance installed and configured per the official documentation
@ -24,7 +30,7 @@ If you believe you've uncovered a security vulnerability and wish to report it c
Please note that we **DO NOT** accept reports generated by automated tooling which merely suggest that a file or file(s) _may_ be vulnerable under certain conditions, as these are most often innocuous.
If you believe that you've found a vulnerability which meets all of these conditions, please [submit a draft security advisory](https://github.com/netbox-community/netbox/security/advisories/new) on GitHub, or email a brief description of the suspected bug and instructions for reproduction to **security@netbox.dev**. For any security concerns regarding NetBox deployed via Docker, please see the [netbox-docker](https://github.com/netbox-community/netbox-docker) project.
For any security concerns regarding the community-maintained Docker image for NetBox, please see the [netbox-docker](https://github.com/netbox-community/netbox-docker) project.
### Bug Bounties

View File

@ -1,6 +1,6 @@
# The Python web framework on which NetBox is built
# https://docs.djangoproject.com/en/stable/releases/
Django<5.1
Django==5.2.*
# Django middleware which permits cross-domain API requests
# https://github.com/adamchainz/django-cors-headers/blob/main/CHANGELOG.rst
@ -14,6 +14,10 @@ django-debug-toolbar
# https://github.com/carltongibson/django-filter/blob/main/CHANGES.rst
django-filter
# Django Debug Toolbar extension for GraphiQL
# https://github.com/flavors/django-graphiql-debug-toolbar/blob/main/CHANGES.rst
django-graphiql-debug-toolbar
# HTMX utilities for Django
# https://django-htmx.readthedocs.io/en/latest/changelog.html
django-htmx
@ -42,6 +46,10 @@ django-rich
# https://github.com/rq/django-rq/blob/master/CHANGELOG.md
django-rq
# Provides a variety of storage backends
# https://github.com/jschneier/django-storages/blob/master/CHANGELOG.rst
django-storages
# Abstraction models for rendering and paginating HTML tables
# https://github.com/jieter/django-tables2/blob/master/CHANGELOG.md
django-tables2
@ -78,21 +86,21 @@ gunicorn
# https://jinja.palletsprojects.com/changes/
Jinja2
# JSON schema validation
# https://github.com/python-jsonschema/jsonschema/blob/main/CHANGELOG.rst
jsonschema
# Simple markup language for rendering HTML
# https://python-markdown.github.io/changelog/
Markdown
# File inclusion plugin for Python-Markdown
# https://github.com/cmacmackin/markdown-include
markdown-include
# MkDocs Material theme (for documentation build)
# https://squidfunk.github.io/mkdocs-material/changelog/
mkdocs-material
# Introspection for embedded code
# https://github.com/mkdocstrings/mkdocstrings/blob/main/CHANGELOG.md
mkdocstrings[python-legacy]
mkdocstrings[python]
# Library for manipulating IP prefixes and addresses
# https://github.com/netaddr/netaddr/blob/master/CHANGELOG.rst
@ -103,12 +111,13 @@ netaddr
nh3
# Fork of PIL (Python Imaging Library) for image processing
# https://github.com/python-pillow/Pillow/blob/main/CHANGES.rst
# https://github.com/python-pillow/Pillow/releases
# https://pillow.readthedocs.io/en/stable/releasenotes/
Pillow
# PostgreSQL database adapter for Python
# https://github.com/psycopg/psycopg/blob/master/docs/news.rst
psycopg[binary,pool]
psycopg[c,pool]
# YAML rendering library
# https://github.com/yaml/pyyaml/blob/master/CHANGES
@ -118,21 +127,26 @@ PyYAML
# https://github.com/psf/requests/blob/main/HISTORY.md
requests
# Social authentication framework
# https://github.com/python-social-auth/social-core/blob/master/CHANGELOG.md
social-auth-core
# rq
# https://github.com/rq/rq/blob/master/CHANGES.md
rq
# Django app for social-auth-core
# https://github.com/python-social-auth/social-app-django/blob/master/CHANGELOG.md
social-auth-app-django
# Social authentication framework
# https://github.com/python-social-auth/social-core/blob/master/CHANGELOG.md
social-auth-core
# Strawberry GraphQL
# https://github.com/strawberry-graphql/strawberry/blob/main/CHANGELOG.md
strawberry-graphql
# Strawberry GraphQL Django extension
# https://github.com/strawberry-graphql/strawberry-django/blob/main/CHANGELOG.md
strawberry-graphql-django
# https://github.com/strawberry-graphql/strawberry-django/releases
# See #19771
strawberry-graphql-django==0.60.0
# SVG image rendering (used for rack elevations)
# https://github.com/mozman/svgwrite/blob/master/NEWS.rst

View File

@ -20,7 +20,7 @@
Alias /static /opt/netbox/netbox/static
<Directory /opt/netbox/netbox/static>
Options Indexes FollowSymLinks MultiViews
Options FollowSymLinks MultiViews
AllowOverride None
Require all granted
</Directory>

View File

@ -12,6 +12,9 @@
"left-to-right",
"right-to-left",
"side-to-rear",
"rear-to-side",
"bottom-to-top",
"top-to-bottom",
"passive",
"mixed"
]
@ -149,6 +152,7 @@
"nema-l15-60p",
"nema-l21-20p",
"nema-l21-30p",
"nema-l22-20p",
"nema-l22-30p",
"cs6361c",
"cs6365c",
@ -179,6 +183,9 @@
"usb-micro-ab",
"usb-3-b",
"usb-3-micro-b",
"molex-micro-fit-1x2",
"molex-micro-fit-2x2",
"molex-micro-fit-2x4",
"dc-terminal",
"saf-d-grid",
"neutrik-powercon-20",
@ -259,6 +266,7 @@
"nema-l15-60r",
"nema-l21-20r",
"nema-l21-30r",
"nema-l22-20r",
"nema-l22-30r",
"CS6360C",
"CS6364C",
@ -281,7 +289,11 @@
"usb-a",
"usb-micro-b",
"usb-c",
"molex-micro-fit-1x2",
"molex-micro-fit-2x2",
"molex-micro-fit-2x4",
"dc-terminal",
"eaton-c39",
"hdot-cx",
"saf-d-grid",
"neutrik-powercon-20a",
@ -317,10 +329,14 @@
"100base-tx",
"100base-t1",
"1000base-t",
"1000base-sx",
"1000base-lx",
"1000base-tx",
"2.5gbase-t",
"5gbase-t",
"10gbase-t",
"10gbase-cx4",
"100base-x-sfp",
"1000base-x-gbic",
"1000base-x-sfp",
"10gbase-x-sfpp",
@ -353,6 +369,8 @@
"800gbase-x-qsfpdd",
"800gbase-x-osfp",
"1000base-kx",
"2.5gbase-kx",
"5gbase-kr",
"10gbase-kr",
"10gbase-kx4",
"25gbase-kr",
@ -368,11 +386,15 @@
"ieee802.11ad",
"ieee802.11ax",
"ieee802.11ay",
"ieee802.11be",
"ieee802.15.1",
"ieee802.15.4",
"other-wireless",
"gsm",
"cdma",
"lte",
"4g",
"5g",
"sonet-oc3",
"sonet-oc12",
"sonet-oc48",
@ -406,12 +428,16 @@
"e3",
"xdsl",
"docsis",
"moca",
"bpon",
"epon",
"10g-epon",
"gpon",
"xg-pon",
"xgs-pon",
"ng-pon2",
"epon",
"10g-epon",
"25g-pon",
"50g-pon",
"cisco-stackwise",
"cisco-stackwise-plus",
"cisco-flexstack",
@ -476,6 +502,9 @@
"n",
"mrj21",
"fc",
"fc-pc",
"fc-upc",
"fc-apc",
"lc",
"lc-pc",
"lc-upc",
@ -503,6 +532,14 @@
"urm-p4",
"urm-p8",
"splice",
"usb-a",
"usb-b",
"usb-c",
"usb-mini-a",
"usb-mini-b",
"usb-micro-a",
"usb-micro-b",
"usb-micro-ab",
"other"
]
}
@ -533,6 +570,9 @@
"n",
"mrj21",
"fc",
"fc-pc",
"fc-upc",
"fc-apc",
"lc",
"lc-pc",
"lc-upc",
@ -560,6 +600,14 @@
"urm-p4",
"urm-p8",
"splice",
"usb-a",
"usb-b",
"usb-c",
"usb-mini-a",
"usb-mini-b",
"usb-micro-a",
"usb-micro-b",
"usb-micro-ab",
"other"
]
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -11,8 +11,24 @@ master = true
; clear environment on exit
vacuum = true
; make SIGTERM stop the app (instead of reload)
die-on-term = true
; exit if no app can be loaded
need-app = true
; do not use multiple interpreters
single-interpreter = true
; change to the project directory
chdir = netbox
; specify the WSGI module to load
module = netbox.wsgi
; workaround to make uWSGI reloads work with pyuwsgi (not to be used if using uwsgi package instead)
binary-path = venv/bin/python
; only log internal messages and errors (reverse proxy already logs the requests)
disable-logging = true
log-5xx = true

View File

@ -2,8 +2,8 @@
{% block site_meta %}
{{ super() }}
{# Disable search indexing unless we're building for ReadTheDocs #}
{% if not config.extra.readthedocs %}
{# Disable search indexing unless we're building for public consumption #}
{% if not config.extra.build_public %}
<meta name="robots" content="noindex">
{% endif %}
{% endblock %}

18
docs/_theme/partials/copyright.html vendored Normal file
View File

@ -0,0 +1,18 @@
<div class="md-copyright">
{% if config.copyright %}
<div class="md-copyright__highlight">
{{ config.copyright }}
</div>
{% endif %}
{% if not config.extra.generator == false %}
Made with
<a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener">
Material for MkDocs
</a>
{% endif %}
</div>
{% if not config.extra.build_public %}
<div class="md-copyright">
Documentation is being served locally
</div>
{% endif %}

View File

@ -0,0 +1,52 @@
# Google
This guide explains how to configure single sign-on (SSO) support for NetBox using [Google OAuth2](https://developers.google.com/identity/protocols/oauth2/web-server) as an authentication backend.
## Google OAuth2 Configuration
1. Log into [console.cloud.google.com](https://console.cloud.google.com/).
2. Create new project for NetBox.
3. Under "APIs and Services" click "OAuth consent screen" and enter the required information.
4. Under "Credentials," click "Create Credentials" and select "OAuth 2.0 Client ID." Select type "Web application."
- "Authorized JavaScript origins" should follow the format `http[s]://<netbox>[:<port>]`
- "Authorized redirect URIs" should follow the format `http[s]://<netbox>[:<port>]/oauth/complete/google-oauth2/`
5. Copy the "Client ID" and "Client Secret" values somewhere convenient.
!!! note
Google requires the NetBox hostname to use a public top-level-domain (e.g. `.com`, `.net`). The use of IP addresses is not permitted (except `127.0.0.1`).
For more information, consult [Google's documentation](https://developers.google.com/identity/protocols/oauth2/web-server#prerequisites).
## NetBox Configuration
### 1. Enter configuration parameters
Enter the following configuration parameters in `configuration.py`, substituting your own values:
```python
REMOTE_AUTH_BACKEND = 'social_core.backends.google.GoogleOAuth2'
SOCIAL_AUTH_GOOGLE_OAUTH2_KEY = '{CLIENT_ID}'
SOCIAL_AUTH_GOOGLE_OAUTH2_SECRET = '{CLIENT_SECRET}'
```
### 2. Restart NetBox
Restart the NetBox services so that the new configuration takes effect. This is typically done with the command below:
```no-highlight
sudo systemctl restart netbox
```
## Testing
Log out of NetBox if already authenticated, and click the "Log In" button at top right. You should see the normal login form as well as an option to authenticate using Google. Click that link.
![NetBox Google login form](../../media/authentication/netbox_google_login.png)
You should be redirected to Google's authentication portal. Enter the username/email and password of your test account to continue. You may also be prompted to grant this application access to your account.
![NetBox Google login form](../../media/authentication/google_login_portal.png)
If successful, you will be redirected back to the NetBox UI, and will be logged in as the Google user. You can verify this by navigating to your profile (using the button at top right).
This user account has been replicated locally to NetBox, and can now be assigned groups and permissions.

View File

@ -1,8 +1,8 @@
# Microsoft Azure AD
# Microsoft Entra ID
This guide explains how to configure single sign-on (SSO) support for NetBox using [Microsoft Azure Active Directory (AD)](https://azure.microsoft.com/en-us/services/active-directory/) as an authentication backend.
This guide explains how to configure single sign-on (SSO) support for NetBox using [Microsoft Entra ID](https://www.microsoft.com/en-us/security/business/identity-access/microsoft-entra-id) as an authentication backend.
## Azure AD Configuration
## Entra ID Configuration
### 1. Create a test user (optional)

View File

@ -40,3 +40,23 @@ 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. (NetBox's default pipeline is defined in `netbox/settings.py` for your reference.)
#### Configuring the SSO module's appearance
The way a remote authentication backend is displayed to the user on the login
page may be adjusted via the `SOCIAL_AUTH_BACKEND_ATTRS` parameter, defaulting
to an empty dictionary. This dictionary maps a `social_core` module's name (ie.
`REMOTE_AUTH_BACKEND.name`) to a couple of parameters, `(display_name, icon)`.
The `display_name` is the name displayed to the user on the login page. The
icon may either be the URL of an icon; refer to a [Material Design
Icons](https://github.com/google/material-design-icons) icon's name; or be
`None` for no icon.
For instance, the OIDC backend may be customized with
```python
SOCIAL_AUTH_BACKEND_ATTRS = {
'oidc': ("My awesome SSO", "login"),
}
```

View File

@ -54,7 +54,7 @@ pg_dump --username netbox --password --host localhost -s netbox > netbox_schema.
By default, NetBox stores uploaded files (such as image attachments) in its media directory. To fully replicate an instance of NetBox, you'll need to copy both the database and the media files.
!!! note
These operations are not necessary if your installation is utilizing a [remote storage backend](../configuration/system.md#storage_backend).
These operations are not necessary if your installation is utilizing a [remote storage backend](../configuration/system.md#storages).
### Archive the Media Directory

View File

@ -69,7 +69,7 @@ For a complete list of available preferences, log into NetBox and navigate to `/
!!! tip "Dynamic Configuration Parameter"
Default: 50
Default: `50`
The default maximum number of objects to display per page within each list of objects.
@ -79,7 +79,7 @@ The default maximum number of objects to display per page within each list of ob
!!! tip "Dynamic Configuration Parameter"
Default: 15
Default: `15`
The default value for the `amperage` field when creating new power feeds.
@ -89,7 +89,7 @@ The default value for the `amperage` field when creating new power feeds.
!!! tip "Dynamic Configuration Parameter"
Default: 80
Default: `80`
The default value (percentage) for the `max_utilization` field when creating new power feeds.
@ -99,7 +99,7 @@ The default value (percentage) for the `max_utilization` field when creating new
!!! tip "Dynamic Configuration Parameter"
Default: 120
Default: `120`
The default value for the `voltage` field when creating new power feeds.
@ -109,7 +109,7 @@ The default value for the `voltage` field when creating new power feeds.
!!! tip "Dynamic Configuration Parameter"
Default: 22
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`.
@ -119,6 +119,6 @@ Default height (in pixels) of a unit within a rack elevation. For best results,
!!! tip "Dynamic Configuration Parameter"
Default: 220
Default: `220`
Default width (in pixels) of a unit within a rack elevation.

View File

@ -2,10 +2,10 @@
## DEBUG
Default: False
Default: `False`
This setting enables debugging. Debugging should be enabled only during development or troubleshooting. Note that only
clients which access NetBox from a recognized [internal IP address](#internal_ips) will see debugging tools in the user
clients which access NetBox from a recognized [internal IP address](./system.md#internal_ips) will see debugging tools in the user
interface.
!!! warning
@ -16,6 +16,6 @@ interface.
## DEVELOPER
Default: False
Default: `False`
This parameter serves as a safeguard to prevent some potentially dangerous behavior, such as generating new database schema migrations. Additionally, enabling this setting disables the debug warning banner in the UI. Set this to `True` **only** if you are actively developing the NetBox code base.

View File

@ -2,9 +2,9 @@
## SENTRY_DSN
Default: None
Default: `None`
Defines a Sentry data source name (DSN) for automated error reporting. `SENTRY_ENABLED` must be True for this parameter to take effect. For example:
Defines a Sentry data source name (DSN) for automated error reporting. `SENTRY_ENABLED` must be `True` for this parameter to take effect. For example:
```
SENTRY_DSN = "https://examplePublicKey@o0.ingest.sentry.io/0"
@ -14,9 +14,9 @@ SENTRY_DSN = "https://examplePublicKey@o0.ingest.sentry.io/0"
## SENTRY_ENABLED
Default: False
Default: `False`
Set to True to enable automatic error reporting via [Sentry](https://sentry.io/).
Set to `True` to enable automatic error reporting via [Sentry](https://sentry.io/).
!!! note
The `sentry-sdk` Python package is required to enable Sentry integration.
@ -25,12 +25,23 @@ Set to True to enable automatic error reporting via [Sentry](https://sentry.io/)
## SENTRY_SAMPLE_RATE
Default: 1.0 (all)
Default: `1.0` (all)
The sampling rate for errors. Must be a value between 0 (disabled) and 1.0 (report on all errors).
---
## SENTRY_SEND_DEFAULT_PII
Default: `False`
Maps to the Sentry SDK's [`send_default_pii`](https://docs.sentry.io/platforms/python/configuration/options/#send-default-pii) parameter. If enabled, certain personally identifiable information (PII) is added.
!!! warning "Sensitive data"
If you enable this option, be aware that sensitive data such as cookies and authentication tokens will be logged.
---
## SENTRY_TAGS
An optional dictionary of tag names and values to apply to Sentry error reports.For example:
@ -49,7 +60,7 @@ SENTRY_TAGS = {
## SENTRY_TRACES_SAMPLE_RATE
Default: 0 (disabled)
Default: `0` (disabled)
The sampling rate for transactions. Must be a value between 0 (disabled) and 1.0 (report on all transactions).

View File

@ -0,0 +1,17 @@
# GraphQL API Parameters
## GRAPHQL_ENABLED
!!! tip "Dynamic Configuration Parameter"
Default: `True`
Setting this to `False` will disable the GraphQL API.
---
## GRAPHQL_MAX_ALIASES
Default: `10`
The maximum number of queries that a GraphQL API request may contain.

View File

@ -25,7 +25,7 @@ Some configuration parameters are primarily controlled via NetBox's admin interf
* [`CUSTOM_VALIDATORS`](./data-validation.md#custom_validators)
* [`DEFAULT_USER_PREFERENCES`](./default-values.md#default_user_preferences)
* [`ENFORCE_GLOBAL_UNIQUE`](./miscellaneous.md#enforce_global_unique)
* [`GRAPHQL_ENABLED`](./miscellaneous.md#graphql_enabled)
* [`GRAPHQL_ENABLED`](./graphql-api.md#graphql_enabled)
* [`JOB_RETENTION`](./miscellaneous.md#job_retention)
* [`MAINTENANCE_MODE`](./miscellaneous.md#maintenance_mode)
* [`MAPS_URL`](./miscellaneous.md#maps_url)

View File

@ -55,9 +55,9 @@ Sets content for the top banner in the user interface.
## CENSUS_REPORTING_ENABLED
Default: True
Default: `True`
Enables anonymous census reporting. To opt out of census reporting, set this to False.
Enables anonymous census reporting. To opt out of census reporting, set this to `False`.
This data enables the project maintainers to estimate how many NetBox deployments exist and track the adoption of new versions over time. Census reporting effects a single HTTP request each time a worker starts. The only data reported by this function are the NetBox version, Python version, and a pseudorandom unique identifier.
@ -67,7 +67,7 @@ This data enables the project maintainers to estimate how many NetBox deployment
!!! tip "Dynamic Configuration Parameter"
Default: 90
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.
@ -79,7 +79,7 @@ changes in the database indefinitely.
## CHANGELOG_SKIP_EMPTY_CHANGES
Default: True
Default: `True`
If enabled, a change log record will not be created when an object is updated without any changes to its existing field values.
@ -96,21 +96,23 @@ The maximum size (in bytes) of an incoming HTTP request (i.e. `GET` or `POST` da
---
## DJANGO_ADMIN_ENABLED
Default: False
Setting this to True installs the `django.contrib.admin` app and enables the [Django admin UI](https://docs.djangoproject.com/en/5.0/ref/contrib/admin/). This may be necessary to support older plugins which do not integrate with the native NetBox interface.
---
## ENFORCE_GLOBAL_UNIQUE
!!! tip "Dynamic Configuration Parameter"
Default: True
Default: `True`
By default, NetBox will prevent the creation of duplicate prefixes and IP addresses in the global table (that is, those which are not assigned to any VRF). This validation can be disabled by setting `ENFORCE_GLOBAL_UNIQUE` to False.
By default, NetBox will prevent the creation of duplicate prefixes and IP addresses in the global table (that is, those which are not assigned to any VRF). This validation can be disabled by setting `ENFORCE_GLOBAL_UNIQUE` to `False`.
---
## EVENTS_PIPELINE
!!! info "This parameter was introduced in NetBox v4.2."
Default: `['extras.events.process_event_queue',]`
NetBox will call dotted paths to the functions listed here for events (create, update, delete) on models as well as when custom EventRules are fired.
---
@ -122,21 +124,11 @@ The maximum amount (in bytes) of uploaded data that will be held in memory befor
---
## GRAPHQL_ENABLED
!!! tip "Dynamic Configuration Parameter"
Default: True
Setting this to False will disable the GraphQL API.
---
## JOB_RETENTION
!!! tip "Dynamic Configuration Parameter"
Default: 90
Default: `90`
The number of days to retain job results (scripts and reports). Set this to `0` to retain job results in the database indefinitely.
@ -149,9 +141,9 @@ The number of days to retain job results (scripts and reports). Set this to `0`
!!! tip "Dynamic Configuration Parameter"
Default: False
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.
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.
---
@ -169,7 +161,7 @@ This specifies the URL to use when presenting a map of a physical location by st
!!! tip "Dynamic Configuration Parameter"
Default: 1000
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`.
@ -177,7 +169,7 @@ A web user or API consumer can request an arbitrary number of objects by appendi
## METRICS_ENABLED
Default: False
Default: `False`
Toggle the availability Prometheus-compatible metrics at `/metrics`. See the [Prometheus Metrics](../integrations/prometheus-metrics.md) documentation for more details.
@ -187,9 +179,9 @@ Toggle the availability Prometheus-compatible metrics at `/metrics`. See the [Pr
!!! tip "Dynamic Configuration Parameter"
Default: False
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.
When determining the primary IP address for a device, IPv6 is preferred over IPv4 by default. Set this to `True` to prefer IPv4 instead.
---
@ -211,7 +203,7 @@ If no queue is defined the queue named `default` will be used.
## RELEASE_CHECK_URL
Default: None (disabled)
Default: `None` (disabled)
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.
@ -241,3 +233,15 @@ This parameter controls how frequently a failed job is retried, up to the maximu
Default: `0` (retries disabled)
The maximum number of times a background task will be retried before being marked as failed.
## DISK_BASE_UNIT
Default: `1000`
The base unit for disk sizes. Set this to `1024` to use binary prefixes (MiB, GiB, etc.) instead of decimal prefixes (MB, GB, etc.).
## RAM_BASE_UNIT
Default: `1000`
The base unit for RAM sizes. Set this to `1024` to use binary prefixes (MiB, GiB, etc.) instead of decimal prefixes (MB, GB, etc.).

View File

@ -2,7 +2,7 @@
## PLUGINS
Default: Empty
Default: `[]`
A list of installed [NetBox plugins](../plugins/index.md) to enable. Plugins will not take effect unless they are listed here.
@ -13,7 +13,7 @@ A list of installed [NetBox plugins](../plugins/index.md) to enable. Plugins wil
## PLUGINS_CONFIG
Default: Empty
Default: `[]`
This parameter holds configuration settings for individual NetBox plugins. It is defined as a dictionary, with each key using the name of an installed plugin. The specific parameters supported are unique to each plugin: Reference the plugin's documentation to determine the supported parameters. An example configuration is shown below:
@ -33,3 +33,21 @@ Note that a plugin must be listed in `PLUGINS` for its configuration to take eff
---
## PLUGINS_CATALOG_CONFIG
Default: `{}` (Empty)
This parameter controls how individual plugins are displayed in the plugins catalog under Admin > System > Plugins. Adding a plugin to the `hidden` list will omit that plugin from the catalog. Adding a plugin to the `static` list will display the plugin, but not link to the plugin details or upgrade instructions.
An example configuration is shown below:
```python
PLUGINS_CATALOG_CONFIG = {
'hidden': [
'plugin1',
],
'static': [
'plugin2',
],
}
```

View File

@ -1,6 +1,6 @@
# 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.
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.
---
@ -8,7 +8,7 @@ The configuration parameters listed here control remote authentication for NetBo
Default: `False`
If true, NetBox will automatically create groups specified in the `REMOTE_AUTH_GROUP_HEADER` header if they don't already exist. (Requires `REMOTE_AUTH_ENABLED`.)
If `True`, NetBox will automatically create groups specified in the `REMOTE_AUTH_GROUP_HEADER` header if they don't already exist. (Requires `REMOTE_AUTH_ENABLED`.)
---
@ -16,7 +16,7 @@ If true, NetBox will automatically create groups specified in the `REMOTE_AUTH_G
Default: `False`
If true, NetBox will automatically create local accounts for users authenticated via a remote service. (Requires `REMOTE_AUTH_ENABLED`.)
If `True`, NetBox will automatically create local accounts for users authenticated via a remote service. (Requires `REMOTE_AUTH_ENABLED`.)
---
@ -43,7 +43,7 @@ The list of groups to assign a new user account when created using remote authen
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` as True and `REMOTE_AUTH_GROUP_SYNC_ENABLED` as False.)
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` as `True` and `REMOTE_AUTH_GROUP_SYNC_ENABLED` as `False`.)
---

View File

@ -2,12 +2,12 @@
## ALLOWED_HOSTS
This is a list of valid fully-qualified domain names (FQDNs) and/or IP addresses that can be used to reach the NetBox service. Usually this is the same as the hostname for the NetBox server, but can also be different; for example, when using a reverse proxy serving the NetBox website under a different FQDN than the hostname of the NetBox server. To help guard against [HTTP Host header attackes](https://docs.djangoproject.com/en/3.0/topics/security/#host-headers-virtual-hosting), NetBox will not permit access to the server via any other hostnames (or IPs).
This is a list of valid fully-qualified domain names (FQDNs) and/or IP addresses that can be used to reach the NetBox service. Usually this is the same as the hostname for the NetBox server, but can also be different; for example, when using a reverse proxy serving the NetBox website under a different FQDN than the hostname of the NetBox server. To help guard against [HTTP Host header attacks](https://docs.djangoproject.com/en/stable/topics/security/#host-headers-virtual-hosting), NetBox will not permit access to the server via any other hostnames (or IPs).
!!! note
This parameter must always be defined as a list or tuple, even if only a single value is provided.
The value of this option is also used to set `CSRF_TRUSTED_ORIGINS`, which restricts POST requests to the same set of hosts (more about this [here](https://docs.djangoproject.com/en/stable/ref/settings/#std:setting-CSRF_TRUSTED_ORIGINS)). Keep in mind that NetBox, by default, sets `USE_X_FORWARDED_HOST` to true, which means that if you're using a reverse proxy, it's the FQDN used to reach that reverse proxy which needs to be in this list (more about this [here](https://docs.djangoproject.com/en/stable/ref/settings/#allowed-hosts)).
The value of this option is also used to set `CSRF_TRUSTED_ORIGINS`, which restricts POST requests to the same set of hosts (more about this [here](https://docs.djangoproject.com/en/stable/ref/settings/#std:setting-CSRF_TRUSTED_ORIGINS)). Keep in mind that NetBox, by default, sets `USE_X_FORWARDED_HOST` to `True`, which means that if you're using a reverse proxy, it's the FQDN used to reach that reverse proxy which needs to be in this list (more about this [here](https://docs.djangoproject.com/en/stable/ref/settings/#allowed-hosts)).
Example:
@ -25,7 +25,30 @@ ALLOWED_HOSTS = ['*']
## DATABASE
NetBox requires access to a PostgreSQL 12 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:
!!! warning "Legacy Configuration Parameter"
The `DATABASE` configuration parameter is deprecated and will be removed in a future release. Users are advised to adopt the new `DATABASES` (plural) parameter, which allows for the configuration of multiple databases.
See the [`DATABASES`](#databases) configuration below for usage.
---
## DATABASES
!!! info "This parameter was introduced in NetBox v4.3."
NetBox requires access to a PostgreSQL 14 or later database service to store data. This service can run locally on the NetBox server or on a remote system. Databases are defined as named dictionaries:
```python
DATABASES = {
'default': {...},
'external1': {...},
'external2': {...},
}
```
NetBox itself requires only that a `default` database is defined. However, certain plugins may require the configuration of additional databases. (Consider also configuring the [`DATABASE_ROUTERS`](./system.md#database_routers) parameter when multiple databases are in use.)
The following parameters must be defined for each database:
* `NAME` - Database name
* `USER` - PostgreSQL username
@ -38,14 +61,16 @@ NetBox requires access to a PostgreSQL 12 or later database service to store dat
Example:
```python
DATABASE = {
'ENGINE': 'django.db.backends.postgresql',
'NAME': 'netbox', # Database name
'USER': 'netbox', # PostgreSQL username
'PASSWORD': 'J5brHrAXFLQSif0K', # PostgreSQL password
'HOST': 'localhost', # Database server
'PORT': '', # Database port (leave blank for default)
'CONN_MAX_AGE': 300, # Max database connection age
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql',
'NAME': 'netbox', # Database name
'USER': 'netbox', # PostgreSQL username
'PASSWORD': 'J5brHrAXFLQSif0K', # PostgreSQL password
'HOST': 'localhost', # Database server
'PORT': '', # Database port (leave blank for default)
'CONN_MAX_AGE': 300, # Max database connection age
}
}
```
@ -53,7 +78,7 @@ DATABASE = {
NetBox supports all PostgreSQL database options supported by the underlying Django framework. For a complete list of available parameters, please see [the Django documentation](https://docs.djangoproject.com/en/stable/ref/settings/#databases).
!!! warning
Make sure to use a PostgreSQL-compatible backend for the ENGINE setting. If you don't specify an ENGINE, the default will be django.db.backends.postgresql.
The `ENGINE` parameter must specify a PostgreSQL-compatible database backend. If not defined, the default engine `django.db.backends.postgresql` will be used.
---
@ -94,15 +119,25 @@ REDIS = {
}
```
!!! note
If you are upgrading from a NetBox release older than v2.7.0, please note that the Redis connection configuration
settings have changed. Manual modification to bring the `REDIS` section inline with the above specification is
necessary
!!! warning
It is highly recommended to keep the task and cache databases separate. Using the same database number on the
same Redis instance for both may result in queued background tasks being lost during cache flushing events.
### UNIX Socket Support
Redis may alternatively be configured by specifying a complete URL instead of individual components. This approach supports the use of a UNIX socket connection. For example:
```python
REDIS = {
'tasks': {
'URL': 'unix:///run/redis-netbox/redis.sock?db=0'
},
'caching': {
'URL': 'unix:///run/redis-netbox/redis.sock?db=1'
},
}
```
### Using Redis Sentinel
If you are using [Redis Sentinel](https://redis.io/topics/sentinel) for high-availability purposes, there is minimal

View File

@ -2,7 +2,10 @@
## ALLOW_TOKEN_RETRIEVAL
Default: True
Default: `False`
!!! note
The default value of this parameter changed from `True` to `False` in NetBox v4.3.0.
If disabled, the values of API tokens will not be displayed after each token's initial creation. A user **must** record the value of a token prior to its creation, or it will be lost. Note that this affects _all_ users, regardless of assigned permissions.
@ -20,26 +23,36 @@ A list of permitted URL schemes referenced when rendering links within NetBox. N
## AUTH_PASSWORD_VALIDATORS
This parameter acts as a pass-through for configuring Django's built-in password validators for local user accounts. If configured, these will be applied whenever a user's password is updated to ensure that it meets minimum criteria such as length or complexity. An example is provided below. For more detail on the available options, please see [the Django documentation](https://docs.djangoproject.com/en/stable/topics/auth/passwords/#password-validation).
This parameter acts as a pass-through for configuring Django's built-in password validators for local user accounts. These rules are applied whenever a user's password is created or updated to ensure that it meets minimum criteria such as length or complexity. The default configuration is shown below.
```python
AUTH_PASSWORD_VALIDATORS = [
{
'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
'OPTIONS': {
'min_length': 10,
}
"NAME": "django.contrib.auth.password_validation.MinimumLengthValidator",
"OPTIONS": {
"min_length": 12,
},
},
{
"NAME": "utilities.password_validation.AlphanumericPasswordValidator",
},
]
```
The default configuration enforces the follow criteria:
* A password must be at least 12 characters in length.
* A password must have at least one uppercase letter, one lowercase letter, and one numeric digit.
Although it is not recommended, the default validation rules can be disabled by setting `AUTH_PASSWORD_VALIDATORS = []` in the configuration file. For more detail on customizing password validation, please see [the Django documentation](https://docs.djangoproject.com/en/stable/topics/auth/passwords/#password-validation).
---
## CORS_ORIGIN_ALLOW_ALL
Default: False
Default: `False`
If True, cross-origin resource sharing (CORS) requests will be accepted from all origins. If False, a whitelist will be used (see below).
If `True`, cross-origin resource sharing (CORS) requests will be accepted from all origins. If False, a whitelist will be used (see below).
---
@ -49,7 +62,7 @@ If True, cross-origin resource sharing (CORS) requests will be accepted from all
These settings specify a list of origins that are authorized to make cross-site API requests. Use
`CORS_ORIGIN_WHITELIST` to define a list of exact hostnames, or `CORS_ORIGIN_REGEX_WHITELIST` to define a set of regular
expressions. (These settings have no effect if `CORS_ORIGIN_ALLOW_ALL` is True.) For example:
expressions. (These settings have no effect if `CORS_ORIGIN_ALLOW_ALL` is `True`.) For example:
```python
CORS_ORIGIN_WHITELIST = [
@ -69,9 +82,9 @@ The name of the cookie to use for the cross-site request forgery (CSRF) authenti
## CSRF_COOKIE_SECURE
Default: False
Default: `False`
If true, the cookie employed for cross-site request forgery (CSRF) protection will be marked as secure, meaning that it can only be sent across an HTTPS connection.
If `True`, the cookie employed for cross-site request forgery (CSRF) protection will be marked as secure, meaning that it can only be sent across an HTTPS connection.
---
@ -79,7 +92,7 @@ If true, the cookie employed for cross-site request forgery (CSRF) protection wi
Default: `[]`
Defines a list of trusted origins for unsafe (e.g. `POST`) requests. This is a pass-through to Django's [`CSRF_TRUSTED_ORIGINS`](https://docs.djangoproject.com/en/4.0/ref/settings/#std:setting-CSRF_TRUSTED_ORIGINS) setting. Note that each host listed must specify a scheme (e.g. `http://` or `https://).
Defines a list of trusted origins for unsafe (e.g. `POST`) requests. This is a pass-through to Django's [`CSRF_TRUSTED_ORIGINS`](https://docs.djangoproject.com/en/stable/ref/settings/#csrf-trusted-origins) setting. Note that each host listed must specify a scheme (e.g. `http://` or `https://).
```python
CSRF_TRUSTED_ORIGINS = (
@ -122,7 +135,7 @@ DEFAULT_PERMISSIONS = {
## EXEMPT_VIEW_PERMISSIONS
Default: Empty list
Default: `[]` (Empty list)
A list of NetBox models to exempt from the enforcement of view permissions. Models listed here will be viewable by all users, both authenticated and anonymous.
@ -149,9 +162,9 @@ EXEMPT_VIEW_PERMISSIONS = ['*']
## LOGIN_PERSISTENCE
Default: False
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.
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.
@ -159,20 +172,34 @@ Note that enabling this setting causes NetBox to update a user's session in the
## LOGIN_REQUIRED
Default: False
Default: `True`
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.
When enabled, only authenticated users are permitted to access any part of NetBox. Disabling this will allow unauthenticated users to access most areas of NetBox (but not make any changes).
!!! info "Changed in NetBox v4.0.2"
Prior to NetBox v4.0.2, this setting was disabled by default.
---
## LOGIN_TIMEOUT
Default: 1209600 seconds (14 days)
Default: `1209600` seconds (14 days)
The lifetime (in seconds) of the authentication cookie issued to a NetBox user upon login.
---
## LOGIN_FORM_HIDDEN
Default: `False`
Option to hide the login form when only SSO authentication is in use.
!!! warning
If the SSO provider is unreachable, login to NetBox will be impossible if this option is enabled. The only recourse is to disable it in the local configuration and restart the NetBox service.
---
## LOGOUT_REDIRECT_URL
Default: `'home'`
@ -183,23 +210,23 @@ The view name or URL to which a user is redirected after logging out.
## SECURE_HSTS_INCLUDE_SUBDOMAINS
Default: False
Default: `False`
If true, the `includeSubDomains` directive will be included in the HTTP Strict Transport Security (HSTS) header. This directive instructs the browser to apply the HSTS policy to all subdomains of the current domain.
If `True`, the `includeSubDomains` directive will be included in the HTTP Strict Transport Security (HSTS) header. This directive instructs the browser to apply the HSTS policy to all subdomains of the current domain.
---
## SECURE_HSTS_PRELOAD
Default: False
Default: `False`
If true, the `preload` directive will be included in the HTTP Strict Transport Security (HSTS) header. This directive instructs the browser to preload the site in HTTPS. Browsers that use the HSTS preload list will force the site to be accessed via HTTPS even if the user types HTTP in the address bar.
If `True`, the `preload` directive will be included in the HTTP Strict Transport Security (HSTS) header. This directive instructs the browser to preload the site in HTTPS. Browsers that use the HSTS preload list will force the site to be accessed via HTTPS even if the user types HTTP in the address bar.
---
## SECURE_HSTS_SECONDS
Default: 0
Default: `0`
If set to a non-zero integer value, the SecurityMiddleware sets the HTTP Strict Transport Security (HSTS) header on all responses that do not already have it. This will instruct the browser that the website must be accessed via HTTPS, blocking any HTTP request.
@ -207,9 +234,9 @@ If set to a non-zero integer value, the SecurityMiddleware sets the HTTP Strict
## SECURE_SSL_REDIRECT
Default: False
Default: `False`
If true, all non-HTTPS requests will be automatically redirected to use HTTPS.
If `True`, all non-HTTPS requests will be automatically redirected to use HTTPS.
!!! warning
Ensure that your frontend HTTP daemon has been configured to forward the HTTP scheme correctly before enabling this option. An incorrectly configured frontend may result in a looping redirect.
@ -226,14 +253,14 @@ The name used for the session cookie. See the [Django documentation](https://doc
## SESSION_COOKIE_SECURE
Default: False
Default: `False`
If true, the cookie employed for session authentication will be marked as secure, meaning that it can only be sent across an HTTPS connection.
If `True`, the cookie employed for session authentication will be marked as secure, meaning that it can only be sent across an HTTPS connection.
---
## SESSION_FILE_PATH
Default: None
Default: `None`
HTTP session data is used to track authenticated users when they access NetBox. By default, NetBox stores session data in its PostgreSQL database. However, this inhibits authentication to a standby instance of NetBox without write access to the database. Alternatively, a local file path may be specified here and NetBox will store session data as files instead of using the database. Note that the NetBox system user must have read and write permissions to this path.

View File

@ -2,7 +2,7 @@
## BASE_PATH
Default: None
Default: `None`
The base URL path to use when accessing NetBox. Do not include the scheme or domain name. For example, if installed at https://example.com/netbox/, set:
@ -12,6 +12,16 @@ BASE_PATH = 'netbox/'
---
## DATABASE_ROUTERS
!!! info "This parameter was introduced in NetBox v4.3."
Default: `[]` (empty list)
An iterable of [database routers](https://docs.djangoproject.com/en/stable/topics/db/multi-db/) to use for automatically selecting the appropriate database(s) for a query. This is useful only when [multiple databases](./required-parameters.md#databases) have been configured.
---
## DEFAULT_LANGUAGE
Default: `en-us` (US English)
@ -64,7 +74,7 @@ Email is sent from NetBox only for critical events or if configured for [logging
## HTTP_PROXIES
Default: None
Default: `None`
A dictionary of HTTP proxies to use for outbound requests originating from NetBox (e.g. when sending webhook requests). Proxies should be specified by schema (HTTP and HTTPS) as per the [Python requests library documentation](https://requests.readthedocs.io/en/latest/user/advanced/#proxies). For example:
@ -75,6 +85,8 @@ HTTP_PROXIES = {
}
```
If more flexibility is needed in determining which proxy to use for a given request, consider implementing one or more custom proxy routers via the [`PROXY_ROUTERS`](#proxy_routers) parameter.
---
## INTERNAL_IPS
@ -83,7 +95,18 @@ Default: `('127.0.0.1', '::1')`
A list of IP addresses recognized as internal to the system, used to control the display of debugging output. For
example, the debugging toolbar will be viewable only when a client is accessing NetBox from one of the listed IP
addresses (and [`DEBUG`](#debug) is true).
addresses (and [`DEBUG`](./development.md#debug) is `True`).
---
## ISOLATED_DEPLOYMENT
Default: `False`
Set this configuration parameter to `True` for NetBox deployments which do not have Internet access. This will disable miscellaneous functionality which depends on access to the Internet.
!!! note
If Internet access is available via a proxy, set [`HTTP_PROXIES`](#http_proxies) instead.
---
@ -91,7 +114,7 @@ addresses (and [`DEBUG`](#debug) is true).
Default: `{}`
A dictionary of custom jinja2 filters with the key being the filter name and the value being a callable. For more information see the [Jinja2 documentation](https://jinja.palletsprojects.com/en/3.1.x/api/#custom-filters). For example:
A dictionary of custom Jinja2 filters with the key being the filter name and the value being a callable. For more information see the [Jinja2 documentation](https://jinja.palletsprojects.com/en/3.1.x/api/#custom-filters). For example:
```python
def uppercase(x):
@ -106,7 +129,7 @@ JINJA2_FILTERS = {
## LOGGING
By default, all messages of INFO severity or higher will be logged to the console. Additionally, if [`DEBUG`](#debug) is False and email access has been configured, ERROR and CRITICAL messages will be emailed to the users defined in [`ADMINS`](#admins).
By default, all messages of INFO severity or higher will be logged to the console. Additionally, if [`DEBUG`](./development.md#debug) is False and email access has been configured, ERROR and CRITICAL messages will be emailed to the users defined in [`ADMINS`](./miscellaneous.md#admins).
The Django framework on which NetBox runs allows for the customization of logging format and destination. Please consult the [Django logging documentation](https://docs.djangoproject.com/en/stable/topics/logging/) for more information on configuring this setting. Below is an example which will write all INFO and higher messages to a local file:
@ -135,6 +158,7 @@ LOGGING = {
* `netbox.<app>.<model>` - Generic form for model-specific log messages
* `netbox.auth.*` - Authentication events
* `netbox.api.views.*` - Views which handle business logic for the REST API
* `netbox.event_rules` - Event rules
* `netbox.reports.*` - Report execution (`module.name`)
* `netbox.scripts.*` - Custom script execution (`module.name`)
* `netbox.views.*` - Views which handle business logic for the web UI
@ -143,12 +167,24 @@ LOGGING = {
## MEDIA_ROOT
Default: $INSTALL_ROOT/netbox/media/
Default: `$INSTALL_ROOT/netbox/media/`
The file path to the location where media files (such as image attachments) are stored. By default, this is the `netbox/media/` directory within the base NetBox installation path.
---
## PROXY_ROUTERS
!!! info "This parameter was introduced in NetBox v4.3."
Default: `["utilities.proxy.DefaultProxyRouter"]`
A list of Python classes responsible for determining which proxy server(s) to use for outbound HTTP requests. Each item in the list can be the class itself or the dotted path to the class.
The `route()` method on each class must return a dictionary of candidate proxies arranged by protocol (e.g. `http` and/or `https`), or None if no viable proxy can be determined. The default class, `DefaultProxyRouter`, simply returns the content of [`HTTP_PROXIES`](#http_proxies).
---
## REPORTS_ROOT
Default: `$INSTALL_ROOT/netbox/reports/`
@ -173,28 +209,59 @@ The dotted path to the desired search backend class. `CachedValueSearchBackend`
---
## STORAGE_BACKEND
## STORAGES
Default: None (local storage)
The backend storage engine for handling uploaded files such as [image attachments](../models/extras/imageattachment.md) and [custom scripts](../customization/custom-scripts.md). NetBox integrates with the [`django-storages`](https://django-storages.readthedocs.io/en/stable/) and [`django-storage-swift`](https://github.com/dennisv/django-storage-swift) libraries, which provide backends for several popular file storage services. If not configured, local filesystem storage will be used.
The backend storage engine for handling uploaded files (e.g. image attachments). NetBox supports integration with the [`django-storages`](https://django-storages.readthedocs.io/en/stable/) package, which provides backends for several popular file storage services. If not configured, local filesystem storage will be used.
By default, the following configuration is used:
The configuration parameters for the specified storage backend are defined under the `STORAGE_CONFIG` setting.
```python
STORAGES = {
"default": {
"BACKEND": "django.core.files.storage.FileSystemStorage",
},
"staticfiles": {
"BACKEND": "django.contrib.staticfiles.storage.StaticFilesStorage",
},
"scripts": {
"BACKEND": "extras.storage.ScriptFileSystemStorage",
},
}
```
---
Within the `STORAGES` dictionary, `"default"` is used for image uploads, "staticfiles" is for static files and `"scripts"` is used for custom scripts.
## STORAGE_CONFIG
If using a remote storage like S3, define the config as `STORAGES[key]["OPTIONS"]` for each storage item as needed. For example:
Default: Empty
```python
STORAGES = {
"scripts": {
"BACKEND": "storages.backends.s3boto3.S3Boto3Storage",
"OPTIONS": {
'access_key': 'access key',
'secret_key': 'secret key',
}
},
}
```
A dictionary of configuration parameters for the storage backend configured as `STORAGE_BACKEND`. The specific parameters to be used here are specific to each backend; see the [`django-storages` documentation](https://django-storages.readthedocs.io/en/stable/) for more detail.
The specific configuration settings for each storage backend can be found in the [django-storages documentation](https://django-storages.readthedocs.io/en/latest/index.html).
If `STORAGE_BACKEND` is not defined, this setting will be ignored.
!!! note
Any keys defined in the `STORAGES` configuration parameter replace those in the default configuration. It is only necessary to define keys within the `STORAGES` for the specific backend(s) you wish to configure.
---
## TIME_ZONE
Default: UTC
Default: `"UTC"`
The time zone NetBox will use when dealing with dates and times. It is recommended to use UTC time unless you have a specific need to use a local time zone. Please see the [list of available time zones](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
---
## TRANSLATION_ENABLED
Default: `True`
Enables language translation for the user interface. (This parameter maps to Django's [USE_I18N](https://docs.djangoproject.com/en/stable/ref/settings/#std-setting-USE_I18N) setting.)

View File

@ -74,6 +74,8 @@ If a default value is specified for a selection field, it must exactly match one
An object or multi-object custom field can be used to refer to a particular NetBox object or objects as the "value" for a custom field. These custom fields must define an `object_type`, which determines the type of object to which custom field instances point.
By default, an object choice field will make all objects of that type available for selection in the drop-down. The list choices can be filtered to show only objects with certain values by providing a `query_params` dict in the Related Object Filter field, as a JSON value. More information about `query_params` can be found [here](./custom-scripts.md#objectvar).
## 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`).

View File

@ -2,7 +2,7 @@
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 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 `object`, and custom fields through `object.cf`.
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 [Jinja template code](https://jinja.palletsprojects.com/en/stable/) through the variable `object`, and custom fields through `object.cf`.
For example, you might define a link like this:

View File

@ -17,6 +17,9 @@ They can also be used as a mechanism for validating the integrity of data within
Custom scripts are Python code which exists outside the NetBox code base, so they can be updated and changed without interfering with the core NetBox installation. And because they're completely custom, there is no inherent limitation on what a script can accomplish.
!!! danger "Only install trusted scripts"
Custom scripts have unrestricted access to change anything in the databse and are inherently unsafe and should only be installed and run from trusted sources. You should also review and set permissions for who can run scripts if the script can modify any data.
## Writing Custom Scripts
All custom scripts must inherit from the `extras.scripts.Script` base class. This class provides the functionality necessary to generate forms and log activity.
@ -65,16 +68,13 @@ class AnotherCustomScript(Script):
script_order = (MyCustomScript, AnotherCustomScript)
```
## Module Attributes
### `name`
You can define `name` within a script module (the Python file which contains one or more scripts) to set the module name. If `name` is not defined, the module's file name will be used.
## Script Attributes
Script attributes are defined under a class named `Meta` within the script. These are optional, but encouraged.
!!! warning
These are also defined and used as properties on the base custom script class, so don't use the same names as variables or override them in your custom script.
### `name`
This is the human-friendly names of your script. If omitted, the class name will be used.
@ -140,15 +140,17 @@ The Script class provides two convenience methods for reading data from files:
These two methods will load data in YAML or JSON format, respectively, from files within the local path (i.e. `SCRIPTS_ROOT`).
**Note:** These convenience methods are deprecated and will be removed in NetBox v4.4. These only work if running scripts within the local path, they will not work if using a storage other than ScriptFileSystemStorage.
## Logging
The Script object provides a set of convenient functions for recording messages at different severity levels:
* `log_debug(message, object=None)`
* `log_success(message, object=None)`
* `log_info(message, object=None)`
* `log_warning(message, object=None)`
* `log_failure(message, object=None)`
* `log_debug(message=None, obj=None)`
* `log_success(message=None, obj=None)`
* `log_info(message=None, obj=None)`
* `log_warning(message=None, obj=None)`
* `log_failure(message=None, obj=None)`
Log messages are returned to the user upon execution of the script. Markdown rendering is supported for log messages. A message may optionally be associated with a particular object by passing it as the second argument to the logging method.
@ -158,6 +160,8 @@ A script can define one or more test methods to report on certain conditions. Al
These methods are detected and run automatically when the script is executed, unless its `run()` method has been overridden. (When overriding `run()`, `run_tests()` can be called to run all test methods present in the script.)
Calling any of these logging methods without a message will increment the relevant counter, but will not generate an output line in the script's log.
!!! info
This functionality was ported from [legacy reports](./reports.md) in NetBox v4.0.
@ -306,6 +310,7 @@ A particular object within NetBox. Each ObjectVar must specify a particular mode
* `query_params` - A dictionary of query parameters to use when retrieving available options (optional)
* `context` - A custom dictionary mapping template context variables to fields, used when rendering `<option>` elements within the dropdown menu (optional; see below)
* `null_option` - A label representing a "null" or empty choice (optional)
* `selector` - A boolean that, when True, includes an advanced object selection widget to assist the user in identifying the desired object (optional; False by default)
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:

View File

@ -86,8 +86,6 @@ CUSTOM_VALIDATORS = {
#### Referencing Related Object Attributes
!!! info "This feature was introduced in NetBox v4.0."
The attributes of a related object can be referenced by specifying a dotted path. For example, to reference the name of a region to which a site is assigned, use `region.name`:
```python
@ -104,8 +102,6 @@ CUSTOM_VALIDATORS = {
#### Validating Request Parameters
!!! info "This feature was introduced in NetBox v4.0."
In addition to validating object attributes, custom validators can also match against parameters of the current request (where available). For example, the following rule will permit only the user named "admin" to modify an object:
```json

View File

@ -25,6 +25,7 @@ Height: {{ rack.u_height }}U
To access custom fields of an object within a template, use the `cf` attribute. For example, `{{ obj.cf.color }}` will return the value (if any) for a custom field named `color` on `obj`.
If you need to use the config context data in an export template, you'll should use the function `get_config_context` to get all the config context data. For example:
```
{% for server in queryset %}
{% set data = server.get_config_context() %}

View File

@ -8,7 +8,7 @@ Each model should define, at a minimum:
* A `Meta` class specifying a deterministic ordering (if ordered by fields other than the primary ID)
* A `__str__()` method returning a user-friendly string representation of the instance
* A `get_absolute_url()` method returning an instance's direct URL (using `reverse()`)
* A `get_absolute_url()` method if necessary; a standard version of the method is defined in the `NetBoxFeatureSet` base class, but you will need to provide your own (returning an instance's direct URL using `reverse()`) if not subclassing that base class
## 2. Define field choices
@ -71,15 +71,18 @@ Add the relevant navigation menu items in `netbox/netbox/navigation/menu.py`.
Create the following for each model:
* Detailed (full) model serializer in `api/serializers.py`
* Nested serializer in `api/nested_serializers.py`
* API view in `api/views.py`
* Endpoint route in `api/urls.py`
## 13. GraphQL API components
Create a Graphene object type for the model in `graphql/types.py` by subclassing the appropriate class from `netbox.graphql.types`.
Create the following for each model:
Also extend the schema class defined in `graphql/schema.py` with the individual object and object list fields per the established convention.
* GraphQL object type for the model in `graphql/types.py` (subclass the appropriate class from `netbox.graphql.types`)
* Add a GraphQL filter for the model in `graphql/filters.py`
* Extend the query class for the app in `graphql/schema.py` with the individual object and object list fields
**Note:** GraphQL unit tests may fail citing null values on a non-nullable field if related objects are prefetched. You may need to fix this by setting the type annotation to be `= strawberry_django.field(select_related=["foo"])` or similar.
## 14. Add tests

View File

@ -49,6 +49,10 @@ This key lists all models which have been registered in NetBox which are not des
This store maintains all registered items for plugins, such as navigation menus, template extensions, etc.
### `request_processors`
A list of context managers to invoke when processing a request e.g. in middleware or when executing a background job. Request processors can be registered with the `@register_request_processor` decorator.
### `search`
A dictionary mapping each model (identified by its app and label) to its search index class, if one has been registered for it.

View File

@ -6,7 +6,7 @@ Below is a list of tasks to consider when adding a new field to a core model.
Add the field to the model, taking care to address any of the following conditions.
* When adding a GenericForeignKey field, also add an index under `Meta` for its two concrete fields. For example:
* When adding a GenericForeignKey field, you may need add an index under `Meta` for its two concrete fields. (This is required only for non-unique GFK relationships, as the unique constraint introduces its own index.) For example:
```python
class Meta:
@ -50,7 +50,7 @@ If you're adding a relational field (e.g. `ForeignKey`) and intend to include th
## 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 representation of the model.
Extend the model's API serializer in `<app>.api.serializers` to include the new field.
## 6. Add fields to forms

View File

@ -37,16 +37,12 @@ CHANGELOG.md CONTRIBUTING.md LICENSE.txt netbox README.md scri
### 2. Create a New Branch
The NetBox project utilizes three persistent git branches to track work:
The NetBox project utilizes two persistent git branches to track work:
* `master` - Serves as a snapshot of the current stable release
* `develop` - All development on the upcoming stable (patch) release occurs here
* `feature` - Tracks work on an upcoming minor release
* `main` - All development on the upcoming stable (patch) release occurs here. Releases are published from this branch.
* `feature` - All work planned for the upcoming minor release is done here.
Typically, you'll base pull requests off of the `develop` branch, or off of `feature` if you're working on a new major release. For example, assume that the current NetBox release is v3.3.5. Work applied to the `develop` branch will appear in v3.3.6, and work done under the `feature` branch will be included in the next minor release (v3.4.0).
!!! warning
**Never** merge pull requests into the `master` branch: This branch only ever merges pull requests from the `develop` branch, to effect a new release.
Typically, you'll base pull requests off of the `main` branch, or off of `feature` if you're working on the upcoming minor or major release. For example, assume that the current NetBox release is v4.2.3. Work applied to the `main` branch will appear in v4.2.4, and work done under the `feature` branch will be included in the next minor release (v4.3.0).
To create a new branch, first ensure that you've checked out the desired base branch, then run:
@ -62,22 +58,7 @@ $issue-$description
The description should be just two or three words to imply the focus of the work being performed. For example, bug #1234 to fix a TypeError exception when creating a device might be named `1234-device-typerror`. This ensures that branches are always follow some logical ordering (e.g. when running `git branch -a`) and helps other developers quickly identify the purpose of each.
### 3. Enable Pre-Commit Hooks
NetBox ships with a [git pre-commit hook](https://githooks.com/) script that automatically checks for style compliance and missing database migrations prior to committing changes. This helps avoid erroneous commits that result in CI test failures. You are encouraged to enable it by creating a link to `scripts/git-hooks/pre-commit`:
```no-highlight
cd .git/hooks/
ln -s ../../scripts/git-hooks/pre-commit
```
For the pre-commit hooks to work, you will also need to install the pycodestyle package:
```no-highlight
python -m pip install pycodestyle
```
...and set up the yarn packages as shown in the [Web UI Development Guide](web-ui.md)
### 4. Create a Python Virtual Environment
### 3. Create a Python Virtual Environment
A [virtual environment](https://docs.python.org/3/tutorial/venv.html) (or "venv" for short) is like a container for a set of Python packages. These allow you to build environments suited to specific projects without interfering with system packages or other projects. When installed per the documentation, NetBox uses a virtual environment in production.
@ -101,7 +82,7 @@ source ~/.venv/netbox/bin/activate
Notice that the console prompt changes to indicate the active environment. This updates the necessary system environment variables to ensure that any Python scripts are run within the virtual environment.
### 5. Install Required Packages
### 4. Install Required Packages
With the virtual environment activated, install the project's required Python packages using the `pip` module. Required packages are defined in `requirements.txt`. Each line in this file specifies the name and specific version of a required package.
@ -109,12 +90,32 @@ With the virtual environment activated, install the project's required Python pa
python -m pip install -r requirements.txt
```
### 5. Install Pre-Commit
NetBox uses [`pre-commit`](https://pre-commit.com/) to automatically validate code when commiting new changes. This includes the following operations:
* Run the `ruff` Python linter
* Run Django's internal system check
* Check for missing database migrations
* Validate any changes to the documentation with `mkdocs`
* Validate Typescript & Sass styling with `yarn`
* Ensure that any modified static front end assets have been recompiled
Enable `pre-commit` with the following commands _prior_ to commiting any changes:
```no-highlight
python -m pip install ruff pre-commit
pre-commit install
```
You may also need to set up the yarn packages as shown in the [Web UI Development Guide](web-ui.md).
### 6. Configure NetBox
Within the `netbox/netbox/` directory, copy `configuration_example.py` to `configuration.py` and update the following parameters:
* `ALLOWED_HOSTS`: This can be set to `['*']` for development purposes
* `DATABASE`: PostgreSQL database connection parameters
* `DATABASES`: PostgreSQL database connection parameters
* `REDIS`: Redis configuration (if different from the defaults)
* `SECRET_KEY`: Set to a random string (use `generate_secret_key.py` in the parent directory to generate a suitable key)
* `DEBUG`: Set to `True`
@ -146,7 +147,7 @@ For UI development you will need to review the [Web UI Development Guide](web-ui
## Populating Demo Data
Once you have your development environment up and running, it might be helpful to populate some "dummy" data to make interacting with the UI and APIs more convenient. Check out the [netbox-demo-data](https://github.com/netbox-community/netbox-demo-data) repo on GitHub, which houses a collection of sample data that can be easily imported to any new NetBox deployment. (This sample data is used to populate the public demo instance at <https://demo.netbox.dev>.)
Once you have your development environment up and running, it might be helpful to populate some "dummy" data to make interacting with the UI and APIs more convenient. Check out the [netbox-demo-data](https://github.com/netbox-community/netbox-demo-data) repo on GitHub, which houses a collection of sample data that can be easily imported to any new NetBox deployment. This sample data is used to populate the [public demo instance](https://demo.netbox.dev).
The demo data is provided in JSON format and loaded into an empty database using Django's `loaddata` management command. Consult the demo data repo's `README` file for complete instructions on populating the data.

View File

@ -128,7 +128,7 @@ Fast-forward
```
!!! warning "Avoid Merging Remote Branches"
You generally want to avoid merging branches that exist on the remote (upstream) repository, such as `develop` and `feature`: Merges into these branches should be done via a pull request on GitHub. Only merge branches when it is necessary to consolidate work you've done locally.
You generally want to avoid merging branches that exist on the remote (upstream) repository, namely `main` and `feature`: Merges into these branches should be done via a pull request on GitHub. Only merge branches when it is necessary to consolidate work you've done locally.
### Show Pending Changes
@ -196,7 +196,7 @@ index 93e125079..4344fb514 100644
+and here too
+
<div align="center">
<img src="https://raw.githubusercontent.com/netbox-community/netbox/develop/docs/netbox_logo.svg" width="400" alt="NetBox logo" />
<img src="https://raw.githubusercontent.com/netbox-community/netbox/main/docs/netbox_logo.svg" width="400" alt="NetBox logo" />
</div>
diff --git a/foo.py b/foo.py
new file mode 100644

View File

@ -8,11 +8,10 @@ NetBox and many of its related projects are maintained on [GitHub](https://githu
![GitHub](../media/development/github.png)
There are three permanent branches in the repository:
There are two permanent branches in the repository:
* `master` - The current stable release. Individual changes should never be pushed directly to this branch, but rather merged from `develop`.
* `develop` - Active development for the upcoming patch release. Pull requests will typically be based on this branch unless they introduce breaking changes that must be deferred until the next minor release.
* `feature` - New feature work to be introduced in the next minor release (e.g. from v3.3 to v3.4).
* `main` - Active development for the upcoming patch release. Pull requests will typically be based on this branch unless they introduce breaking changes that must be deferred until the next minor release.
* `feature` - New feature work to be introduced in the next minor release (e.g. from v4.2 to v4.3).
NetBox components are arranged into Django apps. Each app holds the models, views, and other resources relevant to a particular function:
@ -57,4 +56,4 @@ NetBox follows the [benevolent dictator](http://oss-watch.ac.uk/resources/benevo
## Licensing
The entire NetBox project is licensed as open source under the [Apache 2.0 license](https://github.com/netbox-community/netbox/blob/master/LICENSE.txt). This is a very permissive license which allows unlimited redistribution of all code within the project. Note that all submissions to the project are subject to the same license.
The entire NetBox project is licensed as open source under the [Apache 2.0 license](https://github.com/netbox-community/netbox/blob/main/LICENSE.txt). This is a very permissive license which allows unlimited redistribution of all code within the project. Note that all submissions to the project are subject to the same license.

View File

@ -18,7 +18,7 @@ Depending on its classification, each NetBox model may support various features
| [Custom links](../customization/custom-links.md) | `CustomLinksMixin` | `custom_links` | These models support the assignment of custom links |
| [Custom validation](../customization/custom-validation.md) | `CustomValidationMixin` | - | Supports the enforcement of custom validation rules |
| [Export templates](../customization/export-templates.md) | `ExportTemplatesMixin` | `export_templates` | Users can create custom export templates for these models |
| [Job results](../features/background-jobs.md) | `JobsMixin` | `jobs` | Users can create custom export templates for these models |
| [Job results](../features/background-jobs.md) | `JobsMixin` | `jobs` | Background jobs can be scheduled for these models |
| [Journaling](../features/journaling.md) | `JournalingMixin` | `journaling` | These models support persistent historical commentary |
| [Synchronized data](../integrations/synchronized-data.md) | `SyncedDataMixin` | `synced_data` | Certain model data can be automatically synchronized from a remote data source |
| [Tagging](../models/extras/tag.md) | `TagsMixin` | `tags` | The models can be tagged with user-defined tags |
@ -34,7 +34,9 @@ These are considered the "core" application models which are used to model netwo
* [circuits.Provider](../models/circuits/provider.md)
* [circuits.ProviderAccount](../models/circuits/provideraccount.md)
* [circuits.ProviderNetwork](../models/circuits/providernetwork.md)
* [core.DataFile](../models/core/datafile.md)
* [core.DataSource](../models/core/datasource.md)
* [core.Job](../models/core/job.md)
* [dcim.Cable](../models/dcim/cable.md)
* [dcim.Device](../models/dcim/device.md)
* [dcim.DeviceType](../models/dcim/devicetype.md)
@ -44,12 +46,14 @@ These are considered the "core" application models which are used to model netwo
* [dcim.PowerPanel](../models/dcim/powerpanel.md)
* [dcim.Rack](../models/dcim/rack.md)
* [dcim.RackReservation](../models/dcim/rackreservation.md)
* [dcim.RackType](../models/dcim/racktype.md)
* [dcim.Site](../models/dcim/site.md)
* [dcim.VirtualChassis](../models/dcim/virtualchassis.md)
* [dcim.VirtualDeviceContext](../models/dcim/virtualdevicecontext.md)
* [ipam.Aggregate](../models/ipam/aggregate.md)
* [ipam.ASN](../models/ipam/asn.md)
* [ipam.FHRPGroup](../models/ipam/fhrpgroup.md)
* [ipam.FHRPGroupAssignment](../models/ipam/fhrpgroupassignment.md)
* [ipam.IPAddress](../models/ipam/ipaddress.md)
* [ipam.IPRange](../models/ipam/iprange.md)
* [ipam.Prefix](../models/ipam/prefix.md)
@ -76,6 +80,7 @@ These are considered the "core" application models which are used to model netwo
Organization models are used to organize and classify primary models.
* [circuits.CircuitGroup](../models/circuits/circuitgroup.md)
* [circuits.CircuitType](../models/circuits/circuittype.md)
* [dcim.DeviceRole](../models/dcim/devicerole.md)
* [dcim.Manufacturer](../models/dcim/manufacturer.md)
@ -88,6 +93,7 @@ Organization models are used to organize and classify primary models.
* [tenancy.ContactRole](../models/tenancy/contactrole.md)
* [virtualization.ClusterGroup](../models/virtualization/clustergroup.md)
* [virtualization.ClusterType](../models/virtualization/clustertype.md)
* [vpn.TunnelGroup](../models/vpn/tunnelgroup.md)
### Nested Group Models
@ -131,3 +137,10 @@ These function as templates to effect the replication of device and virtual mach
* [dcim.PowerOutletTemplate](../models/dcim/poweroutlettemplate.md)
* [dcim.PowerPortTemplate](../models/dcim/powerporttemplate.md)
* [dcim.RearPortTemplate](../models/dcim/rearporttemplate.md)
### Connection Models
Connection models are used to model the connections, or connection endpoints between models.
* [circuits.CircuitTermination](../models/circuits/circuittermination.md)
* [vpn.TunnelTermination](../models/vpn/tunneltermination.md)

View File

@ -1,12 +1,14 @@
# Release Checklist
This documentation describes the process of packaging and publishing a new NetBox release. There are three types of release:
This documentation describes the process of packaging and publishing a new NetBox release. There are three types of releases:
* Major release (e.g. v2.11 to v3.0)
* Minor release (e.g. v3.2 to v3.3)
* Patch release (e.g. v3.3.0 to v3.3.1)
* Major release (e.g. v3.7.8 to v4.0.0)
* Minor release (e.g. v4.0.10 to v4.1.0)
* Patch release (e.g. v4.1.0 to v4.1.1)
While major releases generally introduce some very substantial change to the application, they are typically treated the same as minor version increments for the purpose of release packaging.
While major releases generally introduce some very substantial changes to the application, they are typically treated the same as minor version increments for the purpose of release packaging.
For patch releases (e.g. upgrading from v4.2.2 to v4.2.3), begin at the [patch releases](#patch-releases) heading below. For minor or major releases, complete the entire checklist.
## Minor Version Releases
@ -19,7 +21,7 @@ Sometimes it becomes necessary to constrain dependencies to a particular version
djangorestframework==3.8.1
```
These version constraints are added to `base_requirements.txt` to ensure that newer packages are not installed when updating the pinned dependencies in `requirements.txt` (see the [Update Requirements](#update-requirements) section below). Before each new minor version of NetBox is released, all such constraints on dependent packages should be addressed if feasible. This guards against the collection of stale constraints over time.
These version constraints are added to `base_requirements.txt` to ensure that newer packages are not installed when updating the pinned dependencies in `requirements.txt` (see the [Update Requirements](#update-python-dependencies) section below). Before each new minor version of NetBox is released, all such constraints on dependent packages should be addressed if feasible. This guards against the collection of stale constraints over time.
### Close the Release Milestone
@ -29,6 +31,31 @@ Close the [release milestone](https://github.com/netbox-community/netbox/milesto
Check that a link to the release notes for the new version is present in the navigation menu (defined in `mkdocs.yml`), and that a summary of all major new features has been added to `docs/index.md`.
### Update the Dependency Requirements Matrix
For every minor release, update the dependency requirements matrix in `docs/installation/upgrading.md` ("All versions") to reflect the supported versions of Python, PostgreSQL, and Redis:
1. Add a new row with the supported dependency versions.
2. Include a documentation link using the release tag format: `https://github.com/netbox-community/netbox/blob/v4.2.0/docs/installation/index.md`
3. Bold any version changes for clarity.
**Example Update:**
```markdown
| NetBox Version | Python min | Python max | PostgreSQL min | Redis min | Documentation |
|:--------------:|:----------:|:----------:|:--------------:|:---------:|:-------------------------------------------------------------------------------------------------:|
| 4.2 | 3.10 | 3.12 | **13** | 4.0 | [Link](https://github.com/netbox-community/netbox/blob/v4.2.0/docs/installation/index.md) |
```
### Update System Requirements
If a new Django release is adopted or other major dependencies (Python, PostgreSQL, Redis) change:
* Update the installation guide (`docs/installation/index.md`) with the new minimum versions.
* Update the upgrade guide (`docs/installation/upgrading.md`) for the current version accordingly.
* Update the minimum PostgreSQL version in the programming error template (`netbox/templates/exceptions/programming_error.html`).
* Update the minimum and supported Python versions in the project metadata file (`pyproject.toml`)
### Manually Perform a New Install
Start the documentation server and navigate to the current version of the installation docs:
@ -37,11 +64,25 @@ Start the documentation server and navigate to the current version of the instal
mkdocs serve
```
Follow these instructions to perform a new installation of NetBox in a temporary environment. This process must not be automated: The goal of this step is to catch any errors or omissions in the documentation, and ensure that it is kept up-to-date for each release. Make any necessary changes to the documentation before proceeding with the release.
Follow these instructions to perform a new installation of NetBox in a temporary environment. This process must not be automated: The goal of this step is to catch any errors or omissions in the documentation and ensure that it is kept up to date for each release. Make any necessary changes to the documentation before proceeding with the release.
### Merge the Release Branch
### Test Upgrade Paths
Submit a pull request to merge the `feature` branch into the `develop` branch in preparation for its release. Once it has been merged, continue with the section for patch releases below.
Upgrading from a previous version typically involves database migrations, which must work without errors.
Test the following supported upgrade paths:
- From one minor version to another within the same major version (e.g. 4.0 to 4.1).
- From the latest patch version of the previous minor version (e.g. 3.7 to 4.0 or 4.1).
Prior to release, test all these supported paths by loading demo data from the source version and performing:
```no-highlight
./manage.py migrate
```
### Merge the `feature` Branch
Submit a pull request to merge the `feature` branch into the `main` branch in preparation for its release. Once it has been merged, continue with the section for the patch releases below.
### Rebuild Demo Data (After Release)
@ -51,6 +92,15 @@ After the release of a new minor version, generate a new demo data snapshot comp
## Patch Releases
### Create a Release Branch
Begin by creating a new branch (based on `main`) to effect the release. This will comprise the changes listed below.
```
git checkout main
git checkout -B release-vX.Y.Z
```
### Notify netbox-docker Project of Any Relevant Changes
Notify the [`netbox-docker`](https://github.com/netbox-community/netbox-docker) maintainers (in **#netbox-docker**) of any changes that may be relevant to their build process, including:
@ -72,7 +122,20 @@ In cases where upgrading a dependency to its most recent release is breaking, it
### Update UI Dependencies
Check whether any UI dependencies (JavaScript packages, fonts, etc.) need to be updated by running `yarn outdated` from within the `project-static/` directory. [Upgrade these dependencies](http://0.0.0.0:9000/development/web-ui/#updating-dependencies) as necessary, then run `yarn bundle` to generate the necessary files for distribution.
Check whether any UI dependencies (JavaScript packages, fonts, etc.) need to be updated by running `yarn outdated` from within the `project-static/` directory. [Upgrade these dependencies](./web-ui.md#updating-dependencies) as necessary, then run `yarn bundle` to generate the necessary files for distribution:
```
$ yarn bundle
yarn run v1.22.19
$ node bundle.js
✅ Bundled source file 'styles/external.scss' to 'netbox-external.css'
✅ Bundled source file 'styles/netbox.scss' to 'netbox.css'
✅ Bundled source file 'styles/svg/rack_elevation.scss' to 'rack_elevation.css'
✅ Bundled source file 'styles/svg/cable_trace.scss' to 'cable_trace.css'
✅ Bundled source file 'index.ts' to 'netbox.js'
✅ Copied graphiql files
Done in 1.00s.
```
### Rebuild the Device Type Definition Schema
@ -86,51 +149,47 @@ This will automatically update the schema file at `contrib/generated_schema.json
### Update & Compile Translations
Log into [Transifex](https://app.transifex.com/netbox-community/netbox/dashboard/) to download the updated string maps. Download the resource (portable object, or `.po`) file for each language and save them to `netbox/translations/$lang/LC_MESSAGES/django.po`, overwriting the current files. (Be sure to click the **Download for use** link.)
Updated language translations should be pulled from [Transifex](https://app.transifex.com/netbox-community/netbox/dashboard/) and re-compiled for each new release. First, retrieve any updated translation files using the Transifex CLI client:
![Transifex download](../media/development/transifex_download.png)
```no-highlight
tx pull --force
```
Once the resource files for all languages have been updated, compile the machine object (`.mo`) files using the `compilemessages` management command:
Then, compile these portable (`.po`) files for use in the application:
```nohighlight
```no-highlight
./manage.py compilemessages
```
!!! tip
Consult the translation documentation for more detail on [updating translated strings](./translations.md#updating-translated-strings) if you've not set up the Transifex client already.
### Update Version and Changelog
* Update the `VERSION` constant in `settings.py` to the new release version.
* Update the version number and published date in `netbox/release.yaml`. Add or remove the designation (e.g. `beta1`) if applicable.
* Copy the version number from `release.yaml` to `pyproject.toml` in the project root.
* Update the example version numbers in the feature request and bug report templates under `.github/ISSUE_TEMPLATES/`.
* Replace the "FUTURE" placeholder in the release notes with the current date.
* Add a section for this release at the top of the changelog page for the minor version (e.g. `docs/release-notes/version-4.2.md`) listing all relevant changes made in this release.
Commit these changes to the `develop` branch and push upstream.
### Verify CI Build Status
Ensure that continuous integration testing on the `develop` branch is completing successfully. If it fails, take action to correct the failure before proceeding with the release.
!!! tip
Put yourself in the shoes of the user when recording change notes. Focus on the effect that each change has for the end user, rather than the specific bits of code that were modified in a PR. Ensure that each message conveys meaning absent context of the initial feature request or bug report. Remember to include keywords or phrases (such as exception names) that can be easily searched.
### Submit a Pull Request
Submit a pull request titled **"Release vX.Y.Z"** to merge the `develop` branch into `master`. Copy the documented release notes into the pull request's body.
Commit the above changes and submit a pull request titled **"Release vX.Y.Z"** to merge the current release branch (e.g. `release-vX.Y.Z`) into `main`. Copy the documented release notes into the pull request's body.
Once CI has completed on the PR, merge it. This effects a new release in the `master` branch.
Once CI has completed and a colleague has reviewed the PR, merge it. This effects a new release in the `main` branch.
!!! warning
To ensure a streamlined review process, the pull request for a release **must** be limited to the changes outlined in this document. A release PR must never include functional changes to the application: Any unrelated "cleanup" needs to be captured in a separate PR prior to the release being shipped.
### Create a New Release
Create a [new release](https://github.com/netbox-community/netbox/releases/new) on GitHub with the following parameters.
* **Tag:** Current version (e.g. `v3.3.1`)
* **Target:** `master`
* **Title:** Version and date (e.g. `v3.3.1 - 2022-08-25`)
* **Description:** Copy from the pull request body
* **Tag:** Current version (e.g. `v4.2.1`)
* **Target:** `main`
* **Title:** Version and date (e.g. `v4.2.1 - 2025-01-17`)
* **Description:** Copy from the pull request body, then promote the `###` headers to `##` ones
Once created, the release will become available for users to install.
### Update the Development Version
On the `develop` branch, update `VERSION` in `settings.py` to point to the next release. For example, if you just released v3.3.1, set:
```
VERSION = 'v3.3.2-dev'
```
Commit this change with the comment "PRVB" (for _post-release version bump_) and push the commit upstream.

View File

@ -1,6 +1,6 @@
# Style Guide
NetBox generally follows the [Django style guide](https://docs.djangoproject.com/en/stable/internals/contributing/writing-code/coding-style/), which is itself based on [PEP 8](https://www.python.org/dev/peps/pep-0008/). [Pycodestyle](https://github.com/pycqa/pycodestyle) is used to validate code formatting, ignoring certain violations.
NetBox generally follows the [Django style guide](https://docs.djangoproject.com/en/stable/internals/contributing/writing-code/coding-style/), which is itself based on [PEP 8](https://www.python.org/dev/peps/pep-0008/). [ruff](https://docs.astral.sh/ruff/) is used for linting (with certain [exceptions](#linter-exceptions)).
## Code
@ -20,32 +20,32 @@ NetBox generally follows the [Django style guide](https://docs.djangoproject.com
* Nested API serializers generate minimal representations of an object. These are stored separately from the primary serializers to avoid circular dependencies. Always import nested serializers from other apps directly. For example, from within the DCIM app you would write `from ipam.api.nested_serializers import NestedIPAddressSerializer`.
### PEP 8 Exceptions
### Linting
NetBox ignores certain PEP8 assertions. These are listed below.
The [ruff](https://docs.astral.sh/ruff/) linter is used to enforce code style, and is run automatically by [pre-commit](./getting-started.md#5-install-pre-commit). To invoke `ruff` manually, run:
#### Wildcard Imports
```
ruff check netbox/
```
#### Linter Exceptions
The following rules are ignored when linting.
##### [E501](https://docs.astral.sh/ruff/rules/line-too-long/): Line too long
NetBox does not enforce a hard restriction on line length, although a maximum length of 120 characters is strongly encouraged for Python code where possible. The maximum length does not apply to HTML templates or to automatically generated code (e.g. database migrations).
##### [F403](https://docs.astral.sh/ruff/rules/undefined-local-with-import-star/): Undefined local with import star
Wildcard imports (for example, `from .constants import *`) are acceptable under any of the following conditions:
* The library being import contains only constant declarations (e.g. `constants.py`)
* The library being imported explicitly defines `__all__`
#### Maximum Line Length (E501)
##### [F405](https://docs.astral.sh/ruff/rules/undefined-local-with-import-star-usage/): Undefined local with import star usage
NetBox does not restrict lines to a maximum length of 79 characters. We use a maximum line length of 120 characters, however this is not enforced by CI. The maximum length does not apply to HTML templates or to automatically generated code (e.g. database migrations).
#### Line Breaks Following Binary Operators (W504)
Line breaks are permitted following binary operators.
### Enforcing Code Style
The [`pycodestyle`](https://pypi.org/project/pycodestyle/) utility (formerly `pep8`) is used by the CI process to enforce code style. A [pre-commit hook](./getting-started.md#2-enable-pre-commit-hooks) which runs this automatically is included with NetBox. To invoke `pycodestyle` manually, run:
```
pycodestyle --ignore=W504,E501 netbox/
```
The justification for ignoring this rule is the same as F403 above.
### Introducing New Dependencies
@ -76,4 +76,4 @@ When adding a new dependency, a short description of the package and the URL of
* When referring to NetBox in writing, use the proper form "NetBox," with the letters N and B capitalized. The lowercase form "netbox" should be used in code, filenames, etc. but never "Netbox" or any other deviation.
* There is an SVG form of the NetBox logo at [docs/netbox_logo.svg](../netbox_logo.svg). It is preferred to use this logo for all purposes as it scales to arbitrary sizes without loss of resolution. If a raster image is required, the SVG logo should be converted to a PNG image of the prescribed size.
* There are SVG forms of the NetBox logo for both [light mode](../netbox_logo_light.svg) and [dark mode](../netbox_logo_dark.svg) available. It is preferred to use the SVG logo for all purposes as it scales to arbitrary sizes without loss of resolution. If a raster image is required, the SVG logo should be converted to a PNG image of the desired size.

View File

@ -6,17 +6,48 @@ All language translations in NetBox are generated from the source file found at
Reviewers log into Transifex and navigate to their designated language(s) to translate strings. The initial translation for most strings will be machine-generated via the AWS Translate service. Human reviewers are responsible for reviewing these translations and making corrections where necessary.
Immediately prior to each NetBox release, the translation maps for all completed languages will be downloaded from Transifex, compiled, and checked into the NetBox code base by a maintainer.
## Updating Translation Sources
To update the English `.po` file from which all translations are derived, use the `makemessages` management command:
To update the English `.po` file from which all translations are derived, use the `makemessages` management command (ignoring the `project-static/` directory):
```nohighlight
./manage.py makemessages -l en
./manage.py makemessages -l en -i "project-static/*"
```
Then, commit the change and push to the `develop` branch on GitHub. After some time, any new strings will appear for translation on Transifex automatically.
Then, commit the change and push to the `main` branch on GitHub. Any new strings will appear for translation on Transifex automatically.
!!! note
It is typically not necessary to update source strings manually, as this is done nightly by a [GitHub action](https://github.com/netbox-community/netbox/blob/main/.github/workflows/update-translation-strings.yml).
## Updating Translated Strings
Typically, translated strings need to be updated only as part of the NetBox [release process](./release-checklist.md).
Check the Transifex dashboard for languages that are not marked _ready for use_, being sure to click _Show all languages_ if it appears at the bottom of the list. Use machine translation to round out any not-ready languages. It's not necessary to review the machine translation immediately as the translation teams will handle that aspect; the goal at this stage is to get translations included in the Transifex pull request.
To download translated strings automatically, you'll need to:
1. Install the [Transifex CLI client](https://github.com/transifex/cli)
2. Generate a [Transifex API token](https://app.transifex.com/user/settings/api/)
Once you have the client set up, run the following command from the project root (e.g. `/opt/netbox/`):
```no-highlight
TX_TOKEN=$TOKEN tx pull --force
```
This will download all portable (`.po`) translation files from Transifex, updating them locally as needed. (The `--force` argument instructs the client to disregard the timestamps of local translation files.)
Once retrieved, the updated strings need to be compiled into new `.mo` files so they can be used by the application. Run Django's [`compilemessages`](https://docs.djangoproject.com/en/stable/ref/django-admin/#django-admin-compilemessages) management command to compile them:
```no-highlight
./manage.py compilemessages
```
Once any new `.mo` files have been generated, they need to be committed and pushed back up to GitHub. (Again, this is typically done as part of publishing a new NetBox release.)
!!! tip
Run `git status` to check that both `*.mo` & `*.po` files have been updated as expected.
## Proposing New Languages

View File

@ -5,6 +5,10 @@ img {
margin-right: auto;
}
.md-content img {
background-color: rgba(255, 255, 255, 0.64);
}
/* Tables */
table {
margin-bottom: 24px;

View File

@ -41,7 +41,7 @@ NetBox integrates with the open source [python-social-auth](https://github.com/p
* Google
* Hashicorp Vault
* Keycloak
* Microsoft Azure AD
* Microsoft Entra ID
* Microsoft Graph
* Okta
* OIDC

View File

@ -2,9 +2,9 @@
NetBox includes the ability to execute certain functions as background tasks. These include:
* [Report](../customization/reports.md) execution
* [Custom script](../customization/custom-scripts.md) execution
* Synchronization of [remote data sources](../integrations/synchronized-data.md)
* Housekeeping tasks
Additionally, NetBox plugins can enqueue their own background tasks. This is accomplished using the [Job model](../models/core/job.md). Background tasks are executed by the `rqworker` process(es).

View File

@ -1,9 +1,10 @@
# Event Rules
NetBox includes the ability to execute certain functions in response to internal object changes. These include:
NetBox includes the ability to automatically perform certain functions in response to internal events. These include:
* [Scripts](../customization/custom-scripts.md) execution
* [Webhooks](../integrations/webhooks.md) execution
* Executing a [custom script](../customization/custom-scripts.md)
* Sending a [webhook](../integrations/webhooks.md)
* Generating [user notifications](../features/notifications.md)
For example, suppose you want to automatically configure a monitoring system to start monitoring a device when its operational status is changed to active, and remove it from monitoring for any other status. You can create a webhook in NetBox for the device model and craft its content and destination URL to effect the desired change on the receiving system. You can then associate an event rule with this webhook and the webhook will be sent automatically by NetBox whenever the configured constraints are met.

View File

@ -46,7 +46,7 @@ Regions will always be listed alphabetically by name within each parent, and the
Like regions, site groups can be arranged in a recursive hierarchy for grouping sites. However, whereas regions are intended for geographic organization, site groups may be used for functional grouping. For example, you might classify sites as corporate, branch, or customer sites in addition to where they are physically located.
The use of both regions and site groups affords to independent but complementary dimensions across which sites can be organized.
The use of both regions and site groups affords two independent but complementary dimensions across which sites can be organized.
## Sites
@ -56,6 +56,10 @@ A site typically represents a building within a region and/or site group. Each s
A location can be any logical subdivision within a building, such as a floor or room. Like regions and site groups, locations can be nested into a self-recursive hierarchy for maximum flexibility. And like sites, each location has an operational status assigned to it.
## Rack Types
A rack type represents a unique specification of a rack which exists in the real world. Each rack type can be setup with weight, height, and unit ordering. New racks of this type can then be created in NetBox, and any associated specifications will be automatically replicated from the device type.
## Racks
Finally, NetBox models each equipment rack as a discrete object within a site and location. These are physical objects into which devices are installed. Each rack can be assigned an operational status, type, facility ID, and other attributes related to inventory tracking. Each rack also must define a height (in rack units) and width, and may optionally specify its physical dimensions.

View File

@ -0,0 +1,8 @@
# Notifications
NetBox includes a system for generating user notifications, which can be marked as read or deleted by individual users. There are two built-in mechanisms for generating a notification:
* A user can subscribe to an object. When that object is modified, a notification is created to inform the user of the change.
* An [event rule](./event-rules.md) can be defined to automatically generate a notification for one or more users in response to specific system events.
Additionally, NetBox plugins can generate notifications for their own purposes.

View File

@ -13,6 +13,9 @@ To enable remote data synchronization, the NetBox administrator first designates
!!! info
Data backends which connect to external sources typically require the installation of one or more supporting Python libraries. The Git backend requires the [`dulwich`](https://www.dulwich.io/) package, and the S3 backend requires the [`boto3`](https://boto3.amazonaws.com/v1/documentation/api/latest/index.html) package. These must be installed within NetBox's environment to enable these backends.
!!! info
If you are configuring Git and have `HTTP_PROXIES` configured to use the SOCKS protocol, you will also need to install the [`python_socks`](https://pypi.org/project/python-socks/) Python library.
Each type of remote source has its own configuration parameters. For instance, a git source will ask the user to specify a branch and authentication credentials. Once the source has been created, a synchronization job is run to automatically replicate remote files in the local database.
The following NetBox models can be associated with replicated data files:

View File

@ -1,4 +1,5 @@
![NetBox](netbox_logo.svg "NetBox logo"){style="height: 100px; margin-bottom: 3em"}
![NetBox](netbox_logo_light.svg#only-light "NetBox logo"){style="height: 100px; margin-bottom: 3em; background: none;"}
![NetBox](netbox_logo_dark.svg#only-dark "NetBox logo"){style="height: 100px; margin-bottom: 3em; background: none;"}
# The Premier Network Source of Truth
@ -8,7 +9,7 @@ NetBox is the leading solution for modeling and documenting modern networks. By
## :material-server-network: Built for Networks
Unlike general-purpose CMDBs, NetBox has curated a data model which caters specifically to the needs of network engineers and operators. It delivers a wide assortment of object types carefully crafted to best serve the needs of infrastructure design and documentation. These cover all facets of network technology, from IP address managements to cabling to overlays and more:
Unlike general-purpose configuration management databases (CMDBs), NetBox has curated a data model which caters specifically to the needs of network engineers and operators. It delivers a wide assortment of object types carefully crafted to best serve the needs of infrastructure design and documentation. These cover all facets of network technology, from IP address managements to cabling to overlays and more:
* Hierarchical regions, sites, and locations
* Racks, devices, and device components

View File

@ -2,39 +2,17 @@
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 "PostgreSQL 12 or later required"
NetBox requires PostgreSQL 12 or later. Please note that MySQL and other relational databases are **not** supported.
!!! warning "PostgreSQL 14 or later required"
NetBox requires PostgreSQL 14 or later. Please note that MySQL and other relational databases are **not** supported.
## Installation
=== "Ubuntu"
```no-highlight
sudo apt update
sudo apt install -y postgresql
```
```no-highlight
sudo apt update
sudo apt install -y postgresql
```
=== "CentOS"
```no-highlight
sudo yum install -y postgresql-server
sudo postgresql-setup --initdb
```
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
host all all 127.0.0.1/32 md5
host all all ::1/128 md5
```
Once PostgreSQL has been installed, start the service and enable it to run at boot:
```no-highlight
sudo systemctl enable --now postgresql
```
Before continuing, verify that you have installed PostgreSQL 12 or later:
Before continuing, verify that you have installed PostgreSQL 14 or later:
```no-highlight
psql -V
@ -62,6 +40,9 @@ GRANT CREATE ON SCHEMA public 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.
!!! danger "Use UTF8 encoding"
Make sure that your database uses `UTF8` encoding (the default for new installations). Especially do not use `SQL_ASCII` encoding, as it can lead to unpredictable and unrecoverable errors. Enter `\l` to check your encoding.
Once complete, enter `\q` to exit the PostgreSQL shell.
## Verify Service Status

View File

@ -4,18 +4,9 @@
[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).
=== "Ubuntu"
```no-highlight
sudo apt install -y redis-server
```
=== "CentOS"
```no-highlight
sudo yum install -y redis
sudo systemctl enable --now redis
```
```no-highlight
sudo apt install -y redis-server
```
Before continuing, verify that your installed version of Redis is at least v4.0:

View File

@ -9,17 +9,11 @@ Begin by installing all system packages required by NetBox and its dependencies.
!!! warning "Python 3.10 or later required"
NetBox supports Python 3.10, 3.11, and 3.12.
=== "Ubuntu"
```no-highlight
sudo apt install -y python3 python3-pip python3-venv python3-dev build-essential libxml2-dev libxslt1-dev libffi-dev libpq-dev libssl-dev zlib1g-dev
```
=== "CentOS"
```no-highlight
sudo yum install -y gcc libxml2-devel libxslt-devel libffi-devel libpq-devel openssl-devel redhat-rpm-config
```
```no-highlight
sudo apt install -y python3 python3-pip python3-venv python3-dev \
build-essential libxml2-dev libxslt1-dev libffi-dev libpq-dev \
libssl-dev zlib1g-dev
```
Before continuing, check that your installed Python version is at least 3.10:
@ -29,7 +23,7 @@ python3 -V
## Download NetBox
This documentation provides two options for installing NetBox: from a downloadable archive, or from the git repository. Installing from a package (option A below) requires manually fetching and extracting the archive for every future update, whereas installation via git (option B) allows for seamless upgrades by re-pulling the `master` branch.
This documentation provides two options for installing NetBox: from a downloadable archive, or from the git repository. Installing from a package (option A below) requires manually fetching and extracting the archive for every future update, whereas installation via git (option B) allows for seamless upgrades by checking out the latest release tag.
### Option A: Download a Release Archive
@ -55,28 +49,17 @@ cd /opt/netbox/
If `git` is not already installed, install it:
=== "Ubuntu"
```no-highlight
sudo apt install -y git
```
=== "CentOS"
```no-highlight
sudo yum install -y git
```
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 --depth 1 https://github.com/netbox-community/netbox.git .
sudo apt install -y git
```
!!! note
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.
Next, clone the git repository:
The `git clone` command should generate output similar to the following:
```no-highlight
sudo git clone https://github.com/netbox-community/netbox.git .
```
This command should generate output similar to the following:
```
Cloning into '.'...
@ -88,31 +71,24 @@ 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`.
Finally, check out the tag for the desired release. You can find these on our [releases page](https://github.com/netbox-community/netbox/releases). Replace `vX.Y.Z` with your selected release tag below.
```
sudo git checkout vX.Y.Z
```
Using this installation method enables easy upgrades in the future by simply checking out the latest release tag.
## Create the NetBox System User
Create a system user account named `netbox`. We'll configure the WSGI and HTTP services to run under this account. We'll also assign this user ownership of the media directory. This ensures that NetBox will be able to save uploaded files.
=== "Ubuntu"
```
sudo adduser --system --group netbox
sudo chown --recursive netbox /opt/netbox/netbox/media/
sudo chown --recursive netbox /opt/netbox/netbox/reports/
sudo chown --recursive netbox /opt/netbox/netbox/scripts/
```
=== "CentOS"
```
sudo groupadd --system netbox
sudo adduser --system -g netbox netbox
sudo chown --recursive netbox /opt/netbox/netbox/media/
sudo chown --recursive netbox /opt/netbox/netbox/reports/
sudo chown --recursive netbox /opt/netbox/netbox/scripts/
```
```
sudo adduser --system --group netbox
sudo chown --recursive netbox /opt/netbox/netbox/media/
sudo chown --recursive netbox /opt/netbox/netbox/reports/
sudo chown --recursive netbox /opt/netbox/netbox/scripts/
```
## Configuration
@ -126,13 +102,13 @@ sudo cp configuration_example.py configuration.py
Open `configuration.py` with your preferred editor to begin configuring NetBox. NetBox offers [many configuration parameters](../configuration/index.md), but only the following four are required for new installations:
* `ALLOWED_HOSTS`
* `DATABASE`
* `DATABASES` (or `DATABASE`)
* `REDIS`
* `SECRET_KEY`
### ALLOWED_HOSTS
This is a list of the valid hostnames and IP addresses by which this server can be reached. You must specify at least one name or IP address. (Note that this does not restrict the locations from which NetBox may be accessed: It is merely for [HTTP host header validation](https://docs.djangoproject.com/en/3.0/topics/security/#host-headers-virtual-hosting).)
This is a list of the valid hostnames and IP addresses by which this server can be reached. You must specify at least one name or IP address. (Note that this does not restrict the locations from which NetBox may be accessed: It is merely for [HTTP host header validation](https://docs.djangoproject.com/en/stable/topics/security/#host-headers-virtual-hosting).)
```python
ALLOWED_HOSTS = ['netbox.example.com', '192.0.2.123']
@ -144,18 +120,22 @@ If you are not yet sure what the domain name and/or IP address of the NetBox ins
ALLOWED_HOSTS = ['*']
```
### DATABASE
### DATABASES
This parameter holds the database configuration details. You must define the username and password used when you configured PostgreSQL. If the service is running on a remote host, update the `HOST` and `PORT` parameters accordingly. See the [configuration documentation](../configuration/required-parameters.md#database) for more detail on individual parameters.
This parameter holds the PostgreSQL database configuration details. The default database must be defined; additional databases may be defined as needed e.g. by plugins.
A username and password must be defined for the default database. If the service is running on a remote host, update the `HOST` and `PORT` parameters accordingly. See the [configuration documentation](../configuration/required-parameters.md#databases) for more detail on individual parameters.
```python
DATABASE = {
'NAME': 'netbox', # Database name
'USER': 'netbox', # PostgreSQL username
'PASSWORD': 'J5brHrAXFLQSif0K', # PostgreSQL password
'HOST': 'localhost', # Database server
'PORT': '', # Database port (leave blank for default)
'CONN_MAX_AGE': 300, # Max database connection age (seconds)
DATABASES = {
'default': {
'NAME': 'netbox', # Database name
'USER': 'netbox', # PostgreSQL username
'PASSWORD': 'J5brHrAXFLQSif0K', # PostgreSQL password
'HOST': 'localhost', # Database server
'PORT': '', # Database port (leave blank for default)
'CONN_MAX_AGE': 300, # Max database connection age (seconds)
}
}
```
@ -205,7 +185,7 @@ All Python packages required by NetBox are listed in `requirements.txt` and will
### Remote File Storage
By default, NetBox will use the local filesystem to store uploaded files. To use a remote filesystem, install the [`django-storages`](https://django-storages.readthedocs.io/en/stable/) library and configure your [desired storage backend](../configuration/system.md#storage_backend) in `configuration.py`.
By default, NetBox will use the local filesystem to store uploaded files. To use a remote filesystem, install the [`django-storages`](https://django-storages.readthedocs.io/en/stable/) library and configure your [desired storage backend](../configuration/system.md#storages) in `configuration.py`.
```no-highlight
sudo sh -c "echo 'django-storages' >> /opt/netbox/local_requirements.txt"
@ -244,7 +224,7 @@ Once NetBox has been configured, we're ready to proceed with the actual installa
* Create a Python virtual environment
* Installs all required Python packages
* Run database schema migrations
* Run database schema migrations (skip with `--readonly`)
* Builds the documentation locally (for offline use)
* Aggregate static resource files on disk
@ -264,6 +244,9 @@ sudo PYTHON=/usr/bin/python3.10 /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.
!!! note
To run the script on a node connected to a database in read-only mode, include the `--readonly` parameter. This will skip the application of any database migrations.
## Create a Super User
NetBox does not come with any predefined user accounts. You'll need to create a super user (administrative account) to be able to log into NetBox. First, enter the Python virtual environment created by the upgrade script:
@ -319,13 +302,6 @@ 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):
```no-highlight
firewall-cmd --zone=public --add-port=8000/tcp
```
!!! 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.**

View File

@ -17,7 +17,7 @@ pip3 install pyuwsgi
Once installed, add the package to `local_requirements.txt` to ensure it is re-installed during future rebuilds of the virtual environment:
```no-highlight
sudo sh -c "echo 'pyuwgsi' >> /opt/netbox/local_requirements.txt"
sudo sh -c "echo 'pyuwsgi' >> /opt/netbox/local_requirements.txt"
```
## Configuration
@ -28,7 +28,7 @@ NetBox ships with a default configuration file for uWSGI. To use it, copy `/opt/
sudo cp /opt/netbox/contrib/uwsgi.ini /opt/netbox/uwsgi.ini
```
While the provided configuration should suffice for most initial installations, you may wish to edit this file to change the bound IP address and/or port number, or to make performance-related adjustments. See [the uWSGI documentation](https://uwsgi-docs-additions.readthedocs.io/en/latest/Options.html) for the available configuration parameters and take a minute to review the [Things to know](https://uwsgi-docs.readthedocs.io/en/latest/ThingsToKnow.html) page. Django also provides [additional documentation](https://docs.djangoproject.com/en/5.0/howto/deployment/wsgi/uwsgi/) on configuring uWSGI with a Django app.
While the provided configuration should suffice for most initial installations, you may wish to edit this file to change the bound IP address and/or port number, or to make performance-related adjustments. See [the uWSGI documentation](https://uwsgi-docs-additions.readthedocs.io/en/latest/Options.html) for the available configuration parameters and take a minute to review the [Things to know](https://uwsgi-docs.readthedocs.io/en/latest/ThingsToKnow.html) page. Django also provides [additional documentation](https://docs.djangoproject.com/en/stable/howto/deployment/wsgi/uwsgi/) on configuring uWSGI with a Django app.
## systemd Setup

View File

@ -6,18 +6,10 @@ This guide explains how to implement LDAP authentication using an external serve
### Install System Packages
On Ubuntu:
```no-highlight
sudo apt install -y libldap2-dev libsasl2-dev libssl-dev
```
On CentOS:
```no-highlight
sudo yum install -y openldap-devel python3-devel
```
### Install django-auth-ldap
Activate the Python virtual environment and install the `django-auth-ldap` package using pip:

View File

@ -1,11 +1,18 @@
# Installation
!!! info "NetBox Cloud"
The instructions below are for installing NetBox as a standalone, self-hosted application. For a Cloud-delivered solution, check out [NetBox Cloud](https://netboxlabs.com/netbox-cloud/) by NetBox Labs.
<div class="grid cards" markdown>
The installation instructions provided here have been tested to work on Ubuntu 22.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.
- :material-clock-fast:{ .lg .middle } __Eager to Get Started?__
<iframe width="560" height="315" src="https://www.youtube.com/embed/_y5JRiW_PLM" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
---
Check out the [NetBox Cloud Free Plan](https://netboxlabs.com/free-netbox-cloud/)! Skip the installation process and grab your own NetBox Cloud instance, preconfigured and ready to go in minutes. Completely free!
[:octicons-arrow-right-24: Sign Up](https://signup.netboxlabs.com/)
</div>
The installation instructions provided here have been tested to work on Ubuntu 22.04. 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:
@ -21,7 +28,7 @@ The following sections detail how to set up a new instance of NetBox:
| Dependency | Supported Versions |
|------------|--------------------|
| Python | 3.10, 3.11, 3.12 |
| PostgreSQL | 12+ |
| PostgreSQL | 14+ |
| Redis | 4.0+ |
Below is a simplified overview of the NetBox application stack for reference:

View File

@ -20,15 +20,54 @@ NetBox requires the following dependencies:
| Dependency | Supported Versions |
|------------|--------------------|
| Python | 3.10, 3.11, 3.12 |
| PostgreSQL | 12+ |
| PostgreSQL | 14+ |
| Redis | 4.0+ |
### Version History
| NetBox Version | Python min | Python max | PostgreSQL min | Redis min | Documentation |
|:--------------:|:----------:|:----------:|:--------------:|:---------:|:-------------------------------------------------------------------------------------------------:|
| 4.3 | 3.10 | 3.12 | 14 | 4.0 | [Link](https://github.com/netbox-community/netbox/blob/v4.3.0/docs/installation/index.md) |
| 4.2 | 3.10 | 3.12 | 13 | 4.0 | [Link](https://github.com/netbox-community/netbox/blob/v4.2.0/docs/installation/index.md) |
| 4.1 | 3.10 | 3.12 | 12 | 4.0 | [Link](https://github.com/netbox-community/netbox/blob/v4.1.0/docs/installation/index.md) |
| 4.0 | 3.10 | 3.12 | 12 | 4.0 | [Link](https://github.com/netbox-community/netbox/blob/v4.0.0/docs/installation/index.md) |
| 3.7 | 3.8 | 3.11 | 12 | 4.0 | [Link](https://github.com/netbox-community/netbox/blob/v3.7.0/docs/installation/index.md) |
| 3.6 | 3.8 | 3.11 | 12 | 4.0 | [Link](https://github.com/netbox-community/netbox/blob/v3.6.0/docs/installation/index.md) |
| 3.5 | 3.8 | 3.10 | 11 | 4.0 | [Link](https://github.com/netbox-community/netbox/blob/v3.5.0/docs/installation/index.md) |
| 3.4 | 3.8 | 3.10 | 11 | 4.0 | [Link](https://github.com/netbox-community/netbox/blob/v3.4.0/docs/installation/index.md) |
| 3.3 | 3.8 | 3.10 | 10 | 4.0 | [Link](https://github.com/netbox-community/netbox/blob/v3.3.0/docs/installation/index.md) |
| 3.2 | 3.8 | 3.10 | 10 | 4.0 | [Link](https://github.com/netbox-community/netbox/blob/v3.2.0/docs/installation/index.md) |
| 3.1 | 3.7 | 3.9 | 10 | 4.0 | [Link](https://github.com/netbox-community/netbox/blob/v3.1.0/docs/installation/index.md) |
| 3.0 | 3.7 | 3.9 | 9.6 | 4.0 | [Link](https://github.com/netbox-community/netbox/blob/v3.0.0/docs/installation/index.md) |
| 2.11 | 3.6 | 3.9 | 9.6 | 4.0 | [Link](https://github.com/netbox-community/netbox/blob/v2.11.0/docs/installation/index.md) |
| 2.10 | 3.6 | 3.8 | 9.6 | 4.0 | [Link](https://github.com/netbox-community/netbox/blob/v2.10.0/docs/installation/index.md) |
| 2.9 | 3.6 | 3.8 | 9.5 | 4.0 | [Link](https://github.com/netbox-community/netbox/blob/v2.9.0/docs/installation/index.md) |
| 2.8 | 3.6 | 3.8 | 9.5 | 3.4 | [Link](https://github.com/netbox-community/netbox/blob/v2.8.0/docs/installation/index.md) |
| 2.7 | 3.5 | 3.7 | 9.4 | - | [Link](https://github.com/netbox-community/netbox/blob/v2.7.0/docs/installation/index.md) |
| 2.6 | 3.5 | 3.7 | 9.4 | - | [Link](https://github.com/netbox-community/netbox/blob/v2.6.0/docs/installation/index.md) |
| 2.5 | 3.5 | 3.7 | 9.4 | - | [Link](https://github.com/netbox-community/netbox/blob/v2.5.0/docs/installation/index.md) |
| 2.4 | 3.4 | 3.7 | 9.4 | - | [Link](https://github.com/netbox-community/netbox/blob/v2.4.0/docs/installation/index.md) |
| 2.3 | 2.7 | 3.6 | 9.4 | - | [Link](https://github.com/netbox-community/netbox/blob/v2.3.0/docs/installation/postgresql.md) |
| 2.2 | 2.7 | 3.6 | 9.4 | - | [Link](https://github.com/netbox-community/netbox/blob/v2.2.0/docs/installation/postgresql.md) |
| 2.1 | 2.7 | 3.6 | 9.3 | - | [Link](https://github.com/netbox-community/netbox/blob/v2.1.0/docs/installation/postgresql.md) |
| 2.0 | 2.7 | 3.6 | 9.3 | - | [Link](https://github.com/netbox-community/netbox/blob/v2.0.0/docs/installation/postgresql.md) |
| 1.9 | 2.7 | 3.5 | 9.2 | - | [Link](https://github.com/netbox-community/netbox/blob/v1.9.0-r1/docs/installation/postgresql.md) |
| 1.8 | 2.7 | 3.5 | 9.2 | - | [Link](https://github.com/netbox-community/netbox/blob/v1.8.0/docs/installation/postgresql.md) |
| 1.7 | 2.7 | 3.5 | 9.2 | - | [Link](https://github.com/netbox-community/netbox/blob/v1.7.0/docs/installation/postgresql.md) |
| 1.6 | 2.7 | 3.5 | 9.2 | - | [Link](https://github.com/netbox-community/netbox/blob/v1.6.0/docs/installation/postgresql.md) |
| 1.5 | 2.7 | 3.5 | 9.2 | - | [Link](https://github.com/netbox-community/netbox/blob/v1.5.0/docs/installation/postgresql.md) |
| 1.4 | 2.7 | 3.5 | 9.1 | - | [Link](https://github.com/netbox-community/netbox/blob/v1.4.0/docs/installation/postgresql.md) |
| 1.3 | 2.7 | 3.5 | 9.1 | - | [Link](https://github.com/netbox-community/netbox/blob/v1.3.0/docs/installation/postgresql.md) |
| 1.2 | 2.7 | 3.5 | 9.1 | - | [Link](https://github.com/netbox-community/netbox/blob/v1.2.0/docs/installation/postgresql.md) |
| 1.1 | 2.7 | 3.5 | 9.1 | - | [Link](https://github.com/netbox-community/netbox/blob/v1.1.0/docs/getting-started.md) |
| 1.0 | 2.7 | 3.5 | 9.1 | - | [Link](https://github.com/netbox-community/netbox/blob/1.0.0/docs/getting-started.md) |
## 3. Install the Latest Release
As with the initial installation, you can upgrade NetBox by either downloading the latest release package or by cloning the `master` branch of the git repository.
As with the initial installation, you can upgrade NetBox by either downloading the latest release package or by checking out the latest production release from the git repository.
!!! warning
Use the same method as you used to install NetBox originally
Use the same method as you used to install NetBox originally.
If you are not sure how NetBox was installed originally, check with this command:
@ -36,10 +75,7 @@ If you are not sure how NetBox was installed originally, check with this command
ls -ld /opt/netbox /opt/netbox/.git
```
If NetBox was installed from a release package, then `/opt/netbox` will be a
symlink pointing to the current version, and `/opt/netbox/.git` will not
exist. If it was installed from git, then `/opt/netbox` and
`/opt/netbox/.git` will both exist as normal directories.
If NetBox was installed from a release package, then `/opt/netbox` will be a symlink pointing to the current version, and `/opt/netbox/.git` will not exist. If it was installed from git, then `/opt/netbox` and `/opt/netbox/.git` will both exist as normal directories.
### Option A: Download a Release
@ -84,20 +120,24 @@ If you followed the original installation guide to set up gunicorn, be sure to c
sudo cp /opt/netbox-$OLDVER/gunicorn.py /opt/netbox/
```
### Option B: Clone the Git Repository
### Option B: Check Out a Git Release
This guide assumes that NetBox is installed at `/opt/netbox`. Pull down the most recent iteration of the master branch:
This guide assumes that NetBox is installed in `/opt/netbox`. First, determine the latest release either by visiting our [releases page](https://github.com/netbox-community/netbox/releases) or by running the following command:
```no-highlight
cd /opt/netbox
sudo git checkout master
sudo git pull origin master
```
git ls-remote --tags https://github.com/netbox-community/netbox.git \
| grep -o 'refs/tags/v[0-9]*\.[0-9]*\.[0-9]*$' \
| tail -n 1 \
| sed 's|refs/tags/||'
```
!!! info "Checking out an older release"
If you need to upgrade to an older version rather than the current stable release, you can check out any valid [git tag](https://github.com/netbox-community/netbox/tags), each of which represents a release. For example, to checkout the code for NetBox v2.11.11, do:
Check out the desired release by specifying its tag. For example:
sudo git checkout v2.11.11
```
cd /opt/netbox && \
sudo git fetch --tags && \
sudo git checkout v4.2.7
```
## 4. Run the Upgrade Script
@ -114,6 +154,9 @@ sudo ./upgrade.sh
sudo PYTHON=/usr/bin/python3.10 ./upgrade.sh
```
!!! note
To run the script on a node connected to a database in read-only mode, include the `--readonly` parameter. This will skip the application of any database migrations.
This script performs the following actions:
* Destroys and rebuilds the Python virtual environment

View File

@ -1,6 +1,6 @@
# 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/).
NetBox provides a read-only [GraphQL](https://graphql.org/) API to complement its REST API. This API is powered by [Strawberry Django](https://strawberry.rocks/).
## Queries
@ -11,7 +11,7 @@ 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}}}"}'
--data '{"query": "query {circuit_list(filters:{status: STATUS_ACTIVE}) {cid provider {name}}}"}'
```
The response will include the requested data formatted as JSON:
@ -47,23 +47,52 @@ NetBox provides both a singular and plural query field for each object type:
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/) as well as the [GraphQL queries documentation](https://graphql.org/learn/queries/).
For more detail on constructing GraphQL queries, see the [GraphQL queries documentation](https://graphql.org/learn/queries/). For filtering and lookup syntax, please refer to the [Strawberry Django documentation](https://strawberry.rocks/docs/django/guide/filters).
## 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:
!!! note "Changed in NetBox v4.3"
The filtering syntax fo the GraphQL API has changed substantially in NetBox v4.3.
Filters can be specified as key-value pairs within parentheses immediately following the query name. For example, the following will return only active sites:
```
query {
site_list(filters: {region: "us-nc", status: "active"}) {
site_list(
filters: {
status: STATUS_ACTIVE
}
) {
name
}
}
```
In addition, filtering can be done on list of related objects as shown in the following query:
Filters can be combined with logical operators, such as `OR` and `NOT`. For example, the following will return every site that is planned _or_ assigned to a tenant named Foo:
```
{
query {
site_list(
filters: {
status: STATUS_PLANNED,
OR: {
tenant: {
name: {
exact: "Foo"
}
}
}
}
) {
name
}
}
```
Filtering can also be applied to related objects. For example, the following query will return only enabled interfaces for each device:
```
query {
device_list {
id
name
@ -98,9 +127,21 @@ Certain queries can return multiple types of objects, for example cable terminat
}
}
}
```
The field "class_type" is an easy way to distinguish what type of object it is when viewing the returned data, or when filtering. It contains the class name, for example "CircuitTermination" or "ConsoleServerPort".
## Pagination
Queries can be paginated by specifying pagination in the query and supplying an offset and optionaly a limit in the query. If no limit is given, a default of 100 is used. Queries are not paginated unless requested in the query. An example paginated query is shown below:
```
The field "class_type" is an easy way to distinguish what type of object it is when viewing the returned data, or when filtering. It contains the class name, for example "CircuitTermination" or "ConsoleServerPort".
query {
device_list(pagination: { offset: 0, limit: 20 }) {
id
}
}
```
## Authentication
@ -112,4 +153,4 @@ Authorization: Token $TOKEN
## Disabling the GraphQL API
If not needed, the GraphQL API can be disabled by setting the [`GRAPHQL_ENABLED`](../configuration/miscellaneous.md#graphql_enabled) configuration parameter to False and restarting NetBox.
If not needed, the GraphQL API can be disabled by setting the [`GRAPHQL_ENABLED`](../configuration/graphql-api.md#graphql_enabled) configuration parameter to False and restarting NetBox.

View File

@ -2,7 +2,7 @@
## What is a REST API?
REST stands for [representational state transfer](https://en.wikipedia.org/wiki/Representational_state_transfer). It's a particular type of API which employs HTTP requests and [JavaScript Object Notation (JSON)](https://www.json.org/) to facilitate create, retrieve, update, and delete (CRUD) operations on objects within an application. Each type of operation is associated with a particular HTTP verb:
REST stands for [representational state transfer](https://en.wikipedia.org/wiki/REST). It's a particular type of API which employs HTTP requests and [JavaScript Object Notation (JSON)](https://www.json.org/) to facilitate create, retrieve, update, and delete (CRUD) operations on objects within an application. Each type of operation is associated with a particular HTTP verb:
* `GET`: Retrieve an object or list of objects
* `POST`: Create an object
@ -101,7 +101,7 @@ See the [filtering documentation](../reference/filtering.md) for more details on
## Serialization
The REST API employs two types of serializers to represent model data: base serializers and nested serializers. The base serializer is used to present the complete view of a model. This includes all database table fields which comprise the model, and may include additional metadata. A base serializer includes relationships to parent objects, but **does not** include child objects. For example, the `VLANSerializer` includes a nested representation its parent VLANGroup (if any), but does not include any assigned Prefixes.
The REST API generally represents objects in one of two ways: complete or brief. The base serializer is used to present the complete view of an object. This includes all database table fields which comprise the model, and may include additional metadata. A base serializer includes relationships to parent objects, but **does not** include child objects. For example, the `VLANSerializer` includes a nested representation its parent VLANGroup (if any), but does not include any assigned Prefixes. Serializers employ a minimal "brief" representation of related objects, which includes only the attributes prudent for identifying the object.
```json
{
@ -139,7 +139,7 @@ The REST API employs two types of serializers to represent model data: base seri
### Related Objects
Related objects (e.g. `ForeignKey` fields) are represented using nested serializers. A nested serializer provides a minimal representation of an object, including only its direct URL and enough information to display the object to a user. When performing write API actions (`POST`, `PUT`, and `PATCH`), related objects may be specified by either numeric ID (primary key), or by a set of attributes sufficiently unique to return the desired object.
Related objects (e.g. `ForeignKey` fields) are included using nested brief representations. This is a minimal representation of an object, including only its direct URL and enough information to display the object to a user. When performing write API actions (`POST`, `PUT`, and `PATCH`), related objects may be specified by either numeric ID (primary key), or by a set of attributes sufficiently unique to return the desired object.
For example, when creating a new device, its rack can be specified by NetBox ID (PK):
@ -151,7 +151,7 @@ For example, when creating a new device, its rack can be specified by NetBox ID
}
```
Or by a set of nested attributes which uniquely identify the rack:
Or by a set of attributes which uniquely identify the rack:
```json
{
@ -217,26 +217,34 @@ If we wanted to assign this IP address to a virtual machine interface instead, w
### Brief Format
Most API endpoints support an optional "brief" format, which returns only a minimal representation of each object in the response. This is useful when you need only a list of available objects without any related data, such as when populating a drop-down list in a form. As an example, the default (complete) format of an IP address looks like this:
Most API endpoints support an optional "brief" format, which returns only a minimal representation of each object in the response. This is useful when you need only a list of available objects without any related data, such as when populating a drop-down list in a form. As an example, the default (complete) format of a prefix looks like this:
```
```no-highlight
GET /api/ipam/prefixes/13980/
```
```json
{
"id": 13980,
"url": "http://netbox/api/ipam/prefixes/13980/",
"display_url": "http://netbox/api/ipam/prefixes/13980/",
"display": "192.0.2.0/24",
"family": {
"value": 4,
"label": "IPv4"
},
"prefix": "192.0.2.0/24",
"site": {
"id": 3,
"url": "http://netbox/api/dcim/sites/17/",
"name": "Site 23A",
"slug": "site-23a"
},
"vrf": null,
"scope_type": "dcim.site",
"scope_id": 3,
"scope": {
"id": 3,
"url": "http://netbox/api/dcim/sites/3/",
"display": "Site 23A",
"name": "Site 23A",
"slug": "site-23a",
"description": ""
},
"tenant": null,
"vlan": null,
"status": {
@ -250,24 +258,36 @@ GET /api/ipam/prefixes/13980/
"slug": "staging"
},
"is_pool": false,
"mark_utilized": false,
"description": "Example prefix",
"comments": "",
"tags": [],
"custom_fields": {},
"created": "2018-12-10",
"last_updated": "2019-03-01T20:02:46.173540Z"
"created": "2025-03-01T20:01:23.458302Z",
"last_updated": "2025-03-01T20:02:46.173540Z",
"children": 0,
"_depth": 0
}
```
The brief format is much more terse:
```
```no-highlight
GET /api/ipam/prefixes/13980/?brief=1
```
```json
{
"id": 13980,
"url": "http://netbox/api/ipam/prefixes/13980/",
"family": 4,
"prefix": "10.40.3.0/24"
"display": "192.0.2.0/24",
"family": {
"value": 4,
"label": "IPv4"
},
"prefix": "192.0.2.0/24",
"description": "Example prefix",
"_depth": 0
}
```
@ -400,25 +420,31 @@ curl -s -X POST \
-H "Authorization: Token $TOKEN" \
-H "Content-Type: application/json" \
http://netbox/api/ipam/prefixes/ \
--data '{"prefix": "192.0.2.0/24", "site": 6}' | jq '.'
--data '{"prefix": "192.0.2.0/24", "scope_type": "dcim.site", "scope_id": 6}' | jq '.'
```
```json
{
"id": 18691,
"url": "http://netbox/api/ipam/prefixes/18691/",
"display_url": "http://netbox/api/ipam/prefixes/18691/",
"display": "192.0.2.0/24",
"family": {
"value": 4,
"label": "IPv4"
},
"prefix": "192.0.2.0/24",
"site": {
"vrf": null,
"scope_type": "dcim.site",
"scope_id": 6,
"scope": {
"id": 6,
"url": "http://netbox/api/dcim/sites/6/",
"display": "US-East 4",
"name": "US-East 4",
"slug": "us-east-4"
"slug": "us-east-4",
"description": ""
},
"vrf": null,
"tenant": null,
"vlan": null,
"status": {
@ -427,11 +453,15 @@ http://netbox/api/ipam/prefixes/ \
},
"role": null,
"is_pool": false,
"mark_utilized": false,
"description": "",
"comments": "",
"tags": [],
"custom_fields": {},
"created": "2020-08-04",
"last_updated": "2020-08-04T20:08:39.007125Z"
"created": "2025-04-29T15:44:47.597092Z",
"last_updated": "2025-04-29T15:44:47.597092Z",
"children": 0,
"_depth": 0
}
```
@ -490,18 +520,24 @@ http://netbox/api/ipam/prefixes/18691/ \
{
"id": 18691,
"url": "http://netbox/api/ipam/prefixes/18691/",
"display_url": "http://netbox/api/ipam/prefixes/18691/",
"display": "192.0.2.0/24",
"family": {
"value": 4,
"label": "IPv4"
},
"prefix": "192.0.2.0/24",
"site": {
"vrf": null,
"scope_type": "dcim.site",
"scope_id": 6,
"scope": {
"id": 6,
"url": "http://netbox/api/dcim/sites/6/",
"display": "US-East 4",
"name": "US-East 4",
"slug": "us-east-4"
"slug": "us-east-4",
"description": ""
},
"vrf": null,
"tenant": null,
"vlan": null,
"status": {
@ -510,11 +546,15 @@ http://netbox/api/ipam/prefixes/18691/ \
},
"role": null,
"is_pool": false,
"mark_utilized": false,
"description": "",
"comments": "",
"tags": [],
"custom_fields": {},
"created": "2020-08-04",
"last_updated": "2020-08-04T20:14:55.709430Z"
"created": "2025-04-29T15:44:47.597092Z",
"last_updated": "2025-04-29T15:49:40.689109Z",
"children": 0,
"_depth": 0
}
```
@ -568,6 +608,23 @@ http://netbox/api/dcim/sites/ \
!!! note
The bulk deletion of objects is an all-or-none operation, meaning that if NetBox fails to delete any of the specified objects (e.g. due a dependency by a related object), the entire operation will be aborted and none of the objects will be deleted.
## Uploading Files
As JSON does not support the inclusion of binary data, files cannot be uploaded using JSON-formatted API requests. Instead, we can use form data encoding to attach a local file.
For example, we can upload an image attachment using the `curl` command shown below. Note that the `@` signifies a local file on disk to be uploaded.
```no-highlight
curl -X POST \
-H "Authorization: Token $TOKEN" \
-H "Accept: application/json; indent=4" \
-F "object_type=dcim.site" \
-F "object_id=2" \
-F "name=attachment1.png" \
-F "image=@local_file.png" \
http://netbox/api/extras/image-attachments/
```
## Authentication
The NetBox REST API primarily employs token-based authentication. For convenience, cookie-based authentication can also be used when navigating the browsable API.
@ -653,6 +710,7 @@ Note that we are _not_ passing an existing REST API token with this request. If
{
"id": 6,
"url": "https://netbox/api/users/tokens/6/",
"display_url": "https://netbox/api/users/tokens/6/",
"display": "**********************************3c9cb9",
"user": {
"id": 2,

View File

@ -79,5 +79,5 @@ 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 12+ |
| Database | PostgreSQL 14+ |
| Task queuing | Redis/django-rq |

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 193 KiB

After

Width:  |  Height:  |  Size: 403 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 422 KiB

After

Width:  |  Height:  |  Size: 548 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 433 KiB

After

Width:  |  Height:  |  Size: 481 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 510 KiB

After

Width:  |  Height:  |  Size: 562 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 341 KiB

After

Width:  |  Height:  |  Size: 372 KiB

View File

@ -36,6 +36,12 @@ The operational status of the circuit. By default, the following statuses are av
!!! tip "Custom circuit statuses"
Additional circuit statuses may be defined by setting `Circuit.status` under the [`FIELD_CHOICES`](../../configuration/data-validation.md#field_choices) configuration parameter.
### Distance
!!! info "This field was introduced in NetBox v4.2."
The distance between the circuit's two endpoints, including a unit designation (e.g. 100 meters or 25 feet).
### Description
A brief description of the circuit.

View File

@ -0,0 +1,13 @@
# Circuit Groups
[Circuits](./circuit.md) can be arranged into administrative groups for organization. The assignment of a circuit to a group is optional.
## Fields
### Name
A unique human-friendly name.
### Slug
A unique URL-friendly identifier. (This value can be used for filtering.)

View File

@ -0,0 +1,25 @@
# Circuit Group Assignments
Circuits can be assigned to [circuit groups](./circuitgroup.md) for correlation purposes. For instance, three circuits, each belonging to a different provider, may each be assigned to the same circuit group. Each assignment may optionally include a priority designation.
## Fields
### Group
The [circuit group](./circuitgroup.md) being assigned.
### Member
The [circuit](./circuit.md) or [virtual circuit](./virtualcircuit.md) assigned to the group.
### Priority
The circuit's operation priority relative to its peers within the group. The assignment of a priority is optional. Choices include:
* Primary
* Secondary
* Tertiary
* Inactive
!!! tip
Additional priority choices may be defined by setting `CircuitGroupAssignment.priority` under the [`FIELD_CHOICES`](../../configuration/data-validation.md#field_choices) configuration parameter.

View File

@ -21,13 +21,11 @@ Designates the termination as forming either the A or Z end of the circuit.
If selected, the circuit termination will be considered "connected" even if no cable has been connected to it in NetBox.
### Site
### Termination
The [site](../dcim/site.md) with which this circuit termination is associated. Once created, a cable can be connected between the circuit termination and a device interface (or similar component).
!!! info "This field replaced the `site` and `provider_network` fields in NetBox v4.2."
### Provider Network
Circuits which do not connect to a site modeled by NetBox can instead be terminated to a [provider network](./providernetwork.md) representing an unknown network operated by a [provider](./provider.md).
The [region](../dcim/region.md), [site group](../dcim/sitegroup.md), [site](../dcim/site.md), [location](../dcim/location.md) or [provider network](./providernetwork.md) with which this circuit termination is associated. Once created, a cable can be connected between the circuit termination and a device interface (or similar component).
### Port Speed

View File

@ -0,0 +1,39 @@
# Virtual Circuits
!!! info "This feature was introduced in NetBox v4.2."
A virtual circuit can connect two or more interfaces atop a set of decoupled physical connections. For example, it's very common to form a virtual connection between two virtual interfaces, each of which is bound to a physical interface on its respective device and physically connected to a [provider network](./providernetwork.md) via an independent [physical circuit](./circuit.md).
## Fields
### Provider Network
The [provider network](./providernetwork.md) across which the virtual circuit is formed.
### Provider Account
The [provider account](./provideraccount.md) with which the virtual circuit is associated (if any).
### Circuit ID
The unique identifier assigned to the virtual circuit by its [provider](./provider.md).
### Type
The assigned [virtual circuit type](./virtualcircuittype.md).
### Status
The operational status of the virtual circuit. By default, the following statuses are available:
| Name |
|----------------|
| Planned |
| Provisioning |
| Active |
| Offline |
| Deprovisioning |
| Decommissioned |
!!! tip "Custom circuit statuses"
Additional circuit statuses may be defined by setting `Circuit.status` under the [`FIELD_CHOICES`](../../configuration/data-validation.md#field_choices) configuration parameter.

View File

@ -0,0 +1,23 @@
# Virtual Circuit Terminations
!!! info "This feature was introduced in NetBox v4.2."
This model represents the connection of a virtual [interface](../dcim/interface.md) to a [virtual circuit](./virtualcircuit.md).
## Fields
### Virtual Circuit
The [virtual circuit](./virtualcircuit.md) to which the interface is connected.
### Interface
The [interface](../dcim/interface.md) connected to the virtual circuit.
### Role
The functional role of the termination. This depends on the virtual circuit's topology, which is typically either peer-to-peer or hub-and-spoke (multipoint). Valid choices include:
* Peer
* Hub
* Spoke

View File

@ -0,0 +1,13 @@
# Virtual Circuit Types
Like physical [circuits](./circuit.md), [virtual circuits](./virtualcircuit.md) are classified by functional type. These types are completely customizable, and can help categorize circuits by function or technology.
## Fields
### Name
A unique human-friendly name.
### Slug
A unique URL-friendly identifier. (This value can be used for filtering.)

View File

@ -44,6 +44,12 @@ A set of rules (one per line) identifying filenames to ignore during synchroniza
| `*.txt` | Ignore any files with a `.txt` extension |
| `data???.json` | Ignore e.g. `data123.json` |
### Sync Interval
!!! info "This field was introduced in NetBox v4.3."
The interval at which the data source should automatically synchronize. If not set, the data source must be synchronized manually.
### Last Synced
The date and time at which the source was most recently synchronized successfully.

View File

@ -4,6 +4,12 @@ Devices can be organized by functional roles, which are fully customizable by th
## Fields
### Parent
!!! info "This field was introduced in NetBox v4.3."
The parent role of which this role is a child (optional).
### Name
A unique human-friendly name.

View File

@ -45,9 +45,12 @@ The operation duplex (full, half, or auto).
The [virtual routing and forwarding](../ipam/vrf.md) instance to which this interface is assigned.
### MAC Address
### Primary MAC Address
The 48-bit MAC address (for Ethernet interfaces).
The [MAC address](./macaddress.md) assigned to this interface which is designated as its primary.
!!! note "Changed in NetBox v4.2"
The MAC address of an interface (formerly a concrete database field) is available as a property, `mac_address`, which reflects the value of the primary linked [MAC address](./macaddress.md) object.
### WWN
@ -109,6 +112,7 @@ For switched Ethernet interfaces, this identifies the 802.1Q encapsulation strat
* **Access:** All traffic is assigned to a single VLAN, with no tagging.
* **Tagged:** One untagged "native" VLAN is allowed, as well as any number of tagged VLANs.
* **Tagged (all):** Implies that all VLANs are carried by the interface. One untagged VLAN may be designated.
* **Q-in-Q:** Q-in-Q (IEEE 802.1ad) encapsulation is performed using the assigned SVLAN.
This field must be left blank for routed interfaces which do employ 802.1Q encapsulation.
@ -120,6 +124,12 @@ The "native" (untagged) VLAN for the interface. Valid only when one of the above
The tagged VLANs which are configured to be carried by this interface. Valid only for the "tagged" 802.1Q mode above.
### Q-in-Q SVLAN
!!! info "This field was introduced in NetBox v4.2."
The assigned service VLAN (for Q-in-Q/802.1ad interfaces).
### Wireless Role
Indicates the configured role for wireless interfaces (access point or station).
@ -142,3 +152,9 @@ The configured channel width of a wireless interface, in MHz. This is typically
### Wireless LANs
The [wireless LANs](../wireless/wirelesslan.md) for which this interface carries traffic. (Valid for wireless interfaces only.)
### VLAN Translation Policy
!!! info "This field was introduced in NetBox v4.2."
The [VLAN translation policy](../ipam/vlantranslationpolicy.md) that applies to this interface (optional).

View File

@ -1,5 +1,8 @@
# Inventory Items
!!! warning "Deprecation Warning"
Beginning in NetBox v4.3, the use of inventory items has been deprecated. They are planned for removal in a future NetBox release. Users are strongly encouraged to begin using [modules](./module.md) and [module types](./moduletype.md) in place of inventory items. Modules provide enhanced functionality and can be configured with user-defined attributes.
Inventory items represent hardware components installed within a device, such as a power supply or CPU or line card. They are intended to be used primarily for inventory purposes.
Inventory items are hierarchical in nature, such that any individual item may be designated as the parent for other items. For example, an inventory item might be created to represent a line card which houses several SFP optics, each of which exists as a child item within the device. An inventory item may also be associated with a specific component within the same device. For example, you may wish to associate a transceiver with an interface.
@ -25,6 +28,12 @@ The inventory item's name. If the inventory item is assigned to a parent item, i
An alternative physical label identifying the inventory item.
### Status
!!! info "This field was introduced in NetBox v4.2."
The inventory item's operational status.
### Role
The functional [role](./inventoryitemrole.md) assigned to this inventory item.

View File

@ -1,5 +1,8 @@
# Inventory Item Roles
!!! warning "Deprecation Warning"
Beginning in NetBox v4.3, the use of inventory items has been deprecated. They are planned for removal in a future NetBox release. Users are strongly encouraged to begin using [modules](./module.md) and [module types](./moduletype.md) in place of inventory items. Modules provide enhanced functionality and can be configured with user-defined attributes.
Inventory items can be organized by functional roles, which are fully customizable by the user. For example, you might create roles for power supplies, fans, interface optics, etc.
## Fields

View File

@ -1,3 +1,6 @@
# Inventory Item Templates
!!! warning "Deprecation Warning"
Beginning in NetBox v4.3, the use of inventory items has been deprecated. They are planned for removal in a future NetBox release. Users are strongly encouraged to begin using [modules](./module.md) and [module types](./moduletype.md) in place of inventory items. Modules provide enhanced functionality and can be configured with user-defined attributes.
A template for an inventory item that will be automatically created when instantiating a new device. All attributes of this object will be copied to the new inventory item, including the associations with a parent item and assigned component, if any. See the [inventory item](./inventoryitem.md) documentation for more detail.

View File

@ -0,0 +1,13 @@
# MAC Addresses
!!! info "This feature was introduced in NetBox v4.2."
A MAC address object in NetBox comprises a single Ethernet link layer address, and represents a MAC address as reported by or assigned to a network interface. MAC addresses can be assigned to [device](../dcim/device.md) and [virtual machine](../virtualization/virtualmachine.md) interfaces. A MAC address can be specified as the primary MAC address for a given device or VM interface.
Most interfaces have only a single MAC address, hard-coded at the factory. However, on some devices (particularly virtual interfaces) it is possible to assign additional MAC addresses or change existing ones. For this reason NetBox allows multiple MACAddress objects to be assigned to a single interface.
## Fields
### MAC Address
The 48-bit MAC address, in colon-hexadecimal notation (e.g. `aa:bb:cc:11:22:33`).

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