Commit Graph

12120 Commits

Author SHA1 Message Date
Arthur
1ccbe947e0 14438 post_save sync handler 2024-02-16 11:04:40 -08:00
Arthur
1c14c3506e 14438 get_module_scripts -> module_scripts 2024-02-16 10:55:07 -08:00
Arthur
cb2bf2b293 14438 soft delete 2024-02-16 10:53:17 -08:00
Arthur
8b54ff7e33 14438 update init_script_choice in form 2024-02-16 10:45:07 -08:00
Arthur
3182977a88 Merge branch 'feature' into 14438-script-model 2024-02-16 09:00:11 -08:00
Arthur
af2c642de3 14438 review changes 2024-02-16 08:59:52 -08: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
1ea0b6d83f Restore missing edit button for script modules 2024-02-14 14:46:49 -05:00
Jeremy Stretch
6422049d13 Replace legacy URLs with redirects 2024-02-14 14:44:54 -05:00
Jeremy Stretch
638c303bf0 Update references to is_executable 2024-02-14 14:35:56 -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
Arthur
ba8329eb4a 14438 review comments retain old urls 2024-02-13 16:02:03 -08:00
Arthur
613f9f2354 14438 update migration 2024-02-13 15:21:25 -08:00
Arthur
e9f28dcd4d 14438 update migration 2024-02-13 15:00:38 -08:00
Jeremy Stretch
72720354df Update v4.0 release notes 2024-02-13 16:43:51 -05:00
Jeremy Stretch
20824ceb25
Closes #13283: Add context to dropdown options (#15104)
* 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
2024-02-13 16:31:17 -05:00
Arthur
ecd2712253 14438 temp 2024-02-13 12:17:57 -08:00
Arthur
c4ffafaca2 14438 review changes 2024-02-13 11:16:10 -08:00
Arthur
38d2cbbc65 14438 review changes 2024-02-13 11:05:07 -08:00
Arthur
6cb176a36d Merge branch 'feature' into 14438-script-model 2024-02-13 10:51:05 -08:00
Arthur
ee88c2f7d2 14438 optimize migration 2024-02-12 11:06:44 -08:00
Arthur
bc596340c3 14438 add generic relation so delete will show event rule 2024-02-12 10:26:24 -08:00
Arthur
63d3ce6e77 14438 fix migration 2024-02-12 10:14:11 -08:00
Arthur
4fdce65e35 14438 fix migration 2024-02-12 10:02:41 -08:00
Arthur
8c2fbceb76 14438 update EventRule code / form 2024-02-12 09:35:32 -08:00
Arthur
1a6099fce9 14438 update migration for event rules 2024-02-12 09:10:34 -08:00
Arthur
0100857e92 14438 update migration for event rules 2024-02-12 07:57:38 -08:00
Arthur
84b4085a1f 14438 fix tests 2024-02-09 14:43:18 -08:00
Arthur
d9afaf9052 14438 fix tests 2024-02-09 14:42:35 -08:00
Jeremy Stretch
f41105d5e3 Remove unused Javascript 2024-02-09 16:30:14 -05:00
Jeremy Stretch
25723aebe0 Closes #15100: Remove obsolete NullableCharField class 2024-02-09 15:57:42 -05:00
Jeremy Stretch
d8c6dad9d9 Closes #15099: Remove legacy device_role & device_role_id filters for devices 2024-02-09 15:55:03 -05:00
Jeremy Stretch
64039a8833 #14917: Remove obsolete slim-select styling 2024-02-09 14:51:21 -05:00
Arthur
b4c9f93432 14438 fix api post 2024-02-09 11:44:40 -08:00
Arthur
5290c86e08 14438 fix serializer and api view 2024-02-09 11:32:41 -08:00
Arthur
2f8a7b9fe9 Merge branch 'feature' into 14438-script-model 2024-02-09 10:43:12 -08:00
Arthur
6846ec7b71 14438 temp fix 2024-02-09 09:39:02 -08:00
Arthur
8c17d73315 14438 fix delete 2024-02-09 07:14:11 -08:00
Arthur
079dc0077d 14438 view fixes cleanup 2024-02-08 14:22:52 -08:00
Arthur
d3823504b8 14438 view fixes cleanup 2024-02-08 14:18:04 -08:00
Arthur
f7e55a078a 14438 view fixes cleanup 2024-02-08 14:13:08 -08:00
Arthur
c0a5de09a7 14438 check valid script for views 2024-02-08 14:06:32 -08:00
Arthur
172d1b00cc 14438 check valid script for views 2024-02-08 13:49:29 -08:00
Jeremy Stretch
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
Arthur
41c792a3e5 14438 fix merge 2024-02-08 10:33:20 -08:00
Arthur
0c214d37b3 14438 fix merge 2024-02-08 10:32:39 -08:00
Arthur
0bd15c30ec 14438 merge feature 2024-02-07 16:14:33 -08:00
Arthur Hanson
11697d19a6
12510 Merge Scripts and Reports (#14976)
* 12510 move reports to use BaseScript

* 12510 merge report into script view

* 12510 add migration for job report to script

* 12510 update templates

* 12510 remove reports

* 12510 cleanup

* 12510 legacy jobs

* 12510 legacy jobs

* 12510 fixes

* 12510 review changes

* 12510 review changes

* 12510 update docs

* 12510 review changes

* 12510 review changes

* 12510 review changes

* 12510 review changes

* 12510 main log results to empty string

* 12510 move migration

* Introduce an internal log level for debug to simplify Script logging

* Misc cleanup

* Remove obsolete is_valid() method

* Reformat script job data (log, output, tests)

* Remove ScriptLogMessageSerializer

* Fix formatting of script logs

* Record a timestamp with script logs

* Rename _current_method to _current_test

* Clean up template

* Remove obsolete runreport management command

* Misc cleanup & refactoring

* Clean up template

* Clean up migration

* Clean up docs

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-02-07 12:02:09 -05:00
Arthur
d162d440b0 14438 fix migration 2024-02-06 10:43:13 -08:00
Arthur
9543169025 14438 script job run 2024-02-06 10:23:51 -08:00