{% extends "base.html" %} {% block title %} - {{ t('nav.webhooks') }}{% endblock %} {% block main_class %}layout-fill{% endblock %} {% block extra_head %} {% endblock %} {% block content %}

{{ t('nav.webhooks') }}

{% if can_edit(request, 'webhooks') %} {% endif %}

{{ t('webhooks.description') }}

{% if webhooks %}
{% for wh in webhooks %} {% set lvl = wh.log_level or 'important' %} {% set lvl_tag = 'lvl-error' if lvl == 'error' else ('lvl-warn' if lvl == 'warning' else 'lvl-info') %}
{{ wh.name }}
http://{{ host }}/webhooks/{{ wh.id }}
{{ lvl }} src {{ wh.source or '-' }} {% if wh.handler %}handler {{ wh.handler }}{% endif %} {% if wh.private %}{{ t('webhooks.pill_private') }}{% endif %} {% if not wh.enabled %}{{ t('webhooks.pill_disabled') }}{% endif %} {% if wh.last_triggered %} {{ t('webhooks.last_triggered', timestamp=wh.last_triggered[:16].replace('T',' ')) }} {% else %} {{ t('webhooks.never_triggered') }} {% endif %}
{% if can_edit(request, 'webhooks') %} {% endif %}
{% endfor %}
{% else %}

{{ t('webhooks.no_webhooks') }}

{% endif %}

{{ t('webhooks.dialog.title') }}

{{ t('webhooks.dialog.private_help') }}
{% if handlers %} {% endif %}
{% endblock %}