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

59 lines
1.1 KiB
Python
Raw Normal View History

from netbox.search import SearchIndex, register_search
2022-10-21 13:16:16 -04:00
from . import models
2022-10-21 13:16:16 -04:00
@register_search
class ContactIndex(SearchIndex):
model = models.Contact
fields = (
('name', 100),
('title', 300),
('phone', 300),
('email', 300),
('address', 300),
('link', 300),
2022-11-15 10:37:35 -05:00
('description', 500),
2022-10-21 13:16:16 -04:00
('comments', 5000),
)
@register_search
class ContactGroupIndex(SearchIndex):
model = models.ContactGroup
fields = (
('name', 100),
('slug', 110),
('description', 500),
)
@register_search
class ContactRoleIndex(SearchIndex):
model = models.ContactRole
fields = (
('name', 100),
('slug', 110),
('description', 500),
)
@register_search
class TenantIndex(SearchIndex):
2022-10-21 13:16:16 -04:00
model = models.Tenant
fields = (
('name', 100),
('slug', 110),
('description', 500),
('comments', 5000),
)
2022-10-21 13:16:16 -04:00
@register_search
class TenantGroupIndex(SearchIndex):
model = models.TenantGroup
fields = (
('name', 100),
('slug', 110),
('description', 500),
)