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

11 Commits

Author SHA1 Message Date
jeremystretch
730eb2e83b Fixes #12112: Do not link data source URL for local paths 2023-03-31 09:06:16 -04:00
Jeremy Stretch
715592547c #12081: Script & report cleanup (#12091)
* start() and terminate() methods on Job should call save()

* Fix display of associated jobs

* Introduce get_latest_jobs() method on JobsMixin

* Update messaging when no reports/scripts exist

* Catch ImportErrors when rendering report/script lists

* Fix loading of nested modules

* Fix URLs for nested scripts/reports
2023-03-29 16:51:55 -04:00
Jeremy Stretch
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
jeremystretch
40572b543f Rename JobResult to Job and move to core 2023-03-27 14:20:13 -04:00
Jeremy Stretch
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
jeremystretch
08bdb54cb4 #11558: Disable sync button if RQ worker not running 2023-03-20 15:12:11 -04:00
jeremystretch
368e774ceb Add index for (source, path) to DataFile 2023-02-19 20:09:52 -05:00
jeremystretch
a1c9f7a2c6 DataFile should not inherit from ChangeLoggingMixin 2023-02-19 20:09:51 -05:00
Jeremy Stretch
678a7d17df Closes #9073: Remote data support for config contexts (#11692)
* WIP

* Add bulk sync view for config contexts

* Introduce 'sync' permission for synced data models

* Docs & cleanup

* Remove unused method

* Add a REST API endpoint to synchronize config context data
2023-02-19 20:09:51 -05:00
jeremystretch
664132281e Fixes #11659: Include all relevant DataFile attributes during bulk update 2023-02-19 20:09:51 -05:00
Jeremy Stretch
d8784d4155 Closes #11558: Add support for remote data sources (#11646)
* WIP

* WIP

* Add git sync

* Fix file hashing

* Add last_synced to DataSource

* Build out UI & API resources

* Add status field to DataSource

* Add UI control to sync data source

* Add API endpoint to sync data sources

* Fix display of DataSource job results

* DataSource password should be write-only

* General cleanup

* Add data file UI view

* Punt on HTTP, FTP support for now

* Add DataSource URL validation

* Add HTTP proxy support to git fetcher

* Add management command to sync data sources

* DataFile REST API endpoints should be read-only

* Refactor fetch methods into backend classes

* Replace auth & git branch fields with general-purpose parameters

* Fix last_synced time

* Render discrete form fields for backend parameters

* Enable dynamic edit form for DataSource

* Register DataBackend classes in application registry

* Add search indexers for DataSource, DataFile

* Add single & bulk delete views for DataFile

* Add model documentation

* Convert DataSource to a primary model

* Introduce pre_sync & post_sync signals

* Clean up migrations

* Rename url to source_url

* Clean up filtersets

* Add API & filterset tests

* Add view tests

* Add initSelect() to HTMX refresh handler

* Render DataSourceForm fieldsets dynamically

* Update compiled static resources
2023-02-19 20:09:51 -05:00