mirror of
https://github.com/netbox-community/netbox.git
synced 2026-04-17 14:39:56 +02:00
#9623: Add slug field to SavedFilter
This commit is contained in:
@@ -45,7 +45,7 @@ IPADDRESS_MASK_LENGTH_CHOICES = add_blank_choice([
|
||||
class VRFFilterForm(TenancyFilterForm, NetBoxModelFilterSetForm):
|
||||
model = VRF
|
||||
fieldsets = (
|
||||
(None, ('q', 'filter', 'tag')),
|
||||
(None, ('q', 'filter_id', 'tag')),
|
||||
('Route Targets', ('import_target_id', 'export_target_id')),
|
||||
('Tenant', ('tenant_group_id', 'tenant_id')),
|
||||
)
|
||||
@@ -65,7 +65,7 @@ class VRFFilterForm(TenancyFilterForm, NetBoxModelFilterSetForm):
|
||||
class RouteTargetFilterForm(TenancyFilterForm, NetBoxModelFilterSetForm):
|
||||
model = RouteTarget
|
||||
fieldsets = (
|
||||
(None, ('q', 'filter', 'tag')),
|
||||
(None, ('q', 'filter_id', 'tag')),
|
||||
('VRF', ('importing_vrf_id', 'exporting_vrf_id')),
|
||||
('Tenant', ('tenant_group_id', 'tenant_id')),
|
||||
)
|
||||
@@ -97,7 +97,7 @@ class RIRFilterForm(NetBoxModelFilterSetForm):
|
||||
class AggregateFilterForm(TenancyFilterForm, NetBoxModelFilterSetForm):
|
||||
model = Aggregate
|
||||
fieldsets = (
|
||||
(None, ('q', 'filter', 'tag')),
|
||||
(None, ('q', 'filter_id', 'tag')),
|
||||
('Attributes', ('family', 'rir_id')),
|
||||
('Tenant', ('tenant_group_id', 'tenant_id')),
|
||||
)
|
||||
@@ -118,7 +118,7 @@ class AggregateFilterForm(TenancyFilterForm, NetBoxModelFilterSetForm):
|
||||
class ASNFilterForm(TenancyFilterForm, NetBoxModelFilterSetForm):
|
||||
model = ASN
|
||||
fieldsets = (
|
||||
(None, ('q', 'filter', 'tag')),
|
||||
(None, ('q', 'filter_id', 'tag')),
|
||||
('Assignment', ('rir_id', 'site_id')),
|
||||
('Tenant', ('tenant_group_id', 'tenant_id')),
|
||||
)
|
||||
@@ -143,7 +143,7 @@ class RoleFilterForm(NetBoxModelFilterSetForm):
|
||||
class PrefixFilterForm(TenancyFilterForm, NetBoxModelFilterSetForm):
|
||||
model = Prefix
|
||||
fieldsets = (
|
||||
(None, ('q', 'filter', 'tag')),
|
||||
(None, ('q', 'filter_id', 'tag')),
|
||||
('Addressing', ('within_include', 'family', 'status', 'role_id', 'mask_length', 'is_pool', 'mark_utilized')),
|
||||
('VRF', ('vrf_id', 'present_in_vrf_id')),
|
||||
('Location', ('region_id', 'site_group_id', 'site_id')),
|
||||
@@ -232,7 +232,7 @@ class PrefixFilterForm(TenancyFilterForm, NetBoxModelFilterSetForm):
|
||||
class IPRangeFilterForm(TenancyFilterForm, NetBoxModelFilterSetForm):
|
||||
model = IPRange
|
||||
fieldsets = (
|
||||
(None, ('q', 'filter', 'tag')),
|
||||
(None, ('q', 'filter_id', 'tag')),
|
||||
('Attriubtes', ('family', 'vrf_id', 'status', 'role_id')),
|
||||
('Tenant', ('tenant_group_id', 'tenant_id')),
|
||||
)
|
||||
@@ -264,7 +264,7 @@ class IPRangeFilterForm(TenancyFilterForm, NetBoxModelFilterSetForm):
|
||||
class IPAddressFilterForm(TenancyFilterForm, NetBoxModelFilterSetForm):
|
||||
model = IPAddress
|
||||
fieldsets = (
|
||||
(None, ('q', 'filter', 'tag')),
|
||||
(None, ('q', 'filter_id', 'tag')),
|
||||
('Attributes', ('parent', 'family', 'status', 'role', 'mask_length', 'assigned_to_interface')),
|
||||
('VRF', ('vrf_id', 'present_in_vrf_id')),
|
||||
('Tenant', ('tenant_group_id', 'tenant_id')),
|
||||
@@ -333,7 +333,7 @@ class IPAddressFilterForm(TenancyFilterForm, NetBoxModelFilterSetForm):
|
||||
class FHRPGroupFilterForm(NetBoxModelFilterSetForm):
|
||||
model = FHRPGroup
|
||||
fieldsets = (
|
||||
(None, ('q', 'filter', 'tag')),
|
||||
(None, ('q', 'filter_id', 'tag')),
|
||||
('Attributes', ('name', 'protocol', 'group_id')),
|
||||
('Authentication', ('auth_type', 'auth_key')),
|
||||
)
|
||||
@@ -363,7 +363,7 @@ class FHRPGroupFilterForm(NetBoxModelFilterSetForm):
|
||||
|
||||
class VLANGroupFilterForm(NetBoxModelFilterSetForm):
|
||||
fieldsets = (
|
||||
(None, ('q', 'filter', 'tag')),
|
||||
(None, ('q', 'filter_id', 'tag')),
|
||||
('Location', ('region', 'sitegroup', 'site', 'location', 'rack')),
|
||||
('VLAN ID', ('min_vid', 'max_vid')),
|
||||
)
|
||||
@@ -411,7 +411,7 @@ class VLANGroupFilterForm(NetBoxModelFilterSetForm):
|
||||
class VLANFilterForm(TenancyFilterForm, NetBoxModelFilterSetForm):
|
||||
model = VLAN
|
||||
fieldsets = (
|
||||
(None, ('q', 'filter', 'tag')),
|
||||
(None, ('q', 'filter_id', 'tag')),
|
||||
('Location', ('region_id', 'site_group_id', 'site_id')),
|
||||
('Attributes', ('group_id', 'status', 'role_id', 'vid')),
|
||||
('Tenant', ('tenant_group_id', 'tenant_id')),
|
||||
@@ -464,7 +464,7 @@ class VLANFilterForm(TenancyFilterForm, NetBoxModelFilterSetForm):
|
||||
class ServiceTemplateFilterForm(NetBoxModelFilterSetForm):
|
||||
model = ServiceTemplate
|
||||
fieldsets = (
|
||||
(None, ('q', 'filter', 'tag')),
|
||||
(None, ('q', 'filter_id', 'tag')),
|
||||
('Attributes', ('protocol', 'port')),
|
||||
)
|
||||
protocol = forms.ChoiceField(
|
||||
@@ -485,7 +485,7 @@ class ServiceFilterForm(ServiceTemplateFilterForm):
|
||||
class L2VPNFilterForm(TenancyFilterForm, NetBoxModelFilterSetForm):
|
||||
model = L2VPN
|
||||
fieldsets = (
|
||||
(None, ('q', 'filter', 'tag')),
|
||||
(None, ('q', 'filter_id', 'tag')),
|
||||
('Attributes', ('type', 'import_target_id', 'export_target_id')),
|
||||
('Tenant', ('tenant_group_id', 'tenant_id')),
|
||||
)
|
||||
@@ -510,7 +510,7 @@ class L2VPNFilterForm(TenancyFilterForm, NetBoxModelFilterSetForm):
|
||||
class L2VPNTerminationFilterForm(NetBoxModelFilterSetForm):
|
||||
model = L2VPNTermination
|
||||
fieldsets = (
|
||||
(None, ('filter', 'l2vpn_id',)),
|
||||
(None, ('filter_id', 'l2vpn_id',)),
|
||||
('Assigned Object', (
|
||||
'assigned_object_type_id', 'region_id', 'site_id', 'device_id', 'virtual_machine_id', 'vlan_id',
|
||||
)),
|
||||
|
||||
Reference in New Issue
Block a user