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

142 Commits

Author SHA1 Message Date
8e1c2ecd92 Closes #15915: Replace plugins list with an overall system status view (#15950)
* Replace plugins list with an overall system status view

* Enable export of system status data
2024-05-03 17:26:19 -04:00
46bd62fdc9 Merge branch 'develop' into feature 2024-04-22 13:23:42 -04:00
b6e38b2ebe Closes #14690: Pretty-format JSON fields in the config form (#15623)
* Closes #14690: Pretty-format JSON fields in the config form

* Revert changes

* Use our own JSONField for config parameters for pretty editor outputs

* Compare identity instead of equality
2024-04-22 09:25:16 -04:00
77a4300888 Closes #15618: Always use ISO 8601 date & time formatting (#15737)
* Introduce the isodate(), isotime(), and isodatetime() template filters

* Display the relative time on mouse hover

* Render journal entry times in ISO 8601 format

* Use ISO 8601 format when displaying dates & times in a table

* Standardize the use of DateTimeColumn across all tables
2024-04-17 11:46:47 -04:00
b8cedfcc08 15582 check permissions on specific object when sync request (#15704)
* 15582 check permissions on specific object when sync request

* 15582 move permission check

* Enable translation of error message

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-04-17 10:09:50 -04:00
c5ae89ad03 Use endpoint_url in S3Backend 2024-04-17 09:59:39 -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
eaa3bc6576 Fixes #15570: Remove omission of M2M relations when generating writable serializers for OpenAPI schema 2024-03-28 16:17:12 -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
0cff4c9795 14799 Fix sync of scripts from data source (#15303)
* 14799 fix script creation from data-source

* 14799 dont cache module_scripts

* 14799 fix sync_classes call
2024-03-26 08:36:36 -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
ae8df77cc8 Move count_related() & dict_to_filter_params() to utilities.query 2024-03-22 08:59:52 -04:00
d924eaf4da Remove the sha256_hash() utility function 2024-03-22 08:59:52 -04:00
72d3c17b48 Use FieldSet instances for all forms 2024-03-19 13:34:13 -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
6f6d483ca5 Merge branch 'feature' into 15277-object-types 2024-03-05 08:52:07 -05:00
0df68bf291 Rename ContentType proxy model to ObjectType 2024-03-04 08:33:44 -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
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
9b9afdcf79 15192 fix config revision if no revisions 2024-02-20 14:28:04 -05:00
af27bf5eff 15094 Add missing gettext to error strings for internationalization (#15155)
* 15049 add missing gettext to error strings

* 15049 add missing gettext to error strings

* 15094 review change

* 15094 review change

* Formatting cleanup

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-02-20 09:44:02 -05:00
2e74952ac6 added missing import #15058 2024-02-16 01:20:54 +05:30
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
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
74e67afa41 Merge branch 'develop' into feature 2024-02-05 14:38:26 -05:00
fde9c1664a Closes #13729: Censor sensitive data source parameters in change log (#15032) 2024-02-05 11:35:12 -05:00
93b77cb4f0 14729 Move background tasks list from admin UI to Primary UI (#14825)
* 14729 rq table

* 14729 rq table

* 14729 rq table

* 14729 rq table

* 14729 jobs table

* 14729 jobs detail

* 14729 formatting fixup

* 14729 formatting fixup

* 14729 format datetime in tables

* 14729 display job id

* Update templates for #12128

* 14729 review fixes

* 14729 review fixes

* 14729 review fixes

* 14729 review fixes

* 14729 merge feature

* 14729 add modal

* 14729 review changes

* 14729 url fixup

* 14729 no queue param on task

* 14729 queue pages

* 14729 job status handling

* 14729 worker list

* 14729 exec detail and common view

* 14729 worker detail

* 14729 background task delete

* 14729 background task delete

* 14729 background task requeue

* 14729 background task enqueue stop

* 14729 review changes

* 14729 remove rq from admin

* 14729 add tests

* 14729 add tests

* Clean up HTML templates

* Clean up tables

* Clean up views

* Fix tests

* Clean up tests

* Move navigation menu entry for background tasks

* Remove custom deletion form

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-02-01 11:44:07 -05:00
b554e70eda Squash migrations 2024-01-25 12:35:04 -05:00
441e24bca7 Fixes #14934: Correct typo in label 2024-01-25 12:20:21 -05:00
cd8e977418 Fixes #14879: Include custom fields in REST API representation of data sources 2024-01-22 15:54:26 -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
1651a307c8 #14872: Permit makemigrations --check without setting DEVELOPER=True 2024-01-19 16:08:58 -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
ef5e10d360 14728 Move installed plugins list from admin UI to NetBox UI (#14768)
* 14728 move plugins view from admin

* 14728 move plugins view from admin

* 14728 remove plugins view from admin

* Update template for #12128

* 14728 review fixes

* 14728 review fixes

* 14728 review fixes

* 14728 review fixes

* 14728 configure table

* Clean up table columns

* Fix app config lookup for plugins referenced by dotted path

* Move template; fix table display

* Fix user table configuration

* Remove nonfunctional quick search

* Limit PluginListView to staff users

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-01-19 11:27:15 -05:00
58227293f3 14637 update to Django 5 (#14675)
* 14637 update to Django 5

* 14637 fix tests

* 14637 remove extra assignment

* Syntax tweak

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-01-05 13:30:04 -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
3bacee16bd Closes #14631: Ensure description filters are available on all relevant models 2023-12-28 13:53:16 -05:00
1f2f0860fe Merge branch 'develop' into feature 2023-12-27 16:34:38 -05:00
0613e8e95c Fixes #14613: Fix display of current configuration parameters 2023-12-27 15:32:11 -05:00
a67236fc3c Fixes #13812: Record data source sync failure when run via syncdatasource command 2023-12-27 12:51:03 -05:00
58f925c261 Closes #14503: Include additional display attributes for search indexers 2023-12-21 14:36:42 -05:00
b532435a6d Closes #14436: Add indexes for all GenericForeignKey fields (#14463)
* Closes #14436: Add PostgreSQL indexes for all GenericForeignKeys

* Add note about GFK indexes to developer docs
2023-12-07 14:02:51 -05:00