Commit Graph

15851 Commits

Author SHA1 Message Date
bctiemann 4919be6c00
Merge pull request #22628 from Amir-Bakar/22539-fix-available-ips-constrained-permissions
Fixes #22539: Restore available IP display for users with constrained…
2026-07-07 14:56:54 -04:00
Arthur 3f077df77f #22205 - Add EOL to DeviceType, ModuleType 2026-07-07 10:26:38 -07:00
Martin Hauser 0663ea1a47 test(dcim): Add test coverage for Connection list views
Add test cases for Console, Power, and Interface Connection list views.
Include query count baselines and shared mixin for read-only connection
views that filter by complete cable paths.

Fixes #22577
2026-07-07 12:51:27 -04:00
Jeremy Stretch 52a8e6a48d
Fixes #22566: Avoid name collisions when custom script name matches core module (#22625) 2026-07-07 09:18:34 -07:00
Jason Novinger 9f47700e23
Closes #22538: Add security note for HTTP_CLIENT_IP_HEADERS client-IP trust (#22614)
* Fixes #22538: Add security note for HTTP_CLIENT_IP_HEADERS client-IP trust

* Clarify header naming and leftmost-address behavior in client IP warning
2026-07-07 09:09:50 -07: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 54eda421fb
Closes #22629: Lower maximum uploaded image size to 50M pixels (#22630) 2026-07-07 16:52:38 +02: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
Jeremy Stretch 98d9366586
Fixes #22626: Ensure Custom Link names are escaped when rendering fails (#22627) 2026-07-07 15:49:36 +02:00
Amir Bakar 34c21d3d69 Fixes #22539: Restore available IP display for users with constrained permissions 2026-07-07 15:15:28 +02:00
github-actions c5bcea2b99 Update source translation strings 2026-07-07 06:20:28 +00: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 2c74c0c2a4
Fixes #22573: Remove persistent scrollbar on nav menu in Chrome (#22601) 2026-07-06 12:36:37 -05:00
Jeremy Stretch a9da727ffc
Fixes #22598: Fix ValueError exception when viewing background tasks (#22612) 2026-07-06 10:18:20 -05:00
Graham 20605be859
Fixes #22500: Use passed error kwarg in handle_rest_api_exception() (#22562) 2026-07-06 09:54:22 -05:00
Jeremy Stretch a907ba2062
#21992: Additional cleanup (#22594) 2026-07-06 09:45:45 -05:00
Jeremy Stretch 9c3fb57a93
Fixes #22568: Fix ValueError exception when receiving an invalid `filter_id` value (#22602) 2026-07-06 09:41:31 -05:00
Lasse Haugen 9189067f3e Fix harsh interface row separators in dark mode
#22018 switched the row separator on highlighted interface rows to an
opaque colour so it stays visible against tinted backgrounds, but
hardcoded $gray-300 (--tblr-gray-300), a light-theme grey. Because
tr[data-cable-status] matches every interface row, in dark mode this
paints a harsh bright line on every row. Override the separator colour
in dark mode with the theme-aware --tblr-border-color so it stays
visible on tinted rows without being jarring. Light mode is unchanged.
2026-07-05 12:08:58 -04:00
github-actions a835fe216e Update source translation strings 2026-07-04 06:02:43 +00:00
Ciro Iriarte 945634724b
Closes #18828: Add MDC fiber connector to the list of available port types 2026-07-03 19:57:00 -04:00
Jeremy Stretch 6edb5ec8b7
Fixes #22578: Ensure shared objects are treated consistently across the UI and APIs (#22606)
- Annotate the `info` parameter in SharedObjectMixin.get_queryset() with
  the Info type for consistency with BaseObjectType.get_queryset()
- Extend the SavedFilter and TableConfig visibility tests to assert that
  the owning user can still retrieve their own private object via both the
  REST detail endpoint and GraphQL
2026-07-03 20:35:45 +02:00
github-actions d9ccee6ef2 Update source translation strings 2026-07-03 06:11:10 +00:00
Jeremy Stretch 2904ee29df
Document NetBox's threat model (#22575) 2026-07-03 00:10:07 +02: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
mburggraf c56090f994
Fixes #22521: Honor RAM_BASE_UNIT for Virtual Machine Type default memory (#22550)
Update VirtualMachineType default memory labels and display rendering to use
the configured RAM base unit, matching the existing VirtualMachine and
VirtualDisk behavior.

Render default memory with the existing humanized RAM capacity helper and
keep the model field metadata unit-agnostic.

---------

Co-authored-by: Martin Hauser <mhauser@netboxlabs.com>
2026-07-02 13:51:18 +02:00
Jeremy Stretch e727da5cad Work around an MDX rendering error
Working around an MDX compilation failure that occurs when consuming the documentation externally
2026-06-30 17:35:52 -04:00
Arthur Hanson 7a1dfb58e3
Fixes #22154: Correct OpenAPI schema regarding relation counts for nested objects 2026-06-30 16:05:35 -04:00
jkburges 614d50a564
Add prefetch hint for GraphQL tags on list endpoints (#22570)
GraphQL list queries that request tags were issuing one tag lookup query
per object (N+1). TagsMixin declared the field without a prefetch hint;
django-taggit's M2M is not batched by DjangoOptimizerExtension the way
GenericRelations are. Add prefetch_related=['tags'] on the mixin field,
following the pattern from #22061 for journal entries and image
attachments.

Closes #22551
2026-06-30 10:13:49 -07: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