mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-16 12:12:53 -06:00
feat(search): Add search index for tags
Introduces a search index for the Tag model to enable global search for Tags. Includes fields for name, slug, and description with corresponding weight values. Display attributes are limited to the description field. Fixes #17073
This commit is contained in:
parent
0c04a8d301
commit
2abb56b457
@ -24,6 +24,17 @@ class JournalEntryIndex(SearchIndex):
|
||||
display_attrs = ('kind', 'created_by')
|
||||
|
||||
|
||||
@register_search
|
||||
class TagIndex(SearchIndex):
|
||||
model = models.Tag
|
||||
fields = (
|
||||
('name', 100),
|
||||
('slug', 110),
|
||||
('description', 500),
|
||||
)
|
||||
display_attrs = ('description',)
|
||||
|
||||
|
||||
@register_search
|
||||
class WebhookEntryIndex(SearchIndex):
|
||||
model = models.Webhook
|
||||
|
Loading…
Reference in New Issue
Block a user