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

88 Commits

Author SHA1 Message Date
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
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
0bb86f1e7d Replaces device_role with role on device model (#13342)
* replaces device_role with role on device model #6391

* fixes lint issue #6391

* revert the database user

* revert test_runner comment

* changes as per review

* Update references to device_role column in UserConfigs

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-08-02 09:55:52 -04:00
cf1b1a83eb Closes #12194: Add pre-defined custom field choices (#13219)
* Initial work on custom field choice sets

* Rename choices to extra_choices (prep for #12194)

* Remove CustomField.choices

* Add & update tests

* Clean up table columns

* Add order_alphanetically boolean for choice sets

* Introduce ArrayColumn for choice lists

* Show dependent custom fields on choice set view

* Update custom fields documentation

* Introduce ArrayWidget for more convenient editing of choices

* Incorporate PR feedback

* Misc cleanup

* Initial work on predefined choices for custom fields

* Misc cleanup

* Add IATA airport codes

* #13241: Add support for custom field choice labels

* Restore ArrayColumn

* Misc cleanup

* Change extra_choices back to a nested ArrayField to preserve choice ordering

* Hack to bypass GraphQL API test utility absent support for nested ArrayFields
2023-07-28 11:24:21 -04:00
96ea0ac9c7 Closes #12988: Introduce custom field choice sets (#13195)
* Initial work on custom field choice sets

* Rename choices to extra_choices (prep for #12194)

* Remove CustomField.choices

* Add & update tests

* Clean up table columns

* Add order_alphanetically boolean for choice sets

* Introduce ArrayColumn for choice lists

* Show dependent custom fields on choice set view

* Update custom fields documentation

* Introduce ArrayWidget for more convenient editing of choices

* Incorporate PR feedback

* Misc cleanup
2023-07-19 10:26:24 -04:00
837be4d45f Merge branch 'develop' into feature 2023-07-11 10:09:26 -04:00
63ba9fb38c Fixes #11335: Default manager for ObjectChange should filter by installed apps (#11709)
* Fixes #11335: Default manager for ObjectChange should filter by installed apps

* Employ canonical model discovery mechanism

* Move filtering logic to valid_models() queryset method

* fixed import to avoid content type does not exist

* Cleanup

---------

Co-authored-by: Abhimanyu Saharan <desk.abhimanyu@gmail.com>
2023-07-05 11:39:35 -04:00
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
518fd8cca6 12794 change User ref to get_user_model (#12905)
* 12794 change User ref to get_user_model

* 12794 call get_user_model once in tests

* 12794 call get_user_model once in tests

* 12794 use settings.AUTH_USER_MODEL for FK reference
2023-06-22 08:26:50 -04:00
59a6b3e71b Merge branch 'develop' into feature 2023-04-12 17:38:16 -04:00
46d7bf02ac Add tests for ConfigTemplate 2023-04-11 15:25:48 -04:00
278f2b173a Fixes #11431 - Disallow changing customfield type after creation (#11449)
* Disallow changing customfield type after creation

* Fix test_api.CustomFieldTest

---------

Co-authored-by: kkthxbye-code <>
2023-04-10 10:13:08 -04:00
08017c51f6 Merge branch 'develop' into feature 2023-04-07 13:00:00 -04:00
2bf9acfb19 Closes #12193: Clean up tests (#12197)
* Fix skipped API tests

* Remove invalid tests

* Correct logger name
2023-04-06 16:35:27 -04:00
d2a694a878 Closes #12068: Establish a direct relationship from jobs to objects (#12075)
* Reference database object by GFK when running scripts & reports via UI

* Reference database object by GFK when running scripts & reports via API

* Remove old enqueue_job() method

* Enable filtering jobs by object

* Introduce ObjectJobsView

* Add tabbed views for report & script jobs

* Add object_id to JobSerializer

* Move generic relation to JobsMixin

* Clean up old naming
2023-03-28 15:47:09 -04:00
55b1549895 Closes #10762: Permit selection custom fields to have only one choice 2023-01-25 10:27:05 -05:00
fb3d1ef399 Check for the extras.run_script permission when running scripts via. the API 2023-01-17 10:13:18 -05:00
d4a231585a Clean up tests 2022-11-17 10:50:05 -05:00
355678274d #9623: Add slug field to SavedFilter 2022-11-15 10:44:12 -05:00
484efdaf75 Closes #9623: Implement saved filters (#10801)
* Initial work on saved filters

* Return only enabled/shared filters

* Add tests

* Clean up filtering of usable SavedFilters
2022-11-02 12:27:53 -04:00
16919cc1d9 Closes #10761: Enable associating an export template with multiple object types 2022-10-26 13:30:45 -04:00
9e8234bb45 Closes #8274: Enable associating a custom link with multiple object types 2022-10-26 11:39:26 -04:00
478eefb74c Merge v3.1.7 2022-02-03 12:55:34 -05:00
3bb7184f28 Fixes #8499: Content types REST API endpoint should not require model permission 2022-02-01 15:14:13 -05:00
72e17914e2 Closes #8296: Allow disabling custom links 2022-01-10 12:11:37 -05:00
e6091ee0c9 Consolidate GraphQLTestCase into APIViewTestCase 2021-06-30 10:07:33 -04:00
7256c7050a Add GraphQL for extras 2021-06-25 14:12:09 -04:00
f2c079de87 Add JournalEntry tests 2021-03-16 16:47:35 -04:00
fb48c1f6dd Add 'display' field to all REST API serializers 2021-03-16 10:06:25 -04:00
6ffadb501b Closes #5610: Add REST API endpoint for webhooks 2021-03-09 09:22:58 -05:00
38ded66c4e Closes #5608: Add REST API endpoint for custom links 2021-03-08 20:57:44 -05:00
fdb3e3f9a4 Closes #5895: Rename RackGroup to Location 2021-03-03 13:30:33 -05:00
98f2d2501b Add REST API test for custom fields 2020-11-23 16:01:51 -05:00
0567f0d190 Merge branch 'develop' into develop-2.10 2020-11-09 20:58:59 -05:00
ab33b3aa84 Fixes #5328: Fix CreatedUpdatedFilterTest when running in non-UTC timezone 2020-11-09 16:04:09 -05:00
3df3706f27 Closes #5190: Add a REST API endpoint for content types 2020-10-09 15:08:29 -04:00
38ed612cb9 Add test for API bulk updates 2020-09-22 13:50:55 -04:00
ec66e1a5c0 Closes #4349: Drop support for embedded graphs 2020-08-21 11:57:46 -04:00
a206b422fb Fixes #4912: Fix image attachment API endpoint; add API view tests 2020-07-27 14:24:15 -04:00
d5a5a4a8d1 Skip report/script execution tests if RQ worker is not running 2020-07-13 16:48:44 -04:00
e02936a44a Fix reports API test case 2020-07-06 11:15:20 -04:00
f092c107b5 PR review updates 2020-07-06 02:00:16 -04:00
f48a079ae6 fix tests and cleanup 2020-06-29 14:34:42 -04:00
bb755daf8b Update tests 2020-06-17 11:14:41 -04:00
a8145fe4c2 Add permission assignment to custom test methods 2020-06-08 13:40:46 -04:00
4f830c9c22 Fix list_brief tests 2020-06-05 16:09:55 -04:00
665646707c Standardize extras API tests 2020-06-05 13:41:54 -04:00
901143b72a Merge branch 'develop' into develop-2.8 2020-03-16 12:17:00 -04:00
9a38586e13 rename FeatureQuery class 2020-03-16 11:58:35 -04:00