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

113 Commits

Author SHA1 Message Date
Abhimanyu Saharan
cab7b76220 Fixes form rendering when scheduling_enabled is disabled (#13123)
* fixes form rendering when scheduling_enabled is disabled #13096

* Remove requires_input property from BaseScript; render form consistently

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-07-10 10:30:51 -04:00
Abhimanyu Saharan
ca0e7be637 Adds bulk import for journal entry (#12485)
* adds bulk import for journal entry #12122

* lint fix

* Add kind as CSVChoiceField on JournalEntryImportForm

---------

Co-authored-by: jeremystretch <jstretch@netboxlabs.com>
2023-05-05 09:57:09 -04:00
Abhimanyu Saharan
42346702a1 Adds image attachment list view (#12487)
* adds image attachment list view #11932

* fixed typo

* Update netbox/extras/tables/tables.py

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>

* Update netbox/extras/forms/filtersets.py

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>

* changes as per review

* Disable ordering by size (not stored in database)

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-05-05 09:48:13 -04:00
jeremystretch
c08c7dda50 Closes #12292: Replace SelectSpeedWidget and SelectDurationWidget with NumberWithOptions 2023-04-18 16:33:43 -04:00
jeremystretch
9caa7f6b7c Move SyncedDataMixin from extras to core 2023-04-18 15:18:19 -04:00
jeremystretch
b167153186 Enable scheduling_enabled parameter for reports 2023-04-18 08:45:31 -04:00
jeremystretch
197c6a1cbf Add scheduling_enabled parameter for scripts 2023-04-18 08:45:31 -04:00
Jeremy Stretch
8b040ff930 Closes #12129: Enable automatic synchronization of objects when DataFiles are updated (#12262)
* Closes #12129: Enable automatic synchronization of objects when DataFiles are updated

* Cleanup
2023-04-17 10:35:17 -04:00
Jeremy Stretch
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
jeremystretch
59a6b3e71b Merge branch 'develop' into feature 2023-04-12 17:38:16 -04:00
Abhimanyu Saharan
2c07762b7a Added optional user and group on custom field (#12206)
* added group and user model to object_type

* Update netbox/utilities/utils.py

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-04-10 12:40:13 -04:00
kkthxbye
278f2b173a Fixes #11431 - Disallow changing customfield type after creation (#11449)
* Disallow changing customfield type after creation

* Fix test_api.CustomFieldTest

---------

Co-authored-by: kkthxbye-code <>
2023-04-10 10:13:08 -04:00
jeremystretch
15590f1f48 Merge branch 'develop' into feature 2023-03-28 14:19:08 -04:00
Abhimanyu Saharan
1d2335d578 Updated _schedule_at to use local time when _interval is set (#12006)
* updated _schedule_at to use local time when _interval is set

* updated schedule_at to use local time when interval is set
2023-03-28 10:19:18 -04:00
jeremystretch
7d64e5bc62 #12058: Fix initial JSON population 2023-03-28 10:00:15 -04:00
Arthur Hanson
654e32cbbe 11933 saved filters clone of content-types and add m2m field cloning (#12014)
* 11933 saved filters clone of content-types and add m2m field cloning

* Fix JSON rendering

* Add content_types to CustomLink.clone()

---------

Co-authored-by: jeremystretch <jstretch@netboxlabs.com>
2023-03-28 09:53:57 -04:00
jeremystretch
40572b543f Rename JobResult to Job and move to core 2023-03-27 14:20:13 -04:00
jeremystretch
00088cba6d #11559: Add device config API endpoint & cleanup 2023-03-21 17:00:06 -04:00
jeremystretch
d6afc125e5 #11693: Clean up ExportTemplate model form 2023-03-21 14:15:37 -04:00
jeremystretch
2b3b9517d2 #9073: Fix form behavior when disassociating a ConfigContext from a DataFile 2023-03-20 15:42:23 -04:00
jeremystretch
5cd3ad0b12 Cleanup & docs 2023-03-14 15:44:16 -04:00
Arthur
f7150645a1 8749 clone custom fields 2023-03-14 15:44:16 -04:00
jeremystretch
2a9178af12 Merge branch 'develop' into feature 2023-03-13 11:58:37 -04:00
Aron Bergur Jóhannsson
fa60f9d2a8 Closes #11294: Markdown Preview (#11894)
* MarkdownWidget

* Change border and color of active markdown tab

* Fix template name typo

* Add render markdown endpoint

* Static assets for markdown widget

* widget style fix and unique ids based on name

* Replace SmallTextArea with SmallMarkdownWidget

* Clear innerHTML before swapping

* render markdown directly in template

* change render markdown view path

* remove small markdown widget

* Simplify rendering logic

* Use a form to clean input Markdown data

---------

Co-authored-by: Jeremy Stretch <jstretch@ns1.com>
2023-03-09 08:21:13 -05:00
jeremystretch
697feed257 Add type_job_start & type_job_end to Webhook 2023-03-07 18:01:32 -05:00
jeremystretch
c44eb65993 Closes #11325: Move help_texts from model forms to models 2023-03-01 17:31:54 -05:00
Jeremy Stretch
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
Jeremy Stretch
b9bd96f0c7 Closes #11765: Remove StaticSelect & StaticSelectMultiple (#11767)
* Remove StaticSelect, StaticSelectMultiple form widgets

* Tag custom ChoiceField, MultipleChoiceField classes for removal in v3.6
2023-02-19 20:09:51 -05:00
jeremystretch
ac87ce733d Closes #11693: Enable remote data synchronization for export templates 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
315371bf7c Fixes #11786: List only applicable object types in form widget when filtering custom fields 2023-02-19 16:17:57 -05:00
Abhimanyu Saharan
fb2771370c handled scripts error when only interval is used 2023-02-02 10:25:19 -05:00
jeremystretch
0669fda1fd Fixes #11384: Correct current time display on script & report forms 2023-01-06 09:42:13 -05:00
kkthxbye-code
39985ebdd1 Fix exception when scheduling a job in the past 2023-01-05 13:52:07 -05:00
Arthur
98f57f2dba 11297 have custom field form display content-type instead of model 2022-12-27 15:50:08 -05:00
jeremystretch
758030733c #8366: Misc cleanup 2022-12-12 15:27:37 -05:00
jeremystretch
3468e8c8ae #9623: Misc cleanup 2022-12-12 12:56:38 -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
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
23c0ca456f #4347: Rename NetBoxModelCSVForm to NetBoxModelImportForm 2022-11-15 12:24:57 -05:00
jeremystretch
355678274d #9623: Add slug field to SavedFilter 2022-11-15 10:44:12 -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
jeremystretch
91c6bbcd78 Closes #10695: Rename forms/models.py to forms/model_forms.py 2022-10-25 16:26:05 -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
5e5228ff12 Fix JobResultFilterset to use DateTimeField to perserve bc compat 2022-10-21 15:53:39 +02:00
kkthxbye-code
1d9808a92a Added scheduled_time field to JobResult model 2022-10-16 13:42:28 +02:00