mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
#10560: Add new fields to indexers
This commit is contained in:
@ -40,6 +40,7 @@ class ProviderIndex(SearchIndex):
|
||||
fields = (
|
||||
('name', 100),
|
||||
('account', 200),
|
||||
('description', 500),
|
||||
('comments', 5000),
|
||||
)
|
||||
|
||||
|
@ -7,6 +7,8 @@ class CableIndex(SearchIndex):
|
||||
model = models.Cable
|
||||
fields = (
|
||||
('label', 100),
|
||||
('description', 500),
|
||||
('comments', 5000),
|
||||
)
|
||||
|
||||
|
||||
@ -39,6 +41,7 @@ class DeviceIndex(SearchIndex):
|
||||
('asset_tag', 50),
|
||||
('serial', 60),
|
||||
('name', 100),
|
||||
('description', 500),
|
||||
('comments', 5000),
|
||||
)
|
||||
|
||||
@ -69,6 +72,7 @@ class DeviceTypeIndex(SearchIndex):
|
||||
fields = (
|
||||
('model', 100),
|
||||
('part_number', 200),
|
||||
('description', 500),
|
||||
('comments', 5000),
|
||||
)
|
||||
|
||||
@ -136,6 +140,7 @@ class ModuleIndex(SearchIndex):
|
||||
fields = (
|
||||
('asset_tag', 50),
|
||||
('serial', 60),
|
||||
('description', 500),
|
||||
('comments', 5000),
|
||||
)
|
||||
|
||||
@ -156,6 +161,7 @@ class ModuleTypeIndex(SearchIndex):
|
||||
fields = (
|
||||
('model', 100),
|
||||
('part_number', 200),
|
||||
('description', 500),
|
||||
('comments', 5000),
|
||||
)
|
||||
|
||||
@ -176,6 +182,7 @@ class PowerFeedIndex(SearchIndex):
|
||||
model = models.PowerFeed
|
||||
fields = (
|
||||
('name', 100),
|
||||
('description', 500),
|
||||
('comments', 5000),
|
||||
)
|
||||
|
||||
@ -195,6 +202,8 @@ class PowerPanelIndex(SearchIndex):
|
||||
model = models.PowerPanel
|
||||
fields = (
|
||||
('name', 100),
|
||||
('description', 500),
|
||||
('comments', 5000),
|
||||
)
|
||||
|
||||
|
||||
@ -218,6 +227,7 @@ class RackIndex(SearchIndex):
|
||||
('serial', 60),
|
||||
('name', 100),
|
||||
('facility_id', 200),
|
||||
('description', 500),
|
||||
('comments', 5000),
|
||||
)
|
||||
|
||||
@ -227,6 +237,7 @@ class RackReservationIndex(SearchIndex):
|
||||
model = models.RackReservation
|
||||
fields = (
|
||||
('description', 500),
|
||||
('comments', 5000),
|
||||
)
|
||||
|
||||
|
||||
@ -256,7 +267,7 @@ class RegionIndex(SearchIndex):
|
||||
fields = (
|
||||
('name', 100),
|
||||
('slug', 110),
|
||||
('description', 500)
|
||||
('description', 500),
|
||||
)
|
||||
|
||||
|
||||
@ -280,7 +291,7 @@ class SiteGroupIndex(SearchIndex):
|
||||
fields = (
|
||||
('name', 100),
|
||||
('slug', 110),
|
||||
('description', 500)
|
||||
('description', 500),
|
||||
)
|
||||
|
||||
|
||||
@ -289,5 +300,18 @@ class VirtualChassisIndex(SearchIndex):
|
||||
model = models.VirtualChassis
|
||||
fields = (
|
||||
('name', 100),
|
||||
('domain', 300)
|
||||
('domain', 300),
|
||||
('description', 500),
|
||||
('comments', 5000),
|
||||
)
|
||||
|
||||
|
||||
@register_search
|
||||
class VirtualDeviceContextIndex(SearchIndex):
|
||||
model = models.VirtualDeviceContext
|
||||
fields = (
|
||||
('name', 100),
|
||||
('identifier', 300),
|
||||
('description', 500),
|
||||
('comments', 5000),
|
||||
)
|
||||
|
@ -9,6 +9,7 @@ class AggregateIndex(SearchIndex):
|
||||
('prefix', 100),
|
||||
('description', 500),
|
||||
('date_added', 2000),
|
||||
('comments', 5000),
|
||||
)
|
||||
|
||||
|
||||
@ -28,6 +29,7 @@ class FHRPGroupIndex(SearchIndex):
|
||||
('name', 100),
|
||||
('group_id', 2000),
|
||||
('description', 500),
|
||||
('comments', 5000),
|
||||
)
|
||||
|
||||
|
||||
@ -38,6 +40,7 @@ class IPAddressIndex(SearchIndex):
|
||||
('address', 100),
|
||||
('dns_name', 300),
|
||||
('description', 500),
|
||||
('comments', 5000),
|
||||
)
|
||||
|
||||
|
||||
@ -48,6 +51,7 @@ class IPRangeIndex(SearchIndex):
|
||||
('start_address', 100),
|
||||
('end_address', 300),
|
||||
('description', 500),
|
||||
('comments', 5000),
|
||||
)
|
||||
|
||||
|
||||
@ -58,6 +62,7 @@ class L2VPNIndex(SearchIndex):
|
||||
('name', 100),
|
||||
('slug', 110),
|
||||
('description', 500),
|
||||
('comments', 5000),
|
||||
)
|
||||
|
||||
|
||||
@ -67,6 +72,7 @@ class PrefixIndex(SearchIndex):
|
||||
fields = (
|
||||
('prefix', 100),
|
||||
('description', 500),
|
||||
('comments', 5000),
|
||||
)
|
||||
|
||||
|
||||
@ -96,6 +102,7 @@ class RouteTargetIndex(SearchIndex):
|
||||
fields = (
|
||||
('name', 100),
|
||||
('description', 500),
|
||||
('comments', 5000),
|
||||
)
|
||||
|
||||
|
||||
@ -105,6 +112,17 @@ class ServiceIndex(SearchIndex):
|
||||
fields = (
|
||||
('name', 100),
|
||||
('description', 500),
|
||||
('comments', 5000),
|
||||
)
|
||||
|
||||
|
||||
@register_search
|
||||
class ServiceTemplateIndex(SearchIndex):
|
||||
model = models.ServiceTemplate
|
||||
fields = (
|
||||
('name', 100),
|
||||
('description', 500),
|
||||
('comments', 5000),
|
||||
)
|
||||
|
||||
|
||||
@ -115,6 +133,7 @@ class VLANIndex(SearchIndex):
|
||||
('name', 100),
|
||||
('vid', 100),
|
||||
('description', 500),
|
||||
('comments', 5000),
|
||||
)
|
||||
|
||||
|
||||
@ -136,4 +155,5 @@ class VRFIndex(SearchIndex):
|
||||
('name', 100),
|
||||
('rd', 200),
|
||||
('description', 500),
|
||||
('comments', 5000),
|
||||
)
|
||||
|
@ -12,6 +12,7 @@ class ContactIndex(SearchIndex):
|
||||
('email', 300),
|
||||
('address', 300),
|
||||
('link', 300),
|
||||
('description', 500),
|
||||
('comments', 5000),
|
||||
)
|
||||
|
||||
|
@ -7,6 +7,7 @@ class ClusterIndex(SearchIndex):
|
||||
model = models.Cluster
|
||||
fields = (
|
||||
('name', 100),
|
||||
('description', 500),
|
||||
('comments', 5000),
|
||||
)
|
||||
|
||||
@ -36,6 +37,7 @@ class VirtualMachineIndex(SearchIndex):
|
||||
model = models.VirtualMachine
|
||||
fields = (
|
||||
('name', 100),
|
||||
('description', 500),
|
||||
('comments', 5000),
|
||||
)
|
||||
|
||||
|
@ -9,6 +9,7 @@ class WirelessLANIndex(SearchIndex):
|
||||
('ssid', 100),
|
||||
('description', 500),
|
||||
('auth_psk', 2000),
|
||||
('comments', 5000),
|
||||
)
|
||||
|
||||
|
||||
@ -29,4 +30,5 @@ class WirelessLinkIndex(SearchIndex):
|
||||
('ssid', 100),
|
||||
('description', 500),
|
||||
('auth_psk', 2000),
|
||||
('comments', 5000),
|
||||
)
|
||||
|
Reference in New Issue
Block a user