6f6d483ca5
Merge branch 'feature' into 15277-object-types
2024-03-05 08:52:07 -05:00
5f43eabab1
Rename ContactAssignment.content_type to object_type
2024-03-04 08:33:44 -05:00
78e284c14f
Initialize dynamically-resolved serializers with nested=True
2024-02-27 14:56:36 -05:00
c382ba0ae0
Refactor REST API serializers to avoid circular imports
2024-02-27 13:26:43 -05:00
c146f5e1b5
Replace nested serializers with primary serializers where possible
2024-02-26 16:49:30 -05:00
d042e6f69d
Closes #15238 : Include description field in brief mode
2024-02-26 11:39:31 -05:00
3f3bcc5eb5
Closes #15235 : Use primary serializers for REST API "brief" mode ( #15246 )
...
* Use primary serializers for brief mode
* Remove BriefModeMixin
* Correct ModuleBayTest brief_fields (see #15243 )
2024-02-23 14:21:25 -05:00
7abb2b2ab5
Closes #15131 : Dynamic queryset annotations for REST API endpoints ( #15152 )
...
* Introduce RelatedObjectCountField
* Introduce get_annotations_for_serializer() and enable dynamic annotations
* Add RelatedObjectCountFields to serializers; remove static annotations from querysets
* Remove annotations cleanup logic from BriefModeMixin
* Annotate type for RelatedObjectCountField
* Remove redundant field on TagSerializer
* Add missing reverse relationship for power feeds to rack
* Refactor RelatedObjectCountField to take a single relationship name
2024-02-15 14:49:27 -05:00
b3f25a400b
Closes #15087 : Support for specifying a subset of API serializer fields ( #15122 )
...
* Enable dynamic field inclusion for REST API serializers
* Recurse through nested serializer when resolving prefetches
* Remove obsolete calls to prefetch_related() for API views
* Remove support for brief_prefetch_fields viewset attribute
* Rename query parameter
* Fixes #15133 : Fix FHRP group representation on assignments endpoint under brief mode (#15134 )
* Fixes #15133 : Fix FHRP group representation on assignments endpoint under brief mode
* Update API test
* Restore get_queryset() on BriefModeMixin, minus prefetch logic
* get_prefetches_for_serializer() should reference serializer field source if set
2024-02-14 09:28:37 -05:00
5de2dea8a6
Fixes #14816 : Ensure default contact assignment ordering is consistent
2024-01-17 13:29:04 -05:00
2562c8745c
Closes #14156 : Add custom field support for contact assignments
2023-11-09 16:10:14 -05:00
d77d45e795
12336 make region API calls atomic ( #13942 )
...
* 12336 make region API calls atomic
* 12336 switch to pg locks
* 12336 add locks to all views using mptt models
* 12336 fix ADVISORY_LOCK_KEYS reference
* 12336 review changes
* Tweak advisory lock numbering
---------
Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-10-17 10:35:01 -04:00
cbf4b43b35
Adds tags on contact assignment ( #13328 )
...
* adds tags on contact assignments #12882
* updated migration
* added tags on import form
* adds TagsMixin on ContactAssignmentType #12882
* Misc cleanup
---------
Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-08-01 11:52:14 -04:00
ecd0c56554
Closes #9608 : Move from drf-yasg to spectacular
...
Co-authored-by: arthanson <worldnomad@gmail.com>
Co-authored-by: jeremystretch <jstretch@netboxlabs.com>
2023-03-30 14:32:59 -04:00
bc6b5bc4be
Closes #10545 : Standardize description & comment fields on primary models ( #10834 )
...
* Standardize description & comments fields on primary models
* Update REST API serializers
* Update forms
* Update tables
* Update templates
2022-11-04 08:28:09 -04:00
0b5478ad2d
Fixes #9895 : Change DictField serializers to JSONField
2022-08-29 08:02:38 +02:00
abf11fbcb8
Merge branch 'develop' into feature
2022-07-20 12:20:33 -04:00
e07dd3ddcb
Define NESTED_SERIALIZER_PREFIX constant
2022-07-15 15:31:42 -04:00
3eb6b6c07f
Clean up core API imports
2022-07-13 16:18:55 -04:00
422ec7ecec
Fixes #9311 : Permit creating contact assignment without a priority via the REST API
2022-05-06 09:25:40 -04:00
cdacd2a951
Closes #8593 : Add link field to contact model
2022-03-30 16:19:12 -04:00
59aba52b03
Rename OrderedDefaultRouter to NetBoxRouter & document for plugins
2022-03-11 15:59:03 -05:00
bbdeae0ed9
Move CustomFieldModelViewSet functionality into NetBoxModelViewSet
2022-03-09 11:44:55 -05:00
a11abf87ec
Refactor API serializers
2022-03-09 10:59:22 -05:00
5a4fb0323b
Merge pull request #8286 from jasonyates/8285-cluster-count-tenant
...
Fixes #8285 tenant cluster count
2022-01-10 08:34:02 -05:00
e84a282aa6
Revert REST API changes from #8284
2022-01-10 08:24:45 -05:00
184b1055dc
Fixes #8285 - Cluster count missing from tenant api output
2022-01-07 20:17:43 +00:00
eaec25e6c2
Fixes #8262 - Add Cable stat for Tenant
2022-01-07 20:02:45 +00:00
bfc1cab6df
Fixes #8051 : Contact group parent assignment should not be required under REST API
2021-12-13 08:22:48 -05:00
2ce8ef5704
Fixes #7771 : Group assignment should be optional when creating contacts via REST API
2021-11-08 08:34:10 -05:00
ff3edc9889
Add NestedContactAssignmentSerializer; add contact assignment API tests
2021-11-04 11:55:00 -04:00
8bb9f4b8a2
#1344 : Add missing object field to ContactAssignmentSerializer
2021-11-03 16:27:43 -04:00
cfb3897047
Add tags to organizational & nested group models
2021-10-21 10:51:02 -04:00
487d67768b
Cleanup and documentation for #1344
2021-10-18 16:20:31 -04:00
2e78568d4d
Initial work on contacts
2021-10-18 13:59:05 -04:00
1024782b9e
Rename FilterSet modules
2021-04-29 16:48:24 -04:00
fb48c1f6dd
Add 'display' field to all REST API serializers
2021-03-16 10:06:25 -04:00
fca5accba8
Clean up base serializers
2021-03-12 13:31:28 -05:00
12fbd34962
Introduce NestedGroupModelSerializer
2021-02-25 17:15:42 -05:00
664a39911c
Add custom field support for organizational models to API serializers
2021-02-25 15:58:13 -05:00
fa3199d41c
Update serializers.py
...
Group should be nullable via API to match frontend functionality and Swagger documentation.
2021-02-11 11:49:57 +13:00
4a066a1913
Rename get_subquery() to count_related()
2020-12-17 14:47:49 -05:00
91083fd6c5
Call Coalesce() inside get_queryset()
2020-12-17 14:45:50 -05:00
3c2b2f26b9
Fixes : #5450 - Added Coalesce to viewsets for the _count functions
2020-12-15 12:50:28 -06:00
c0c5f52ed9
Reorganize REST API components under netbox app
2020-10-13 15:57:21 -04:00
fd139a77f5
Closes #4997 : Introduce OrderedDefaultRouter; move root API views to views.py
2020-08-13 12:49:49 -04:00
0f679e1f03
Closes #4871 : Specify ordering for querysets using annotate() to count related objects
2020-07-20 12:07:19 -04:00
15525392a2
Closes #4837 : Use dynamic form widget for relationships to MPTT objects
2020-07-09 09:50:01 -04:00
924f319343
Closes #4806 : Add a url field to all API serializers
2020-07-06 16:41:08 -04:00
448dc1442c
Replace TaggitSerializer and TagListSerializerField with TaggedObjectSerializer
2020-06-17 09:57:17 -04:00