mirror of
https://github.com/netbox-community/netbox.git
synced 2026-04-19 23:41:35 +02:00
Miscellaneous cleanup for tags
This commit is contained in:
@@ -466,6 +466,9 @@ class ServiceFilter(django_filters.FilterSet):
|
||||
to_field_name='name',
|
||||
label='Virtual machine (name)',
|
||||
)
|
||||
tag = django_filters.CharFilter(
|
||||
name='tags__slug',
|
||||
)
|
||||
|
||||
class Meta:
|
||||
model = Service
|
||||
|
||||
@@ -918,10 +918,11 @@ class VLANFilterForm(BootstrapMixin, CustomFieldFilterForm):
|
||||
#
|
||||
|
||||
class ServiceForm(BootstrapMixin, CustomFieldForm):
|
||||
tags = TagField(required=False)
|
||||
|
||||
class Meta:
|
||||
model = Service
|
||||
fields = ['name', 'protocol', 'port', 'ipaddresses', 'description']
|
||||
fields = ['name', 'protocol', 'port', 'ipaddresses', 'description', 'tags']
|
||||
help_texts = {
|
||||
'ipaddresses': "IP address assignment is optional. If no IPs are selected, the service is assumed to be "
|
||||
"reachable via all IPs assigned to the device.",
|
||||
|
||||
@@ -877,6 +877,8 @@ class Service(ChangeLoggedModel, CustomFieldModel):
|
||||
object_id_field='obj_id'
|
||||
)
|
||||
|
||||
tags = TaggableManager()
|
||||
|
||||
serializer = 'ipam.api.serializers.ServiceSerializer'
|
||||
|
||||
class Meta:
|
||||
|
||||
Reference in New Issue
Block a user