Commit Graph

15257 Commits

Author SHA1 Message Date
Brian Tiemann f3181241c5 Closes #22264: Regenerate dist files using Linux/Node 20 to match CI
Rebuilds all dist files using the same platform as CI (Linux, Node 20)
to ensure verify-bundles passes. Prior commits used macOS builds which
produce different output than the Linux esbuild/sass binaries.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-21 12:46:46 -04:00
Brian Tiemann 3f785c539c temp: log changed dist files in verify-bundles for debugging
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-21 12:24:39 -04:00
Brian Tiemann e96bec003a Rebuild netbox.js with current bundler versions
The committed netbox.js was produced by an older build; re-running
yarn bundle with the current yarn.lock generates slightly different
output. No source changes.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-21 10:09:05 -04:00
Brian Tiemann 8e332367b4 Closes #22264: Regenerate stale graphiql and CSS dist files
Runs yarn bundle to bring dist/graphiql/ and the compiled CSS files in
sync with the package versions resolved by the current yarn.lock (last
updated in v4.6.1). No source changes — purely dependency version drift.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-21 09:57:07 -04:00
github-actions f9135392f1 Update source translation strings 2026-05-21 06:22:07 +00: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 02746d7daa
test(models): Detect missing model test coverage (#22254) 2026-05-20 14:43:39 -07:00
bctiemann 284402f6ee
Fixes #22247: use ContentType.name for related_object_type display on custom field detail (#22248) 2026-05-20 14:32:33 -07: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
Brian Tiemann 31338a28e3 Closes #22059: Consolidate numeric GraphQL lookup classes via shared mixin
Extract _NumericLookupMixin with shared get_filter() and filter() methods.
IntegerLookup, BigIntegerLookup, and FloatLookup each inherit from it and
declare only their type-specific fields, eliminating triplicated logic.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-20 12:49:17 -04:00
Martin Hauser d25e2d43d0 fix(circuits): Require termination object for selected type
Require a Circuit Termination target when a termination type has been
selected, so blank dynamic target fields surface an inline form error
instead of falling through to generic GFK validation for termination_id.

Add a model-level guard for the same invalid state before generic
GenericForeignKey validation runs.

Fixes #22163
2026-05-20 12:27:09 -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
Martin Hauser 9ec1633dac test: Replace override_settings with explicit permission grants
Remove `@override_settings(EXEMPT_VIEW_PERMISSIONS=['*'])` decorators
across test suites, replacing them with explicit `add_permissions()`
calls for required view permissions. Improves test clarity and ensures
permission checks are properly validated.

Fixes #22091
2026-05-19 09:15:54 -04:00
Martin Hauser 90b74aaa1a fix(extras): Preserve Changelog messages for Table Configs
Have TableConfigSerializer inherit from ChangeLogMessageSerializer so
changelog_message values submitted via the REST API are recorded on the
resulting ObjectChange.

This aligns table configs with other changelog-tracked extras models.

Fixes #22236
2026-05-19 09:09:28 -04:00
Jeremy Stretch 7e44f88d11
Replace legacy installation graphics with mermaid.js diagrams (#22229) 2026-05-19 11:35:49 +02:00
github-actions da6c91f5e6 Update source translation strings 2026-05-19 06:21:57 +00:00
bctiemann f644101fa3
Merge pull request #22224 from netbox-community/22097-standardize-naming-of-test-classes-followup
Closes #22097: Standardize remaining test class names to TestCase suffix
2026-05-18 19:25:48 -04:00
bctiemann 337d856905
Merge pull request #22215 from netbox-community/22208-jobfilterset-missing-user_id-fk-filter
Fixes #22208: Add User ID and Username Filters for Jobs
2026-05-18 19:24:43 -04:00
Martin Hauser 25bc127d93
Fixes #22207: Fix GraphQL `object_type` field for table configurations (#22214) 2026-05-18 14:40:27 -05:00
Martin Hauser 84f466877d
Closes #22190: Add tenancy columns to CircuitGroup table (#22221) 2026-05-18 12:28:01 -05:00
Martin Hauser 288ba749e8
Fixes #22227: Limit NAT (outside) list to 10 with link to filtered view (#22230) 2026-05-18 11:40:51 -05:00
Martin Hauser f149ccb302
test(tables): Add validation for model table test classes (#22223)
Add test ensuring each model-backed table has a corresponding test case
inheriting from StandardTableTestCase with correct table attribute set.
Includes helper method to import table test classes by model.

Fixes #22110
2026-05-18 09:30:44 -07:00
Martin Hauser 8c506c84c8
fix(dcim): Add missing termination object filters to CableTerminationFilterSet (#22217)
Adds the cable_id FK companion filter and 9 termination object filters
(consoleport_id, consoleserverport_id, powerport_id, poweroutlet_id,
interface_id, frontport_id, rearport_id, powerfeed_id,
circuittermination_id), mirroring the CableFilterSet pattern.

Adds a corresponding CableTerminationTestCase using ChangeLoggedFilterSetTests
so future missing-filter regressions are caught automatically.

Fixes #22209
2026-05-18 09:26:17 -07:00
Martin Hauser 3bfdc32fda
refactor(tests): Standardize remaining test class names to TestCase suffix
Follow-up to #22097. Rename the test classes missed by the original
sweep.

Fixes #22097
2026-05-18 15:13:06 +02:00
Martin Hauser 90c371dee2 fix(extras): Handle None ordering in TableConfig validation
Prevent TypeError when TableConfig.ordering is None by adding explicit
null check in clean(). Add regression test covering unset ordering
field.

Fixes #22206
2026-05-18 08:30:50 -04:00
Martin Hauser bcb9a83c46 fix(core): Handle empty release list in check_for_new_releases
Guard max(releases) against an empty iterable to prevent a ValueError
when the release-check endpoint returns only prereleases, dev releases,
or entries lacking a tag_name.

Fixes #22202
2026-05-18 08:29:45 -04:00
Jeremy Stretch bad4cc70be
Update PR template (#22218) 2026-05-15 16:56:49 -05:00
Martin Hauser 521bc44c40
fix(core): Add explicit user_id and user filters to JobFilterSet
Adds the missing user_id companion filter (by ID) and an explicit
user filter (by username), mirroring the ObjectChangeFilterSet
pattern.

Fixes #22208
2026-05-15 21:20:42 +02:00
bctiemann a65afe7eaf
Merge pull request #22201 from netbox-community/22125-extend-test-coverage-of-background-jobs
Closes #22125: Add test coverage for system housekeeping, data source sync, and script jobs
2026-05-15 13:07:25 -04:00
bctiemann 55b2c6e0a8
Merge pull request #22193 from netbox-community/22124-add-tests-for-management-commands
Closes #22124: Add test coverage for custom management commands
2026-05-15 13:06:10 -04:00
bctiemann 6df7298b58
Merge pull request #22184 from netbox-community/22098-add-tests-for-signal-handlers
Closes #22098: Add signal handler test coverage
2026-05-15 13:04:08 -04:00
github-actions 517108a559 Update source translation strings 2026-05-15 06:11:07 +00:00
Jeremy Stretch 5b5cd36cae
Closes #22058: Remove redundant declarations on SiteType (#22203) 2026-05-14 13:39:29 -07:00
Martin Hauser d2545c4bda
docs(plugin): Update plugin installation examples (#22185) 2026-05-14 13:36:00 -07:00
Martin Hauser 7fb061c4d1
test(jobs): Add comprehensive test coverage for job runners
Add test suites for SystemHousekeepingJob, SyncDataSourceJob, and
ScriptJob covering housekeeping tasks, data source synchronization,
script rollback paths, and request processor integration.

Includes helpers to safely instantiate runners without accumulating
log handlers across tests, plus a DummyScript test double.

Fixes #22125
2026-05-14 18:17:50 +02:00
Martin Hauser 919817e255
Closes #14914: Add test for automatic plugin dashboard widget registration (#22191) 2026-05-14 10:28:31 -05:00
Jeremy Stretch 329c041224
Closes #22192: Introduce HTTP_CLIENT_IP_HEADERS configuration parameter (#22197) 2026-05-14 17:04:30 +02:00
Jeremy Stretch d4408f3d5d
Closes #22198: Restrict ExportTemplate querysets for UI & REST API (#22199) 2026-05-14 09:42:12 -05:00
Martin Hauser 0a49618297
test(commands): Add comprehensive tests for management commands
Add test coverage for Django management commands across core, dcim,
extras, ipam, and utilities apps.
Tests verify command argument handling, error cases, and integration
with mocked dependencies using patches and test doubles.

Fixes #22124
2026-05-14 15:58:31 +02:00
Martin Hauser 71d0352a7c
Fixes #22195: Align continuation-line indentation in attrs.py docstrings (#22196)
Bump under-indented continuation lines in the Parameters sections of
RelatedObjectAttr, GenericForeignKeyAttr, and AddressAttr so griffe's
Google parser (used by zensical) no longer warns about confusing
indentation. Whitespace-only change; no rendered output differs.
2026-05-14 15:36:32 +02:00
Jason Novinger d124c5fe86 Fixes #22079: Restrict environment_params to an allowlist of permitted keys
Replace JINJA_ENV_PARAMS_WITH_PATH_IMPORT with JINJA_ENV_PARAMS_ALLOWED,
a whitelist of permitted Jinja2 Environment parameters. Unknown keys are
rejected by clean() and stripped at render time.

The undefined parameter resolves values via direct class mapping instead
of import_string(). The finalize parameter is deprecated and blocked
from new use via clean(); existing stored values continue to resolve via
import_string() to preserve backward compatibility. No data migrations.
2026-05-14 08:14:59 -04:00
Martin Hauser 8c67d2449a fix(wireless): Correct attribute check in WirelessLink signal handler
Fix typo in post_save signal checking `interface_b.cable` instead of
`interface_b.wireless_link`, preventing unnecessary re-saves.
Add regression test verifying interfaces aren't logged on link re-save.

Fixes #22183
2026-05-14 08:07:38 -04: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
Laurent Stéphenne df5bc85b48
Closes #20808: Show occupying Device in Rack Position Selector (#21744)
Add a description field to the rack unit serializer containing the
occupying Device, allowing the Rack position dropdown to show Device
context while keeping the existing display value unchanged.

Co-authored-by: Martin Hauser <mhauser@netboxlabs.com>
2026-05-14 13:22:56 +02:00
github-actions 9b5f29af23 Update source translation strings 2026-05-14 06:05:35 +00:00
bctiemann 77dc7104c7
Merge pull request #22147 from netbox-community/22146-modulebay-mptt-improvements
Closes #22146: Avoid renumbering MPTT trees when creating module bays
2026-05-13 20:52:43 -04:00
Arthur Hanson 7a3397798a
Fixes #16851: Add missing Aria Labels (#22178)
* #16851 - Add missing Aria Labels

* #16851 - Add missing Aria Labels

* #16851 - Add missing Aria Labels

* fixes for form field labels

* cleanup

* cleanup

* cleanup

* cleanup

* cleanup

* cleanup

* cleanup
2026-05-13 16:38:30 -05:00
Martin Hauser e60ba2859d
test(signals): Add signal handler test coverage
Add comprehensive test coverage for signal handlers in circuits, core,
dcim, extras, ipam, users, virtualization, and wireless, including
cable path rebuilding, change logging, data source sync, scope
propagation, and notification dispatch logic.

Fixes #22098
2026-05-13 18:06:07 +02:00
Jeremy Stretch eeca184cb8
Closes #22057: Add GraphQL filters for notifications and subscriptions (#22175) 2026-05-13 08:45:59 -07:00