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

354 Commits

Author SHA1 Message Date
d9949b2de1 Update API test for Group model 2024-04-02 16:33:12 -04:00
53ff85df21 Prevent the stock Django Group model from appearing in the admin UI (if enabled) 2024-04-02 15:48:40 -04:00
8b8d63db2e Include description field on Group serializer 2024-04-02 15:41:44 -04:00
abc949a015 Refactor models under users app 2024-04-02 15:06:05 -04:00
fb129579c1 #12795: Complete support for description field on custom Group model 2024-04-02 14:44:26 -04:00
f0291aa60f Fix ordering of Groups 2024-04-02 08:31:53 -04:00
c8d9d9358e Closes #15464: Move permission assignments to user & group models (#15554)
* Move user & group M2M assignments for ObjectPermission

* Restore users & groups fields on ObjectPermission serializer
2024-03-29 14:57:16 -04:00
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
744be59a4d Closes #14736: Enable HTMX navigation globally (#15158)
* Enable HTMX boosting

* Refactor HTMX properties for tables

* Fix dashboard object list widget

* Disable scrolling to page content

* Fix initialization of TomSelect dropdowns after HTMX loading

* Replace formaction properties with hx-post

* Fix quick search field on object list view

* Reinitialize copy-to-clipboard buttons upon HTMX load

* Disable scrolling effect for intra-page navigation

* Introduce user preference for toggling HTMX navigation

* Enable HTMX navigation only when selected by user

* Pass htmx_navigation context

* Fix display of confirmation form when deleting an object

* Disable HTMX boosting for rack elevation SVG downloads

* Fix dyanmic form rendering

* Introduce htmx_boost template tag; enable HTMX for user menu

* Use out-of-band sap to update footer stamp

* Fix display of toasts after form submission

* Fix user preference selection

* Misc cleanup

* Rename render_partial() to htmx_partial()

* Add docstring to htmx_boost template tag

* Disable HTMX for user preferences form to force a full page refresh on changes
2024-03-28 11:51:38 -04:00
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
81ca455fef Move array_to_range(), array_to_string(), deepmerge(), drange(), flatten_dict(), and shallow_compare_dict() to utilities.data 2024-03-22 08:59:52 -04:00
72d3c17b48 Use FieldSet instances for all forms 2024-03-19 13:34:13 -04:00
313e63622b Extend logic for validating filter class 2024-03-11 15:35:40 -04:00
b36a70d236 Add missing filters for reverse many-to-many relationships 2024-03-11 14:39:34 -04:00
6085e0bb0b Test for missing ManyToManyField filters 2024-03-11 14:39:34 -04:00
5cb7af88d4 Fix remaining tests 2024-03-11 14:39:34 -04:00
16b422cbac Add missing filters 2024-03-11 14:39:34 -04:00
6af12b1814 Add tests for missing FilterSet filters 2024-03-11 14:39:34 -04:00
21de3f954f #15357: Rename CustomField object_type to related_object_type 2024-03-11 11:49:04 -04:00
6f6d483ca5 Merge branch 'feature' into 15277-object-types 2024-03-05 08:52:07 -05:00
cd74e040c1 Merge branch 'feature' into 15278-primary-nested-serializers 2024-03-04 16:42:36 -05:00
0419a69ae8 Clean up outdated references to ContentType 2024-03-04 10:46:34 -05:00
01ee9c87b8 Update ObjectPermission.object_types to reference ObjectType 2024-03-04 09:52:45 -05:00
0df68bf291 Rename ContentType proxy model to ObjectType 2024-03-04 08:33:44 -05:00
c6a3fc2407 #12795: Introduce a custom Group model (#15304)
* Rename sequences & indexes after renaming users table

* Migrate from auth.Group to a custom group model

* Delete original groups from auth_group table

* Update object & multi-object custom fields referencing the Group model

* Fix ContentType resolution

* Clean up obsolete logic for view/serializer resolution
2024-03-04 08:29:53 -05:00
ca56c8b9ef Add dynamic nesting support to SerializedPKRelatedField 2024-02-27 14:00:42 -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
ca2ee436a0 Closes #14438: Database representation of scripts
- Introduces the Script model to represent individual Python classes within a ScriptModule file
- Automatically migrates jobs & event rules

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-02-23 08:27:37 -05:00
3ddacf4b88 Merge branch 'develop' into feature 2024-02-21 16:24:23 -05:00
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
cf3969bc6c Added Last Login to user/profile GUI views and the /users/user API output (#15198)
* Added Last Login to user/profile GUI and user api output

* Update netbox/templates/account/profile.html

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>

* Update netbox/templates/account/profile.html

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>

* Update netbox/templates/users/user.html

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-02-20 15:43:49 -05:00
50e5bb9717 added validation error for script and report constraint #15174 2024-02-20 14:15: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
1f800a975f Fixes #15115: Fix unhandled exception with invalid permission constraints 2024-02-13 09:55:07 -05:00
d63e1dacbf Closes #14917: Replace slim-select with tom-select (#15080)
* Experimenting

* Remove testing resources

* Replace ApiSelect with TomSelect

* Add color support

* Add clear button

* Clear cached options when searching dynamic selects

* Add support for static parameters

* Refactor TomSelect implementation

* Add dynamic parameter support

* Limit number of options to 100

* Remove redundant api_url definitions for user model

* Add support for disabled indicator

* Remove obsolete value-field attr on dynamic select widgets

* Remove obsolete fetch_trigger kwarg from dynamic model choice widgets

* Remove obsolete empty_label kwarg from dynamic model choice widgets

* Add support for API path variables

* Add support for setting a 'null' option

* Annotate depth for recursive hierarchies

* Misc cleanup

* Remove obsolete APISelect code

* Remove slim-select & just-debounce-it

* Clean up type validation

* Closes #14237: Clear child selections on change to parent selection

* Use an MD icon for the clear button

* Use an MD icon for the clear button

* Explain why noUnusedParameters is disabled
2024-02-08 15:07:04 -05:00
317bef6796 12795 custom user model (#15005)
* 12795 users.User migration

* 12795 users.User migration

* 12795 review changes

* 12795 fix user model registration

* 12795 fix user model registration

* 12795 update migration

* 12795 update migration

* 12795 update migration

* 12795 add comment to migration db_table

* Tweak import to avoid class name collision

* 12795 add comment for _register_features requirement

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-02-05 13:24:03 -05:00
b554e70eda Squash migrations 2024-01-25 12:35:04 -05:00
222388b988 Revert "Closes #13647: Squash all migrations prior to v3.7 (#14853)"
This reverts commit 874685fd6f6b463e68fd2eef4711aa6765371a17.
2024-01-22 13:15:43 -05:00
da085e60c2 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
874685fd6f 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
8e20581da7 PEP8 cleanup 2024-01-05 13:08:37 -05:00
d5c1cb0ef6 Merge branch 'develop' into feature 2023-12-28 14:20:04 -05:00
3ef2db81e8 Closes #14629: Add filter tests for all q and description filters 2023-12-28 13:53:16 -05:00
326b54b7e0 Closes #14579: Add user language preference 2023-12-21 14:27:52 -05:00
25e67eb555 Merge branch 'develop' into feature 2023-12-15 16:52:42 -05:00
8a4233aca1 Update create_userconfig to receive signals from NetBoxUser model in addition to User model. 2023-12-14 17:07:57 -05:00
b83fcc6077 Merge branch 'develop' into feature 2023-11-29 20:25:44 -05:00