- 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>
* 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
* 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
* Initial work on #13283
* Enable passing TomSelect HTML template attibutes on DynamicModelChoiceField
* Merge disabled_indicator into option_attrs
* Add support for annotating a numeric count on dropdown options
* Annotate parent object on relevant fields
* Improve rendering of color options
* Improve rendering of color options
* Rename option_attrs to context
* Expose option context on ObjectVar for custom scripts
* Document dropdown context variables
* 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
* Issue #14962 VM to merge directly related site context
* Cleanup & rewrite test
---------
Co-authored-by: Chris Carter <chris.carter@spinlocksecurity.com>
Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
* Fixes#14572 - Constrains JobView (and related views) badge to specific named job
* Adjust report views to resolve same problem
* Fixed PEP8 error
* Update netbox/templates/extras/script/base.html
Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
* Move function to method on PythonModuleMixin
* Update netbox/extras/views.py
Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
* Update netbox/extras/views.py
Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
* Update netbox/extras/views.py
Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
* Update netbox/extras/views.py
Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
* Update to mixin and view
---------
Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
* Fixes#14755: ValueError in web UI after REST API accepts invalid custom-field choice-set data
* PR Comments Addressed
* Set max_length=2 on extra_choices items; remove custom validation logic
* Move test for invalid choices to CustomFieldChoiceSetTest
* Omit unused imports
---------
Co-authored-by: julio.oliveira <julio.oliveira@alertmedia.com>
Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
* fixes user delete when they have a bookmark #14851
* Include migration for user field
---------
Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
* 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