Commit Graph

10361 Commits

Author SHA1 Message Date
Arthur Hanson
3412139acc
17193 update logo in Readme (#17194)
* 17193 update logo in Readme

* 17193 update logo in Readme

* 17193 remove .png

* 17194 favicon, apple
2024-08-19 11:22:40 -04:00
github-actions
e656e2da24 Update source translation strings 2024-08-17 05:03:01 +00:00
Arthur Hanson
c457f01b19
16640 fix JSON custom field save nul (#16713)
* 16640 fix JSON custom field save nul

* 16640 explicitly check against None

* 16640 convert JSON field from str to dict
2024-08-16 10:29:57 -04:00
Jeremy Stretch
1504fb5ac2 Closes #17173: Update GraphQL web front end dependencies 2024-08-15 12:05:26 -04:00
Jeremy Stretch
dd3166a4ed
Fixes #17097: Record static object representation when calling NotificationGroup.notify() (#17161)
* Fixes #17097: Record static object representation when calling NotificationGroup.notify()

* Redirect to notifications list when marking as read notifications for deleted objects

* Link to object in notifications dropdown only for non-destructive events
2024-08-15 12:04:19 -04:00
Jeremy Stretch
b6071a80d9 Closes #16574: Add last_synced time to REST API serializer for data sources 2024-08-15 10:20:21 -04:00
Arthur Hanson
93a13ce311
17169 use config_name for matching in plugin catalog (#17172)
* 17169 use config_name for matching

* 17169 remove cache buster
2024-08-15 10:18:34 -04:00
Arthur Hanson
122522a625 17163 Fix services list on IPAddress view 2024-08-15 10:06:37 -04:00
Arthur Hanson
a3befd0abe 17159 fix plugin install instructions 2024-08-15 09:59:31 -04:00
Jeremy Stretch
51c3d94725 Merge branch 'develop' into feature 2024-08-15 08:46:54 -04:00
Jeremy Stretch
e3d681be54 Closes #17143: Deprecate the use of dedicated nested API serializers 2024-08-15 08:00:33 -04:00
Jeremy Stretch
234b4027b0 Fixes #17098: Prevent automatic deletion of related notifications when deleting an object 2024-08-15 07:59:16 -04:00
Jeremy Stretch
277b7039d8 Closes #16245: Update frontend developer dependencies 2024-08-15 07:56:54 -04:00
github-actions
e2dfa63df6 Update source translation strings 2024-08-15 05:02:02 +00:00
Alexander Haase
c6c0ab2828 Fix job details view 2024-08-14 12:01:43 -04:00
Jeremy Stretch
8b91fb8d2d Merge branch 'develop' into feature 2024-08-14 10:54:31 -04:00
Jeremy Stretch
370c1209f4 PRVB 2024-08-14 10:27:03 -04:00
Jeremy Stretch
4747cdef0b Bump version to v4.0.9 for release 2024-08-14 10:06:44 -04:00
transifex-integration[bot]
727cb65c50
Updates for project NetBox (#17153)
* Translate django.po in ru

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

* Translate django.po in de

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

* Translate django.po in ja [Manual Sync]

98% of minimum 1% translated source file: 'django.po'
on 'ja'.

Sync of partially translated files: 
untranslated content is included with an empty translation 
or source language content depending on file format

* Translate django.po in fr [Manual Sync]

98% of minimum 1% translated source file: 'django.po'
on 'fr'.

Sync of partially translated files: 
untranslated content is included with an empty translation 
or source language content depending on file format

* Translate django.po in es [Manual Sync]

98% of minimum 1% translated source file: 'django.po'
on 'es'.

Sync of partially translated files: 
untranslated content is included with an empty translation 
or source language content depending on file format

* Translate django.po in pt [Manual Sync]

98% of minimum 1% translated source file: 'django.po'
on 'pt'.

Sync of partially translated files: 
untranslated content is included with an empty translation 
or source language content depending on file format

* Translate django.po in tr [Manual Sync]

98% of minimum 1% translated source file: 'django.po'
on 'tr'.

Sync of partially translated files: 
untranslated content is included with an empty translation 
or source language content depending on file format

* Translate django.po in it [Manual Sync]

98% of minimum 1% translated source file: 'django.po'
on 'it'.

Sync of partially translated files: 
untranslated content is included with an empty translation 
or source language content depending on file format

* Translate django.po in zh [Manual Sync]

99% of minimum 1% translated source file: 'django.po'
on 'zh'.

Sync of partially translated files: 
untranslated content is included with an empty translation 
or source language content depending on file format

* Translate django.po in pl [Manual Sync]

98% of minimum 1% translated source file: 'django.po'
on 'pl'.

Sync of partially translated files: 
untranslated content is included with an empty translation 
or source language content depending on file format

* Translate django.po in nl [Manual Sync]

98% of minimum 1% translated source file: 'django.po'
on 'nl'.

Sync of partially translated files: 
untranslated content is included with an empty translation 
or source language content depending on file format

* Translate django.po in uk [Manual Sync]

99% of minimum 1% translated source file: 'django.po'
on 'uk'.

Sync of partially translated files: 
untranslated content is included with an empty translation 
or source language content depending on file format

* Translate django.po in cs [Manual Sync]

98% of minimum 1% translated source file: 'django.po'
on 'cs'.

Sync of partially translated files: 
untranslated content is included with an empty translation 
or source language content depending on file format

* Translate django.po in da [Manual Sync]

98% of minimum 1% translated source file: 'django.po'
on 'da'.

Sync of partially translated files: 
untranslated content is included with an empty translation 
or source language content depending on file format

* Translate django.po in zh

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

* Translate django.po in cs

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

* 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 fr

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

* Translate django.po in it

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

* Translate django.po in ja

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

* Translate django.po in pl

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

* Translate django.po in pt

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

* Translate django.po in es

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

* Translate django.po in tr

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

* Translate django.po in uk

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

---------

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
2024-08-14 09:28:28 -04:00
Arthur Hanson
872af72b8e
16073 set default custom fields on CSV import (#17152)
* 16073 set default custom fields on CSV import

* 16073 add test case

* Remove second for loop

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-08-14 08:22:14 -04:00
Jeremy Stretch
5a9f9af2fa Fixes #16871: Sanitize device ID when bulk editing components to prevent exception 2024-08-14 07:43:10 -04:00
github-actions
09d36469dd Update source translation strings 2024-08-14 05:02:17 +00:00
Jeremy Stretch
d5c1a5acda Fixes #17144: Avoid displaying duplicate pop-up messages 2024-08-13 15:36:15 -04:00
PieterL75
6feb8bf0e3
add 'vlan' to prefix bulk edit (#17142)
* add 'vlan' to prefix bulk edit

* Move VLAN fields to a separate field set in bulk edit form

---------

Co-authored-by: Pieter Lambrecht <pieter.lambrecht@accenture.com>
Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-08-13 09:54:07 -04:00
Jeremy Stretch
9e54cfe340 Fixes #17131: Fix exception when creating object-type custom field without selecting related object type 2024-08-13 08:14:16 -04:00
github-actions
6a663e2a3e Update source translation strings 2024-08-13 05:02:12 +00:00
Matthew Mehrtens
7c9a77b77f
17006 Add Wi-Fi 7 IEEE 802.11be (#17125)
* Add .devcontainer to .gitignore

* Closes #17006: Add Wi-Fi 7 IEEE 802.11be

* Revert out-of-scope change

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-08-12 08:03:46 -04:00
github-actions
81fe12a7d9 Update source translation strings 2024-08-11 05:02:11 +00:00
Jeremy Stretch
9c7002f691 Fixes #17124: BaseTable should follow reverse one-to-one relationships when prefetching related objects 2024-08-10 11:58:14 -04:00
Arthur Hanson
34d20fccd5
17036 international messages (#17041)
* 17036 international messages

* 17036 fix typo

* 17036 fix _

* Misc cleanup & fixes

* More cleanup

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-08-10 11:47:06 -04:00
Arthur Hanson
f6c1642116 16176 Add UI for multi-termination cables 2024-08-10 10:30:56 -04:00
Arthur Hanson
b7b0ab16f5 17064 fix markdown padding for first line 2024-08-10 10:28:01 -04:00
Arthur Hanson
6ae3af2f26
13459 Fix OpenAPI type for TreeNodeMultipleChoiceFilter (#17095)
* 13459 Correct OpenAPI type for TreeNodeMultipleChoiceFilter

* 13459 Correct OpenAPI type for TreeNodeMultipleChoiceFilter
2024-08-10 10:24:02 -04:00
Jeremy Stretch
23490d3336 Release v4.1-beta1 2024-08-05 13:34:05 -04:00
github-actions
75a0b53aeb Update source translation strings 2024-08-05 13:14:41 -04:00
Arthur Hanson
796b9e84af
Closes #10500: Introduce support for nested modules (#16983)
* 10500 add ModularComponentModel

* 10500 add ModularComponentModel

* 10500 add to forms

* 10500 add to serializer, tables

* 10500 template

* 10500 add docs

* 10500 check recursion

* 10500 fix graphql

* 10500 fix conflicting migration from merge

* 10500 token resolution

* 10500 don't return reverse

* 10500 don't return reverse / optimize

* Add ModuleTypeModuleBaysView

* Fix replication of module bays on new modules

* Clean up tables & templates

* Adjust uniqueness constraints

* Correct URL

* Clean up docs

* Fix up serializers

* 10500 add filterset tests

* 10500 add nested validation to Module

* Misc cleanup

* 10500 ModuleBay recursion Test

* 10500 ModuleBay recursion Test

* 10500 ModuleBay recursion Test

* 10500 ModuleBay recursion Test

* Enable MPTT for module bays

* Fix tests

* Fix validation of module token in component names

* Misc cleanup

* Merge migrations

* Fix table ordering

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-08-05 13:13:59 -04:00
Jeremy Stretch
57fe2071a4 #15621: Support notifications for deletion of a subscribed object 2024-08-02 11:34:56 -04:00
Jeremy Stretch
02dd1a3970
Feature UI (#17069)
* 16649 general contrast issues (#16759)

* fixes #16647: navigation contrast issues updated

* fixes #16651: table contrast issues new

* fixed #16649: general contrast issues

* fixes #16649: feedback changes

---------

Co-authored-by: Andrew Gormley <Andrew@MacBook-Pro-3.local>
Co-authored-by: Andrew Gormley <Andrew@MacBook-Pro-3.broadband>

* 16648 dashboard contrast issues (#16824)

* fixed #16648: dashboard contrast issues

* reinstate amendment to 16649

* fixed #16648: created gridstack override and removed inline bug fix

---------

Co-authored-by: Andrew Gormley <Andrew@MacBook-Pro-3.local>

* fixed #16853: accessibility issues

* fixed #16847: updated font (#16848)

* fixed #16847: updated font

* fixed #16847: changed font to local and added current font as fallback

* fixed #16847: removed inter and added padding to page header

---------

Co-authored-by: Andrew Gormley <Andrew@MacBook-Pro-3.local>
Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>

* 16849 document hierarchy issues (#16875)

* fixed #16849: h elements not in sequential order

* fixed #16849: Lists do not contain only li elements

* fixed #16849: fixed h hierarchy on rack object pages

* Remove standalone h5 classes

* Remove unnecessary line breaks

---------

Co-authored-by: Andrew Gormley <Andrew@MacBook-Pro-3.local>
Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>

* 16650 button contrast issues (#16845)

* fixed #16650: button contrast issues

* fixed #16650: green bg text contrast issue

* Revert errant JS resource updates

* Revert custom button colors

* Fix indentation

---------

Co-authored-by: Andrew Gormley <Andrew@MacBook-Pro-3.local>
Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>

* 16907 web UI refresh (#16915)

* closes #16907: web ui refresh

* closes #16907: changed default widget color to primary color

* closes #16907: removed comma

* Revert dashboard widget color changes

* Rename logo images for consistency

* Restore original dashboard widget config

* Remove .navbar-brand-autodark from logo

* Restore logo file names

---------

Co-authored-by: Andrew Gormley <Andrew@MacBook-Pro-3.local>
Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>

* 16394 distinguish product edition (#16924)

* closes #16907: web ui refresh

* closes #16907: changed default widget color to primary color

* closes #16907: removed comma

* closes #16394: distinguish product edition

* Revert dashboard changes

* Clean up redundant styling (merge error)

* removed labs logo and added sub text for all editions

* fixed motif bug

* Fix "flashing" of side nav under dark mode

* Use title case for edition label

* altered edition text style

---------

Co-authored-by: Andrew Gormley <Andrew@MacBook-Pro-3.local>
Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>

* Query release features to toggle commercial theme

* fixes dark mode primary button contrast issue

* fixes #16913: hidden admin nav link (#16978)

Co-authored-by: Andrew Gormley <Andrew@MacBook-Pro-3.local>
Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>

* fixed 16852: misc accessbility problems (#16977)

* fixed 16852: misc accessbility problems

* Restore tooltip text

* Add translation support

* Add missing i18n

---------

Co-authored-by: Andrew Gormley <Andrew@MacBook-Pro-3.local>
Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>

* fixes issues in #16850 (#16986)

* fixes issues in #16850: issue 3 and 5

* Add link text for 'clear' button on table column

* Translate aria label

---------

Co-authored-by: Andrew Gormley <Andrew@MacBook-Pro-3.local>
Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>

* Use alternate footer links for commercial releases

* Remove Inter font

* Adjust base font weight to 500

* Retain default text color for hyperlinks inside tables

* Logo & edition cleanup

* Move dashboard styling

* Misc cleanup

* Remove unused styles

* Misc cleanup & refactoring

---------

Co-authored-by: Andrew Gormley <andrewgormley91@gmail.com>
Co-authored-by: Andrew Gormley <Andrew@MacBook-Pro-3.local>
Co-authored-by: Andrew Gormley <Andrew@MacBook-Pro-3.broadband>
2024-08-02 09:36:38 -04:00
Jeremy Stretch
f3da529399
Closes #14656: Dynamically render form fields depending on custom field type (#17068) 2024-08-02 08:14:01 -04:00
Jeremy Stretch
472fbdc654
Closes #17051: Introduce the ISOLATED_DEPLOYMENT config parameter (#17067)
* Closes #17051: Introduce ISOLATED_DEPLOYMENT config parameter

* Revert omission of external footer links
2024-08-02 08:05:08 -04:00
github-actions
597fc926c0 Update source translation strings 2024-08-02 05:02:14 +00:00
Jeremy Stretch
80fc9abb03 16927: Move JobRunner from utilities to netbox 2024-08-01 14:18:33 -04:00
Jeremy Stretch
8e6987edbf #16388: Move change logging signal handlers into core 2024-08-01 12:58:11 -04:00
Arthur Hanson
e32cfdf88c
17034 Add error handling to Plugins Catalog API (#17035)
* 17034 add error handling to plugins catalog API

* 17034 refactor from review feedback

* 17034 refactor from review feedback

* Misc cleanup

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-08-01 10:30:41 -04:00
Jeremy Stretch
bf17485290 Fix export of system data & include plugins 2024-08-01 09:36:23 -04:00
Jeremy Stretch
149c80a10e Merge branch 'develop' into feature 2024-08-01 09:16:01 -04:00
Jeremy Stretch
0b77b3372c Rename DeviceType.get_full_name to full_name 2024-08-01 09:14:03 -04:00
bubu
fa2b3bcfcc Adjust HTML template for Chinese translation order. 2024-08-01 09:08:06 -04:00
Arthur Hanson
d6f2fc7d29
17058 RackType name -> model (#17059)
* 17058 RackType name -> model

* 17058 RackType name -> model

* 17058 fix tests

* 17058 fix tests
2024-08-01 09:06:51 -04:00
Arthur Hanson
dc173a5508 17038 fix export system data 2024-08-01 08:47:26 -04:00
Arthur Hanson
408f8b4964 17054 upgrade sass to upgrade braces 2024-08-01 08:43:50 -04:00
Jeremy Stretch
c51e91dddd Closes #17048: Replace all calls to get_user_model() with direct imports of User 2024-08-01 08:17:51 -04:00
Arthur Hanson
1a6406632a For #12826 add tests to RackTest filtersets for manufacturer and DeviceType 2024-08-01 13:59:20 +07:00
Arthur Hanson
77d0e9032a fix internationalization for string 2024-08-01 13:12:58 +07:00
Jeremy Stretch
a49a74236b #16886: Misc cleanup 2024-07-31 16:02:20 -04:00
Jeremy Stretch
d1e16013f0 #16886: Rename Event to EventType 2024-07-31 15:39:05 -04:00
Jeremy Stretch
2168a73a2d Display manufacturer & model of module type on module view 2024-07-31 14:40:05 -04:00
Jeremy Stretch
8d585031d8 Misc cleanup 2024-07-31 14:06:35 -04:00
Jeremy Stretch
da7d47d3ed Add manufacturer filter for Rack; extend RackFilterForm 2024-07-31 14:06:07 -04:00
Jeremy Stretch
047d717532 Add missing table columns 2024-07-31 14:04:51 -04:00
Jeremy Stretch
52692d49b6 #9627: Fix calculation of available VIDs 2024-07-31 12:28:19 -04:00
Arthur Hanson
a3edc0472a
17032 Convert Virtual Disk Size from GB -> MB (#17033)
* 17032 Convert Virtual Disk size from GB -> MB

* 17032 update migration

* 17032 update migration

* 17032 update migration

* 17032 update migration

* Omit redundant method

* Merge migrations

* Tweak column header

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-07-31 10:03:25 -04:00
Jeremy Stretch
954eadcdc5 #15908: Introduce FeatureSet dataclass for tracking release features 2024-07-30 16:39:46 -04:00
Jeremy Stretch
845888c24e #14731: Misc cleanup 2024-07-30 15:11:35 -04:00
Jeremy Stretch
a63bb6dba6 #8984: Tweak ordering of log levels; fix invalid level handling 2024-07-30 14:49:42 -04:00
Jeremy Stretch
5f87724072 #8198: Fix validation bug 2024-07-30 14:25:47 -04:00
Jeremy Stretch
dbd503bcc8 #7025: Misc cleanup 2024-07-30 13:50:42 -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
samk-acw
650898719e
Fixes #16782: Add object filtering for custom fields (#16994)
* Fixes #16782: Add object filtering for custom fields

* Add validation for related_object_filter

* Extend documentation & misc cleanup

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-07-29 15:45:48 -04:00
github-actions
f949aa334b Update source translation strings 2024-07-27 05:02:14 +00:00
Jeremy Stretch
a12fdd6e2d Merge branch 'develop' into feature 2024-07-26 16:39:58 -04:00
Jeremy Stretch
8bfcb1c816 PRVB 2024-07-26 16:25:32 -04:00
Jeremy Stretch
7b5e8d5f2a Update static assets 2024-07-26 15:47:57 -04:00
Jeremy Stretch
303c1ce00c Release v4.0.8 2024-07-26 15:37:05 -04:00
Jeremy Stretch
b4240cdd67 Update import statements for Strawberry 0.236.0 2024-07-26 15:35:08 -04:00
transifex-integration[bot]
1e7a71969e
Updates for project NetBox (#17004)
* Translate django.po in de

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

* Translate django.po in pt

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

* Translate django.po in zh

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

* Translate django.po in pl

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

* Translate django.po in ja

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

* Translate django.po in nl

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

* Translate django.po in cs

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

* Translate django.po in uk

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

---------

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
2024-07-26 15:34:47 -04:00
Jonathan Senecal
f3d1924453 Use provider_id instead of account_id in url_params 2024-07-26 15:10:25 -04:00
Arthur Hanson
0a1ce79154
16992 remove TODO for NetBox 4.1 (#16993)
* 16992 remove TODO for NetBox 4.1

* 16992 fix custom validator

* Remove obsolete LegacyScriptRedirectView

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-07-26 09:46:16 -04:00
Jeremy Stretch
d8c7282fdb
Fixes #16964: Ensure configured password validators are enforced (#16990)
* Closes #16964: Validate password when creating a new user or updating password for an existing user

* Add serializer validation & tests

---------

Co-authored-by: Nishant Gaglani <nishantgaglani@gmail.com>
2024-07-26 07:58:14 -04:00
Jeremy Stretch
22319b2cce Closes #16988: Move rack nav menu items to a dedicated section 2024-07-26 07:57:29 -04:00
Arthur Hanson
e62a42286a
11969 airflow (#16967)
* 11960 Add airflow

* 11960 Add airflow

* 11960 fix tests

* 11960 fix racktype form

* 11969 different choices type

* 11969 update docs

* 11969 fix racktype copy

* 11969 fix

* Misc cleanup & reordering of form fields

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-07-25 15:14:02 -04:00
Arthur Hanson
1d6987bca0
14731 plugins catalog (#16763)
* 14731 plugin catalog

* 14731 detal page

* 14731 plugin table

* 14731 cleanup

* 14731 cache API results

* 14731 fix install name

* 14731 filtering

* 14731 filtering

* 14731 fix detail view

* 14731 fix detail view

* 14731 sort / status

* 14731 sort / status

* 14731 cleanup detail view

* 14731 htmx plugin list

* 14731 align quicksearch

* 14731 remove pytz

* 14731 change to table

* 14731 change to table

* 14731 remove status from table

* 14731 quick search

* 14731 cleanup

* 14731 cleanup

* Employ datetime_from_timestamp() to parse timestamps

* 14731 review changes

* 14731 move to plugins.py file

* 14731 use dataclasses

* 14731 review changes

* Tweak table columns

* Use is_staff (for now) to evaluate user permission for plugin views

* Use table for ordering

* 7025 change to api fields

* 14731 tweaks

* Remove filtering for is_netboxlabs_supported

* Misc cleanup

* Update logic for determining whether to display plugin installation instructions

* 14731 review changes

* 14731 review changes

* 14731 review changes

* 14731 add user agent string, proxy settings

* Clean up templates

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-07-25 14:58:48 -04:00
Jeremy Stretch
8409ca9fd2 Closes #16928: Add help center button to top nav 2024-07-25 13:16:31 -04:00
Jeremy Stretch
909ee7d543 Closes #14861: Standardize URL path for virtual disks 2024-07-25 13:12:53 -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
f7fdfdd925 #16866: Fix handling of job start/stop events 2024-07-22 13:47:48 -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
github-actions
36df9228a6 Update source translation strings 2024-07-20 05:02:12 +00:00
Jeremy Stretch
4a53a96541 #15908: Add features attribute to ReleaseInfo 2024-07-19 17:04:06 -04:00
Jeremy Stretch
1acb9902e7 #16359: Include plugin nav content on mobile view 2024-07-19 16:21:46 -04:00
Jeremy Stretch
424dda5be6 Closes #16933: Enable toggling true/false marks on BooleanColumn 2024-07-19 07:54:41 -04:00
Jeremy Stretch
3028f262cc Closes #16943: Expand navigation breadcrumbs on job view to include parent object 2024-07-19 07:52:27 -04:00
github-actions
11cadf3a8a Update source translation strings 2024-07-19 05:02:01 +00:00
Jeremy Stretch
965e78125a Closes #16884: Remove ID column from ObjectChangeTable defaults 2024-07-18 21:44:12 -04:00
Jeremy Stretch
954d0cfcd0
Closes #16929: Add version & user details as data attributes (#16939)
* Closes #16929: Add version & user details as data attributes

* Fix typo
2024-07-18 12:39:23 -04:00
Jeremy Stretch
b2c5a4639c Introduce datetime_from_timestamp() utility function 2024-07-16 12:21:50 -04:00
Arthur Hanson
cf1024a12b
9627 use ArrayField on VLANGroup for allowed VLANs (#16710)
* 9627 initial commit

* 9627 numeric range field

* 9627 numeric range field

* 9627 numeric range field

* 9627 numeric range field

* 9627 add stuff for utilization calc

* 9627 update views

* 9627 fixes

* 9627 available_vlans

* 9627 available_vlans

* 9627 fixes

* 9627 bulk import / edit

* 9627 test fixes

* 9627 test fixes

* 9627 update validation

* 9627 fix tests

* 9627 fix tests

* 9627 fix tests

* 9627 fix tests

* 9627 fix tests

* 9627 fix tests

* 9627 review changes

* 9627 temp vlan_id filter

* Clean up labels

* Remove annotate_vlan_ranges() from VLANGroupQuerySet

* Misc cleanup

* Implement contains_vid filter

* Serialize VID ranges as integer lists in REST API

* Remove default value from vlan_id_ranges

* 9627 fix typo in test

* Require vlan_id_ranges & set default value

* Fix logic for upper range boundaries

* Add field to VLANGroup model documentation

* Rename vlan_id_ranges to vid_ranges

* Fix computation of available VLAN IDs

* Clean up migration

* Add tests for range utility functions

* Clean up add_available_vlans()

* Misc cleanup, add test for VID validation

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-07-16 10:47:18 -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
Arthur Hanson
dde77c83b4
16819 highlight parent device in rack (#16881)
* 16819 highlight parent device in rack

* 16819 review changes
2024-07-15 09:09:26 -04:00
Jeremy Stretch
1c2336be60
Closes #16776: Extend PluginTemplateExtension to render custom alerts for objects (#16889)
* Closes #16776: Extend PluginTemplateExtension to render custom alerts for objects

* Fix bug in _get_registered_content()
2024-07-12 09:52:07 -04:00
Thomas Fargeix
d39acfd3f2
Fixes 16536 - Fix filtering of device component by device role (#16553)
* Fixes 16536 - Fix filtering of device component by device role

Rename role and role_id fields to device_role and device_role_id in
DeviceComponentFilterSet

* Update tests for DeviceComponentFilterSet

* Use device_role filter name for DeviceComponentFilterSetTests

* Add test_device_role test in InventoryItemTestCase
2024-07-12 09:13:33 -04:00
Fabian Geisberger
4ea4e57f33 Fixes #16624: Set allow_null=True on method fields that can return None 2024-07-12 09:03:40 -04:00
Arthur Hanson
377543cd9c 16402 remove links from script result table 2024-07-12 08:31:32 -04:00
github-actions
a8827c8472 Update source translation strings 2024-07-12 05:02:03 +00:00
transifex-integration[bot]
ab6ddd50a8
Updates for project NetBox (#16888)
* Translate django.po in pt

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

* Translate django.po in es

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

* Translate django.po in de

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

* Translate django.po in fr

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

* Translate django.po in ru

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

* Translate django.po in ja

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

* Translate django.po in it

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

* Translate django.po in cs

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

* Translate django.po in zh

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

* Translate django.po in nl

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

* Translate django.po in da

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

* 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'.

* Translate django.po in tr

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

---------

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
2024-07-11 14:20:06 -04:00
Jeff Gehlbach
499da4fdcf
Added CS, DA, IT, NL, and PL, minus the .po and .mo starting point files (#16810)
* Added CS, DA, IT, NL, and PL, minus the .po and .mo starting point files

* Add initial PO files for new languages

* Revert updates to EN django.po

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-07-11 14:04:36 -04:00
github-actions
4fa396716e Update source translation strings 2024-07-11 05:02:02 +00:00
the.friendly.net
f2e1de027f
Fixes #16760: datasource git on local file system fails (#16872)
* Fixes #16760: datasource git on local file system fails

* Fixes #16760: datasource git on local file system fails

* Set depth & quiet parameters only if using a remote URL

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-07-10 09:10:28 -04:00
Arthur Hanson
30d711d24a 16838 show extra_buttons if no actions defined 2024-07-10 08:43:27 -04:00
Arthur Hanson
2a8bec1cbf 16867 render dashboard if model no longer available 2024-07-10 08:39:40 -04:00
Arthur Hanson
013139aa20 16357 clone tenant and type for cable 2024-07-10 08:34:48 -04:00
Théophile Bastian
4ca1494127
SSO: custom name for identity providers (#16732) 2024-07-10 13:09:03 +07:00
github-actions
70311a9db5 Update source translation strings 2024-07-10 05:02:10 +00:00
Jeremy Stretch
02ae91589d Merge branch 'develop' into feature 2024-07-09 15:16:05 -04:00
Jeremy Stretch
dd413b248a PRVB 2024-07-09 13:49:24 -04:00
Jeff Gehlbach
596514ce74 Release v4.0.7 2024-07-09 13:27:13 -04:00
transifex-integration[bot]
aafb26662a
Updates for project NetBox (#16811)
* Translate django.po in pt

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

* Translate django.po in fr [Manual Sync]

12% of minimum 1% reviewed source file: 'django.po'
on 'fr'.

Sync of partially translated files: 
untranslated content is included with an empty translation 
or source language content depending on file format

* Translate django.po in pt [Manual Sync]

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

* Translate django.po in de [Manual Sync]

78% of minimum 1% reviewed source file: 'django.po'
on 'de'.

Sync of partially translated files: 
untranslated content is included with an empty translation 
or source language content depending on file format

* Translate django.po in tr [Manual Sync]

7% of minimum 1% reviewed source file: 'django.po'
on 'tr'.

Sync of partially translated files: 
untranslated content is included with an empty translation 
or source language content depending on file format

* Translate django.po in ru [Manual Sync]

30% of minimum 1% reviewed source file: 'django.po'
on 'ru'.

Sync of partially translated files: 
untranslated content is included with an empty translation 
or source language content depending on file format

* Translate django.po in zh [Manual Sync]

16% of minimum 1% reviewed source file: 'django.po'
on 'zh'.

Sync of partially translated files: 
untranslated content is included with an empty translation 
or source language content depending on file format

---------

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
2024-07-09 13:18:19 -04:00
Jeremy Stretch
4c797bf755 Update dependencies for v4.0.7 2024-07-09 13:05:57 -04:00
Martin
6a1245c792
Fixes #16758: Create language cookie if required (#16764)
* Fixes #16758: Create language cookie if required

* Align language cookie with session lifetime
2024-07-09 08:51:12 -04:00
Mattias L
96ff796b94
Allowed configuration of Sentry send_default_pii parameter (#16803)
* Allowed configuration of Sentry send_default_pii parameter.

Also changed default value of send_default_pii to False to avoid sending sensitive data to Sentry.

Closes #16802

* Order alphabetically & link to Sentry parameter documentation

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-07-09 08:39:43 -04:00
locklearxd
d8d66581cc potential fix for IKE policy mode issue with version2 2024-07-09 08:35:02 -04:00
Jeremy Stretch
7564f6f538 Fixes #16808: Correct event type of webhooks emitted upon object deletion immediately following a modification 2024-07-09 08:17:46 -04:00
github-actions
f2e3c1a219 Update source translation strings 2024-07-09 05:02:43 +00:00
Arzhel Younsi
22348cdbfc
Extend STORAGE_BACKEND config to support Swift (#16319)
* Extend STORAGE_BACKEND config to support Swift

Requires django-storage-swift >= 1.4.0 when used.

Bug: T310717
Change-Id: I67cf439e9152608cbba3a3de4173d54ba5fbddc2

* Update system.md from suggestions

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

* Update settings.py from suggestions

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

* Update system.md from suggestions 2

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

* Remove SWIFT storage from configuration_example.py

* Load swift config as global instead of monkey path

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-07-08 12:04:17 -04:00
Adam Brutsaert
f4532dd4ab Closes #16817: Added 200 & 400 Gbps selections for circuit commit rate 2024-07-04 11:31:10 -04:00
Jeremy Stretch
e02796a64e Fixes #16721: Fix errant API request after deselecting a rack in device edit form 2024-07-04 10:28:52 -04:00
Jeremy Stretch
7a88810a23 Fixes #16780: IKE proposal created via REST API should not require authentication_algorithm 2024-07-04 09:32:01 -04:00
Jeremy Stretch
a518579916 Fixes #16796: Allow assignment of VM with no site to a cluster with a site 2024-07-04 09:14:07 -04:00
Jeremy Stretch
e9dd5aa17b Fixes #16806: Fix redirect URL when creating contact assignments with "add another" button 2024-07-04 08:50:22 -04:00
Jeremy Stretch
8026f79cbb Fixes #16813: Fix ordering of bookmarks in dashboard widget when filtering by object type 2024-07-04 08:23:05 -04:00
github-actions
cf38c7724e Update source translation strings 2024-07-04 05:02:06 +00:00
Jeremy Stretch
616f6f6165 #16726: Fix cotent registration bug 2024-07-03 16:20:00 -04:00
Jeremy Stretch
b18a6b7c59
Fixes #16779: Fix saved filter selection for child object lists (#16789)
* Fixes #16779: Fix saved filter selection for child object lists

* Omit label_suffix
2024-07-03 08:51:30 -04:00
RobertH1993
98748d901b Closes #16716, add NAT IP to device view for OOB IP 2024-07-03 08:48:24 -04:00
Jeremy Stretch
a704708caa Fixes #16679: Avoid overwriting custom JSON fields during bulk edit 2024-07-03 08:42:37 -04:00
Jeremy Stretch
224f157b75 Fixes #16807: Fix layout of VLAN edit form when custom fields are present 2024-07-03 08:31:25 -04:00
Jeremy Stretch
94c2e7582e Closes #16791: Add 200 & 400 Gbps selections for circuit termination port speed 2024-07-03 08:28:12 -04:00
github-actions
4857a87be5 Update source translation strings 2024-07-02 05:02:15 +00:00
Arthur Hanson
5ac5135dbc
8984 Allow script log to be filtered (#16446)
* 8984 filter by script log level

* 8984 filter log list

* 8984 add dropdown

* 8984 add dropdown

* 8984 fix button color

* Update netbox/extras/views.py

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

* 8984 review changes

* 8984 review changes

* 8984 review changes

* Clean up log threshold selector

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-07-01 16:04:29 -04:00
Jeremy Stretch
82d8de32df Closes #16726: Extend PluginTemplateExtension to allow registering multiple models 2024-07-01 15:25:27 -04:00
Elliott Balsley
e2596587fa
fix: allow cloning field value of 0 (#16741)
* fix: allow cloning field value of 0

* Fix evaluation of False value

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-07-01 09:22:09 -04:00
siku4
a12259fae7 fix: add missing parent field to inventory item import form 2024-07-01 09:20:49 -04:00
Peter Eckel
753ba5d3f4
Do not delete all search indexes when reindexing specific models (#16755)
* Do not delete all search indexes when reindexing specific models

* Clear all indexes only if neither --lazy nor a list of models are
  specified for "manage.py reindex"

* Otherwise, clear the index for a model immediately before rebuilding
  it

* Separated clearing from re-indexing the search cache
2024-07-01 09:12:02 -04:00
Jeremy Stretch
b5d8e657ad Fixes #16523: Restore highlighting of current device in virtual chassis members panel 2024-07-01 08:48:01 -04:00
github-actions
67983c6a75 Update source translation strings 2024-07-01 05:02:10 +00:00
Tobias Genannt
a896b14c08 Fixes #16689: Load correct configuration
Loads the the current configuration if no ConfigRevisions are saved to
the database.
2024-06-30 15:20:26 -04:00
Julio-Oliveira-Encora
2c64a52d7d Added default:"0" to total_count in object_list.html 2024-06-30 15:10:38 -04:00
Julio Oliveira at Encora
00d23a0cff
16725 - The admin section should always come last in the navigation menu (#16762)
* I replaced `append` with `insert` into menu.py to make the admin section appear last in the navigation menu.

* Clean up ordering logic

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-06-30 11:30:39 -04:00
github-actions
c7dcded74f Update source translation strings 2024-06-27 05:02:05 +00:00