2022-10-10 11:00:59 -07:00
|
|
|
from netbox.search import SearchIndex, register_search
|
2022-10-21 13:16:16 -04:00
|
|
|
from . import models
|
2022-10-10 11:00:59 -07:00
|
|
|
|
|
|
|
|
2024-04-19 14:50:42 -04:00
|
|
|
@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
|
2022-10-10 11:00:59 -07:00
|
|
|
class JournalEntryIndex(SearchIndex):
|
2022-10-21 13:16:16 -04:00
|
|
|
model = models.JournalEntry
|
|
|
|
fields = (
|
|
|
|
('comments', 5000),
|
|
|
|
)
|
2022-10-10 11:00:59 -07:00
|
|
|
category = 'Journal'
|
2023-12-21 14:24:05 -05:00
|
|
|
display_attrs = ('kind', 'created_by')
|
2023-11-30 17:02:45 -05:00
|
|
|
|
|
|
|
|
|
|
|
@register_search
|
|
|
|
class WebhookEntryIndex(SearchIndex):
|
|
|
|
model = models.Webhook
|
|
|
|
fields = (
|
|
|
|
('name', 100),
|
|
|
|
('description', 500),
|
|
|
|
)
|
2023-12-21 14:24:05 -05:00
|
|
|
display_attrs = ('description',)
|