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

343 Commits

Author SHA1 Message Date
312291b010 Merge branch 'develop' into feature 2024-05-01 16:09:14 -04:00
a2efec09be Fixes #15891: Ensure deterministic ordering for scripts & reports 2024-05-01 10:46:25 -04:00
365bb4ba17 Fixes #15896: Retain proper formatting for JSON custom field default values 2024-04-30 16:24:26 -04:00
4b21cf604b 14852 delete event-rule when delete script 2024-04-29 15:02:39 -04:00
0f0ab1a3be Closes #15547: Add comments field to CustomField model 2024-04-19 15:10:06 -04:00
77a4300888 Closes #15618: Always use ISO 8601 date & time formatting (#15737)
* Introduce the isodate(), isotime(), and isodatetime() template filters

* Display the relative time on mouse hover

* Render journal entry times in ISO 8601 format

* Use ISO 8601 format when displaying dates & times in a table

* Standardize the use of DateTimeColumn across all tables
2024-04-17 11:46:47 -04:00
5e05041b8b 15671 save module before sync_classes (#15675)
* 15671 save module before sync_classes

* 15671 don't return save
2024-04-15 13:22:56 -04:00
489e956d83 Merge branch 'develop' into feature 2024-04-03 08:43:12 -04:00
3cb68e4bc0 Fixes #15567: Correct typo in help text
Fixes #15567: Correct typo in help text
2024-03-28 16:32:25 -04:00
0cff4c9795 14799 Fix sync of scripts from data source (#15303)
* 14799 fix script creation from data-source

* 14799 dont cache module_scripts

* 14799 fix sync_classes call
2024-03-26 08:36:36 -04:00
6f9f1d9d43 14799 dont cache report member names 2024-03-22 10:27:33 -04:00
6ac700e43f Move object_type_identifier() & object_type_name() to utilities.object_types 2024-03-22 08:59:52 -04:00
8ad73e3f90 Rename content_type_identifier() and content_type_name() 2024-03-22 08:59:52 -04:00
a49eb80f9e Move dict_to_querydict() and normalize_querydict() to utilities.querydict 2024-03-22 08:59:52 -04:00
81ca455fef Move array_to_range(), array_to_string(), deepmerge(), drange(), flatten_dict(), and shallow_compare_dict() to utilities.data 2024-03-22 08:59:52 -04:00
1d3efc90c0 Move utilities.utils.render_jinja2() to utilities.jinja2 2024-03-22 08:59:52 -04:00
c30d22335a Move extras.jinja2.ConfigTemplateLoader to utilities.jinja2.DataFileLoader 2024-03-22 08:59:52 -04:00
2a3b85a32f Move clean_html() & foreground_color() to utilities.html 2024-03-22 08:59:52 -04:00
b92d3245c8 Move serialize_object() & deserialize_object() to utilities.serialization 2024-03-22 08:59:52 -04:00
f49819ebc2 Move ConfigTemplateLoader from utilities.jinja2 to extras.jinja2 2024-03-22 08:59:52 -04:00
a9bb4c5c3e Move choice sets from utilities.choices to netbox.choices 2024-03-22 08:59:52 -04:00
78bd7dec48 Merge branch 'develop' into feature 2024-03-15 12:32:54 -04:00
8fe3f5e3fd Closes #14366: Enable custom links on ConfigContexts and ConfigTemplates 2024-03-13 14:44:41 -04:00
78dd65219f Closes #15357: Rename CustomField.object_type to related_object_type (#15366) 2024-03-09 06:16:17 -05:00
0e89f46601 #15277: Clean up references to object types in templates 2024-03-04 11:49:39 -05:00
570f64784f Update Tag.object_types to reference ObjectType 2024-03-04 09:51:32 -05:00
e0165539b3 Rename ImageAttachment.content_type to object_type 2024-03-04 08:33:44 -05:00
ce6b2666a9 Rename SavedFilter.content_types to object_types & use ObjectType proxy 2024-03-04 08:33:44 -05:00
bef17e5a95 Rename ExportTemplate.content_types to object_types & use ObjectType proxy 2024-03-04 08:33:44 -05:00
e51d71d7e6 Rename EventRule.content_types to object_types & use ObjectType proxy 2024-03-04 08:33:44 -05:00
ba514aceac Rename CustomLink.content_types to object_types & use ObjectType proxy 2024-03-04 08:33:44 -05:00
aeeec284a5 Rename CustomField.content_types to object_types & use ObjectType proxy 2024-03-04 08:33:44 -05:00
0df68bf291 Rename ContentType proxy model to ObjectType 2024-03-04 08:33:44 -05:00
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
3ddacf4b88 Merge branch 'develop' into feature 2024-02-21 16:24:23 -05:00
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
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
74e67afa41 Merge branch 'develop' into feature 2024-02-05 14:38:26 -05:00
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
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
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
1f2f0860fe Merge branch 'develop' into feature 2023-12-27 16:34:38 -05:00
4eadc8cfe4 Closes #14240: Increase min/max validation values for custom fields 2023-12-27 15:41:26 -05:00
634681a72e Fixes #13606: Fix filtering by null for multiselect custom fields 2023-12-27 12:49:31 -05:00
3f4a65cc5c added ! to safe characters 2023-12-21 15:10:38 -05:00
25e67eb555 Merge branch 'develop' into feature 2023-12-15 16:52:42 -05:00
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
965f2de34b 14424 Remove ChangeLoggedModel from StagedChange (#14476)
* 14424 remove ChangeLoggedModel from StagedChange

* 14424 rename migration
2023-12-11 10:50:07 -05:00
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
32264ac3e3 Fixes #14322: Populate default custom field values when instantiating templated device components 2023-12-06 15:21:34 -05:00