Commit Graph

15480 Commits

Author SHA1 Message Date
Jeremy Stretch 891e40ffb4 Closes #20285: Support for multi-protocol application services 2026-07-08 10:43:27 -04:00
bctiemann b620be0f46
Merge pull request #22631 from netbox-community/22615-webhooks-drop-request_id-username
Closes #22615: Remove legacy request_id and username parameters from webhook context
2026-07-07 15:45:49 -04:00
Jeremy Stretch 58e8068958
#21355: Refactor trigger migrations (#22608) 2026-07-07 09:04:45 -07:00
Jeremy Stretch 80c81230a4 Closes #22615: Remove legacy request_id and username parameters from webhook context 2026-07-07 11:13:09 -04:00
Jeremy Stretch df83277156
Closes #22607: Sanitize HTTP requests passed to template contexts for custom links (#22616) 2026-07-07 08:59:24 -05:00
bctiemann a6da836df8
Merge pull request #22580 from netbox-community/21712-static-select-descriptions
Closes #21712: Support description annotations for static choice form fields
2026-07-06 14:47:18 -04:00
Jeremy Stretch a907ba2062
#21992: Additional cleanup (#22594) 2026-07-06 09:45:45 -05:00
Jeremy Stretch a7be755e01 Closes #21712: Support description annotations for static choice form fields 2026-07-02 13:46:43 -04:00
Jeremy Stretch 48ce5e7e2c
Closes #22446: Add breadcrumbs support for Layouts (#22546) 2026-07-02 10:46:01 -05:00
Jeremy Stretch 9ed112b89d #21326: Fix tests for updated VC search behavior 2026-06-30 12:40:54 -04:00
Jeremy Stretch d28f0a2114 Merge branch 'main' into feature
Resolved conflicts:
- Dropped 4.7 deprecation shims (FutureWarning getattr/methods) re-introduced
  by main, which feature has already removed: pagination, constants, registry,
  forms utils/expandable, settings (Sentry), generic view mixins.
- dcim/signals.py: kept main's search-cache-on-VC-rename handler; dropped
  Prefix/Cluster/WirelessLAN imports for the scope-sync handler feature replaced
  with PostgreSQL triggers.
- extras test_management_commands.py: unioned ConfigContext + ImageAttachment
  imports.
- Rebuilt project-static dist bundles (netbox.js/.map/.css) from merged source.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-30 11:32:37 -04:00
Jeremy Stretch 3d73b2a166 Release NetBox v4.6.4 2026-06-30 11:23:11 -04:00
Martin Hauser 1a12f687ee fix(extras): Conditionally render saved filter dropdown
Only display the saved filter dropdown in table controls when a filter
form is present and includes a filter_id field. This prevents rendering
an empty or non-functional dropdown when saved filters are unavailable.
2026-06-30 11:21:19 -04:00
Martin Hauser 8c898e7713 fix(navigation): Normalize default menu button color
Render navigation menu buttons with the secondary ghost style when their
color is unset or set to the default choice.

This fixes plugin menu buttons, which default to "default" rather than
None, while preserving explicitly configured button colors.
2026-06-30 11:21:19 -04:00
Martin Hauser f027b0b206 feat(navigation): Improve sidebar action button styling
Replace the grouped button wrapper with a semantic
`dropdown-item-buttons` container and render sidebar action buttons with
the `btn-ghost` style while preserving existing color support.

Scope dropdown item link styles to direct child anchors so nested action
buttons keep their intended styling, and reveal the buttons on hover,
active, and focus-within states.
2026-06-30 08:24:30 -04:00
Martin Hauser b6bdfbd2a5
Closes #19821: Consolidate GFK form handling with GenericObjectChoiceField (#22537)
* refactor(forms): Add GenericObjectChoiceField

Replace separate scope_type/scope and parent_object_type/parent field
pairs with unified GenericObjectChoiceField. Introduce
GenericObjectFormMixin to handle GFK descriptor initialization and
assignment.

This removes redundant HTMX/queryset setup logic from ScopedForm,
VLANGroupForm, and ServiceForm by delegating GFK presentation to a
single reusable field and mixin pair. Field query param references now
use `$scope_object_id` instead of `$scope` to match the subwidget name.

Fixes #19821

* fix(forms): Skip validation on HTMX bulk-edit dependent field refresh

Render bulk-edit form unbound when an HTMX request changes a dependent
field (e.g. content type) without clicking Apply. This prevents
validation errors from surfacing before the user submits.

Cache ContentType lookups in GenericObjectChoiceField and sync widget
references before setting queryset to ensure choices land on the
rendered subwidget.

* fix(ipam): Update scope query params for GenericObjectChoiceField

Change available-prefix Add links to use `scope_content_type` and
`scope_object_id` query parameters instead of `scope_type` and `scope`.
This aligns with the GenericObjectChoiceField subwidget naming
introduced in the earlier refactor.

* refactor(models): Simplify GFK handling in clone_fields

Replace `scope_type`/`scope_id` pairs with bare `scope` GFK names in
clone_fields across models. Update CloningMixin to emit GFK subwidget
parameters (`scope_content_type`, `scope_object_id`) directly when a
GenericForeignKey appears in clone_fields.

* Update pre-populated links

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2026-06-29 16:44:33 -04:00
Jason Novinger b86145fe54
Closes #22561: Fix AttributeError when importing IPs with is_primary/is_oob set but no device (#22564)
Move the device/VM lookup ahead of is_primary/is_oob handling and only
process those flags when a parent device or VM exists.

This avoids dereferencing None for explicit falsy CSV values such as
"false", which are not covered by the column-absent checks in
clean_is_primary() and clean_is_oob(). This also keeps the behavior
aligned with MACAddressImportForm.
2026-06-29 17:40:43 +02:00
Arthur Hanson e1f0c18c74
Closes #20897: Expose selection custom field labels in the REST API (#22475) 2026-06-29 04:54:08 -05:00
Martin Hauser 0e5cbed3f6
Fixes #22501: Fix GraphQL API exceptions falling back to HTML error responses (#22552) 2026-06-29 03:45:30 -05:00
github-actions 34c3c81c61 Update source translation strings 2026-06-27 06:10:30 +00:00
Jeremy Stretch 4f4e97f1a6
Fixes #22530: Remove hidden select inputs from the accessibility tree (#22541) 2026-06-26 10:26:42 -07:00
Martin Hauser 9f140e6442
fix(extras): Prevent Script uploads from overwriting files (#22554)
Reject duplicate ScriptModule uploads before writing to storage to
prevent failed uploads from corrupting existing files. Add existence
check in cleanup path to avoid deleting files referenced by concurrent
uploads that won the race.

Fixes #22543
2026-06-26 10:19:12 -07:00
Jeremy Stretch 80a243045e
Fixes #22529: Ensure navigation menu is navigable via keyboard (#22540) 2026-06-26 10:14:06 -07:00
Jeremy Stretch 18fc16df8e
Closes #20547: Consolidate unique constraints comprising nullable fields (#22549) 2026-06-26 18:51:09 +02:00
Martin Hauser 021b7c5f5b
Closes #22174: Include DNS names for primary/OOB IPs and NAT data for VDCs (#22553) 2026-06-26 11:34:30 -05:00
Jeremy Stretch 68c1153325
Closes #22526: Avoid query timeouts when updating custom fields on a large number of objects (#22556) 2026-06-26 11:22:15 -05:00
Jamie (Bear) Murphy 2f87dab011
Closes #21710: Support multi-select fields for module type profile array enums (#22495) 2026-06-26 12:19:18 -04:00
Martin Hauser 4da65854e1 feat(dcim): Add 1C8P:8C1P breakout cable profile
Introduce Breakout1C8Px8C1PCableProfile to map a single 8-position
connector to eight single-position connectors. Add profile choice,
registration, and bidirectional link peer tests for the new breakout.

Fixes #22279
2026-06-26 12:08:22 -04:00
Jeremy Stretch 1077ff7169 Fixes #22528: Fix keyboard navigation for object list tabs 2026-06-26 08:22:16 -04:00
Jeremy Stretch 76f82989bf
Fixes #22532: Ensure all empty table headers have an ARIA label (#22545) 2026-06-26 05:08:15 -05:00
github-actions 84d9c428ee Update source translation strings 2026-06-26 06:21:47 +00:00
Jeremy Stretch 9c73c7a8ae
Fixes #22531: Ensure Saved Filter selector has unique element ID (#22542) 2026-06-25 18:04:56 +02:00
Jeremy Stretch 742cd0b5b6
Fixes #22527: Notify screen reader of quick search updates (#22534) 2026-06-25 13:35:33 +02:00
bctiemann 4daa1a0165
Merge pull request #22524 from netbox-community/22441-exec-time-jobs-table
Closes #22441: Add execution_time to background jobs
2026-06-24 18:54:33 -04:00
Jason Novinger 2dcc98b41e
Closes #21326: Defer global search cache updates to a background job (#22481)
Defer CachedValue updates from post_save/post_delete signal handlers to a
SearchCacheJob that runs after the surrounding transaction commits. Coalesce
pending updates per database alias and savepoint scope, preserving rollback
semantics while reducing synchronous write latency.

When no worker is available, or Redis cannot be reached during dispatch, apply
the update inline so existing single-process installs continue to behave
correctly. Replay the originating database alias during deferred reads and
writes so cache updates remain routed to the schema that emitted the signal.

Keep deferral private to CachedValueSearchBackend so custom SEARCH_BACKEND
implementations continue to use the existing synchronous cache/remove contract.
Move the job runner to search/jobs.py and keep the CachedValue-specific update
logic on the backend.

Document the eventual consistency of global search results and add coverage for
coalescing, rollback/savepoint behavior, worker dispatch, inline fallback,
deleted objects, and the custom backend contract.
2026-06-24 17:48:55 +02:00
Jason Novinger f1f84faa7f Fixes #22441: Address claudebot review feedback
- humanize_duration: guard on 'is None' instead of falsiness so
  timedelta(0) renders as '0s' rather than blank
- execution_time filter: add label= for consistency with sibling filters
2026-06-24 17:31:13 +02:00
Jason Novinger e7e1362c35 Closes #22441: Add execution_time field to background jobs
Adds a nullable DurationField computed as completed - started, set in
Job.terminate(). Exposes it as an orderable table column, detail-panel
attr, REST API field, and UI/API range filters (execution_time__gte /
execution_time__lte).

A plain stored field (not a GeneratedField) keeps the migration
metadata-only, avoiding a full table rewrite on core_job.
2026-06-24 16:39:59 +02:00
bctiemann 7b1e1a1dab
Closes #22419: Replace DeprecationWarning with FutureWarning for user-facing deprecations (#22510)
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-24 09:14:59 -05:00
github-actions f25a1c7474 Update source translation strings 2026-06-24 06:19:17 +00:00
Martin Hauser a1db254104 fix(dcim): Refresh Device search cache on VC rename
Add post_save signal handler to update cached virtual_chassis field for
member Devices when a VirtualChassis is renamed. Skip updates for
creates, raw saves, or targeted saves excluding the name field.

Fixes stale search cache entries after VirtualChassis name changes.

Fixes #22489
2026-06-23 13:58:15 -04:00
Jason Novinger d7c566aee6
Closes #22169: Cache image file size on ImageAttachment (#22465) 2026-06-23 08:40:19 -07:00
bctiemann b3489cd529
Merge pull request #22013 from netbox-community/21988-authorization-bypass-in-nested-object-resolution-via
Fixes #21988: Enforce object permissions for nested related objects in the REST API
2026-06-22 20:31:04 -04:00
bctiemann bf78a45204
Merge pull request #22491 from JCWasmx86/22442-cache-serializers
chore(netbox): Cache serializers
2026-06-22 20:28:57 -04:00
bctiemann 41f792c53b
Merge pull request #22473 from netbox-community/21367-mac-address
#21367 - Add is_primary field to MAC address REST API serializer
2026-06-22 20:22:46 -04:00
Jason Novinger 8c73f46cc9
Fixes #22507: Check is_active in restrict() and IsSuperuser superuser bypass (#22508)
RestrictedQuerySet.restrict() and IsSuperuser short-circuited on is_superuser
without checking is_active, so a deactivated superuser was granted the full
superuser bypass. restrict() in particular fails open, returning the
unrestricted queryset. Both now also require is_active, matching the existing
guard in ObjectPermissionMixin.has_perm.
2026-06-22 22:03:33 +02:00
Jeremy Stretch a5974ee265
Fixes #21310: Fix IntegrityError exception when `AUTH_LDAP_MIRROR_GROUPS` is enabled (#22492) 2026-06-22 05:35:38 -05:00
Jeremy Stretch 482537c72f
Closes #22393: Drop support for Redis 5.x (#22471) 2026-06-22 02:49:34 -05:00
Martin Hauser e597107b01
fix(api): Enforce Object Permissions for Nested Serializer input
Apply object-level view restrictions when nested Serializers resolve
related objects from REST API write input. Nested create and update
operations now resolve related objects from a permission-restricted
queryset, causing hidden related objects to fail validation the same as
nonexistent objects.

Fixes #21988
2026-06-20 18:13:14 +02:00
github-actions 78d4f4765e Update source translation strings 2026-06-20 06:28:34 +00:00
Arthur Hanson 626e1ef1f8
Fixes #22439: Enforce view permissions for Custom Links (#22469)
Filter custom links by the current user's view permissions before rendering
them on object detail views and table columns.
2026-06-19 09:38:47 +02:00