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

1820 Commits

Author SHA1 Message Date
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
ac91d4e5e5 Merge branch 'develop' into feature 2023-11-09 16:06:26 -05:00
6b89da2233 Closes #13936: Add primary_ip4 and primary_ip6 filters to VirtualMachine and VirtualDeviceContext filtersets (#14203)
* Add primary_ip4 and primary_ip6 filters for VirtualMachine and VirtualDeviceContext filtersets (#13936)

* Add PrimaryIPFilterSet to __all__

---------

Co-authored-by: Artem I. Kotik <artem.i.kotik@ringcentral.com>
Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-11-09 09:56:43 -05:00
8dcbd66de6 Closes #13427: Public model registration (#14152)
* Initial work on #13427

* Clarify documentation

* Reference public models registry when populating models for ConfigTemplate context
2023-11-03 10:32:59 -04:00
c2d1988cb3 Closes #14035: Order global search results of equivalent weight by value (#14140) 2023-11-01 11:56:14 -04:00
7323668dd0 Closes #13334: Record error message on failed jobs (#14106) 2023-10-31 08:34:57 -04:00
edc4a35296 Initial work on #10244: Protection rules (#14097) 2023-10-30 14:36:56 -04:00
c4e765c4a8 Closes #14141: translation cleanup (#14143)
* Translations cleanup

* Tweak variable names; misc string cleanup

* Misc cleanup
2023-10-30 13:38:03 -04:00
450790ab4a Closes #13550: Refactor view action mappings (#14062)
* Merge actions and action_perms into a single mapping

* Update obsolete permission maps

* Update obsolete action lists

* Normalize empty permission mappings

* Cleanup

* Add deprecation warnings

* Introduce DEFAULT_ACTION_PERMISSIONS constant
2023-10-20 15:08:09 -04:00
3f40ee5501 Closes #14036: Move extras.plugins to netbox.plugins (#14086)
* Move extras.plugins to netbox.plugins & add deprecation warnings

* Move plugin template tags from extras to utilities

* Move plugins tests from extras to netbox

* Add TODO reminders for v4.0
2023-10-20 11:24:08 -04:00
7983c2590e 14025 fix script name checking (#14030)
* 14025 fix script name checking

* 14025 fix script name checking

* 14025 add file extension validation and simplify get logic

* 14025 match start of string with regex

* 14025 backout changes to model_forms

* 14025 add filepatch checking to reports
2023-10-17 10:57:50 -04:00
285187542d Adds selection custom field labels to UI 2023-10-05 15:02:22 -04:00
ef460a38ed 13944 fix report detail api 2023-10-03 14:39:46 -04:00
4dd229e73a Fixes #13864: Remove 'default' choice for dashboard widget color 2023-09-26 15:24:20 -04:00
b759d694ee Fixes #13859: Fix valid response when no matching choice values are found 2023-09-26 12:08:05 -04:00
f9ceaad284 #13666: Add is_valid property to Report class 2023-09-26 10:53:38 -04:00
e67624f042 Fixes #13666: Fix behavior for reports without test methods (#13667) 2023-09-26 10:41:09 -04:00
04796a6ac6 Fix creating config template using rest api (#13869)
* Fix creation of extras/config-templates objects using the REST API

* Update serializers.py
2023-09-25 13:33:01 -04:00
f5dd7d853a 13809 fix ConfigRevision edit if custom validators (#13825)
* 13809 fix ConfigRevision edit, check if custom validator JSON serializable

* 13809 check json rendering for all fields

* Refactor field initialization logic to more cleanly handle statically configured values

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-09-20 14:11:25 -04:00
6e4b4a553b 12685 use markdown for custom fields added to form (#13828)
* 12685 use markdown for custom fields added to form

* 13809 change markdown to use utilities

* Add help_text for CustomField description indicating Markdown support

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-09-20 14:06:04 -04:00
8e251ac33c 13757 Fix ConfigContext reference to DeviceType (#13804)
* 13757 do prefetch to work around Django issue with vars in init (DeviceType)

* 13757 use self.__dict to access vars in init

* 13757 change test
2023-09-20 09:56:52 -04:00
9aa7444bf9 Fixes #13782: Fix tag exclusion support for contact assignments 2023-09-18 11:08:49 -04:00
487827c776 13768 fix typo 2023-09-15 09:40:27 -04:00
6939bf8aed Fixes #12219: Ensure dashboard widget heading text has sufficient contrast (#13753)
* Fixes #12219: Ensure dashboard widget heading text has sufficient contrast in both light & dark modes

* Change foreground color for teal background
2023-09-13 10:56:03 -04:00
b7cfb2f7d9 Adds csv dialect detection to bulk import view (#13563)
* adds csv dialect detection to bulk import view #13239

* adds sane delimiters for dialect detection #13239

* adds csv delimiter tests #13239

* adds csv delimiter on the form

* pass delimiter to clean_csv method #13239

* fix tests for csv import #13239

* fix tests for csv import #13239

* fix tests for csv import #13239

* fix tests for csv import #13239

* Improve auto-detection of import data format

* Misc cleanup

* Include tab as a supported delimiting character for auto-detection

* Move delimiting chars to a separate constant for easy reference

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-09-12 16:48:40 -04:00
75b71890a4 Misc i18n cleanup 2023-09-11 15:59:50 -04:00
2d1457b94b Fixes: #13682 - Fix custom field exceptions and validation (#13685)
* Fixes: #13682 - Fix custom field exceptions and validation

* Add tests

* Remove default setting for multi-select/multi-object and return slice of choices and annotate.

* Remove redundant default choice valiadtion; introduce values property on CustomFieldChoiceSet

* Refactor test

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-09-06 10:47:18 -04:00
9d851924c8 13674 fix ReportSerializer (#13688)
* 13674 fix ReportSerializer

* Remove test_methods attr from Report class

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-09-06 08:44:25 -04:00