Skip to content

Commit

Permalink
Add Webhooks section in the settings #1027
Browse files Browse the repository at this point in the history
Signed-off-by: tdruez <[email protected]>
  • Loading branch information
tdruez committed May 8, 2024
1 parent ec3112f commit 30069f9
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@
<i class="fa-solid fa-file-lines mr-2"></i>Attribution
</a>
</li>
<li>
<a href="#webhooks">
<i class="fa-solid fa-paper-plane mr-2"></i>Webhooks
</a>
</li>
</ul>
<hr class="my-4">
<p class="menu-label">
Expand Down
27 changes: 27 additions & 0 deletions scanpipe/templates/scanpipe/project_settings.html
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,33 @@
</div>
</div>

<div class="panel">
<p id="webhooks" class="panel-heading py-2 is-size-6">Webhooks</p>
<div class="panel-block is-block px-4">
<p class="help">
Webhooks enable instant communication between applications by automatically
sending notifications or data to other services when specific events happen.<br>
They work by sending HTTP POST requests to provided URLs, allowing seamless
integration and automation across different systems.<br>
<strong>
Webhooks will be triggered upon pipeline completion, regardless of
whether it was successful or failed.
</strong>
</p>

<div class="mt-3">
{% for webhook in project.webhooksubscriptions.all %}
{% if forloop.first %}Active webhooks:{% endif %}
<span class="panel-block">
{{ webhook.target_url }}
</span>
{% endfor %}
</div>

<a href="#" class="button is-link is-small mt-2">Add Webhook</a>
</div>
</div>

<div class="columns mt-4 mb-5 is-variable is-1">
<div class="column is-one-third">
<a href="{% url 'project_detail' project.slug %}" class="button is-fullwidth">Cancel</a>
Expand Down

0 comments on commit 30069f9

Please sign in to comment.