mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-14 01:41:22 -06:00
Merge branch 'develop-2.6' into 3077-nested-api-writes
This commit is contained in:
commit
655e48823a
27
CHANGELOG.md
27
CHANGELOG.md
@ -117,36 +117,43 @@ Note that if the provided parameters do not return exactly one object, a validat
|
|||||||
|
|
||||||
### API Device/VM Config Context Included by Default ([#2350](https://github.com/digitalocean/netbox/issues/2350))
|
### API Device/VM Config Context Included by Default ([#2350](https://github.com/digitalocean/netbox/issues/2350))
|
||||||
|
|
||||||
The rendered Config Context for Devices and VMs is now included by default in all API results (list and detail views).
|
The rendered config context for devices and VMs is now included by default in all API results (list and detail views).
|
||||||
Previously the rendered Config Context was only available in the detail view for objects. Users with large amounts of
|
Previously, the rendered config context was only available in the detail view for objects. Users with large amounts of
|
||||||
context data may observe a performance drop when returning multiple objects. To combat this, in cases where the rendered
|
context data may observe a performance drop when returning multiple objects. To combat this, in cases where the rendered
|
||||||
Config Context is not needed, the query parameter `?exclude=config_context` may be added to the request as to remove
|
config context is not needed, the query parameter `?exclude=config_context` may be added to the request as to remove
|
||||||
the Config Context from being included in any results.
|
the config context from being included in any results.
|
||||||
|
|
||||||
### Tag Permissions Changed
|
### Tag Permissions Changed
|
||||||
|
|
||||||
NetBox now makes use of its own `Tag` model instead of the vanilla model which ships with django-taggit. This new model
|
NetBox now makes use of its own `Tag` model instead of the vanilla model which ships with django-taggit. This new model
|
||||||
lives in the `extras` app and thus any permissions that you may have configured using "Taggit | Tag" should be changed
|
lives in the `extras` app and thus any permissions that you may have configured using "Taggit | Tag" should be changed
|
||||||
to now use "Extras | Tag."
|
to now use "Extras | Tag." Also note that the admin interface for tags has been removed as it was redundant to the
|
||||||
|
functionality provided by the front end UI.
|
||||||
|
|
||||||
## Enhancements
|
## Enhancements
|
||||||
|
|
||||||
* [#323](https://github.com/digitalocean/netbox/issues/323) - Enforce per-object type view permissions
|
* [#323](https://github.com/digitalocean/netbox/issues/323) - Enforce per-object type view permissions
|
||||||
* [#1792](https://github.com/digitalocean/netbox/issues/1792) - Add CustomFieldChoices API endpoint
|
* [#1792](https://github.com/digitalocean/netbox/issues/1792) - Add CustomFieldChoices API endpoint
|
||||||
* [#1863](https://github.com/digitalocean/netbox/issues/1863) - Add child object counts to API representation of organizational objects
|
* [#1863](https://github.com/digitalocean/netbox/issues/1863) - Add child object counts to API representation of organizational objects
|
||||||
* [#2324](https://github.com/digitalocean/netbox/issues/2324) - Add `color` option for tags
|
* [#2324](https://github.com/digitalocean/netbox/issues/2324) - Add `color` field for tags
|
||||||
* [#2643](https://github.com/digitalocean/netbox/issues/2643) - Add `description` field to console/power components and device bays
|
* [#2643](https://github.com/digitalocean/netbox/issues/2643) - Add `description` field to console/power components and device bays
|
||||||
* [#2791](https://github.com/digitalocean/netbox/issues/2791) - Add a `comment` field for tags
|
* [#2791](https://github.com/digitalocean/netbox/issues/2791) - Add a `comments` field for tags
|
||||||
* [#2920](https://github.com/digitalocean/netbox/issues/2920) - Rename Interface `form_factor` to `type`
|
* [#2920](https://github.com/digitalocean/netbox/issues/2920) - Rename Interface `form_factor` to `type`
|
||||||
* [#2926](https://github.com/digitalocean/netbox/issues/2926) - Add changelog to the Tag model
|
* [#2926](https://github.com/digitalocean/netbox/issues/2926) - Add changelog to the Tag model
|
||||||
|
|
||||||
## API Changes
|
## API Changes
|
||||||
|
|
||||||
|
* New API endpoints for power modeling: `/api/dcim/power-panels` and `/api/dcim/power-feeds/`
|
||||||
|
* New API endpoint for custom field choices: `/api/extras/_custom_field_choices/`
|
||||||
* ForeignKey fields now accept either the related object PK or a dictionary of attributes describing the related object.
|
* ForeignKey fields now accept either the related object PK or a dictionary of attributes describing the related object.
|
||||||
* dcim.Interface: `form_factor` has been renamed to `type`. Backward-compatibile support for `form_factor` will be maintained until NetBox v2.7.
|
|
||||||
* dcim.Interface: The `type` filter has been renamed to `kind`.
|
|
||||||
* dcim.DeviceType: `instance_count` has been renamed to `device_count`.
|
|
||||||
* Organizational objects now include child object counts. For example, the Role serializer includes `prefix_count` and `vlan_count`.
|
* Organizational objects now include child object counts. For example, the Role serializer includes `prefix_count` and `vlan_count`.
|
||||||
|
* Added a `description` field for all device components.
|
||||||
|
* dcim.Device: The devices list endpoint now includes rendered context data.
|
||||||
|
* dcim.DeviceType: `instance_count` has been renamed to `device_count`.
|
||||||
|
* dcim.Interface: `form_factor` has been renamed to `type`. Backward compatibility for `form_factor` will be maintained until NetBox v2.7.
|
||||||
|
* dcim.Interface: The `type` filter has been renamed to `kind`.
|
||||||
|
* extras.Tag: Added `color` and `comments` fields to the Tag serializer.
|
||||||
|
* virtualization.VirtualMachine: The virtual machines list endpoint now includes rendered context data.
|
||||||
|
|
||||||
## Bug Fixes
|
## Bug Fixes
|
||||||
|
|
||||||
|
@ -2,17 +2,6 @@ from django.conf import settings
|
|||||||
from django.contrib.admin import AdminSite
|
from django.contrib.admin import AdminSite
|
||||||
from django.contrib.auth.admin import GroupAdmin, UserAdmin
|
from django.contrib.auth.admin import GroupAdmin, UserAdmin
|
||||||
from django.contrib.auth.models import Group, User
|
from django.contrib.auth.models import Group, User
|
||||||
from taggit.admin import TagAdmin, TaggedItemInline
|
|
||||||
|
|
||||||
from extras.models import Tag, TaggedItem
|
|
||||||
|
|
||||||
|
|
||||||
class NetBoxTaggedItemInline(TaggedItemInline):
|
|
||||||
model = TaggedItem
|
|
||||||
|
|
||||||
|
|
||||||
class NetBoxTagAdmin(TagAdmin):
|
|
||||||
inlines = [NetBoxTaggedItemInline]
|
|
||||||
|
|
||||||
|
|
||||||
class NetBoxAdminSite(AdminSite):
|
class NetBoxAdminSite(AdminSite):
|
||||||
@ -29,7 +18,6 @@ admin_site = NetBoxAdminSite(name='admin')
|
|||||||
# Register external models
|
# Register external models
|
||||||
admin_site.register(Group, GroupAdmin)
|
admin_site.register(Group, GroupAdmin)
|
||||||
admin_site.register(User, UserAdmin)
|
admin_site.register(User, UserAdmin)
|
||||||
admin_site.register(Tag, NetBoxTagAdmin)
|
|
||||||
|
|
||||||
# Modify the template to include an RQ link if django_rq is installed (see RQ_SHOW_ADMIN_LINK)
|
# Modify the template to include an RQ link if django_rq is installed (see RQ_SHOW_ADMIN_LINK)
|
||||||
if settings.WEBHOOKS_ENABLED:
|
if settings.WEBHOOKS_ENABLED:
|
||||||
|
Loading…
Reference in New Issue
Block a user