Allow using webhooks for notifications

This commit is contained in:
2023-01-15 18:40:17 +00:00
parent 46c7d96310
commit eb2486afba
7 changed files with 168 additions and 28 deletions

View File

@@ -17,6 +17,7 @@
<th>topic</th>
<th>enabled</th>
<th>data length</th>
<th>match</th>
<th>actions</th>
</thead>
{% for item in object_list %}
@@ -40,6 +41,7 @@
{% endif %}
</td>
<td>{{ item.data|length }}</td>
<td>{{ item.matches }}</td>
<td>
<div class="buttons">
<button
@@ -69,6 +71,20 @@
</span>
</span>
</button>
<button
hx-headers='{"X-CSRFToken": "{{ csrf_token }}"}'
hx-post="{% url 'rule_clear' type=type pk=item.id %}"
hx-trigger="click"
hx-target="#modals-here"
hx-swap="innerHTML"
hx-confirm="Are you sure you wish to clear matches for {{ item.name }}?"
class="button">
<span class="icon-text">
<span class="icon">
<i class="fa-solid fa-arrow-rotate-right"></i>
</span>
</span>
</button>
</div>
</td>
</tr>