netbox/netbox/wireless/search.py
Jason Novinger c0b019b735 Adds WirelessLANGroup.comments to all the required places
- [x] 1. Add the field to the model class
- [x] 2. Generate and run database migrations
- [NA] 3. Add validation logic to clean()
- [NA] 4. Update relevant querysets
- [x] 5. Update API serializer
- [x] 6. Add fields to forms
    - [x] wireless.forms.model_forms, create/edit (e.g. model_forms.py)
    - [x] wireless.forms.bulk_edit, bulk edit
    - [x] wireless.forms.bulk_import, CSV import
    - [NA] filter (UI and API)
- [x] 7. Extend object filter set
- [NA] 8. Add column to object table (Note: was already present)
- [x] 9. Update the SearchIndex
- [x] 10. Update the UI templates
- [x] 11. Create/extend test cases
    - [NA] models
    - [x] views
    - [NA] forms
    - [x] filtersets
    - [x] api
- [NA] 12. Update the model's documentation
2025-03-13 11:52:06 -05:00

39 lines
909 B
Python

from netbox.search import SearchIndex, register_search
from . import models
@register_search
class WirelessLANIndex(SearchIndex):
model = models.WirelessLAN
fields = (
('ssid', 100),
('description', 500),
('auth_psk', 2000),
('comments', 5000),
)
display_attrs = ('group', 'status', 'vlan', 'tenant', 'scope', 'description')
@register_search
class WirelessLANGroupIndex(SearchIndex):
model = models.WirelessLANGroup
fields = (
('name', 100),
('slug', 110),
('description', 500),
('comments', 5000),
)
display_attrs = ('description',)
@register_search
class WirelessLinkIndex(SearchIndex):
model = models.WirelessLink
fields = (
('ssid', 100),
('description', 500),
('auth_psk', 2000),
('comments', 5000),
)
display_attrs = ('status', 'tenant', 'description')