Jeremy Stretch
ff7a59db2e
Closes #17752 : Rename URL paths for bulk import to *_bulk_import
2024-11-22 12:51:06 -05:00
Jeremy Stretch
343a4af591
Closes #18022 : Extend linter (ruff) to enforce line length limit (120 chars) ( #18067 )
...
* Enable E501 rule
* Configure ruff formatter
* Reformat migration files to fix line length violations
* Fix various E501 errors
* Move table template code to template_code.py & ignore E501 errors
* Reformat raw SQL
2024-11-21 15:58:11 -05:00
Jeremy Stretch
a0b4b0afe0
Closes #18023 : Employ register_model_view()
for list views ( #18029 )
...
* Extend register_model_view() to enable registering list views
* Register circuits list views with register_model_view()
* Register core list views with register_model_view()
* Fix bulk_edit & bulk_delete URL paths
* Register dcim list views with register_model_view() (WIP)
* Register dcim list views with register_model_view()
* Register extras list views with register_model_view()
* Register ipam list views with register_model_view()
* Register tenancy list views with register_model_view()
* Register users list views with register_model_view()
* Register virtualization list views with register_model_view()
* Register vpn list views with register_model_view()
* Register wireless list views with register_model_view()
* Add change note for register_model_view()
2024-11-20 15:54:37 -05:00
Jeremy Stretch
b4f15092db
Closes #5858 : Implement a quick-add UI widget for related objects ( #18016 )
...
* WIP
* Misc cleanup
* Add warning re: nested quick-adds
2024-11-18 14:44:57 -05:00
Arthur Hanson
6ab0792f02
Closes #11279 : Replace _name
natural key sorting with collation ( #18009 )
...
* 11279 add collation
* 11279 add collation
* 11279 add collation
* 11279 add collation
* 11279 fix tables /tests
* 11279 fix tests
* 11279 refactor VirtualDisk
* Clean up migrations
* Misc cleanup
* Correct errant file inclusion
---------
Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-11-15 09:32:09 -05:00
Jeremy Stretch
19c5c32965
Merge branch 'develop' into feature
2024-10-30 13:10:47 -04:00
Jeremy Stretch
1e5f79a8ed
Fixes #17884 : Fix translation support for certain tab headings
2024-10-30 08:48:37 -04:00
Jeremy Stretch
ef1fdf0a01
Closes #17761 : Store empty CharField choices as null
2024-10-21 13:12:05 -04:00
Jeremy Stretch
c78da79ce6
Merge branch 'develop' into feature
2024-10-18 13:18:11 -04:00
Jeremy Stretch
a8ec06687a
Reomove obsolete nested serializers
2024-10-18 08:16:30 -04:00
corubba
532dbabbab
Fixes #17749 : Add missing graphql fields
2024-10-16 13:40:38 -04:00
Jeremy Stretch
727de0fb59
Remove unused imports
2024-10-11 12:27:39 -04:00
Jeremy Stretch
256b5dc676
Merge branch 'develop' into feature
2024-10-11 11:29:36 -04:00
Jeremy Stretch
7ac6dff96d
Closes #17733 : Replace pycodestyle
with ruff
( #17734 )
...
* Resolve F541 errors
* Resolve F841 errors
* Resolve F811 errors
* Resolve F901 errors
* Resolve E714 errors
* Ignore F821 errors for GraphQL mixins
* Replace pycodestyle with ruff
* Move ignores to ruff.toml
2024-10-11 07:43:46 -04:00
Jeremy Stretch
e59f776e02
Closes #17725 : Clean up import
statements ( #17728 )
...
* #17725 : Resolve all F401 errors
* Tweak noqa designation
2024-10-10 14:52:47 -04:00
Arthur Hanson
ed1327eeb7
16546 define get_absolute_url method in NetBoxModel ( #17693 )
...
* 16546 define get_absolute_url method in NetBoxModel
* 16546 define get_absolute_url method in NetBoxModel
* 16546 define get_absolute_url method in NetBoxModel
* 16546 move get_absolute_url to NetBoxFeatureSet
* 16546 fix CircuitTermination
* Fix linebreaks
---------
Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-10-10 09:59:19 -04:00
Jeremy Stretch
a777850702
Merge branch 'develop' into feature
2024-09-03 11:59:59 -04:00
Daniel Sheppard
4fead1c85f
Fixes : #17310 - Properly restrict GraphQL related object queries ( #17312 )
...
* Fixes : #17310 - Fix GraphQL restriction of related objects
* Fix some failing tests
* Fix test
2024-08-30 14:22:58 -04:00
Jeremy Stretch
6f7bf5baf4
Merge branch 'develop' into feature
2024-08-29 10:51:38 -04:00
Daniel Sheppard
0464dacf7e
Fixes : #16292 - Properly restrict GraphQL queries for querys with pk set ( #17244 )
...
* Fixes : #16292 - Properly restrict GraphQL queries for querys with pk set
* Update netbox/netbox/settings.py
* Apply schema adaptations across all apps
* Extend GraphQL API tests
---------
Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-08-28 12:23:25 -04:00
bctiemann
8903e4649c
Fixes : #17072 - Make active links of phone and email in Contact Assignments table ( #17233 )
...
* Add linkify_email and apply with linkify_phone to ContactAssignmentTable
* Use EmailColumn instead of linkify_email
2024-08-22 10:57:53 -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
02ae91589d
Merge branch 'develop' into feature
2024-07-09 15:16:05 -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
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
Arthur Hanson
52546608f6
15156 Add display_url to REST API ( #16412 )
...
* 15156 add display_url to REST API
* 15156 fix view name
* 15156 fix typo
* 15156 fix tests
* 15156 add url display_url to base class
* 15156 add url display_url to base class
* 15156 add url display_url to base class
* 15156 review changes
* 15156 review changes
* 15156 review changes
* 15156 review changes
* 15156 remove bogus code
* 15156 remove bogus code
* 15156 review changes
* 15156 review changes
* 15156 review changes
---------
Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-06-25 09:59:58 -04:00
Alexander Haase
5353f83710
15794 Make "related objects" dynamic ( #15876 )
...
* Closes #15794 : Make "related objects" dynamic
Instead of hardcoding relationships between models for the detail view,
they are now dynamically generated.
* Fix related models call
* Remove extra related models hook
Instead of providing a rarely used hook method, additional related
models can now be passed directly to the lookup method.
* Fix relations view for ASNs
ASNs have ManyToMany relationships and therefore can't used automatic
resolving. Explicit relations have been restored as before.
* Add method call keywords for clarification
* Cleanup related models
---------
Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-06-12 09:46:41 -04:00
Arthur Hanson
97a37576fc
14953 fix serializers when using add_related_count ( #16158 )
...
* 14953 fix serializers when using add_related_count
* 14953 update comments
* Set default=0 for annotated count fields
---------
Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-05-17 15:50:39 -04:00
Jeremy Stretch
4d40699f2c
Fixes #15995 : Permit nullable fields referenced by unique constraints to be omitted from REST API requests
2024-05-07 15:33:14 -04:00
Arthur Hanson
8767577ecd
15553 change graphql sub-queries from functions to types ( #15557 )
...
* 15553 change graphql list to types
* 15553 review changes
2024-03-29 14:54:31 -04:00
Arthur Hanson
45c99e4477
9856 Replace graphene with Strawberry ( #15141 )
...
* 9856 base strawberry integration
* 9856 user and group
* 9856 user and circuits base
* 9856 extras and mixins
* 9856 fk
* 9856 update strawberry version
* 9856 update imports
* 9856 compatability fixes
* 9856 compatability fixes
* 9856 update strawberry types
* 9856 update strawberry types
* 9856 core schema
* 9856 dcim schema
* 9856 extras schema
* 9856 ipam and tenant schema
* 9856 virtualization, vpn, wireless schema
* 9856 fix old decorator
* 9856 cleanup
* 9856 cleanup
* 9856 fixes to circuits type specifiers
* 9856 fixes to circuits type specifiers
* 9856 update types
* 9856 GFK working
* 9856 GFK working
* 9856 _name
* 9856 misc fixes
* 9856 type updates
* 9856 _name to types
* 9856 update types
* 9856 update types
* 9856 update types
* 9856 update types
* 9856 update types
* 9856 update types
* 9856 update types
* 9856 update types
* 9856 update types
* 9856 GraphQLView
* 9856 GraphQLView
* 9856 fix OrganizationalObjectType
* 9856 single item query for schema
* 9856 circuits graphql tests working
* 9856 test fixes
* 9856 test fixes
* 9856 test fixes
* 9856 test fix vpn
* 9856 test fixes
* 9856 test fixes
* 9856 test fixes
* 9856 circuits test sans DjangoModelType
* 9856 core test sans DjangoModelType
* 9856 temp checkin
* 9856 fix extas FK
* 9856 fix tenancy FK
* 9856 fix virtualization FK
* 9856 fix vpn FK
* 9856 fix wireless FK
* 9856 fix ipam FK
* 9856 fix partial dcim FK
* 9856 fix dcim FK
* 9856 fix virtualization FK
* 9856 fix tests / remove debug code
* 9856 fix test imagefield
* 9856 cleanup graphene
* 9856 fix plugin schema
* 9856 fix requirements
* 9856 fix requirements
* 9856 fix docs
* 9856 fix docs
* 9856 temp fix tests
* 9856 first filterset
* 9856 first filterset
* 9856 fix tests
* 9856 fix tests
* 9856 working auto filter generation
* 9856 filter types
* 9856 filter types
* 9856 filter types
* 9856 fix graphiql test
* 9856 fix counter fields and merge feature
* 9856 temp fix tests
* 9856 fix tests
* 9856 fix tenancy, ipam filter definitions
* 9856 cleanup
* 9856 cleanup
* 9856 cleanup
* 9856 review changes
* 9856 review changes
* 9856 review changes
* 9856 fix base-requirements
* 9856 add wrapper to graphiql
* 9856 remove old graphiql debug toolbar
* 9856 review changes
* 9856 update strawberry
* 9856 remove superfluous check
---------
Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-03-22 12:56:30 -04:00
Jeremy Stretch
eb3aa7cb36
Move utilities.utils.get_related_models() to utilities.relations
2024-03-22 08:59:52 -04:00
Jeremy Stretch
ae8df77cc8
Move count_related() & dict_to_filter_params() to utilities.query
2024-03-22 08:59:52 -04:00
Jeremy Stretch
72d3c17b48
Use FieldSet instances for all forms
2024-03-19 13:34:13 -04:00
Jeremy Stretch
8f03a19b5f
Introduce ObjectAttribute for displaying read-only instance attributes on forms
2024-03-19 13:34:13 -04:00
Jeremy Stretch
bea32aef71
Declare FilterSet fields as a tuple
2024-03-12 12:08:11 -04:00
Jeremy Stretch
d6acc18c29
Closes #15383 : Standardize filtering logic for the parents of recursively-nested models
2024-03-11 13:27:57 -04:00
Jeremy Stretch
6f6d483ca5
Merge branch 'feature' into 15277-object-types
2024-03-05 08:52:07 -05:00
Jeremy Stretch
0419a69ae8
Clean up outdated references to ContentType
2024-03-04 10:46:34 -05:00
Jeremy Stretch
5f43eabab1
Rename ContactAssignment.content_type to object_type
2024-03-04 08:33:44 -05:00
Jeremy Stretch
e0165539b3
Rename ImageAttachment.content_type to object_type
2024-03-04 08:33:44 -05:00
Jeremy Stretch
0df68bf291
Rename ContentType proxy model to ObjectType
2024-03-04 08:33:44 -05:00
Jeremy Stretch
78e284c14f
Initialize dynamically-resolved serializers with nested=True
2024-02-27 14:56:36 -05:00
Jeremy Stretch
c382ba0ae0
Refactor REST API serializers to avoid circular imports
2024-02-27 13:26:43 -05:00
Jeremy Stretch
c146f5e1b5
Replace nested serializers with primary serializers where possible
2024-02-26 16:49:30 -05:00
Jeremy Stretch
d042e6f69d
Closes #15238 : Include description field in brief mode
2024-02-26 11:39:31 -05:00
Jeremy Stretch
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
Jeremy Stretch
5f159795dd
Closes #15042 : Move model registration logic to AppConfigs ( #15203 )
...
* Closes #15042 : Move model registration logic to AppConfigs
* Refactor register_model() to accept multiple models
2024-02-21 14:22:13 -05:00
Jeremy Stretch
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
Jeremy Stretch
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