Commit Graph

13587 Commits

Author SHA1 Message Date
Jason Novinger
b85a5f471b Extract base NestedGroupModelFilterSet with base search behavior
This can easily be extended (as in the case of LocationFilterSet) by
calling super() and ORing a filter to the queryset that is returned.
See: https://docs.djangoproject.com/en/5.1/ref/models/querysets/#or
2025-03-13 15:36:55 -05:00
Jason Novinger
cbe3f39eb5 Ensures overridden filterset search() methods include fields from OrganizationalModelFilterSet 2025-03-13 11:52:06 -05:00
Jason Novinger
e33c1f1173 Ensures that all new comments fields render Markdown in tables 2025-03-13 11:52:06 -05:00
Jason Novinger
d557936c98 Adds WirelessLANGroup.comments to all the required places
- [x] 1. Add the field to the model class
- [x] 2. Generate and run database migrations
- [NA] 3. Add validation logic to clean()
- [NA] 4. Update relevant querysets
- [x] 5. Update API serializer
- [x] 6. Add fields to forms
    - [x] wireless.forms.model_forms, create/edit (e.g. model_forms.py)
    - [x] wireless.forms.bulk_edit, bulk edit
    - [x] wireless.forms.bulk_import, CSV import
    - [NA] filter (UI and API)
- [x] 7. Extend object filter set
- [NA] 8. Add column to object table (Note: was already present)
- [x] 9. Update the SearchIndex
- [x] 10. Update the UI templates
- [x] 11. Create/extend test cases
    - [NA] models
    - [x] views
    - [NA] forms
    - [x] filtersets
    - [x] api
- [NA] 12. Update the model's documentation
2025-03-13 11:52:06 -05:00
Jason Novinger
e15468f8eb Adds TenantGroup.comments to the required locations
- [x] 1. Add the field to the model class
- [x] 2. Generate and run database migrations
- [NA] 3. Add validation logic to clean()
- [NA] 4. Update relevant querysets
- [x] 5. Update API serializer
- [x] 6. Add fields to forms
    - [x] tenancy.forms.model_forms, create/edit (e.g. model_forms.py)
    - [x] tenancy.forms.bulk_edit, bulk edit
    - [x] tenancy.forms.bulk_import, CSV import
    - [NA] filter (UI and API)
- [x] 7. Extend object filter set
- [x] 8. Add column to object table
- [x] 9. Update the SearchIndex
- [x] 10. Update the UI templates
- [x] 11. Create/extend test cases
    - [NA] models
    - [x] views
    - [NA] forms
    - [x] filtersets
    - [x] api
- [NA] 12. Update the model's documentation
2025-03-13 11:52:06 -05:00
Jason Novinger
790acd01e5 Adds ContactGroup.comments in the required locations
- [x] 1. Add the field to the model class
- [x] 2. Generate and run database migrations
- [NA] 3. Add validation logic to clean()
- [NA] 4. Update relevant querysets
- [x] 5. Update API serializer
- [x] 6. Add fields to forms
    - [x] tenancy.forms.model_forms, create/edit (e.g. model_forms.py)
    - [x] tenancy.forms.buld_edit, bulk edit
    - [x] tenancy.dorms.bulk_import, CSV import
    - [NA] filter (UI and API)
- [x] 7. Extend object filter set
- [x] 8. Add column to object table
- [x] 9. Update the SearchIndex
- [x] 10. Update the UI templates
- [x] 11. Create/extend test cases
    - [NA] models
    - [x] views
    - [NA] forms
    - [x] filtersets
    - [x] api
- [NA] 12. Update the model's documentation
2025-03-13 11:52:06 -05:00
Jason Novinger
f487214398 Adds SiteGroup.comments in the required locations
- [x] 1. Add the field to the model class
- [x] 2. Generate and run database migrations
- [NA] 3. Add validation logic to clean()
- [NA] 4. Update relevant querysets
- [x] 5. Update API serializer
- [x] 6. Add fields to forms
    - [x] dcim.forms.model_forms.LocationForm, create/edit (e.g. model_forms.py)
    - [x] dcim.forms.buld_edit.LocationBulkEditForm, bulk edit
    - [x] dcim.dorms.bulk_import.LocationImportForm, CSV import
    - [x] filter (UI and API)
- [x] 7. Extend object filter set
- [x] 8. Add column to object table
- [x] 9. Update the SearchIndex
- [x] 10. Update the UI templates
- [x] 11. Create/extend test cases
    - [NA] models
    - [x] views
    - [NA] forms
    - [x] filtersets
    - [x] api
- [x] 12. Update the model's documentation
2025-03-13 11:52:06 -05:00
Jason Novinger
6391eb598f Adds Region.comments field in the required locations
- [x] 1. Add the field to the model class
- [x] 2. Generate and run database migrations
- [NA] 3. Add validation logic to clean()
- [NA] 4. Update relevant querysets
- [x] 5. Update API serializer
- [ ] 6. Add fields to forms
    - [x] dcim.forms.model_forms.RegionForm, create/edit (e.g. model_forms.py)
    - [x] dcim.forms.buld_edit.RegionBulkEditForm, bulk edit
    - [x] dcim.dorms.bulk_import.RegionImportForm, CSV import
    - [NA] filter (UI and API)
- [x] 7. Extend object filter set
- [x] 8. Add column to object table
- [x] 9. Update the SearchIndex
- [x] 10. Update the UI templates
- [x] 11. Create/extend test cases
    - [NA] models
    - [x] views
    - [NA] forms
    - [x] filtersets
    - [x] api
- [NA] 12. Update the model's documentation
2025-03-13 11:52:06 -05:00
Jason Novinger
5097a64e6a Update Location detail UI template 2025-03-13 11:52:06 -05:00
Jason Novinger
5fc888bfad Adds Location.comments field in the required locations
- [x] 1. Add the field to the model class
- [x] 2. Generate and run database migrations
- [NA] 3. Add validation logic to clean()
- [NA] 4. Update relevant querysets
- [x] 5. Update API serializer
- [x] 6. Add fields to forms
    - [x] dcim.forms.model_forms.LocationForm, create/edit (e.g. model_forms.py)
    - [x] dcim.forms.buld_edit.LocationBulkEditForm, bulk edit
    - [x] dcim.dorms.bulk_import.LocationImportForm, CSV import
    - [x] filter (UI and API)
        - [NA] UI
            - Note: could not find any comments related things in filtersets
        - [x] API
- [x] 7. Extend object filter set
- [x] 8. Add column to object table
- [x] 9. Update the SearchIndex
- [x] 10. Update the UI templates
- [x] 11. Create/extend test cases
    - [NA] models
    - [x] views
    - [NA] forms
    - [x] filtersets
    - [x] api
- [NA] 12. Update the model's documentation
2025-03-13 11:52:06 -05:00
Jason Novinger
d3a88a4c81 Adds comments field to abstract NestedGroupModel and associated migrations
Models affected:
- dcim: `Location`, `Region`, `SiteGroup`
- tenancy`: `ContactGroup`, `TenantGroup`
- wireless: `WirelessLANGroup`
2025-03-13 11:52:06 -05:00
bctiemann
84d799b663 Merge pull request #18822 from netbox-community/18743-django-52
Closes #18743: Upgrade to Django 5.2
2025-03-13 10:58:58 -04:00
Tobias Genannt
f4581ae388 Fixes: #18568 Update mkdocstrings and adapt config 2025-03-13 10:25:42 -04:00
Jeremy Stretch
2b771a8a35 Adapt RemoteUserMiddleware for Django 5.2 2025-03-13 09:34:00 -04:00
Jeremy Stretch
116d42de74 Closes #18743: Upgrade to Django 5.2 2025-03-13 09:34:00 -04:00
bctiemann
f738b518fe Closes: #18535 - Skip incompatible plugins during startup (#18537)
* Skip incompatible plugins during startup and remove from PLUGINS

* Handle exceptions on request processors in incompatible plugins, and display status in Plugins page

* Revert "Handle exceptions on request processors in incompatible plugins, and display status in Plugins page"

This reverts commit d97bf2ab146114cc13d751878a17a383de0fd5f8.

* Resolve merge conflicts

* Skip incompatible plugins during startup and remove from PLUGINS

* Rename Installed column to Active, and add custom PluginActiveColumn with tooltip

* Fix is_installed

* Simplify plugin_config.validate syntax

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

* Merge feature

* Revert "Merge feature"

This reverts commit d1ea60f082.

* Undo simplification

* Add failed_to_load logic

* Use a TemplateColumn for is_installed

* Remove custom column class

* Remove merge vestige

* Simplify plugin attributes for is_installed column

* Use placeholders for false values to increase legibility of the plugins table

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2025-03-10 10:51:41 -04:00
Jeremy Stretch
8f39c645b4 Closes #7598: Enable custom field filtering for GraphQL (#18701) 2025-03-07 10:49:06 -08:00
bctiemann
34f0afecb6 Fixes: #18808 - Fix incorrect dependencies on squashed migrations (#18827) 2025-03-07 10:20:34 -08:00
Jason Novinger
306a67346f Closes #17608: Adds L2VPN.status field (#18791) 2025-03-06 14:06:06 -08:00
Jeremy Stretch
eb1fb127e3 Closes #18627: Proxy routing (#18681)
* Introduce proxy routing

* Misc cleanup

* Document PROXY_ROUTERS parameter
2025-03-04 08:24:54 -05:00
bctiemann
612343f72e Merge pull request #18748 from netbox-community/18352-add-poweroutlet-status
Closes #18352: Adds PowerOutlet.status field
2025-03-03 20:07:39 -05:00
Jason Novinger
f4e26ca673 Adds PowerOutlet.status to detail view
Also fixes color display in list table and detail template
2025-03-03 12:22:34 -06:00
Jeremy Stretch
c6490da5c5 Closes #18287: Enable periodic synchronization for data sources (#18747)
* Add sync_interval to DataSource

* Enqueue a SyncDataSourceJob when needed after saving a DataSource

* Fix logic for clearing pending jobs on interval change

* Fix lingering background tasks after modifying DataSource
2025-03-03 09:29:40 -05:00
Jason Novinger
7b98e5a10f Adds initial PowerOutletForm tests 2025-02-27 15:02:14 -06:00
Jeremy Stretch
1c6af84ffc Closes #17424: Add custom visibility toggle to ViewTab 2025-02-27 10:41:10 -05:00
Jason Novinger
d168b11d92 Extend filterset/model tests to cover PowerOutlet.status 2025-02-26 17:09:56 -06:00
Jason Novinger
28d6f66f31 Updates PowetOutler docs to include new status field 2025-02-26 16:51:07 -06:00
Jason Novinger
6c9c546267 Updates PowerOutletIndex to display status field in results
This seemed inline with status fields on other model search indexes
2025-02-26 16:44:54 -06:00
Jason Novinger
bc50280cb1 Adds PowerOutlet.status field to PowerOutlet model tables 2025-02-26 16:44:03 -06:00
Jason Novinger
eee2d400e6 Adds status field to PowerOutletSerializer 2025-02-26 16:42:44 -06:00
Jason Novinger
d610d613c6 For #18352, adds PowerOutlet.status field to forms and filtersets 2025-02-26 16:38:11 -06:00
Jason Novinger
6d0f8aa656 For #18352, adds choices, model field, migration
Adds:
- dcim.choices.PowerOutletStatusChoices
- dcim.models.device_components.PowerOutlet.status field with `choices`
  set to PowerOutletStatusChoices
- adds migration for PowerOutlet.status field
- updates breaking view tests
2025-02-26 16:36:09 -06:00
Daniel Sheppard
a77937c461 Fixes: #15924 - Prevent API payload from allowing tagged_vlans while interface mode is set to tagged-all (#17211) 2025-02-26 09:28:02 -08:00
bctiemann
611de153bc Merge pull request #18704 from alehaa/18095-inherit-contacts
Fixes 18095: inherit contacts
2025-02-25 16:08:32 -05:00
Alexander Haase
642c3ca0ca Optimize contact lookup query 2025-02-25 18:36:16 +01:00
bctiemann
341125cd54 Merge pull request #18650 from tobiasge/18635-fix-version-identifier
Close #18635: Show only the semantic version
2025-02-25 12:19:26 -05:00
Jeremy Stretch
00f4359f1f Closes #18623: Upgrade Tabler to v1.0 (#18624)
* Upgrade Tabler to v1.0

* Fix navigation menu colors

* Reduce table column heading font size
2025-02-25 12:13:53 -05:00
Jeremy Stretch
658fc12070 Closes #17793: Introduce a REST API endpoint for tagged objects (#18679)
* Closes #17793: Introduce a REST API endpoint for tagged objects

* Add missing object_id filter to TaggedItemFilterSet
2025-02-25 12:06:44 -05:00
Mathias Guillemot
302eaacd32 Closes: #18434 - Add SPB in L2VPN (#18523)
* Add SPB in L2VPN

* Change category as Other

Co-authored-by: Daniel Sheppard <dans@dansheps.com>

---------

Co-authored-by: Daniel Sheppard <dans@dansheps.com>
2025-02-25 10:06:07 -05:00
Jeremy Stretch
669e893e90 Closes #18072: Remove support for single model registration from PluginTemplateExtension 2025-02-25 09:32:48 -05:00
Arthur Hanson
4f7b5fb121 18296 Add Tenancy to VLAN Groups (#18690)
* 18296 add tenant to vlan groups

* 18296 add tenant to vlan groups

* 18296 add tenant to vlan groups

* 18296 add tenant to vlan groups

* 18296 review changes
2025-02-25 09:13:30 -05:00
Tobias Genannt
5f1929c8eb Close #18635: Show only the semantic version
This modifies the 'netbox-version' to only show the semantic version of Netbox
and adds 'netbox-full-version' to show the full version.

Related issues:
- https://github.com/netbox-community/netbox/issues/15908
- https://github.com/netbox-community/ansible_modules/issues/1381
2025-02-25 07:07:14 +01:00
Alexander Haase
4ea36f6430 Limit inherited contacts to model 2025-02-22 00:06:44 +01:00
Jeremy Stretch
ad70722d3a Closes #18071: Remvoe legacy staged changes functionality 2025-02-20 16:50:37 -05:00
Alexander Haase
e4515dae56 Allow exclusion of inherited contacts 2025-02-18 23:08:47 +01:00
Alexander Haase
85443826c1 Move contact queryset into model 2025-02-18 23:02:57 +01:00
Alexander Haase
4d76da991c Show parent contacts for nested models
When contacts of a nested model are displayed, the contacts of the
parents are also displayed.
2025-02-16 20:04:12 +01:00
Jeremy Stretch
99eb9d5fa6 Closes #18541: Document support for auth_required attribute on PluginMenuItem 2025-02-06 14:45:25 -05:00
Arthur
60acc5f627 Merge branch 'main' into feature 2025-02-04 13:05:40 -08:00
bctiemann
a040c86322 Merge pull request #18569 from netbox-community/release-v4.2.3
Release 4.2.3
2025-02-04 15:35:45 -05:00