Commit Graph

13993 Commits

Author SHA1 Message Date
Jeremy Stretch
6035ad139a
Closes #16903: Update release process to use Transifex CLI client (#17916)
* Closes #16903: Update release process to use Transifex CLI client

* Add token environment variable to tx command
2024-11-07 08:57:02 -05:00
Arthur Hanson
27d15615b3
17898 upgrade to django-rq v3 (#17911)
* 17898 upgrade to django-rq v3

* Unpin base requirements

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-11-01 15:14:11 -04:00
Alexander Haase
4bba92617d
Closes #16971: Add system jobs (#17716)
* Fix check for existing jobs

If a job is to be enqueued once and no specific scheduled time is
specified, any scheduled time of existing jobs will be valid. Only if a
specific scheduled time is specified for 'enqueue_once()' can it be
evaluated.

* Allow system jobs to be registered

A new registry key allows background system jobs to be registered and
automatically scheduled when rqworker starts.

* Test scheduling of system jobs

* Fix plugins scheduled job documentation

The documentation reflected a non-production state of the JobRunner
framework left over from development. Now a more practical example
demonstrates the usage.

* Allow plugins to register system jobs

* Rename system job metadata

To clarify which meta-attributes belong to system jobs, each of them is
now prefixed with 'system_'.

* Add predefined job interval choices

* Remove 'system_enabled' JobRunner attribute

Previously, the 'system_enabled' attribute was used to control whether a
job should run or not. However, this can also be accomplished by
evaluating the job's interval.

* Fix test

* Use a decorator to register system jobs

* Specify interval when registering system job

* Update documentation

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-11-01 14:56:08 -04:00
Jeremy Stretch
81f00fd03a Fixes #17895: Ensure GraphiQL UI resources are served locally 2024-11-01 14:51:41 -04:00
Arthur Hanson
6dc75d8db1
7699 Add Scope to Cluster (#17848)
* 7699 Add Scope to Cluster

* 7699 Serializer

* 7699 filterset

* 7699 bulk_edit

* 7699 bulk_import

* 7699 model_form

* 7699 graphql, tables

* 7699 fixes

* 7699 fixes

* 7699 fixes

* 7699 fixes

* 7699 fix tests

* 7699 fix graphql tests for clusters reference

* 7699 fix dcim tests

* 7699 fix ipam tests

* 7699 fix tests

* 7699 use mixin for model

* 7699 change mixin name

* 7699 scope form

* 7699 scope form

* 7699 scoped form, fitlerset

* 7699 review changes

* 7699 move ScopedFilterset

* 7699 move CachedScopeMixin

* 7699 review changes

* 7699 review changes

* 7699 refactor mixins

* 7699 _sitegroup -> _site_group

* 7699 update docstring

* Misc cleanup

* Update migrations

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-11-01 14:18:23 -04:00
Jeremy Stretch
8767fd8186
Closes #13428: Q-in-Q VLANs (#17822)
* Initial work on #13428 (QinQ)

* Misc cleanup; add tests for Q-in-Q fields

* Address PR feedback
2024-10-31 14:17:06 -04:00
Jeremy Stretch
58bc388457
Merge pull request #17909 from netbox-community/develop
Release v4.1.6
2024-10-31 13:50:45 -04:00
Jeremy Stretch
74315080a3 Release v4.1.6 2024-10-31 13:31:11 -04:00
Arthur Hanson
a8eb455f3e
9604 Add Termination to CircuitTermination (#17821)
* 9604 add scope type to CircuitTermination

* 9604 add scope type to CircuitTermination

* 9604 add scope type to CircuitTermination

* 9604 model_forms

* 9604 form filtersets

* 9604 form bulk_import

* 9604 form bulk_edit

* 9604 serializers

* 9604 graphql

* 9604 tests and detail template

* 9604 fix migration merge

* 9604 fix tests

* 9604 fix tests

* 9604 fix table

* 9604 updates

* fix tests

* fix tests

* fix tests

* fix tests

* fix tests

* fix tests

* fix tests

* 9604 remove provider_network

* 9604 fix tests

* 9604 fix tests

* 9604 fix forms

* 9604 review changes

* 9604 scope->termination

* 9604 fix _circuit_terminations

* 9604 fix _circuit_terminations

* 9604 sitegroup -> site_group

* 9604 update docs

* 9604 fix form termination side reference

* Misc cleanup

* Fix terminations in circuits table

* Fix missing imports

* Clean up termination attrs display

* Add termination & type to CircuitTerminationTable

* Update cable tracing logic

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-10-31 09:55:08 -04:00
Jeremy Stretch
7580aa0781 Add professional support link 2024-10-31 09:24:38 -04:00
github-actions
4ca2b21a70 Update source translation strings 2024-10-31 05:02:35 +00:00
bctiemann
f74a9a1c76
Fixes: #7336 - VLAN Translation (#17745)
* VLANTranslationPolicy and VLANTranslationRule models and all associated UI classes

* Change VLANTranslationPolicy to a PrimaryModel and make name unique

* Add serializer classes to InterfaceSerializer

* Remake migrations

* Add GraphQL typing

* Skip tagged models in test

* Missing migration

* Remove get_absolute_url methods

* Remove package-lock.json

* Rebuild migration and add constraints and field options

* Rebuild migrations

* Use DynamicModelChoiceField for policy field

* Make vlan_translation_policy fields on filtersets more consistent with existing __name convention

* Add vlan_translation_table to VMInterface detail page

* Add vlan_translation_policy to VMInterfaceSerializer

* Move vlan_translation_policy fields to model and filterset mixins

* Protect in-use policies against deletion

* Add vlan_translation_policy to fields in VMInterfaceSerializer

* Cleanup indentation

* Remove unnecessary ordering column

* Rebuild migrations

* Search methods and registration

* Ensure 'id' column is present by default

* Add graphql types/filters/schema for VLANTranslationRule

* Filterset tests

* View tests

* API and viewset tests (incomplete)

* Add tags to VLANTranslationRuleForm

* Complete viewset tests for VLANTranslationRule

* Make VLANTranslationRule.policy nullable (but still required)

* Revert "Make VLANTranslationRule.policy nullable (but still required)"

This reverts commit 4c1bb437ef.

* Revert nullability

* Explicitly prefetch policy in graphql

* Documentation of new and affected models

* Add note about select_related in graphql

* Rework policy/rule documentation

* Move vlan_translation_policy into 802.1Q Switching fieldset

* Remove redundant InterfaceVLANTranslationTable

* Conditionally include vlan_translation_table in interface.html and vminterface.html

* Add description field to VLANTranslationRule

* Define vlan_translation_table conditionally

* Add policy (name) filter to VLANTranslationRuleFilterSet

* Revert changes to adding-models.md (moved to another PR)

* Dynamic table for linked rules in vlantranslationpolicy.html

* Misc cleanup

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-10-30 17:09:46 -04:00
Jeremy Stretch
19c5c32965 Merge branch 'develop' into feature 2024-10-30 13:10:47 -04:00
Jeremy Stretch
1e5f79a8ed Fixes #17884: Fix translation support for certain tab headings 2024-10-30 08:48:37 -04:00
Jeremy Stretch
f00a93c066 Fixes #17700: Fix warning when no scripts are found within a script module 2024-10-30 08:47:46 -04:00
Arthur Hanson
5f94dff815 17885 fix script running by providing script name to job 2024-10-29 16:47:15 -04:00
Brian Tiemann
572aad0e20 Update adding-models.md to reflect changes to get_absolute_url 2024-10-29 09:15:24 -04:00
github-actions
576498955f Update source translation strings 2024-10-29 05:02:05 +00:00
Arthur Hanson
99904c1518 Merge branch 'develop' into feature 2024-10-28 14:29:48 -07:00
Jeremy Stretch
58d9057ccd
Merge pull request #17876 from netbox-community/develop
Release v4.1.5
2024-10-28 17:20:29 -04:00
Jeremy Stretch
813347121e Release v4.1.5 2024-10-28 16:59:44 -04:00
transifex-integration[bot]
c383086aac
Updates for project NetBox (#17875)
* Translate django.po in cs

100% translated source file: 'django.po'
on 'cs'.

* Translate django.po in de

100% translated source file: 'django.po'
on 'de'.

* Translate django.po in es

100% translated source file: 'django.po'
on 'es'.

* Translate django.po in it

100% translated source file: 'django.po'
on 'it'.

* Translate django.po in tr

100% translated source file: 'django.po'
on 'tr'.

* Translate django.po in fr

100% translated source file: 'django.po'
on 'fr'.

* Translate django.po in ja

100% translated source file: 'django.po'
on 'ja'.

* Translate django.po in pt

100% translated source file: 'django.po'
on 'pt'.

* Translate django.po in da

100% translated source file: 'django.po'
on 'da'.

* Translate django.po in nl

100% translated source file: 'django.po'
on 'nl'.

* Translate django.po in zh

100% translated source file: 'django.po'
on 'zh'.

* Translate django.po in ru

100% translated source file: 'django.po'
on 'ru'.

* Translate django.po in uk

100% translated source file: 'django.po'
on 'uk'.

* Translate django.po in pl

100% translated source file: 'django.po'
on 'pl'.

---------

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
2024-10-28 16:50:34 -04:00
Jeremy Stretch
dba6e532c4 Pin django-rq to <3.0 2024-10-28 16:18:11 -04:00
Jeremy Stretch
f0eb8b9c64 Pin rq to LESS THAN v2.0 2024-10-28 16:13:34 -04:00
Jeremy Stretch
f56843333d Pin rq to <2.0 2024-10-28 16:07:50 -04:00
Jeremy Stretch
8279eaff5b Update source translation strings 2024-10-28 15:22:19 -04:00
bctiemann
ca210168df
Fixes: #17358 - Ensure correct comparison of overlapping IPRanges (#17391)
* Add new INET lookups for net_host_lt/gt/lte/gte comparisons irrespective of subnet inclusion

* Refactor Lookup subclasses to be more DRY

* Move comparison_sql to class attribute

* Add HostAsInet(Transform) to perform cast

* Remove unnecessary Lookup comparison classes

* Chain Host and Inet instead of making a new transform
2024-10-28 15:07:59 -04:00
Arthur Hanson
476194f0aa
17460 make ModuleType / DeviceType bulk buttons consistent (#17463)
* 17460 make ModuleType / DeviceType bulk buttons consistent

* 17460 refactor moduletype/devicetype to use standardized object_children

* 17460 refactor moduletype/devicetype to use standardized object_children

* 17460 refactor moduletype/devicetype to use standardized object_children
2024-10-28 15:04:45 -04:00
Alexander Haase
69e1394fef Fix job field validation
Previously, fields in the Job model were not validated when the job was
created. Now 'full_clean()' is called before saving the job to ensure
valid data.
2024-10-28 13:40:20 -04:00
Jeremy Stretch
ac12eae0b7 Fix issue templates 2024-10-24 16:41:14 -04:00
xee8ai
ce67d2c13b Fix ambiguous shebang in netbox/manage.py. 2024-10-24 09:04:49 -04:00
Jeremy Stretch
97eb5bda50 Closes #17832: Don't validate terminations on Cable instance when importing from serialzied data 2024-10-24 08:28:30 -04:00
Jeremy Stretch
6251296776 Remove subjective priority reasons 2024-10-24 08:27:01 -04:00
Jeremy Stretch
ef1fdf0a01 Closes #17761: Store empty CharField choices as null 2024-10-21 13:12:05 -04:00
Jeremy Stretch
5940f5fa61 Changelog for #17374, #17635, #17774, #17802, #17789 2024-10-21 10:35:59 -04:00
github-actions
bb06b733c4 Update source translation strings 2024-10-19 05:02:04 +00:00
Jeremy Stretch
75270c1aef
Closes #6414: Enable assigning prefixes to various object types (#17692)
* Replace site FK on Prefix with scope GFK

* Add denormalized relations

* Update prefix filters

* Add generic relations for Prefix

* Update GraphQL type for Prefix model

* Fix tests; misc cleanup

* Remove prefix_count from SiteSerializer

* Remove site field from PrefixBulkEditForm

* Restore scope filters for prefixes

* Fix scope population on PrefixForm init

* Show scope type

* Assign scope during bulk import of prefixes

* Correct handling of GenericForeignKey in PrefixForm

* Add prefix counts to all scoped objects

* Fix migration; linter fix

* Add limit_choices_to on scope_type

* Clean up cache_related_objects()

* Enable bulk editing prefix scope
2024-10-18 15:45:22 -04:00
Ali Al-Ebrahim
1c4a1e075d Update README.md to point to NetBox logo URL
The NetBox logo is referenced at https://github.com/netbox-community/netbox/blob/develop/docs/netbox_logo.svg but that no longer exists as the logo has been changed to https://github.com/netbox-community/netbox/blob/develop/docs/netbox_logo_dark.svg (or _light.svg -- should add handling for that but seems like overkill)

Updated the README to reflect this to properly render the logo.
2024-10-18 14:54:07 -04:00
Jeremy Stretch
c78da79ce6 Merge branch 'develop' into feature 2024-10-18 13:18:11 -04:00
Jeremy Stretch
538f3255a7 Closes #17789: Use a single scope field for VLANGroup bulk edit 2024-10-18 13:16:24 -04:00
Arthur Hanson
b9c6def8ab
15093 Allow plugins to register events pipeline (#17717)
* 15093 add events_pipeline registration to plugins

* 15093 use list

* 15093 add documentation

* Update docs/configuration/index.md

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

* Update docs/configuration/miscellaneous.md

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

* 15093 review changes

* 15093 review changes

* Formatting & readability

* 15093 review changes

* 15093 add test

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-10-18 12:47:16 -04:00
Arthur Hanson
a2cd4d0983
17635 fix script AbortTransaction (#17764)
* 17635 fix script AbortTransaction

* 17635 review changes
2024-10-18 10:55:17 -04:00
Arthur Hanson
e13bc0694d
17374 correct background color in dark mode for active list item (#17792)
Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-10-18 10:48:15 -04:00
bctiemann
d8c5147e02
Fixes: #17732 - Add a background-color to img elements in docs to ensure readability in dark mode (#17790)
* Add a background-color to img elements in docs to ensure readability in dark mode

* Limit style changes to those within CMS content blocks; update colors of main netbox_logo.svg

* Add a white stroke to the main logo

* Add light & dark mode versions of the NetBox logo

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-10-18 10:47:05 -04:00
Alexander Haase
ac9f561372 Fix social auth for Entra ID
Previously Azure AD was renamed to Entra ID. However, as django social
auth didn't change its API, just the display names must be changed but
not the API names.
2024-10-18 10:45:34 -04:00
atownson
5ddbacaa1f
Fixes #17802 - Added opaque background to Rename buttons (#17805)
* Added btn-float class to the Rename button

* Added btn-float class to the Rename button
2024-10-18 09:49:17 -04:00
Ian Bishop
e6f41f73f7
Add instructions for authenticating using Google oauth2 (#17527)
* Add instructions for authenticating using Google oauth2

Signed-off-by: Ian Bishop <151477169+ianb-mp@users.noreply.github.com>

* Add navigation link

* Misc cleanup

---------

Signed-off-by: Ian Bishop <151477169+ianb-mp@users.noreply.github.com>
Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-10-18 09:36:29 -04:00
Jeremy Stretch
a8ec06687a Reomove obsolete nested serializers 2024-10-18 08:16:30 -04:00
Jeremy Stretch
6aeb553391 Closes #17029: Deprecate PluginTemplateExtension.model 2024-10-18 08:15:31 -04:00
github-actions
110b2b3d97 Update source translation strings 2024-10-18 05:02:11 +00:00