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

35 lines
727 B
Python
Raw Normal View History

from netbox.search import SearchIndex, register_search
2022-10-21 13:16:16 -04:00
from . import models
@register_search
class CustomFieldIndex(SearchIndex):
model = models.CustomField
fields = (
('name', 100),
('label', 100),
('description', 500),
('comments', 5000),
)
display_attrs = ('description',)
2022-10-21 13:16:16 -04:00
@register_search
class JournalEntryIndex(SearchIndex):
2022-10-21 13:16:16 -04:00
model = models.JournalEntry
fields = (
('comments', 5000),
)
category = 'Journal'
display_attrs = ('kind', 'created_by')
@register_search
class WebhookEntryIndex(SearchIndex):
model = models.Webhook
fields = (
('name', 100),
('description', 500),
)
display_attrs = ('description',)