Jeremy Stretch
2a3b85a32f
Move clean_html() & foreground_color() to utilities.html
2024-03-22 08:59:52 -04:00
Jeremy Stretch
b92d3245c8
Move serialize_object() & deserialize_object() to utilities.serialization
2024-03-22 08:59:52 -04:00
Jeremy Stretch
f49819ebc2
Move ConfigTemplateLoader from utilities.jinja2 to extras.jinja2
2024-03-22 08:59:52 -04:00
Jeremy Stretch
a9bb4c5c3e
Move choice sets from utilities.choices to netbox.choices
2024-03-22 08:59:52 -04:00
Jeremy Stretch
78bd7dec48
Merge branch 'develop' into feature
2024-03-15 12:32:54 -04:00
Jeremy Stretch
8fe3f5e3fd
Closes #14366 : Enable custom links on ConfigContexts and ConfigTemplates
2024-03-13 14:44:41 -04:00
Jeremy Stretch
78dd65219f
Closes #15357 : Rename CustomField.object_type to related_object_type ( #15366 )
2024-03-09 06:16:17 -05:00
Jeremy Stretch
0e89f46601
#15277 : Clean up references to object types in templates
2024-03-04 11:49:39 -05:00
Jeremy Stretch
570f64784f
Update Tag.object_types to reference ObjectType
2024-03-04 09:51:32 -05:00
Jeremy Stretch
e0165539b3
Rename ImageAttachment.content_type to object_type
2024-03-04 08:33:44 -05:00
Jeremy Stretch
ce6b2666a9
Rename SavedFilter.content_types to object_types & use ObjectType proxy
2024-03-04 08:33:44 -05:00
Jeremy Stretch
bef17e5a95
Rename ExportTemplate.content_types to object_types & use ObjectType proxy
2024-03-04 08:33:44 -05:00
Jeremy Stretch
e51d71d7e6
Rename EventRule.content_types to object_types & use ObjectType proxy
2024-03-04 08:33:44 -05:00
Jeremy Stretch
ba514aceac
Rename CustomLink.content_types to object_types & use ObjectType proxy
2024-03-04 08:33:44 -05:00
Jeremy Stretch
aeeec284a5
Rename CustomField.content_types to object_types & use ObjectType proxy
2024-03-04 08:33:44 -05:00
Jeremy Stretch
0df68bf291
Rename ContentType proxy model to ObjectType
2024-03-04 08:33:44 -05:00
Arthur Hanson
ca2ee436a0
Closes #14438 : Database representation of scripts
...
- Introduces the Script model to represent individual Python classes within a ScriptModule file
- Automatically migrates jobs & event rules
---------
Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com >
2024-02-23 08:27:37 -05:00
Jeremy Stretch
3ddacf4b88
Merge branch 'develop' into feature
2024-02-21 16:24:23 -05:00
Abhimanyu Saharan
a3b8262ab0
Added index on cachevalue ( #15199 )
...
* added index on cachevalue #14966
* Update netbox/extras/models/search.py
Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com >
* fixed migration
---------
Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com >
2024-02-21 13:20:55 -05:00
Arthur Hanson
11697d19a6
12510 Merge Scripts and Reports ( #14976 )
...
* 12510 move reports to use BaseScript
* 12510 merge report into script view
* 12510 add migration for job report to script
* 12510 update templates
* 12510 remove reports
* 12510 cleanup
* 12510 legacy jobs
* 12510 legacy jobs
* 12510 fixes
* 12510 review changes
* 12510 review changes
* 12510 update docs
* 12510 review changes
* 12510 review changes
* 12510 review changes
* 12510 review changes
* 12510 main log results to empty string
* 12510 move migration
* Introduce an internal log level for debug to simplify Script logging
* Misc cleanup
* Remove obsolete is_valid() method
* Reformat script job data (log, output, tests)
* Remove ScriptLogMessageSerializer
* Fix formatting of script logs
* Record a timestamp with script logs
* Rename _current_method to _current_test
* Clean up template
* Remove obsolete runreport management command
* Misc cleanup & refactoring
* Clean up template
* Clean up migration
* Clean up docs
---------
Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com >
2024-02-07 12:02:09 -05:00
Jeremy Stretch
74e67afa41
Merge branch 'develop' into feature
2024-02-05 14:38:26 -05:00
Daniel Sheppard
fd5392563f
Fixes #14572 - Constrains JobView (and related views) badge to specific named job ( #14754 )
...
* Fixes #14572 - Constrains JobView (and related views) badge to specific named job
* Adjust report views to resolve same problem
* Fixed PEP8 error
* Update netbox/templates/extras/script/base.html
Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com >
* Move function to method on PythonModuleMixin
* Update netbox/extras/views.py
Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com >
* Update netbox/extras/views.py
Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com >
* Update netbox/extras/views.py
Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com >
* Update netbox/extras/views.py
Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com >
* Update to mixin and view
---------
Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com >
2024-01-22 14:01:53 -05:00
Abhimanyu Saharan
a87d76ad17
Fixes user delete when they have a bookmark ( #14867 )
...
* fixes user delete when they have a bookmark #14851
* Include migration for user field
---------
Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com >
2024-01-19 15:23:20 -05:00
Arthur Hanson
58227293f3
14637 update to Django 5 ( #14675 )
...
* 14637 update to Django 5
* 14637 fix tests
* 14637 remove extra assignment
* Syntax tweak
---------
Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com >
2024-01-05 13:30:04 -05:00
Jeremy Stretch
1f2f0860fe
Merge branch 'develop' into feature
2023-12-27 16:34:38 -05:00
Jeremy Stretch
4eadc8cfe4
Closes #14240 : Increase min/max validation values for custom fields
2023-12-27 15:41:26 -05:00
Jeremy Stretch
634681a72e
Fixes #13606 : Fix filtering by null for multiselect custom fields
2023-12-27 12:49:31 -05:00
Azmodeszer
3f4a65cc5c
added ! to safe characters
2023-12-21 15:10:38 -05:00
Jeremy Stretch
25e67eb555
Merge branch 'develop' into feature
2023-12-15 16:52:42 -05:00
Arthur Hanson
224d64007a
14147 Prevent logging to Change Log when no changes are made ( #14477 )
...
* 14147 Prevent logging to Change Log when no changes are made
* 14147 add test
* 14147 add exclude_fields to serialize_object
* 14147 make skip empty default to True
* 14147 remove override of to_objectchange
* Misc cleanup
---------
Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com >
2023-12-15 15:17:45 -05:00
Arthur Hanson
965f2de34b
14424 Remove ChangeLoggedModel from StagedChange ( #14476 )
...
* 14424 remove ChangeLoggedModel from StagedChange
* 14424 rename migration
2023-12-11 10:50:07 -05:00
Jeremy Stretch
b532435a6d
Closes #14436 : Add indexes for all GenericForeignKey fields ( #14463 )
...
* Closes #14436 : Add PostgreSQL indexes for all GenericForeignKeys
* Add note about GFK indexes to developer docs
2023-12-07 14:02:51 -05:00
Jeremy Stretch
32264ac3e3
Fixes #14322 : Populate default custom field values when instantiating templated device components
2023-12-06 15:21:34 -05:00
Jeremy Stretch
5d57e9863d
#14132 : Simplify form logic for script EventRules
2023-12-04 10:57:29 -05:00
Jeremy Stretch
0340a5e8d6
#13299 : Clean up custom field form field help text
2023-12-01 10:24:12 -05:00
Jeremy Stretch
b812a50ca2
Closes #14361 : Add a description field to Webhook ( #14380 )
2023-11-30 17:02:45 -05:00
Arthur Hanson
a38a38218b
14132 Add EventRule - change webhook and add in script processing to events ( #14267 )
...
---------
Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com >
2023-11-30 16:36:33 -05:00
Jeremy Stretch
975a647d9a
Closes #14312 : Move ConfigRevision to core ( #14328 )
...
* Move ConfigRevision model & write migrations
* Move ConfigRevision resources from extras to core
* Extend migration to update original content type for ConfigRevision
2023-11-27 16:09:05 -05:00
Jeremy Stretch
a73ba00aa0
Closes #13299 : Improve options for controlling custom field visibility ( #14289 )
...
* Add ui_visible and ui_editable fields
* Extend migration to map new visible/editable values
* Remove ui_visibility field
* Update docs
2023-11-20 13:06:34 -05:00
Jeremy Stretch
e15647a2ce
Closes #14153 : Filter ContentTypes by supported feature ( #14191 )
...
* WIP
* Remove FeatureQuery
* Standardize use of proxy ContentType for models
* Remove TODO
* Correctly filter BookmarksWidget object_types choices
* Add feature-specific object type validation
2023-11-16 12:12:51 -05:00
Jeremy Stretch
3d20276f55
Closes #14134 : Display additional object attributes in global search results ( #14154 )
...
* WIP
* Add display_attrs for all indexers
* Linkify object attributes
* Clean up prefetch logic
* Use tooltips for display attributes
* Simplify template code
* Introduce get_indexer() utility function
* Add to examples in docs
* Use tooltips to display long strings
2023-11-09 16:21:09 -05:00
Jeremy Stretch
8dcbd66de6
Closes #13427 : Public model registration ( #14152 )
...
* Initial work on #13427
* Clarify documentation
* Reference public models registry when populating models for ConfigTemplate context
2023-11-03 10:32:59 -04:00
Jeremy Stretch
c2d1988cb3
Closes #14035 : Order global search results of equivalent weight by value ( #14140 )
2023-11-01 11:56:14 -04:00
Jeremy Stretch
c4e765c4a8
Closes #14141 : translation cleanup ( #14143 )
...
* Translations cleanup
* Tweak variable names; misc string cleanup
* Misc cleanup
2023-10-30 13:38:03 -04:00
sleepinggenius2
285187542d
Adds selection custom field labels to UI
2023-10-05 15:02:22 -04:00
Arthur Hanson
6e4b4a553b
12685 use markdown for custom fields added to form ( #13828 )
...
* 12685 use markdown for custom fields added to form
* 13809 change markdown to use utilities
* Add help_text for CustomField description indicating Markdown support
---------
Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com >
2023-09-20 14:06:04 -04:00
Arthur Hanson
8e251ac33c
13757 Fix ConfigContext reference to DeviceType ( #13804 )
...
* 13757 do prefetch to work around Django issue with vars in init (DeviceType)
* 13757 use self.__dict to access vars in init
* 13757 change test
2023-09-20 09:56:52 -04:00
Jeremy Stretch
75b71890a4
Misc i18n cleanup
2023-09-11 15:59:50 -04:00
Daniel Sheppard
2d1457b94b
Fixes : #13682 - Fix custom field exceptions and validation ( #13685 )
...
* Fixes : #13682 - Fix custom field exceptions and validation
* Add tests
* Remove default setting for multi-select/multi-object and return slice of choices and annotate.
* Remove redundant default choice valiadtion; introduce values property on CustomFieldChoiceSet
* Refactor test
---------
Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com >
2023-09-06 10:47:18 -04:00
Jeremy Stretch
2544e2bf18
Fixes #13622 : Fix exception when viewing current config and no revisions have been created
2023-08-31 11:11:56 -04:00