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 = (
|
fields = (
|
||||||
('name', 100),
|
('name', 100),
|
||||||
('account', 200),
|
('account', 200),
|
||||||
|
('description', 500),
|
||||||
('comments', 5000),
|
('comments', 5000),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -7,6 +7,8 @@ class CableIndex(SearchIndex):
|
|||||||
model = models.Cable
|
model = models.Cable
|
||||||
fields = (
|
fields = (
|
||||||
('label', 100),
|
('label', 100),
|
||||||
|
('description', 500),
|
||||||
|
('comments', 5000),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@ -39,6 +41,7 @@ class DeviceIndex(SearchIndex):
|
|||||||
('asset_tag', 50),
|
('asset_tag', 50),
|
||||||
('serial', 60),
|
('serial', 60),
|
||||||
('name', 100),
|
('name', 100),
|
||||||
|
('description', 500),
|
||||||
('comments', 5000),
|
('comments', 5000),
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -69,6 +72,7 @@ class DeviceTypeIndex(SearchIndex):
|
|||||||
fields = (
|
fields = (
|
||||||
('model', 100),
|
('model', 100),
|
||||||
('part_number', 200),
|
('part_number', 200),
|
||||||
|
('description', 500),
|
||||||
('comments', 5000),
|
('comments', 5000),
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -136,6 +140,7 @@ class ModuleIndex(SearchIndex):
|
|||||||
fields = (
|
fields = (
|
||||||
('asset_tag', 50),
|
('asset_tag', 50),
|
||||||
('serial', 60),
|
('serial', 60),
|
||||||
|
('description', 500),
|
||||||
('comments', 5000),
|
('comments', 5000),
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -156,6 +161,7 @@ class ModuleTypeIndex(SearchIndex):
|
|||||||
fields = (
|
fields = (
|
||||||
('model', 100),
|
('model', 100),
|
||||||
('part_number', 200),
|
('part_number', 200),
|
||||||
|
('description', 500),
|
||||||
('comments', 5000),
|
('comments', 5000),
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -176,6 +182,7 @@ class PowerFeedIndex(SearchIndex):
|
|||||||
model = models.PowerFeed
|
model = models.PowerFeed
|
||||||
fields = (
|
fields = (
|
||||||
('name', 100),
|
('name', 100),
|
||||||
|
('description', 500),
|
||||||
('comments', 5000),
|
('comments', 5000),
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -195,6 +202,8 @@ class PowerPanelIndex(SearchIndex):
|
|||||||
model = models.PowerPanel
|
model = models.PowerPanel
|
||||||
fields = (
|
fields = (
|
||||||
('name', 100),
|
('name', 100),
|
||||||
|
('description', 500),
|
||||||
|
('comments', 5000),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@ -218,6 +227,7 @@ class RackIndex(SearchIndex):
|
|||||||
('serial', 60),
|
('serial', 60),
|
||||||
('name', 100),
|
('name', 100),
|
||||||
('facility_id', 200),
|
('facility_id', 200),
|
||||||
|
('description', 500),
|
||||||
('comments', 5000),
|
('comments', 5000),
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -227,6 +237,7 @@ class RackReservationIndex(SearchIndex):
|
|||||||
model = models.RackReservation
|
model = models.RackReservation
|
||||||
fields = (
|
fields = (
|
||||||
('description', 500),
|
('description', 500),
|
||||||
|
('comments', 5000),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@ -256,7 +267,7 @@ class RegionIndex(SearchIndex):
|
|||||||
fields = (
|
fields = (
|
||||||
('name', 100),
|
('name', 100),
|
||||||
('slug', 110),
|
('slug', 110),
|
||||||
('description', 500)
|
('description', 500),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@ -280,7 +291,7 @@ class SiteGroupIndex(SearchIndex):
|
|||||||
fields = (
|
fields = (
|
||||||
('name', 100),
|
('name', 100),
|
||||||
('slug', 110),
|
('slug', 110),
|
||||||
('description', 500)
|
('description', 500),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@ -289,5 +300,18 @@ class VirtualChassisIndex(SearchIndex):
|
|||||||
model = models.VirtualChassis
|
model = models.VirtualChassis
|
||||||
fields = (
|
fields = (
|
||||||
('name', 100),
|
('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),
|
('prefix', 100),
|
||||||
('description', 500),
|
('description', 500),
|
||||||
('date_added', 2000),
|
('date_added', 2000),
|
||||||
|
('comments', 5000),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@ -28,6 +29,7 @@ class FHRPGroupIndex(SearchIndex):
|
|||||||
('name', 100),
|
('name', 100),
|
||||||
('group_id', 2000),
|
('group_id', 2000),
|
||||||
('description', 500),
|
('description', 500),
|
||||||
|
('comments', 5000),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@ -38,6 +40,7 @@ class IPAddressIndex(SearchIndex):
|
|||||||
('address', 100),
|
('address', 100),
|
||||||
('dns_name', 300),
|
('dns_name', 300),
|
||||||
('description', 500),
|
('description', 500),
|
||||||
|
('comments', 5000),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@ -48,6 +51,7 @@ class IPRangeIndex(SearchIndex):
|
|||||||
('start_address', 100),
|
('start_address', 100),
|
||||||
('end_address', 300),
|
('end_address', 300),
|
||||||
('description', 500),
|
('description', 500),
|
||||||
|
('comments', 5000),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@ -58,6 +62,7 @@ class L2VPNIndex(SearchIndex):
|
|||||||
('name', 100),
|
('name', 100),
|
||||||
('slug', 110),
|
('slug', 110),
|
||||||
('description', 500),
|
('description', 500),
|
||||||
|
('comments', 5000),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@ -67,6 +72,7 @@ class PrefixIndex(SearchIndex):
|
|||||||
fields = (
|
fields = (
|
||||||
('prefix', 100),
|
('prefix', 100),
|
||||||
('description', 500),
|
('description', 500),
|
||||||
|
('comments', 5000),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@ -96,6 +102,7 @@ class RouteTargetIndex(SearchIndex):
|
|||||||
fields = (
|
fields = (
|
||||||
('name', 100),
|
('name', 100),
|
||||||
('description', 500),
|
('description', 500),
|
||||||
|
('comments', 5000),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@ -105,6 +112,17 @@ class ServiceIndex(SearchIndex):
|
|||||||
fields = (
|
fields = (
|
||||||
('name', 100),
|
('name', 100),
|
||||||
('description', 500),
|
('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),
|
('name', 100),
|
||||||
('vid', 100),
|
('vid', 100),
|
||||||
('description', 500),
|
('description', 500),
|
||||||
|
('comments', 5000),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@ -136,4 +155,5 @@ class VRFIndex(SearchIndex):
|
|||||||
('name', 100),
|
('name', 100),
|
||||||
('rd', 200),
|
('rd', 200),
|
||||||
('description', 500),
|
('description', 500),
|
||||||
|
('comments', 5000),
|
||||||
)
|
)
|
||||||
|
@ -12,6 +12,7 @@ class ContactIndex(SearchIndex):
|
|||||||
('email', 300),
|
('email', 300),
|
||||||
('address', 300),
|
('address', 300),
|
||||||
('link', 300),
|
('link', 300),
|
||||||
|
('description', 500),
|
||||||
('comments', 5000),
|
('comments', 5000),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -7,6 +7,7 @@ class ClusterIndex(SearchIndex):
|
|||||||
model = models.Cluster
|
model = models.Cluster
|
||||||
fields = (
|
fields = (
|
||||||
('name', 100),
|
('name', 100),
|
||||||
|
('description', 500),
|
||||||
('comments', 5000),
|
('comments', 5000),
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -36,6 +37,7 @@ class VirtualMachineIndex(SearchIndex):
|
|||||||
model = models.VirtualMachine
|
model = models.VirtualMachine
|
||||||
fields = (
|
fields = (
|
||||||
('name', 100),
|
('name', 100),
|
||||||
|
('description', 500),
|
||||||
('comments', 5000),
|
('comments', 5000),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -9,6 +9,7 @@ class WirelessLANIndex(SearchIndex):
|
|||||||
('ssid', 100),
|
('ssid', 100),
|
||||||
('description', 500),
|
('description', 500),
|
||||||
('auth_psk', 2000),
|
('auth_psk', 2000),
|
||||||
|
('comments', 5000),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@ -29,4 +30,5 @@ class WirelessLinkIndex(SearchIndex):
|
|||||||
('ssid', 100),
|
('ssid', 100),
|
||||||
('description', 500),
|
('description', 500),
|
||||||
('auth_psk', 2000),
|
('auth_psk', 2000),
|
||||||
|
('comments', 5000),
|
||||||
)
|
)
|
||||||
|
Reference in New Issue
Block a user