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

cleanup component filters and UI filter forms for device and device type - #2583

This commit is contained in:
John Anderson
2018-11-15 00:42:01 -05:00
parent 3c0181ef35
commit fd9b2f2fda
4 changed files with 113 additions and 90 deletions

View File

@@ -42,6 +42,11 @@ NUMERIC_EXPANSION_PATTERN = r'\[((?:\d+[?:,-])+\d+)\]'
ALPHANUMERIC_EXPANSION_PATTERN = r'\[((?:[a-zA-Z0-9]+[?:,-])+[a-zA-Z0-9]+)\]'
IP4_EXPANSION_PATTERN = r'\[((?:[0-9]{1,3}[?:,-])+[0-9]{1,3})\]'
IP6_EXPANSION_PATTERN = r'\[((?:[0-9a-f]{1,4}[?:,-])+[0-9a-f]{1,4})\]'
BOOLEAN_WITH_BLANK_CHOICES = (
('', '---------'),
('True', 'Yes'),
('False', 'No'),
)
def parse_numeric_range(string, base=10):