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

Add UI views for webhooks

This commit is contained in:
jeremystretch
2021-06-23 21:24:23 -04:00
parent 10cbbee947
commit 4e0b795a3c
11 changed files with 426 additions and 57 deletions

View File

@@ -36,7 +36,8 @@ __all__ = (
# Webhooks
#
class Webhook(BigIDModel):
@extras_features('webhooks')
class Webhook(ChangeLoggedModel):
"""
A Webhook defines a request that will be sent to a remote application when an object is created, updated, and/or
delete in NetBox. The request will contain a representation of the object, which the remote application can act on.
@@ -129,6 +130,9 @@ class Webhook(BigIDModel):
def __str__(self):
return self.name
def get_absolute_url(self):
return reverse('extras:webhook', args=[self.pk])
def clean(self):
super().clean()