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

205 Commits

Author SHA1 Message Date
kkthxbye-code
eed1b8f412 Create CachedValueField to contain search specific lookups 2023-02-19 18:50:24 -05:00
Jeremy Stretch
9f91b89467 #11711: Use CSVModelChoiceField for custom object fields during CSV import 2023-02-13 17:53:01 -05:00
kkthxbye
d748851027 Fixes #11711 - Use CSVModelMultipleChoiceField when importing custom multiple object fields (#11712)
* Fixes #11711 - Use CSVModelMultipleChoiceField when importing custom multiple object fields

* Fix pep8

---------

Co-authored-by: kkthxbye-code <>
2023-02-13 17:49:08 -05:00
jeremystretch
55b1549895 Closes #10762: Permit selection custom fields to have only one choice 2023-01-25 10:27:05 -05:00
kkthxbye
1354947434 Get the queue from QUEUE_MAPPINGS when deleting JobResults 2023-01-09 08:22:40 -05:00
Renato Almeida de Oliveira
35273cc87f Add ExportTemplatesMixin to JournalEntry model (#11251)
* Add ExportTemplatesMixin to JournalEntry model

* Move mixin ahead of base class

Co-authored-by: Jeremy Stretch <jstretch@ns1.com>
2023-01-05 16:26:48 -05:00
kkthxbye-code
b35b33e798 Use the start time to calculate duration of jobs instead of created time 2022-12-22 09:52:05 -05:00
Jeremy Stretch
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
jeremystretch
6ffd8aa320 Introduce constants for RQ queue names 2022-12-08 09:58:52 -05:00
kkthxbye-code
080a001118 Allow redefining internally used queues 2022-12-08 09:45:21 -05:00
Jeremy Stretch
52cf9086a5 Fixes #11046: Restrict length of indexed search values (#11076)
* Fixes #11046: Restrict length of indexed search values

* Reference constant in index declaration

* Remove index from CachedValue.value
2022-12-02 10:07:53 -05:00
jeremystretch
23077821f6 #10052: Serialize date fields 2022-11-15 16:10:20 -05:00
jeremystretch
0bcc59a1e9 #8366: Add started field to JobResult 2022-11-15 15:06:11 -05:00
jeremystretch
87727c71f7 #8366: name scheduled_time to scheduled for consistency with other fields 2022-11-15 13:37:13 -05:00
jeremystretch
640fd8045d #9887: Add missing model documentation links 2022-11-15 11:00:13 -05:00
jeremystretch
355678274d #9623: Add slug field to SavedFilter 2022-11-15 10:44:12 -05:00
Jeremy Stretch
a5308ea28e Closes #10851: New staging mechanism (#10890)
* WIP

* Convert checkout() context manager to a class

* Misc cleanup

* Drop unique constraint from Change model

* Extend staging tests

* Misc cleanup

* Incorporate M2M changes

* Don't cancel wipe out creation records when an object is deleted

* Rename Change to StagedChange

* Add documentation for change staging
2022-11-14 13:55:03 -05:00
Arthur
6eba5d4d96 10300 initial translation support use gettext 2022-11-11 08:47:29 -05:00
Jeremy Stretch
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
jeremystretch
16919cc1d9 Closes #10761: Enable associating an export template with multiple object types 2022-10-26 13:30:45 -04:00
jeremystretch
9e8234bb45 Closes #8274: Enable associating a custom link with multiple object types 2022-10-26 11:39:26 -04:00
Jeremy Stretch
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
kkthxbye-code
ed2f7f1236 Job scheduling review changes 2022-10-21 10:31:30 +02:00
kkthxbye-code
1d9808a92a Added scheduled_time field to JobResult model 2022-10-16 13:42:28 +02:00
kkthxbye-code
ef0b455b05 Called super delete method before deleting JobResult task.
Done to avoid having deleted a task on accident if the deleting of the JobResult fails.
2022-10-09 21:16:26 +02:00
kkthxbye-code
679a9e839b Work on job scheduling:
* Added JobResult form filtersets
* Change housekeeping cleanup delete from `_raw_delete` to `delete` to make sure scheduled tasks are cancelled
* Change default sort of JobResult table to -created
* Added `delete` override to `JobResult` to remove scheduled tasks from RQ when a JobResult is deleted
* Updated js/css dist files. Will need to be redone when develop is merged to feature.
2022-10-09 21:05:31 +02:00
kkthxbye-code
53c8a48244 Merge branch 'feature' into 8366-job-scheduling
Sync with upstream
2022-10-09 11:18:47 +02:00
jeremystretch
c481a1b6a2 Merge branch 'develop' into feature 2022-10-05 10:28:48 -04:00
jeremystretch
fec8d1bc2f Fixes #10423: Enforce object type validation when creating journal entries 2022-10-04 15:26:52 -04:00
jeremystretch
10352ff5ad Merge branch 'develop' into feature 2022-09-30 17:17:18 -04:00
Arthur Hanson
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
jeremystretch
f51415cf2c Replace unique_together with UniqueConstraints 2022-09-27 15:35:24 -04:00
jeremystretch
2463e4efd3 Fixes #10461: Enable filtering by read-only custom fields in the UI 2022-09-26 16:42:11 -04:00
kkthxbye-code
06dea8ef3f WIP: Moving JobResults out of the admin panel 2022-09-23 13:44:24 +02:00
kkthxbye-code
cbb3378d10 Job Scheduling WIP 2022-09-23 06:45:40 +02:00
kkthxbye
25ac1edb48 Merge branch 'netbox-community:develop' into 8366-job-scheduling 2022-09-18 15:08:11 +02:00
kkthxbye-code
824b4e0923 Add scheduling for reports and scripts 2022-09-18 15:06:28 +02:00
jeremystretch
2b2a41edd2 Enable cloning for custom fields & custom links 2022-09-09 16:51:18 -04:00
jeremystretch
e4bbebf87a Merge branch 'develop' into feature 2022-08-12 10:18:57 -04:00
jeremystretch
a9aaa8939c Closes #9161: Pretty print JSON custom field data when editing 2022-08-10 16:12:04 -04:00
jeremystretch
562769fb89 Merge branch 'develop' into feature 2022-08-01 14:42:09 -04:00
jeremystretch
84f2225f42 PEP8 cleanup 2022-08-01 09:16:58 -04:00
jeremystretch
c5fb7b72f0 Closes #9391: Remove 500-character limit for custom link text & URL fields 2022-07-28 14:36:20 -04:00
jeremystretch
c380fd00bf Merge branch 'develop' into feature 2022-07-11 12:58:24 -04:00
jeremystretch
5a4467a4a8 Fixes #9687: Don't restrict custom text field lengths when entering via UI form 2022-07-11 11:12:06 -04:00
jeremystretch
379880cd84 Closes #9582: Enable assigning config contexts based on device location 2022-06-22 16:10:48 -04:00
jeremystretch
31024ce672 Changelog & cleanup for #9166 2022-05-24 16:39:05 -04:00
kkthxbye
20eaa7d069 #9166 - Add UI Visibility setting for custom fields 2022-05-24 10:12:32 +02:00
jeremystretch
17df8a5c43 Closes #8495: Enable custom field grouping 2022-04-15 14:45:28 -04:00
kkthxbye-code
69b4d0d44b #9028 - Fix pep8 syntax 2022-04-04 18:13:13 +02:00