Commit Graph

4104 Commits

Author SHA1 Message Date
Jeremy Stretch 70391e5a0b
Closes #22392: Deprecate support for Redis 5.x (#22405) 2026-06-08 09:28:31 -07:00
Jeremy Stretch d592afe56c Closes #22349: Correct documentation to reflect minimum Redis version of 5.0 2026-06-04 14:57:03 -04:00
Jeremy Stretch 839259ccec
Closes #22361: Introduce ArrayAttr UI panel attribute (#22362) 2026-06-02 18:17:02 +02:00
Jeremy Stretch 742f4b4330 Release v4.6.2 2026-06-02 10:11:34 -04:00
Jeremy Stretch 7022bb7eac
Closes #22109: Add template object counts to ModuleType representation in REST & GraphQL APIs (#22302) 2026-05-27 09:38:47 -07:00
Jeremy Stretch 4d8dbc6ffe
Closes #22212: Support for exposing environment parameters in Jinja template context (#22289) 2026-05-26 13:47:04 -05:00
Jeremy Stretch a89feaf856 Closes #22090: Extend test cases to analyze the number of SQL queries executed 2026-05-26 09:10:03 -04:00
mburggraf 57e7884d83
Closes #21261: add quick_add parameter to ObjectVar (#22271) 2026-05-22 13:38:58 -05:00
Arthur ff26cbd521 cleanup 2026-05-22 14:12:17 -04:00
Arthur b09e8a1808 cleanup 2026-05-22 14:12:17 -04:00
bctiemann 2580b321a3
Closes #19460: Support {lat}/{lon} placeholders in MAPS_URL (#22243)
Add support for literal `{lat}` and `{lon}` placeholders in `MAPS_URL`
when rendering GPS coordinate links. Existing configurations continue to
work by falling back to appending `lat,lon` when no coordinate placeholders
are present.

Move map URL handling into shared UI helpers so `GPSCoordinatesAttr` and
`AddressAttr` use consistent placeholder detection. When `MAPS_URL` contains
coordinate placeholders, suppress address-based map links to avoid rendering
invalid URLs.

Add tests for placeholder replacement, decimal coordinate values, fallback
behavior, and address link suppression. Also document the address link behavior
in the `MAPS_URL` configuration description.
2026-05-22 12:35:14 +02:00
bctiemann e15b7bd8ac
Merge pull request #22244 from netbox-community/22228-vlangroupsave-doesnt-validate-vid_ranges-bounds-metadata
Fixes #22228: Correct VLAN Group total VLAN ID calculation for non-canonical VID ranges
2026-05-20 20:39:46 -04:00
Martin Hauser 62b3d8f615 docs(customization): Add model validation guidance for Custom Scripts
Adds warning and examples for validating NetBox objects before saving
in Custom Scripts. Direct ORM writes bypass UI/API validation and can
introduce invalid data. Recommends calling `full_clean()` explicitly.

Fixes #22249
2026-05-20 12:52:36 -04:00
Martin Hauser 573b1b0634
fix(ipam): Correct VLAN ID range bound handling in VLANGroup
Fix miscounting of total_vlan_ids when VLANGroup vid_ranges use
non-canonical bounds (e.g. '[]'). Normalize ranges to '[)' on save and
add migration to recompute existing totals. Prevent division-by-zero in
utilization queries for legacy rows with miscounted totals.

Fixes #22228
2026-05-20 14:45:01 +02:00
Jeremy Stretch 64d3b114bc Release v4.6.1 2026-05-19 11:16:49 -04:00
Jeremy Stretch 7e44f88d11
Replace legacy installation graphics with mermaid.js diagrams (#22229) 2026-05-19 11:35:49 +02:00
Martin Hauser d2545c4bda
docs(plugin): Update plugin installation examples (#22185) 2026-05-14 13:36:00 -07:00
Jeremy Stretch 329c041224
Closes #22192: Introduce HTTP_CLIENT_IP_HEADERS configuration parameter (#22197) 2026-05-14 17:04:30 +02:00
Martin Hauser f66e6f360a feat(ipam): Allow single-address IP Ranges
Allow IP ranges where start_address equals end_address to model
single-IP pools like DHCP or NAT reservations. Add validation tests,
filterset coverage, and display logic to render both endpoints.

Fixes #21993
2026-05-14 08:05:51 -04:00
Jeremy Stretch 2e9c3119ce
Closes #22060: Introduce a config parameter to enforce GraphQL maximum query depth (#22162) 2026-05-11 19:54:07 +02:00
Jeremy Stretch 2703ff98a3
Closes #22128: Deprecate v1 API tokens (#22143)
Display a warning in the UI whenever a user goes to provision a v1
token (both via the admin token form and the user profile token form).
Update documentation to note that v1 tokens are deprecated and will be
removed in NetBox v5.0.
2026-05-07 08:48:25 -07:00
Jeremy Stretch 734a69c9a7
Closes #22141: Deprecate support for PostgreSQL 14 (#22142) 2026-05-07 17:14:02 +02:00
Jeremy Stretch e50aff8736
Documentation cleanup (#22127) 2026-05-06 16:58:08 -05:00
Jeremy Stretch 00791344e6 Release v4.6.0 2026-05-05 08:55:05 -04:00
Jeremy Stretch 28a5c7d882 Merge branch 'main' into feature 2026-05-04 13:02:42 -04:00
Jeremy Stretch b78bd71329 Release v4.5.10 2026-05-04 12:48:34 -04:00
Jeremy Stretch da2d19c932 Release v4.6.0-beta2 2026-04-28 10:56:59 -04:00
Jeremy Stretch 3ccf4e2d14 Merge branch 'main' into feature 2026-04-28 10:19:36 -04:00
Jeremy Stretch 8fbb6f74d3
Release v4.5.9 (#22024) 2026-04-28 09:45:20 -04:00
Martin Hauser 5f802bb18f
Closes #19648: Add support for colored Custom Field Choice Set values (#21984)
Fixes #19648
2026-04-24 12:37:32 -05:00
Jeremy Stretch 0563cc4585
Closes #21788: Return CSV export as a streaming response (#21974) 2026-04-23 09:45:15 -07:00
Jeremy Stretch df02abbbdf Merge branch 'main' into feature 2026-04-23 11:10:58 -04:00
bctiemann 6a9c3dad17
Merge pull request #21932 from netbox-community/21782-config
21782 Enable optional config template override in URL
2026-04-21 13:24:10 -04:00
Jeremy Stretch b68b0c6d78
Closes #21751: Enable toggling user notifications when executing custom scripts (#21923) 2026-04-20 09:32:41 -07:00
Jeremy Stretch a451e12158
Fixes #21955: Revert errant docs addition (#21968) 2026-04-20 17:12:20 +02:00
Grische 26c6c59797
Fixes #21935: Document MAX_PAGE_SIZE effect on GraphQL (#21940) 2026-04-20 13:01:48 +02:00
Jamie (Bear) Murphy 87b17ff26d
Fixes #21711: Added support for filtering and viewing modules by their module type profile (#21900) 2026-04-17 10:34:50 -07:00
Jeremy Stretch af7a35f836
Closes #21936: Deprecate `LOGIN_REQUIRED` (#21941)
Closes #21936: Deprecate LOGIN_REQUIRED
2026-04-16 14:33:11 -05:00
Arthur 5c1d1d6001 documentation 2026-04-16 11:49:54 -07:00
Arthur bbd2796c17 documentation 2026-04-16 11:29:59 -07:00
Jeremy Stretch 539448683c
Release v4.6.0-beta1 (#21910)
* Draft v4.6 release notes

* Revert django-tables2 upgrade

* Correct release notes

* Release v4.6.0-beta1

* Fix typo
2026-04-14 10:09:06 -04:00
Jeremy Stretch e208a28137 Merge branch 'main' into feature 2026-04-14 08:48:22 -04:00
Jeremy Stretch 75e1b86613
Release v4.5.8 (#21903)
* Release v4.5.8
* Limit django-tables2 to <v2.9
2026-04-14 08:39:16 -04:00
Jeremy Stretch 58275977bb
Closes #21890: Deprecate the `models` registry key (#21892)
* Closes #21890: Deprecate the 'models' registry key

* Add deprecation note for 'models' key to development docs
2026-04-13 09:24:30 -04:00
Jason Novinger 28a11f6aad
Fixes #21357: Add support for registering custom model actions (#21560)
* Add ModelAction and register_model_actions() API for custom permission actions

* Add ObjectTypeSplitMultiSelectWidget and RegisteredActionsWidget

* Integrate registered actions into ObjectPermissionForm

* Add JavaScript for registered actions show/hide

* Register custom actions for DataSource, Device, and VirtualMachine

* Add tests for ModelAction and register_model_actions

* Refine registered actions widget UI

- Use verbose labels (App | Model) for action group headers
- Simplify template layout with h5 headers instead of cards
- Consolidate Standard/Custom/Additional Actions into single Actions fieldset

* Hide custom actions field when no applicable models selected

The entire field row is now hidden when no selected object types
have registered custom actions, avoiding an empty "Custom actions"
label.

* Add documentation for custom model actions

- Add plugin development guide for registering custom actions
- Update admin permissions docs to mention custom actions UI
- Add docstrings to ModelAction and register_model_actions

* Add RESERVED_ACTIONS constant and fix dedup in registered actions

- Define RESERVED_ACTIONS in users/constants.py for the four built-in
  permission actions (view, add, change, delete)
- Replace hardcoded action lists in ObjectPermissionForm with the constant
- Fix duplicate action names in clean() when the same action is registered
  across multiple models (e.g. render_config for Device and VirtualMachine)
- Fix template substring matching bug in objectpermission.html detail view
  by passing RESERVED_ACTIONS through view context for proper list membership

* Fix shared action pre-selection and additional actions leakage on edit

* Prevent duplicate action registration in register_model_actions()

* Remove stale comment in RegisteredActionsWidget

* Rebuild frontend assets after rebase onto feature

* Refactor SplitMultiSelectWidget to use class attributes for widget classes

* Reject reserved action names in register_model_actions()

* Show all registered actions with enable/disable instead of show/hide

* Validate action name is not empty and clarify RESERVED_ACTIONS origin

* Adapt custom actions panel for declarative layout system

Convert the ObjectPermission detail view to use the new panel-based
layout from #21568. Add ObjectPermissionCustomActionsPanel that
cross-references assigned object types with the model_actions registry
to display which models each custom action applies to.

Also fix dark-mode visibility of disabled action checkboxes in the
permission form by overriding Bootstrap's disabled opacity.

* Flatten registered actions UI and declare via Meta.permissions

Implement two changes requested in review of #21560:

1. Use Meta.permissions for action declaration
   - Add Meta.permissions to DataSource, Device, and VirtualMachine
   - register_models() auto-registers actions from Meta.permissions
   - Remove explicit register_model_actions() calls from apps.py
   - Add get_action_model_map() utility to utilities/permissions.py

2. Flatten the ObjectPermission form UI
   - Show a single deduplicated list of action checkboxes (one per
     unique action name) instead of grouped-by-model checkboxes
   - RegisteredActionsWidget uses create_option() to inject model_keys
     and help_text; JS enables/disables based on selected object types
   - render_field.html bypasses outer wrapper for registeredactionswidget
     so widget emits rows with identical DOM structure to CRUD checkboxes
   - Unchecking a model now also unchecks unsupported action checkboxes

Fixes #21357

* Address review feedback on registered actions

- Sort model_keys in data-models attribute for deterministic output
- Rename registered_actions field label to 'Registered actions'
- Target object_types selected list via data-object-types-selected
  attribute instead of hardcoded DOM ID
- Reduce setTimeout delay to 0ms since moveOption() is synchronous

* Consolidate ObjectPermission detail view actions panel

Merge ObjectPermissionActionsPanel and ObjectPermissionCustomActionsPanel
into a single Actions panel that shows CRUD booleans and all registered
actions in one table, matching the form's consolidated layout.

Also fix data-object-types-selected attribute value (True -> 'true') and
update plugin docs to show Meta.permissions as the primary registration
approach.

* Address additional bot review feedback

- clean() collects all validation errors before raising instead of stopping at the first
- Fix stale admin docs (still referenced "Custom actions" and "grouped by model")

* Update netbox/netbox/registry.py

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

* Fix model_actions registry to use set operations

The registry was changed to defaultdict(set) but the registration
code still used list methods. Update .append() to .add() and fix
tests to use set-compatible access patterns.

* Rename permission migrations for clarity

* Move ModelAction validation into __post_init__

* Drop model name from permission descriptions

* Simplify ObjectPermission form and remove custom widgets

Replace the dynamic UI with standard BooleanField checkboxes for each
registered action. No custom widgets, no JavaScript, no template
changes.

- Remove RegisteredActionsWidget, ObjectTypeSplitMultiSelectWidget,
  and registeredActions.ts
- Use dynamic BooleanFields for registered actions (renders identically
  to CRUD checkboxes)
- Move action-resolution logic from panel to ObjectPermission model
- Remove object-type cross-validation from form clean()
- Remove unused get_action_model_map utility

* Remove register_model_actions from public API

Meta.permissions is the documented approach for plugins. The
register_model_actions function is now an internal implementation
detail.

* Sort registered actions and improve test coverage

Sort action names alphabetically for stable display order. Add tests
for cloning, empty registry, and models_csv output.

* Add help_text to registered action checkboxes

* Return model_keys as list from get_registered_actions()

Move string joining to the template so callers get native
list data instead of a pre-formatted CSV string.

* Improve detail view: human-friendly descriptions and additional actions

Return dicts from get_registered_actions() with help_text and verbose
model names. Add get_additional_actions() for manually-entered actions
that aren't CRUD or registered. Show both in the Actions panel.

* Renumber permission migrations after feature merge

Resolve migration conflicts with default_ordering_indexes migrations.
Renumber to 0023 (core), 0232 (dcim), 0056 (virtualization) and
update dependencies.

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2026-04-13 08:37:09 -04:00
Jeremy Stretch 315fcdffb6 Merge branch 'main' into feature 2026-04-10 14:58:07 -04:00
Jeremy Stretch 7462e45c8e
Closes #21865: Display debug toolbar if `INTERNAL_IPS` is empty (#21871) 2026-04-09 19:19:25 +02:00
Martin Hauser cb7e97c7f7 docs(configuration): Expand S3 storage configuration examples
Update STORAGES configuration examples to include all three storage
backends (default, staticfiles, scripts) with complete option sets.
Add region_name to environment variable example and clarify usage for
S3-compatible services.

Fixes #21864
2026-04-09 09:52:07 -04:00
Jeremy Stretch 48e790c9f0
#21409: Disable CHANGELOG_RETAIN_CREATE_LAST_UPDATE by default (#21849) 2026-04-07 16:26:26 +02:00
Jeremy Stretch 06c90cb86a
Closes #21847: Correct webhook documentation for deprecated keys (#21848) 2026-04-07 15:58:45 +02:00