mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-25 18:08:38 -06:00
Closes #3659: Add filtering for objects in admin UI
This commit is contained in:
parent
bd4b496d14
commit
391c42300e
@ -6,6 +6,7 @@
|
|||||||
* [#3499](https://github.com/netbox-community/netbox/issues/3499) - Add `ca_file_path` to Webhook model to support user supplied CA certificate verification of webhook requests
|
* [#3499](https://github.com/netbox-community/netbox/issues/3499) - Add `ca_file_path` to Webhook model to support user supplied CA certificate verification of webhook requests
|
||||||
* [#3594](https://github.com/netbox-community/netbox/issues/3594) - Add ChoiceVar for custom scripts
|
* [#3594](https://github.com/netbox-community/netbox/issues/3594) - Add ChoiceVar for custom scripts
|
||||||
* [#3619](https://github.com/netbox-community/netbox/issues/3619) - Add 400GE OSFP interface type
|
* [#3619](https://github.com/netbox-community/netbox/issues/3619) - Add 400GE OSFP interface type
|
||||||
|
* [#3659](https://github.com/netbox-community/netbox/issues/3659) - Add filtering for objects in admin UI
|
||||||
|
|
||||||
## Bug Fixes
|
## Bug Fixes
|
||||||
|
|
||||||
|
@ -40,6 +40,9 @@ class WebhookAdmin(admin.ModelAdmin):
|
|||||||
'name', 'models', 'payload_url', 'http_content_type', 'enabled', 'type_create', 'type_update',
|
'name', 'models', 'payload_url', 'http_content_type', 'enabled', 'type_create', 'type_update',
|
||||||
'type_delete', 'ssl_verification',
|
'type_delete', 'ssl_verification',
|
||||||
]
|
]
|
||||||
|
list_filter = [
|
||||||
|
'enabled', 'type_create', 'type_update', 'type_delete', 'obj_type',
|
||||||
|
]
|
||||||
form = WebhookForm
|
form = WebhookForm
|
||||||
|
|
||||||
def models(self, obj):
|
def models(self, obj):
|
||||||
@ -70,7 +73,12 @@ class CustomFieldChoiceAdmin(admin.TabularInline):
|
|||||||
@admin.register(CustomField, site=admin_site)
|
@admin.register(CustomField, site=admin_site)
|
||||||
class CustomFieldAdmin(admin.ModelAdmin):
|
class CustomFieldAdmin(admin.ModelAdmin):
|
||||||
inlines = [CustomFieldChoiceAdmin]
|
inlines = [CustomFieldChoiceAdmin]
|
||||||
list_display = ['name', 'models', 'type', 'required', 'filter_logic', 'default', 'weight', 'description']
|
list_display = [
|
||||||
|
'name', 'models', 'type', 'required', 'filter_logic', 'default', 'weight', 'description',
|
||||||
|
]
|
||||||
|
list_filter = [
|
||||||
|
'type', 'required', 'obj_type',
|
||||||
|
]
|
||||||
form = CustomFieldForm
|
form = CustomFieldForm
|
||||||
|
|
||||||
def models(self, obj):
|
def models(self, obj):
|
||||||
@ -106,7 +114,12 @@ class CustomLinkForm(forms.ModelForm):
|
|||||||
|
|
||||||
@admin.register(CustomLink, site=admin_site)
|
@admin.register(CustomLink, site=admin_site)
|
||||||
class CustomLinkAdmin(admin.ModelAdmin):
|
class CustomLinkAdmin(admin.ModelAdmin):
|
||||||
list_display = ['name', 'content_type', 'group_name', 'weight']
|
list_display = [
|
||||||
|
'name', 'content_type', 'group_name', 'weight',
|
||||||
|
]
|
||||||
|
list_filter = [
|
||||||
|
'content_type',
|
||||||
|
]
|
||||||
form = CustomLinkForm
|
form = CustomLinkForm
|
||||||
|
|
||||||
|
|
||||||
@ -116,7 +129,12 @@ class CustomLinkAdmin(admin.ModelAdmin):
|
|||||||
|
|
||||||
@admin.register(Graph, site=admin_site)
|
@admin.register(Graph, site=admin_site)
|
||||||
class GraphAdmin(admin.ModelAdmin):
|
class GraphAdmin(admin.ModelAdmin):
|
||||||
list_display = ['name', 'type', 'weight', 'source']
|
list_display = [
|
||||||
|
'name', 'type', 'weight', 'source',
|
||||||
|
]
|
||||||
|
list_filter = [
|
||||||
|
'type',
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
@ -139,7 +157,12 @@ class ExportTemplateForm(forms.ModelForm):
|
|||||||
|
|
||||||
@admin.register(ExportTemplate, site=admin_site)
|
@admin.register(ExportTemplate, site=admin_site)
|
||||||
class ExportTemplateAdmin(admin.ModelAdmin):
|
class ExportTemplateAdmin(admin.ModelAdmin):
|
||||||
list_display = ['name', 'content_type', 'description', 'mime_type', 'file_extension']
|
list_display = [
|
||||||
|
'name', 'content_type', 'description', 'mime_type', 'file_extension',
|
||||||
|
]
|
||||||
|
list_filter = [
|
||||||
|
'content_type',
|
||||||
|
]
|
||||||
form = ExportTemplateForm
|
form = ExportTemplateForm
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user