mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-25 01:48:38 -06:00
14201 allow searching for ASN with prefix AS
This commit is contained in:
parent
44c7786cd9
commit
8e6a15a25e
@ -149,3 +149,7 @@ class ASN(PrimaryModel):
|
||||
return f'{self.asn} ({self.asn // 65536}.{self.asn % 65536})'
|
||||
else:
|
||||
return self.asn
|
||||
|
||||
@property
|
||||
def prefixed_name(self):
|
||||
return f'AS{self.asn_with_asdot}'
|
||||
|
@ -19,6 +19,7 @@ class ASNIndex(SearchIndex):
|
||||
model = models.ASN
|
||||
fields = (
|
||||
('asn', 100),
|
||||
('prefixed_name', 110),
|
||||
('description', 500),
|
||||
)
|
||||
display_attrs = ('rir', 'tenant', 'description')
|
||||
|
Loading…
Reference in New Issue
Block a user