Commit Graph

214 Commits

Author SHA1 Message Date
Jeremy Stretch
ac3c2e2de3
Closes #19348: Plug the NetBox Cloud Free tier (#19349) 2025-04-28 16:28:54 -05:00
Jeremy Stretch
7375042f9e
Release v4.3-beta1 (#19172)
* Draft changelog for v4.3 release

* Add release notes summary & nav link

* Docs cleanup

* Update Python dependencies

* Update static assets

* Revert errant change to schema

* Fix minimum PostgreSQL version

* Misc cleanup

* Correct issue numbers in change log
2025-04-14 15:12:47 -04:00
Jeremy Stretch
fc0acb020f Merge main into feature 2025-04-10 17:17:21 -04:00
Jeremy Stretch
bb5057c063
Closes #14591: Saved table configurations (#19101)
* Add SavedTableConfig

* Update table configuration logic to support TableConfigs

* Update table config link when updating table

* Correct docstring

* Misc cleanup

* Use multi-select widgets for column selection

* Return null config params for tables with no model

* Fix auto-selection of selected columns

* Update migration

* Clean up template

* Enforce enabled/shared flags

* Search/filter by table name

* Misc cleanup

* Fix population of selected columns

* Ordering field should not be required

* Enable cloning for TableConfig

* Misc cleanup

* Add model documentation for TableConfig

* Drop slug field from TableConfig

* Improve TableConfig validation

* Remove add button from TableConfig list view

* Fix ordering validation to account for leading hyphens
2025-04-10 15:48:02 -05:00
Tobias Genannt
19703f7d69 Fixes: #18568 Update mkdocstrings and adapt config 2025-03-13 10:25:42 -04:00
Jeremy Stretch
ef89fc1264 Closes #18071: Remvoe legacy staged changes functionality 2025-02-20 16:50:37 -05:00
Jeremy Stretch
9d82a668a4 Release v4.2.0 2025-01-06 16:13:24 -05:00
Jeremy Stretch
3ee951b0d0 Fix missing/incorrect documentation links 2024-11-26 10:45:30 -05:00
Jeremy Stretch
d2168b107f
Closes #13086: Virtual circuits (#17933)
* WIP

* Add API tests

* Add remaining tests

* Add model docs

* Show virtual circuit connections on interfaces

* Misc cleanup per PR feedback

* Renumber migration

* Support nested terminations for virtual circuit bulk import
2024-11-19 10:58:39 -05: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
Alexander Haase
bfcae8088d Rename Microsoft Azure AD to Entra ID
Occurrences of the old term have been replaced by the new term. However,
the documentation still needs some work to reflect the new Entra ID
screenshots and terminology.
2024-10-03 13:25:48 -04:00
Jeremy Stretch
56f110c2a9
Closes #17288: Limit the number of aliases within a GraphQL API requests to 10 (#17329)
* Closes #17288: Limit the number of aliases within a GraphQL API request to 10

* Introduce GRAPHQL_MAX_ALIASES config parameter
2024-09-02 09:30:41 -04:00
Jeremy Stretch
6e59db7310 #16886: Updated documentation for event types 2024-07-31 15:54:31 -04:00
Jeremy Stretch
5cfa2bb561 #15621: Add feature documentation for user notifications 2024-07-31 15:11:40 -04:00
Alexander Haase
d3a3a6ba46
15692: Introduce background jobs (#16927)
* Introduce reusable BackgroundJob framework

A new abstract class can be used to implement job function classes. It
handles the necessary logic for starting and stopping jobs, including
exception handling and rescheduling of recurring jobs.

This commit also includes the migration of data source jobs to the new
framework.

* Restore using import_string for jobs

Using the 'import_string()' utility from Django allows the job script
class to be simplified, as module imports no longer need to avoid loops.
This should make it easier to queue and maintain jobs.

* Use SyncDataSourceJob for management command

Instead of maintaining two separate job execution logics, the same job
is now used for both background and interactive execution.

* Implement BackgroundJob for running scripts

The independent implementations of interactive and background script
execution have been merged into a single BackgroundJob implementation.

* Fix documentation of model features

* Ensure consitent code style

* Introduce reusable ScheduledJob

A new abstract class can be used to implement job function classes that
specialize in scheduling. These use the same logic as regular
BackgroundJobs, but ensure that they are only scheduled once at any given
time.

* Introduce reusable SystemJob

A new abstract class can be used to implement job function classes that
specialize in system background tasks (e.g. synchronization or
housekeeping). In addition to the features of the BackgroundJob and
ScheduledJob classes, these implement additional logic to not need to be
bound to an existing NetBox object and to setup job schedules on plugin
load instead of an interactive request.

* Add documentation for jobs framework

* Revert "Use SyncDataSourceJob for management"

This partially reverts commit db591d4. The 'run_now' parameter of
'enqueue()' remains, as its being used by following commits.

* Merge enqueued status into JobStatusChoices

* Fix logger for ScriptJob

* Remove job name for scripts

Because scripts are already linked through the Job Instance field, the
name is displayed twice. Removing this reduces redundancy and opens up
the possibility of simplifying the BackgroundJob framework in future
commits.

* Merge ScheduledJob into BackgroundJob

Instead of using separate classes, the logic of ScheduledJob is now
merged into the generic BackgroundJob class. This allows reusing the
same logic, but dynamically deciding whether to enqueue the same job
once or multiple times.

* Add name attribute for BackgroundJob

Instead of defining individual names on enqueue, BackgroundJob classes
can now set a job name in their meta class. This is equivalent to other
Django classes and NetBox scripts.

* Drop enqueue_sync_job() method from DataSource

* Import ScriptJob directly

* Relax requirement for Jobs to reference a specific object

* Rename 'run_now' arg on Job.enqueue() to 'immediate'

* Fix queue lookup in Job enqueue

* Collapse SystemJob into BackgroundJob

* Remove legacy JobResultStatusChoices

ChoiceSet was moved to core in 40572b5.

* Use queue 'low' for system jobs by default

System jobs usually perform low-priority background tasks and therefore
can use a different queue than 'default', which is used for regular jobs
related to specific objects.

* Add test cases for BackgroundJob handling

* Fix enqueue interval jobs

As the job's name is set by enqueue(), it must not be passed in handle()
to avoid duplicate kwargs with the same name.

* Honor schedule_at for job's enqueue_once

Not only can a job's interval change, but so can the time at which it is
scheduled to run. If a specific scheduled time is set, it will also be
checked against the current job schedule. If there are any changes, the
job is rescheduled with the new time.

* Switch BackgroundJob to regular methods

Instead of using a class method for run(), a regular method is used for
this purpose. This gives the possibility to add more convenience methods
in the future, e.g. for interacting with the job object or for logging,
as implemented for scripts.

* Fix background tasks documentation

* Test enqueue in combination with enqueue_once

* Rename background jobs to tasks (to differentiate from RQ)

* Touch up docs

* Revert "Use queue 'low' for system jobs by default"

This reverts commit b17b2050df.

* Remove system background job

This commit reverts commits 4880d81 and 0b15ecf. Using the database
'connection_created' signal for job registration feels a little wrong at
this point, as it would trigger registration very often. However, the
background job framework is prepared for this use case and can be used
by plugins once the auto-registration of jobs is solved.

* Fix runscript management command

Defining names for background jobs was disabled with fb75389. The
preceeding changes in 257976d did forget the management command.

* Use regular imports for ScriptJob

* Rename BackgroundJob to JobRunner

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-07-30 13:31:21 -04:00
Arthur Hanson
8237c6accc
7025 circuit redundancy (#16945)
* 7025 CircuitRedundancyGroups

* 7025 CircuitRedundancyGroups api

* 7025 CircuitRedundancyGroups api

* 7025 CircuitRedundancyGroups tests

* 7025 CircuitRedundancyGroup -> CircuitGroup

* 7025 add tenancy

* 7025 linkify name

* 7025 missing file

* 7025 circuitgroupassignment

* 7025 base group assignment working

* 7025 assignments

* 7025 fix forms/tests for CircuitGroup

* 7025 fix api tests

* 7025 view tests

* 7025 CircuitGroupAssignment tests

* 7025 fix typo

* 7025 fix typo

* 7025 fix tests

* 7025 remove m2m

* 7025 add count to serializer

* 7025 fix test

* 7025 documentation

* 7025 review comments

* 7025 review comments

* 7025 add search index

* Make CircuitPriorityChoices extensible

* Add group assignment table to circuit view

* Misc cleanup

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-07-24 12:24:44 -04:00
Jeremy Stretch
44a9350986
Closes #16886: Dynamic event types (#16938)
* Initial work on #16886

* Restore GraphQL filter

* Remove namespace

* Add Event documentation

* Use MultipleChoiceField for event_types

* Fix event_types field class on EventRuleImportForm

* Fix tests

* Simplify event queue handling logic

* Misc cleanup
2024-07-22 08:12:04 -04:00
Arthur Hanson
5a6ffde67e
12826 Add Rack Type (#16739)
* 12826 add RackType

* 12826 add forms, filters, tables

* 12826 add to menu

* 12826 remove role

* 12826 add api/serializers

* 12826 add tests and fixes

* 12826 fix tests

* 12826 fix tests

* 12826 fix tests

* 12826 fix tests

* 12826 add device_type to device and instantiation

* 12826 test device creation

* 12826 add slug

* 12826 fix tests

* 12826 fix slug field

* 12826 prevent modification of rack fields if rack_type set

* 12826 update rack fields on rack_type edit

* Misc cleanup

* Update model docs

* Add manufacturer field to RackType

* Add test for mounting_depth

* Rename 'type' to 'form_factor'

* Create base classes for Rack & RackType models, serializers

* Hide RackType-defined fields on RackForm when a rack type is set

* Establish a base filter form for Rack & RackType

* Clean up RackType attr inheritance

* Clean up templates

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-07-16 08:58:22 -04:00
Jeremy Stretch
b0e7294bc1
Closes #15621: User notifications (#16800)
* Initial work on #15621

* Signal receiver should ignore models which don't support notifications

* Flesh out NotificationGroup functionality

* Add NotificationGroup filters for users & groups

* Separate read & dimiss actions

* Enable one-click dismissals from notifications list

* Include total notification count in dropdown

* Drop 'kind' field from Notification model

* Register event types in the registry; add colors & icons

* Enable event rules to target notification groups

* Define dynamic choices for Notification.event_name

* Move event registration to core

* Add more job events

* Misc cleanup

* Misc cleanup

* Correct absolute URLs for notifications & subscriptions

* Optimize subscriber notifications

* Use core event types when queuing events

* Standardize queued event attribute to event_type; change content_type to object_type

* Rename Notification.event_name to event_type

* Restore NotificationGroupBulkEditView

* Add API tests

* Add view & filterset tests

* Add model documentation

* Fix tests

* Update notification bell when notifications have been cleared

* Ensure subscribe button appears only on relevant models

* Notifications/subscriptions cannot be ordered by object

* Misc cleanup

* Add event icon & type to notifications table

* Adjust icon sizing

* Mute color of read notifications

* Misc cleanup
2024-07-15 14:24:11 -04:00
Jeremy Stretch
6819186bb6 Start release notes for v4.1 2024-06-18 13:43:33 -04:00
Jeremy Stretch
902c61bf47 Rename environment variable controlling public docs build 2024-05-21 15:22:40 -04:00
Jeremy Stretch
46bd62fdc9 Merge branch 'develop' into feature 2024-04-22 13:23:42 -04:00
Jeremy Stretch
ebe504c825 Closes #15664: Restore usage of READTHEDOCS env variable 2024-04-22 09:52:03 -04:00
Jeremy Stretch
b5bb732031
Closes #10696: Break out instructions for installing & removing plugins (#15757)
* Closes #10696: Break out instructions for installing & rmeoving plugins

* Misc cleanup
2024-04-17 11:58:14 -04:00
Jeremy Stretch
157df069e8 Closes #15738: Remove configuration parameters date & time formatting 2024-04-17 11:50:14 -04:00
Jeremy Stretch
3ab2f25ee1
Closes #15043: Add v4.0 migration guide for plugins (#15477)
* Add v4.0 migration guide for plugins

* Note Python 3.12 support

* 15403 update GraphQL plugin conversion docs

* Add section on FieldSets

---------

Co-authored-by: Arthur <worldnomad@gmail.com>
2024-04-01 09:08:28 -04:00
Arthur Hanson
99508150d3
15154 Add uWSGI as option to gunicorn (#15550)
* 15154 uwsgi docs

* 15154 uwsgi contrib files

* 15154 review comments - merge nginx conf

* Restructure gunicorn/uWSGI installation docs

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-03-28 15:24:08 -04:00
Jeremy Stretch
72720354df Update v4.0 release notes 2024-02-13 16:43:51 -05:00
Arthur Hanson
11697d19a6
12510 Merge Scripts and Reports (#14976)
* 12510 move reports to use BaseScript

* 12510 merge report into script view

* 12510 add migration for job report to script

* 12510 update templates

* 12510 remove reports

* 12510 cleanup

* 12510 legacy jobs

* 12510 legacy jobs

* 12510 fixes

* 12510 review changes

* 12510 review changes

* 12510 update docs

* 12510 review changes

* 12510 review changes

* 12510 review changes

* 12510 review changes

* 12510 main log results to empty string

* 12510 move migration

* Introduce an internal log level for debug to simplify Script logging

* Misc cleanup

* Remove obsolete is_valid() method

* Reformat script job data (log, output, tests)

* Remove ScriptLogMessageSerializer

* Fix formatting of script logs

* Record a timestamp with script logs

* Rename _current_method to _current_test

* Clean up template

* Remove obsolete runreport management command

* Misc cleanup & refactoring

* Clean up template

* Clean up migration

* Clean up docs

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-02-07 12:02:09 -05:00
Jeremy Stretch
edc2e3809d Closes #14765: Add developer documentation for updating translations 2024-01-10 14:03:25 -05:00
Jeremy Stretch
1afac47178 Documentation cleanup 2023-12-05 08:05:44 -05:00
Jeremy Stretch
115111df9e #14132: Fix documentation link 2023-12-04 11:15:13 -05:00
Jeremy Stretch
c0512e2c36 #14311: Update model documentation 2023-12-04 09:29:43 -05:00
Jeremy Stretch
dea5f94d97 Finish draft release notes 2023-12-01 08:37:20 -05:00
Arthur Hanson
a38a38218b
14132 Add EventRule - change webhook and add in script processing to events (#14267)
---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-11-30 16:36:33 -05:00
Jeremy Stretch
6678880db5
Closes #9816: VPN tunnel support (#14276)
- Introduces a new `vpn` app with the following models:
    - Tunnel
    - TunnelTermination
    - IKEProposal
    - IKEPolicy
    - IPSecProposal
    - IPSecPolicy
    - IPSecProfile
2023-11-27 16:17:15 -05:00
Jeremy Stretch
30ce9edf1c
Closes #13381: Enable plugins to register custom data backends (#14095)
* Initial work on #13381

* Fix backend type display in table column

* Fix data source type choices during bulk edit

* Misc cleanup

* Move backend utils from core app to netbox

* Move backend type validation from serializer to model
2023-10-24 11:35:53 -04:00
Arthur Hanson
8593715149
13319 add documentation for internationalization (#13330)
* 13319 add documentation for internationalization

* 13319 add verbose name to model

* 13319 fix typo

* Flesh out developer doc for i18n

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-08-11 11:27:48 -04:00
Jeremy Stretch
646d52d498 Misc docs cleanup for v3.6 2023-08-09 10:12:40 -04:00
Jeremy Stretch
6e222f8dce
Closes #8248: User bookmarks (#13035)
* Initial work on #8248

* Add tests

* Fix tests

* Add feature query for bookmarks

* Add BookmarksWidget

* Correct generic relation name

* Add docs for bookmarks

* Remove inheritance from ChangeLoggedModel
2023-06-29 14:36:11 -04:00
jeremystretch
02db0bcc2e Closes #11766: Remove obsolete custom ChoiceField and MultipleChoiceField classes 2023-05-12 16:27:50 -04:00
jeremystretch
d5c4b1e27c #10520: Remove obsolete NAPALM documentation 2023-04-21 11:22:38 -04:00
jeremystretch
08017c51f6 Merge branch 'develop' into feature 2023-04-07 13:00:00 -04:00
jeremystretch
0676ed45c7 Closes #12107: Document support for plugin-provided dashboard widgets 2023-04-03 14:15:18 -04:00
jeremystretch
0ac8419005 Fixes #12104: Restore copy-to-clipboard & footer navigation in docs 2023-03-30 16:29:54 -04:00
jeremystretch
b0f6cea4f3 Documentation cleanup 2023-03-30 15:45:32 -04:00
jeremystretch
40572b543f Rename JobResult to Job and move to core 2023-03-27 14:20:13 -04:00
jeremystretch
2fc79af4c7 #11558: Cleanup & docs 2023-03-22 09:20:44 -04:00
Jeremy Stretch
7994073687
Closes #8550: Implement ASN ranges (#11835)
* Move ASN to a separate module

* Move ASNField from dcim to ipam

* Introduce ASNRange model

* Add relationship from ASN to ASNRange

* Add an available-asns API endpoint

* Add RIR assignment for ASNRange

* Add standard tests

* Move child ASNs to a tabbed view

* Remove FK on ASN to ASNRange

* Add tests for provisioning available ASNs

* Add docs for ASNRange
2023-02-27 16:36:05 -05:00
jeremystretch
574b5551a0 Clean up model & registry documentation 2023-02-19 20:09:52 -05:00