Commit Graph

878 Commits

Author SHA1 Message Date
Daniel Sheppard
24611f9e2f Fixes: #16039 - Fix row highlighting on device components and VM interfaces (#16044)
* Fix row highlighting

* Minor fix for VMInterfaces

* Move duplicated dicts into inheritable meta class

* Add CableTerminationTable.Meta class for inheritance of the row_attrs to each descendant Meta class.
2024-06-03 08:47:53 -04:00
Jeremy Stretch
a55a2bdaf1 Fixes #16124: Fix GraphQL API support for querying virtual machine interfaces 2024-05-14 09:15:57 -04:00
Jeremy Stretch
5480c96c65 Closes #16070: Set default template for ObjectChildrenView 2024-05-13 15:21:52 -04:00
Jeremy Stretch
47278b7347 Fixes #15995: Permit nullable fields referenced by unique constraints to be omitted from REST API requests 2024-05-07 15:33:14 -04:00
Jeremy Stretch
2914276837 Merge branch 'develop' into feature 2024-04-22 13:23:42 -04:00
Arthur
647449e6bb 15588 set readonly nullable fields as allow_null=True 2024-04-19 16:17:28 -04:00
Florian Derler
a4150a28a5 #15712: add imageattachments to vms 2024-04-19 14:15:50 -04:00
Julio-Oliveira-Encora
80433c90a6 Fixed line 391 in netbox/virtualization/views.py. It was reeplaced "view_virtual_disk" with "view_virtualdisk" 2024-04-15 09:28:21 -04:00
Arthur Hanson
cc979e110f 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
Jeremy Stretch
d85b056a14 Upgrade DRF to v3.15 2024-03-29 13:13:41 -04:00
Arthur Hanson
d166f577e1 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
d636da5f32 Move count_related() & dict_to_filter_params() to utilities.query 2024-03-22 08:59:52 -04:00
Jeremy Stretch
c928756396 Use FieldSet instances for all forms 2024-03-19 13:34:13 -04:00
Jeremy Stretch
521735c400 Merge branch 'develop' into feature 2024-03-15 12:32:54 -04:00
Jeremy Stretch
3a60ea4568 Fixes #15347: Fix querying virtual machine contacts via GraphQL 2024-03-13 19:09:52 -04:00
Jeremy Stretch
bc49f301d2 Declare FilterSet fields as a tuple 2024-03-12 12:08:11 -04:00
Jeremy Stretch
458a80244a Clean up exemption logic 2024-03-11 15:54:35 -04:00
Jeremy Stretch
813ec0c7f3 Add missing filters 2024-03-11 14:39:34 -04:00
Jeremy Stretch
411862a55e Add tests for missing FilterSet filters 2024-03-11 14:39:34 -04:00
Jeremy Stretch
f3c7da2cfb Closes #15291: Add tunnel termination buttons to VM interfaces table 2024-03-08 16:58:04 -05:00
Jeremy Stretch
6372d3be41 Closes #15297: Linkify platform column in device & virtual machine tables 2024-03-08 16:48:39 -05:00
Jeremy Stretch
66cc58e7d0 Add dynamic nesting support to SerializedPKRelatedField 2024-02-27 14:00:42 -05:00
Jeremy Stretch
de0427a45b Refactor REST API serializers to avoid circular imports 2024-02-27 13:26:43 -05:00
Jeremy Stretch
aea8c693f5 Replace nested serializers with primary serializers where possible 2024-02-26 16:49:30 -05:00
Jeremy Stretch
5c2f7fa59c Closes #15238: Include description field in brief mode 2024-02-26 11:39:31 -05:00
Abhimanyu Saharan
ba23a7f31e added display on virtual disk api #15241 2024-02-23 15:33:35 -05:00
Jeremy Stretch
c9a62ed6bd 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
703791326d Merge branch 'develop' into feature 2024-02-21 16:24:23 -05:00
Jeremy Stretch
fd7bccb2d9 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
aee02c168c 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
214c91a78e 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
Jeremy Stretch
c0598e9fc3 Fixes #15070: Fix inclusion of config_template field on REST API serializer for virtual machines 2024-02-08 09:10:24 -05:00
Jeremy Stretch
f76e3ce68c Merge branch 'develop' into feature 2024-02-05 14:38:26 -05:00
Arthur Hanson
83c6cd75b4 15020 Update assigned VMs site when move cluster (#15031)
* 15020 Update assigned VMs site when move cluster

* 15020 call super

* 15020 change to use denormalized
2024-02-05 11:41:33 -05:00
Abhimanyu Saharan
624d3e0c8d fixed typo in cluster bulk edit #14936 2024-01-25 17:24:58 -05:00
Jeremy Stretch
7e3c990c66 Squash migrations 2024-01-25 12:35:04 -05:00
Jeremy Stretch
c0c1c1fc2d Revert "Closes #13647: Squash all migrations prior to v3.7 (#14853)"
This reverts commit 1da6869039.
2024-01-22 13:15:43 -05:00
Jeremy Stretch
5272e9e2db Closes #14740: Remove BootstrapMixin (#14841)
* Introduce custom form widget templates to apply CSS classes

* Apply both mandatory and optional CSS classes to form widgets

* Omit required & placeholder attrs

* Move annotation of field validation failures to CSS

* Remove BootstrapMixin class

* Remove obsolete ComponentTemplateImportForm class

* Remove obsolete custom forms for login & password change

* Clean up obsolete accommodations for 'required' widget attr
2024-01-19 14:02:33 -05:00
Jeremy Stretch
1da6869039 Closes #13647: Squash all migrations prior to v3.7 (#14853)
* Regenerate pre-v3.7 migrations

* Annotate replaced migrations

* Rename dependencies; remove FeatureQuery references

* Add missed replacement
2024-01-19 13:55:22 -05:00
Jeremy Stretch
acd3797e5c Apply filterset & test changes for #14631 & #14629 2023-12-28 14:43:08 -05:00
Jeremy Stretch
0324db1c74 Merge branch 'develop' into feature 2023-12-28 14:20:04 -05:00
Jeremy Stretch
8f452486c3 Closes #14629: Add filter tests for all q and description filters 2023-12-28 13:53:16 -05:00
Jeremy Stretch
5c3c044263 Closes #14631: Ensure description filters are available on all relevant models 2023-12-28 13:53:16 -05:00
Jeremy Stretch
3929e62b83 Closes #14503: Include additional display attributes for search indexers 2023-12-21 14:36:42 -05:00
Jeremy Stretch
c49e4c3797 Merge branch 'develop' into feature 2023-12-15 16:52:42 -05:00
kkthxbye
6d0fdcbc29 Fixes #12751 - Usability improvements for object selector (#14387)
* Usability improvements for object selector:
* Adds preselected filters
* Applies the filter on selection instead of requiring the search button to be pushed

* Declare selector_fields on base form class

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-12-15 16:07:15 -05:00
Jeremy Stretch
c4aed4763e Fixes #14402: Avoid nullifying disk value when editing a VM with disk(s) attached 2023-12-04 10:03:47 -05:00
Jeremy Stretch
bbccc1c743 Merge branch 'develop' into feature 2023-11-29 20:25:44 -05:00
Jeremy Stretch
07d6da7e83 Fixes #14363: Fix bulk editing of interfaces assigned to VM with no cluster 2023-11-29 15:23:35 -05:00
Jeremy Stretch
b62a1210f9 Closes #14311: Move L2VPN models from ipam to vpn (#14358)
* Move L2VPN and L2VPNTermination models from ipam to vpn

* Move L2VPN resources from ipam to vpn

* Extend migration to update content types

* Misc cleanup
2023-11-28 13:45:00 -05:00