mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-18 13:38:16 -06:00
14132 add payload_url to webhook filterset
This commit is contained in:
parent
92ab4a0a25
commit
bbd008e152
@ -43,6 +43,9 @@ class WebhookFilterSet(NetBoxModelFilterSet):
|
||||
http_method = django_filters.MultipleChoiceFilter(
|
||||
choices=WebhookHttpMethodChoices
|
||||
)
|
||||
payload_url = MultiValueCharFilter(
|
||||
lookup_expr='icontains'
|
||||
)
|
||||
|
||||
class Meta:
|
||||
model = Webhook
|
||||
|
@ -226,10 +226,14 @@ class SavedFilterFilterForm(SavedFiltersMixin, FilterForm):
|
||||
class WebhookFilterForm(NetBoxModelFilterSetForm):
|
||||
model = Webhook
|
||||
tag = TagFilterField(model)
|
||||
payload_url = forms.CharField(
|
||||
label=_('Payload URL'),
|
||||
required=False
|
||||
)
|
||||
|
||||
fieldsets = (
|
||||
(None, ('q', 'filter_id', 'tag')),
|
||||
(_('Attributes'), ('http_method',)),
|
||||
(_('Attributes'), ('payload_url', 'http_method',)),
|
||||
)
|
||||
http_method = forms.MultipleChoiceField(
|
||||
choices=WebhookHttpMethodChoices,
|
||||
|
Loading…
Reference in New Issue
Block a user