Commit Graph

15458 Commits

Author SHA1 Message Date
Jeremy Stretch ebee3578b9 Release v4.6.5 2026-07-14 08:45:54 -04:00
github-actions bc666ed226 Update source translation strings 2026-07-14 05:45:35 +00:00
JCWasmx86 c475cd12b7 chore(netbox): Cache serializers
Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2026-07-13 17:54:11 -04:00
Martin Hauser 48ecc712bc
Closes #22603: Add experimental Python packaging support for NetBox (#22605)
Add initial Python package support for NetBox, including wheel and sdist
builds, generated package metadata, and Test PyPI publishing for maintainer
validation.

Add package-aware CLI support, `netbox setup` scaffolding for instance-local
files, and centralized wheel-vs-checkout path handling while preserving the
existing source/archive install layout.

Bundle pre-rendered embedded documentation in the wheel, and extend CI to
verify dependency pins, wheel metadata, artifact contents, CLI behavior, sdist
rebuilds, and smoke-test upgrades.
2026-07-13 16:28:04 +02:00
github-actions 84bbaaa5a0 Update source translation strings 2026-07-12 05:59:57 +00:00
bctiemann ca7caecac5
Closes #22652: Disable autoescaping for Config Templates (#22653)
Force autoescape=False in ConfigTemplate.get_environment_params() after
merging user-supplied environment parameters. Config templates produce
plain-text network configurations and scripts, so HTML autoescaping is
not applicable.

Keep the override out of the shared render_jinja2() helper so export
templates can continue to use autoescape=True for HTML output. Add
regression coverage for both behaviors.
2026-07-11 18:37:52 +02:00
github-actions f250586b4c Update source translation strings 2026-07-11 05:50:53 +00:00
bctiemann a5071064d7
Merge pull request #22650 from netbox-community/22544-provide-a-rest-api-method-to-updateoverwrite-an-existing
Closes: #22544: Add support for updating Custom Script Modules via REST API
2026-07-10 13:14:55 -04:00
bctiemann 6ec79402cc
Closes #22657: escape exception message in render_widget before mark_safe (#22658) 2026-07-10 10:26:40 -05:00
Martin Hauser a0debf0e3b
feat(extras): Allow updating uploaded Script Modules via API
Add PUT/PATCH support to ScriptModuleViewSet for replacing Script Module
content in place. Modules can be addressed by numeric ID or file name,
and the uploaded file name must match the existing file path.
The module's scripts are re-synchronized from the new content after
successful update.

Fixes #22544
2026-07-10 13:18:36 +02:00
github-actions 817b35de49 Update source translation strings 2026-07-10 06:17:51 +00:00
Jeremy Stretch feeff9c376
Closes #22649: Add Korean language support (#22651) 2026-07-09 08:48:21 -07:00
github-actions ff50ad8ae2 Update source translation strings 2026-07-09 06:18:24 +00:00
Jeremy Stretch 1391e5185f
Closes #22636: Feature plugins in the README & installation docs (#22638) 2026-07-08 09:37:32 -07:00
Jeremy Stretch 9ee38b6c1a
Fixes #22617: Editing objects via bulk import form requires "change" permission (#22618) 2026-07-08 10:23:00 -05:00
Martin Hauser 3561de3d56 fix(auth): Support proxy models in Object Permission checks
Replace ValueError with graceful permission denial when checking
permissions against proxy models or invalid model references. Evaluate
constraints via the permission model's manager and log warnings for
nonexistent models or debug messages for model mismatches.

Fixes #22632
2026-07-08 09:56:19 -04:00
github-actions 46de424447 Update source translation strings 2026-07-08 05:58:42 +00:00
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
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 54eda421fb
Closes #22629: Lower maximum uploaded image size to 50M pixels (#22630) 2026-07-07 16:52:38 +02: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
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 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
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 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
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
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
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