1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

1747 Commits

Author SHA1 Message Date
31fb6961e9 14947 fix for missing changelog if only update m2m (#14986)
* 14947 fix for missing changelog if only update m2m

* 14947 review change

* 14947 DRY save logic

* 14947 DRY save logic

* Refactor logic

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-02-05 09:52:10 -05:00
59510b4bd0 Issue #14962 VM to merge directly related site context (#14992)
* Issue #14962 VM to merge directly related site context

* Cleanup & rewrite test

---------

Co-authored-by: Chris Carter <chris.carter@spinlocksecurity.com>
Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-02-02 10:16:07 -05:00
487f1ccfde Fixes #14703: Catch exceptions when rendering dashboard and revert to default 2024-01-24 17:19:07 -05:00
23e201cec6 Fixes #14905: Fix miscellaneous errors with string translations 2024-01-24 17:05:02 -05:00
d606749335 Fixes #14892: Omit username when running report/script via command line 2024-01-22 15:52:03 -05:00
fd5392563f Fixes #14572 - Constrains JobView (and related views) badge to specific named job (#14754)
* Fixes #14572 - Constrains JobView (and related views) badge to specific named job

* Adjust report views to resolve same problem

* Fixed PEP8 error

* Update netbox/templates/extras/script/base.html

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

* Move function to method on PythonModuleMixin

* Update netbox/extras/views.py

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

* Update netbox/extras/views.py

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

* Update netbox/extras/views.py

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

* Update netbox/extras/views.py

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

* Update to mixin and view

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-01-22 14:01:53 -05:00
48168de4ff Fixes #14755: ValueError in web UI after REST API accepts invalid cus… (#14804)
* Fixes #14755: ValueError in web UI after REST API accepts invalid custom-field choice-set data

* PR Comments Addressed

* Set max_length=2 on extra_choices items; remove custom validation logic

* Move test for invalid choices to CustomFieldChoiceSetTest

* Omit unused imports

---------

Co-authored-by: julio.oliveira <julio.oliveira@alertmedia.com>
Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-01-19 15:24:08 -05:00
a87d76ad17 Fixes user delete when they have a bookmark (#14867)
* fixes user delete when they have a bookmark #14851

* Include migration for user field

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-01-19 15:23:20 -05:00
66db4f3874 Fixes #14827: Ensure all matching event rules are processed in response to an event 2024-01-17 14:09:06 -05:00
70dd8f17b6 Fixes #14778: Allow null values in CustomFieldSerializer object_type & choice_set fields 2024-01-16 13:08:02 -05:00
33af942571 Closes #14624: Add action object column to EventRuleTable 2023-12-28 15:56:22 -05:00
d930c4e36e Apply filterset & test changes for #14631 & #14629 2023-12-28 14:43:08 -05:00
d5c1cb0ef6 Merge branch 'develop' into feature 2023-12-28 14:20:04 -05:00
3ef2db81e8 Closes #14629: Add filter tests for all q and description filters 2023-12-28 13:53:16 -05:00
3bacee16bd Closes #14631: Ensure description filters are available on all relevant models 2023-12-28 13:53:16 -05:00
1f2f0860fe Merge branch 'develop' into feature 2023-12-27 16:34:38 -05:00
4eadc8cfe4 Closes #14240: Increase min/max validation values for custom fields 2023-12-27 15:41:26 -05:00
634681a72e Fixes #13606: Fix filtering by null for multiselect custom fields 2023-12-27 12:49:31 -05:00
99467e8f66 Fixes #12731: Support custom validation for many-to-many fields (#14516)
* WIP

* Enforce custom validators during bulk edit

* Add bulk edit M2M validation test

* Clean up tests

* Add custom validation test for bulk import

* Misc cleanup
2023-12-22 10:01:05 -05:00
00807d1e52 Fixes #14550: Fix changing event rule action type from webhook to script (#14571)
* Fixes #14550: Fix changing event rule action type from webhook to script

* Remove action_parameters from form; set on instance under save()
2023-12-22 09:54:08 -05:00
e5c565cbf4 Closes #14119: Remove redundant check for to_objectchange() 2023-12-21 16:26:20 -05:00
3f4a65cc5c added ! to safe characters 2023-12-21 15:10:38 -05:00
58f925c261 Closes #14503: Include additional display attributes for search indexers 2023-12-21 14:36:42 -05:00
12beac4f1a fix the result of script jobs #14549 2023-12-20 15:15:02 -05:00
25e67eb555 Merge branch 'develop' into feature 2023-12-15 16:52:42 -05:00
224d64007a 14147 Prevent logging to Change Log when no changes are made (#14477)
* 14147 Prevent logging to Change Log when no changes are made

* 14147 add test

* 14147 add exclude_fields to serialize_object

* 14147 make skip empty default to True

* 14147 remove override of to_objectchange

* Misc cleanup

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-12-15 15:17:45 -05:00
69bf1472d2 13983 Add nested arrays for extra_choices in CustomFieldChoiceSet (#14470)
* 13983 split array fields in CSV data for CustomFieldChoices

* 13983 fix help text

* 13983 update tests

* 13983 use re for split

* 13983 replace escaped chars

* 13983 fix escape handling

* 13983 fix escape handling

* 13983 fix escape handling
2023-12-14 15:18:56 -05:00
6939ae4a47 14467 change ChoiceField separator from comma to colon (#14469)
* 14467 change ChoiceField separator from comma to colon

* 14467 fix test

* 14467 fix test

* 14467 use regex for colon detection

* 14467 update tests
2023-12-12 14:31:39 -05:00
965f2de34b 14424 Remove ChangeLoggedModel from StagedChange (#14476)
* 14424 remove ChangeLoggedModel from StagedChange

* 14424 rename migration
2023-12-11 10:50:07 -05:00
b532435a6d Closes #14436: Add indexes for all GenericForeignKey fields (#14463)
* Closes #14436: Add PostgreSQL indexes for all GenericForeignKeys

* Add note about GFK indexes to developer docs
2023-12-07 14:02:51 -05:00
32264ac3e3 Fixes #14322: Populate default custom field values when instantiating templated device components 2023-12-06 15:21:34 -05:00
5d57e9863d #14132: Simplify form logic for script EventRules 2023-12-04 10:57:29 -05:00
cfc20f910e #14132: Fix migration 2023-12-04 10:21:37 -05:00
0c9919a5e8 #13334: Capture exception class when recording job error 2023-12-01 10:54:46 -05:00
0340a5e8d6 #13299: Clean up custom field form field help text 2023-12-01 10:24:12 -05:00
85ab7adca6 Closes #14395: Move & rename process_webhook() 2023-12-01 08:25:01 -05:00
4fc0a999ea Closes #14365: Introduce job_start and job_end signals (#14393)
* Introduce job_start and job_end signals, and receivers to process event rules

* Complete signals documentation
2023-11-30 19:36:41 -05:00
b812a50ca2 Closes #14361: Add a description field to Webhook (#14380) 2023-11-30 17:02:45 -05:00
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
b83fcc6077 Merge branch 'develop' into feature 2023-11-29 20:25:44 -05:00
ac3fc25dfd Fixes #14239: Fix CustomFieldChoiceSet search filter 2023-11-29 17:20:18 -05:00
6dddb6c9d2 Fixes #14199: Fix jobs count for reports with a custom name 2023-11-29 17:19:02 -05:00
c43c63a817 14346 fix missing function call convert
In PR #13958 (commit 8224644) _get_report was modified to do the call on the variable without changing the call later on.

This commit fixes that and removes the call on the variable.

Signed-off-by: Josef Johansson <josef@oderland.se>
2023-11-29 15:58:14 -05:00
40763b58bd 14299 change webhook timestamp to isoformat (#14331)
* 14299 change timestamp to isoformat

* Omit redundant str() casting

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-11-28 17:01:03 -05:00
975a647d9a Closes #14312: Move ConfigRevision to core (#14328)
* Move ConfigRevision model & write migrations

* Move ConfigRevision resources from extras to core

* Extend migration to update original content type for ConfigRevision
2023-11-27 16:09:05 -05:00
18422e1d26 Closes #14326: Move form mixins (#14327)
* Move form mixins from extras app to netbox app

* Remove obsolete extras/admin.py
2023-11-22 13:49:26 -05:00
a73ba00aa0 Closes #13299: Improve options for controlling custom field visibility (#14289)
* Add ui_visible and ui_editable fields

* Extend migration to map new visible/editable values

* Remove ui_visibility field

* Update docs
2023-11-20 13:06:34 -05:00
e13bf48a35 Add /api/virtualization/virtual-machines/{id}/render-config/ endpoint (#14287)
* Add /api/virtualization/virtual-machines/{id}/render-config/ endpoint

* Update Docstring "Device" -> "Virtual Machine"

Docstring should mention "..this Virtual Machine" instead of "...this Device", thanks @LuPo!

* Move config rendering logic to new RenderConfigMixin

* Add tests for render-config API endpoint

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-11-17 08:32:58 -05:00
e15647a2ce Closes #14153: Filter ContentTypes by supported feature (#14191)
* WIP

* Remove FeatureQuery

* Standardize use of proxy ContentType for models

* Remove TODO

* Correctly filter BookmarksWidget object_types choices

* Add feature-specific object type validation
2023-11-16 12:12:51 -05:00
3d20276f55 Closes #14134: Display additional object attributes in global search results (#14154)
* WIP

* Add display_attrs for all indexers

* Linkify object attributes

* Clean up prefetch logic

* Use tooltips for display attributes

* Simplify template code

* Introduce get_indexer() utility function

* Add  to examples in docs

* Use tooltips to display long strings
2023-11-09 16:21:09 -05:00