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

1719 Commits

Author SHA1 Message Date
224d64007a 14147 Prevent logging to Change Log when no changes are made ()
* 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 ()
* 14424 remove ChangeLoggedModel from StagedChange

* 14424 rename migration
2023-12-11 10:50:07 -05:00
b532435a6d Closes : Add indexes for all GenericForeignKey fields ()
* Closes : Add PostgreSQL indexes for all GenericForeignKeys

* Add note about GFK indexes to developer docs
2023-12-07 14:02:51 -05:00
5d57e9863d : Simplify form logic for script EventRules 2023-12-04 10:57:29 -05:00
cfc20f910e : Fix migration 2023-12-04 10:21:37 -05:00
0c9919a5e8 : Capture exception class when recording job error 2023-12-01 10:54:46 -05:00
0340a5e8d6 : Clean up custom field form field help text 2023-12-01 10:24:12 -05:00
85ab7adca6 Closes : Move & rename process_webhook() 2023-12-01 08:25:01 -05:00
4fc0a999ea Closes : Introduce job_start and job_end signals ()
* Introduce job_start and job_end signals, and receivers to process event rules

* Complete signals documentation
2023-11-30 19:36:41 -05:00
b812a50ca2 Closes : Add a description field to Webhook () 2023-11-30 17:02:45 -05:00
a38a38218b 14132 Add EventRule - change webhook and add in script processing to events ()
---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-11-30 16:36:33 -05:00
b83fcc6077 Merge branch 'develop' into feature 2023-11-29 20:25:44 -05:00
ac3fc25dfd Fixes : Fix CustomFieldChoiceSet search filter 2023-11-29 17:20:18 -05:00
6dddb6c9d2 Fixes : Fix jobs count for reports with a custom name 2023-11-29 17:19:02 -05:00
c43c63a817 14346 fix missing function call convert
In PR  (commit 8224644) _get_report was modified to do the call on the variable without changing the call later on.

This commit fixes that and removes the call on the variable.

Signed-off-by: Josef Johansson <josef@oderland.se>
2023-11-29 15:58:14 -05:00
40763b58bd 14299 change webhook timestamp to isoformat ()
* 14299 change timestamp to isoformat

* Omit redundant str() casting

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-11-28 17:01:03 -05:00
975a647d9a Closes : Move ConfigRevision to core ()
* 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
18422e1d26 Closes : Move form mixins ()
* Move form mixins from extras app to netbox app

* Remove obsolete extras/admin.py
2023-11-22 13:49:26 -05:00
a73ba00aa0 Closes : Improve options for controlling custom field visibility ()
* 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
e13bf48a35 Add /api/virtualization/virtual-machines/{id}/render-config/ endpoint ()
* Add /api/virtualization/virtual-machines/{id}/render-config/ endpoint

* Update Docstring "Device" -> "Virtual Machine"

Docstring should mention "..this Virtual Machine" instead of "...this Device", thanks @LuPo!

* Move config rendering logic to new RenderConfigMixin

* Add tests for render-config API endpoint

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-11-17 08:32:58 -05:00
e15647a2ce Closes : Filter ContentTypes by supported feature ()
* 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
3d20276f55 Closes : Display additional object attributes in global search results ()
* 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
ac91d4e5e5 Merge branch 'develop' into feature 2023-11-09 16:06:26 -05:00
6b89da2233 Closes : Add primary_ip4 and primary_ip6 filters to VirtualMachine and VirtualDeviceContext filtersets ()
* Add primary_ip4 and primary_ip6 filters for VirtualMachine and VirtualDeviceContext filtersets ()

* Add PrimaryIPFilterSet to __all__

---------

Co-authored-by: Artem I. Kotik <artem.i.kotik@ringcentral.com>
Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-11-09 09:56:43 -05:00
8dcbd66de6 Closes : Public model registration ()
* Initial work on 

* Clarify documentation

* Reference public models registry when populating models for ConfigTemplate context
2023-11-03 10:32:59 -04:00
c2d1988cb3 Closes : Order global search results of equivalent weight by value () 2023-11-01 11:56:14 -04:00
7323668dd0 Closes : Record error message on failed jobs () 2023-10-31 08:34:57 -04:00
edc4a35296 Initial work on : Protection rules () 2023-10-30 14:36:56 -04:00
c4e765c4a8 Closes : translation cleanup ()
* Translations cleanup

* Tweak variable names; misc string cleanup

* Misc cleanup
2023-10-30 13:38:03 -04:00
450790ab4a Closes : Refactor view action mappings ()
* Merge actions and action_perms into a single mapping

* Update obsolete permission maps

* Update obsolete action lists

* Normalize empty permission mappings

* Cleanup

* Add deprecation warnings

* Introduce DEFAULT_ACTION_PERMISSIONS constant
2023-10-20 15:08:09 -04:00
3f40ee5501 Closes : Move extras.plugins to netbox.plugins ()
* Move extras.plugins to netbox.plugins & add deprecation warnings

* Move plugin template tags from extras to utilities

* Move plugins tests from extras to netbox

* Add TODO reminders for v4.0
2023-10-20 11:24:08 -04:00
7983c2590e 14025 fix script name checking ()
* 14025 fix script name checking

* 14025 fix script name checking

* 14025 add file extension validation and simplify get logic

* 14025 match start of string with regex

* 14025 backout changes to model_forms

* 14025 add filepatch checking to reports
2023-10-17 10:57:50 -04:00
285187542d Adds selection custom field labels to UI 2023-10-05 15:02:22 -04:00
ef460a38ed 13944 fix report detail api 2023-10-03 14:39:46 -04:00
4dd229e73a Fixes : Remove 'default' choice for dashboard widget color 2023-09-26 15:24:20 -04:00
b759d694ee Fixes : Fix valid response when no matching choice values are found 2023-09-26 12:08:05 -04:00
f9ceaad284 : Add is_valid property to Report class 2023-09-26 10:53:38 -04:00
e67624f042 Fixes : Fix behavior for reports without test methods () 2023-09-26 10:41:09 -04:00
04796a6ac6 Fix creating config template using rest api ()
* Fix creation of extras/config-templates objects using the REST API

* Update serializers.py
2023-09-25 13:33:01 -04:00
f5dd7d853a 13809 fix ConfigRevision edit if custom validators ()
* 13809 fix ConfigRevision edit, check if custom validator JSON serializable

* 13809 check json rendering for all fields

* Refactor field initialization logic to more cleanly handle statically configured values

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-09-20 14:11:25 -04:00
6e4b4a553b 12685 use markdown for custom fields added to form ()
* 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
8e251ac33c 13757 Fix ConfigContext reference to DeviceType ()
* 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
9aa7444bf9 Fixes : Fix tag exclusion support for contact assignments 2023-09-18 11:08:49 -04:00
487827c776 13768 fix typo 2023-09-15 09:40:27 -04:00
6939bf8aed Fixes : Ensure dashboard widget heading text has sufficient contrast ()
* Fixes : Ensure dashboard widget heading text has sufficient contrast in both light & dark modes

* Change foreground color for teal background
2023-09-13 10:56:03 -04:00
b7cfb2f7d9 Adds csv dialect detection to bulk import view ()
* adds csv dialect detection to bulk import view 

* adds sane delimiters for dialect detection 

* adds csv delimiter tests 

* adds csv delimiter on the form

* pass delimiter to clean_csv method 

* fix tests for csv import 

* fix tests for csv import 

* fix tests for csv import 

* fix tests for csv import 

* Improve auto-detection of import data format

* Misc cleanup

* Include tab as a supported delimiting character for auto-detection

* Move delimiting chars to a separate constant for easy reference

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-09-12 16:48:40 -04:00
75b71890a4 Misc i18n cleanup 2023-09-11 15:59:50 -04:00
2d1457b94b Fixes: - Fix custom field exceptions and validation ()
* Fixes:  - 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
9d851924c8 13674 fix ReportSerializer ()
* 13674 fix ReportSerializer

* Remove test_methods attr from Report class

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-09-06 08:44:25 -04:00
f962fb3b53 Closes : Add optional staff_only attribute to MenuItem ()
* Closes : Add optional staff_only attribute to MenuItem

* Add missing file

* Add release note
2023-08-31 11:23:44 -04:00