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

107 Commits

Author SHA1 Message Date
197c6a1cbf Add scheduling_enabled parameter for scripts 2023-04-18 08:45:31 -04:00
d470848b29 Closes #12246: General cleanup of utilities modules
* Clean up base modules

* Clean up forms modules

* Clean up templatetags modules

* Replace custom simplify_decimal filter with floatformat

* Misc cleanup

* Merge ReturnURLForm into ConfirmationForm

* Clean up import statements for utilities.forms

* Fix field class references in docs
2023-04-14 10:33:53 -04:00
d2a694a878 Closes #12068: Establish a direct relationship from jobs to objects (#12075)
* Reference database object by GFK when running scripts & reports via UI

* Reference database object by GFK when running scripts & reports via API

* Remove old enqueue_job() method

* Enable filtering jobs by object

* Introduce ObjectJobsView

* Add tabbed views for report & script jobs

* Add object_id to JobSerializer

* Move generic relation to JobsMixin

* Clean up old naming
2023-03-28 15:47:09 -04:00
40572b543f Rename JobResult to Job and move to core 2023-03-27 14:20:13 -04:00
f7a2eb8aef Closes #11890: Sync/upload reports & scripts (#12059)
* Initial work on #11890

* Consolidate get_scripts() and get_reports() functions

* Introduce proxy models for script & report modules

* Add add/delete views for reports & scripts

* Add deletion links for modules

* Enable resolving scripts/reports from module class

* Remove get_modules() utility function

* Show results in report/script lists

* Misc cleanup

* Fix file uploads

* Support automatic migration for submodules

* Fix module child ordering

* Template cleanup

* Remove ManagedFile views

* Move is_script(), is_report() into extras.utils

* Fix URLs for nested reports & scripts

* Misc cleanup
2023-03-24 21:00:36 -04:00
3b9fda0169 Merge branch 'develop' into feature 2023-03-20 08:54:22 -04:00
4286d74d44 Add fieldsets functionality to scripts to allow for form field groupings (#11880)
* update script template

* update docs

* introduce default_fieldset

* correct custom script docs

* default to use fieldsets in scripts

* update scripts docs for new behavior

* Misc cleanup

---------

Co-authored-by: jeremystretch <jstretch@netboxlabs.com>
2023-03-14 15:50:49 -04:00
a8c331f88a Replace JobResult.set_status() with terminate() 2023-03-07 18:01:32 -05:00
c78022a74c Change the way we invalidate the module cache to support reloading code from subpackages 2023-02-16 10:50:38 -05:00
699edd049c Closes #11152: Add support to abort custom script gracefully (#11621)
Signed-off-by: Maximilian Wilhelm <max@sdn.clinic>
2023-02-02 15:22:55 -05:00
4297c65f87 Closes #10945: Enable recurring execution of scheduled reports & scripts (#11096)
* Add interval to JobResult

* Accept a recurrence interval when executing scripts & reports

* Cleaned up jobs list display

* Schedule next job only if a reference start time can be determined

* Improve validation for scheduled jobs
2022-12-08 18:17:13 -05:00
0bcc59a1e9 #8366: Add started field to JobResult 2022-11-15 15:06:11 -05:00
f489ffa043 Allow running scripts nested in modules/packages 2022-09-07 22:33:24 +02:00
29a611c729 Closes #9896: Discontinue arbitrary use of OrderedDict 2022-08-01 16:51:44 -04:00
56f3aaf7c8 Merge pull request #9473 from kkthxbye-code/fix-9466
Fixes #9466 - Clear webhook queue on script failure
2022-06-17 13:58:26 -04:00
e2eb7fdfb5 Clear webhook queue on script failure 2022-06-03 13:03:58 +02:00
fe899d9d7c Iterate base classes when searching for ScriptVariables 2022-05-28 11:29:18 +02:00
6b73d22da1 Changelog for #8959 2022-04-25 10:11:51 -04:00
84e4156259 Add lock around script loading to prevent race condition 2022-04-22 21:21:01 +02:00
f13a00b2dd Save old JobResults 2022-04-12 11:42:47 -04:00
69b4d0d44b #9028 - Fix pep8 syntax 2022-04-04 18:13:13 +02:00
36d6ae33d1 Allow setting individual timeouts on scripts and reports 2022-04-04 18:00:38 +02:00
58f97bc0e7 Merge develop into feature 2022-03-24 16:35:35 -04:00
69eb6b11d0 Closes #8368: Enable controlling the order of custom script form fields with field_order 2022-01-18 16:01:40 -05:00
c6467a824b #8228: Always add a blank choice 2022-01-05 17:10:59 -05:00
b1d1f3c6b2 Fixes #8228: Optional ChoiceVar fields should not force a selection 2022-01-05 15:46:04 -05:00
ae6ed97a80 Clear sys.modules cache when reloading scripts 2021-11-11 11:53:31 +01:00
b56cae24c5 Fixes #7628: Fix load_yaml method for custom scripts 2021-10-27 09:04:18 -04:00
ed3bc7cdcc Changelog for #7387 2021-10-01 09:30:17 -04:00
0fdd081869 feat: scripts within a module can now be ordered 2021-09-30 09:17:33 +02:00
9476fda987 Closes #5994: Drop support for display_field argument on ObjectVar 2021-04-21 10:29:25 -04:00
46a024441c Closes #5995: Dropped backward compatibility for queryset parameter on ObjectVar and MultiObjectVar 2021-03-16 11:28:50 -04:00
a694dbb020 Closes #5990: Deprecated display_field parameter for custom script ObjectVar and MultiObjectVar fields 2021-03-16 11:08:34 -04:00
0567f0d190 Merge branch 'develop' into develop-2.10 2020-11-09 20:58:59 -05:00
dc7da4f0f6 Fixes #5316: Dry running scripts should not trigger webhooks 2020-11-09 16:22:45 -05:00
2339fe22ae Closes #4941: commit argument is now required argument in a custom script's run() method 2020-08-21 11:06:36 -04:00
bc0e6cc8dd Fixes #5012: Return details of exceptions resulting from report/script execution 2020-08-20 12:47:26 -04:00
986ef2b8e6 Move changelog signals setup to a context manager 2020-08-18 13:05:41 -04:00
81c72739b5 Attach object modification signals before running a custom script 2020-08-17 13:43:48 -04:00
4ee8e473eb Move ObjectChange creation into signal receivers 2020-08-14 17:03:45 -04:00
bc61393256 Merge branch 'develop' into develop-2.9 2020-08-13 10:06:03 -04:00
fe1ffdcbb7 Extend ObjectVars to accept display_field, query_params, and null_option 2020-08-12 14:51:58 -04:00
3c395e7c9f Closes #4885: Add MultiChoiceVar for custom scripts 2020-08-11 13:23:39 -04:00
b410674f9e Log a warning for scripts whose run() method does not accept a commit argument 2020-08-03 13:56:10 -04:00
08a5e82afc Merge pull request #4852 from glennmatthews/gfm-2006-continued
Some additional fixes to scripts/reports background running (2.9)
2020-07-20 13:10:56 -04:00
8dd41b771e Update import locations for Django 3.1 2020-07-16 11:54:08 -04:00
d8b0a11a49 Save JobResult even for a script run with commit=False 2020-07-15 12:58:01 -04:00
15525392a2 Closes #4837: Use dynamic form widget for relationships to MPTT objects 2020-07-09 09:50:01 -04:00
41f92ef8e6 review updates 2020-07-06 02:00:16 -04:00
f092c107b5 PR review updates 2020-07-06 02:00:16 -04:00