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

278 Commits

Author SHA1 Message Date
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
00088cba6d #11559: Add device config API endpoint & cleanup 2023-03-21 17:00:06 -04:00
5cd3ad0b12 Cleanup & docs 2023-03-14 15:44:16 -04:00
f7150645a1 8749 clone custom fields 2023-03-14 15:44:16 -04:00
697feed257 Add type_job_start & type_job_end to Webhook 2023-03-07 18:01:32 -05:00
084a2cc52c Closes #9416: Dashboard widgets (#11823)
* Replace masonry with gridstack

* Initial work on dashboard widgets

* Implement function to save dashboard layout

* Define a default dashboard

* Clean up widgets

* Implement widget configuration views & forms

* Permit merging dict value with existing dict in user config

* Add widget deletion view

* Enable HTMX for widget configuration

* Implement view to add dashboard widgets

* ObjectCountsWidget: Identify models by app_label & name

* Add color customization to dashboard widgets

* Introduce Dashboard model to store user dashboard layout & config

* Clean up utility functions

* Remove hard-coded API URL

* Use fixed grid cell height

* Add modal close button

* Clean up dashboard views

* Rebuild JS
2023-02-24 16:04:00 -05:00
73a7a2d27a Closes #11559: Implement config template rendering (#11769)
* WIP

* Add config_template field to Device

* Pre-fetch referenced templates

* Correct up_to_date callable

* Add config_template FK to Device

* Update & merge migrations

* Add config_template FK to Platform

* Add tagging support for ConfigTemplate

* Catch exceptions when rendering device templates in UI

* Refactor ConfigTemplate.render()

* Add support for returning plain text content

* Add ConfigTemplate model documentation

* Add feature documentation for config rendering
2023-02-19 20:09:52 -05:00
ac87ce733d Closes #11693: Enable remote data synchronization for export templates 2023-02-19 20:09:51 -05:00
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
fb3d1ef399 Check for the extras.run_script permission when running scripts via. the API 2023-01-17 10:13:18 -05:00
064e3ff605 Merge branch 'develop' into feature 2022-12-13 17:17:05 -05:00
b9888d6f86 Fixes #11109: Fix nullification of custom object & multi-object fields via REST API 2022-12-13 14:48:40 -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
c3dcd8937f Merge branch 'develop' into feature 2022-11-22 10:08:23 -05:00
d5538c1ca3 Fixes #10241: Support referencing custom field related objects by attribute in addition to PK 2022-11-21 12:48:13 -05:00
0bcc59a1e9 #8366: Add started field to JobResult 2022-11-15 15:06:11 -05:00
87727c71f7 #8366: name scheduled_time to scheduled for consistency with other fields 2022-11-15 13:37:13 -05:00
355678274d #9623: Add slug field to SavedFilter 2022-11-15 10:44:12 -05:00
484efdaf75 Closes #9623: Implement saved filters (#10801)
* Initial work on saved filters

* Return only enabled/shared filters

* Add tests

* Clean up filtering of usable SavedFilters
2022-11-02 12:27:53 -04:00
16919cc1d9 Closes #10761: Enable associating an export template with multiple object types 2022-10-26 13:30:45 -04:00
9e8234bb45 Closes #8274: Enable associating a custom link with multiple object types 2022-10-26 11:39:26 -04:00
9628dead07 Closes #10560: New global search (#10676)
* Initial work on new search backend

* Clean up search backends

* Return only the most relevant result per object

* Clear any pre-existing cached entries on cache()

* #6003: Implement global search functionality for custom field values

* Tweak field weights & document guidance

* Extend search() to accept a lookup type

* Move get_registry() out of SearchBackend

* Enforce object permissions when returning search results

* Add indexers for remaining models

* Avoid calling remove() on non-cacheable objects

* Use new search backend by default

* Extend search backend to filter by object type

* Clean up search view form

* Enable specifying lookup logic

* Add indexes for value field

* Remove object type selector from search bar

* Introduce SearchTable and enable HTMX for results

* Enable pagination

* Remove legacy search backend

* Cleanup

* Use a UUID for CachedValue primary key

* Refactoring search methods

* Define max search results limit

* Extend reindex command to support specifying particular models

* Add clear() and size to SearchBackend

* Optimize bulk caching performance

* Highlight matched portion of field value

* Performance improvements for reindexing

* Started on search tests

* Cleanup & docs

* Documentation updates

* Clean up SearchIndex

* Flatten search registry to register by app_label.model_name

* Clean up search backend classes

* Clean up RestrictedGenericForeignKey and RestrictedPrefetch

* Resolve migrations conflict
2022-10-21 13:16:16 -04:00
4f95c5a72c Allow scheduling jobs via. the API 2022-10-20 21:36:43 +02:00
f797b5ed97 Add scheduled_time to JobResultSerializer 2022-10-16 15:27:33 +02:00
af8bb0c4b9 10348 add decimal custom field (#10422)
* 10348 add decimal custom field

* 10348 fix tests

* 10348 add documentation

* Rearrange custom fields to be ordered consistently

* Rename number_field to integer_field for clarity

* Clean up validation logic

* Apply suggested changes from PR

* Store decimal custom field values natively

* Fix filter test

* Update custom field model migrations to use new encoder

Co-authored-by: jeremystretch <jstretch@ns1.com>
2022-09-30 16:03:24 -04:00
356ff457be Allow reports to be nested in submodules 2022-09-14 19:57:37 +02:00
f489ffa043 Allow running scripts nested in modules/packages 2022-09-07 22:33:24 +02:00
b11fa53519 Closes #10231: Add missing serializer annotations 2022-09-01 17:18:09 +02:00
0b5478ad2d Fixes #9895: Change DictField serializers to JSONField 2022-08-29 08:02:38 +02:00
36729fb6ae Fixes #10134: Custom fields data serializer should return a 400 response for invalid data 2022-08-24 13:08:21 -04:00
abf11fbcb8 Merge branch 'develop' into feature 2022-07-20 12:20:33 -04:00
e07dd3ddcb Define NESTED_SERIALIZER_PREFIX constant 2022-07-15 15:31:42 -04:00
3eb6b6c07f Clean up core API imports 2022-07-13 16:18:55 -04:00
c380fd00bf Merge branch 'develop' into feature 2022-07-11 12:58:24 -04:00
ed7f42a803 Fixes #9704: Include last_updated field on JournalEntry REST API serializer 2022-07-11 10:28:37 -04:00
379880cd84 Closes #9582: Enable assigning config contexts based on device location 2022-06-22 16:10:48 -04:00
31024ce672 Changelog & cleanup for #9166 2022-05-24 16:39:05 -04:00
20eaa7d069 #9166 - Add UI Visibility setting for custom fields 2022-05-24 10:12:32 +02:00
17df8a5c43 Closes #8495: Enable custom field grouping 2022-04-15 14:45:28 -04:00
f13a00b2dd Save old JobResults 2022-04-12 11:42:47 -04:00
36d6ae33d1 Allow setting individual timeouts on scripts and reports 2022-04-04 18:00:38 +02:00
1d55c04c21 Closes #9006: Enable custom fields, custom links, and tags for journal entries 2022-03-31 11:40:02 -04:00
bf50134d94 #8976: Set required=False on serializer field 2022-03-28 14:18:45 -04:00
227bac7c60 Fixes #8976: Add missing object_type field on CustomField REST API serializer 2022-03-28 13:34:37 -04:00
59aba52b03 Rename OrderedDefaultRouter to NetBoxRouter & document for plugins 2022-03-11 15:59:03 -05:00
bbdeae0ed9 Move CustomFieldModelViewSet functionality into NetBoxModelViewSet 2022-03-09 11:44:55 -05:00
efd5a73a18 Refactor API views 2022-03-09 11:27:42 -05:00
478eefb74c Merge v3.1.7 2022-02-03 12:55:34 -05:00