{% extends "config/base.html" %} {% import "site_shell/_macros.html" as ui %} {% block title %}Notifications - Pychestrate Configuration{% endblock %} {% block content %} {% call ui.preview_notice() %}Only run results are sent today: a run failing or completing. Reservations expiring, devices being quarantined, outbound webhooks and alert rules do not send messages yet.{% endcall %}

Channels

{% if can_manage %}
{{ ui.icon("add") }} Add Channel
{% endif %}
{% for row in channels %} {% else %} {{ ui.empty_state("No channels yet.", hint="Add an email server, a Slack or Teams webhook, PagerDuty or a webhook. Then add a rule to send a message through it.", action_url=url_for('config.notification_channel_create') if can_manage else None, action_label="Add Channel" if can_manage else None, colspan=6) }} {% endfor %}
Name Type Used by State Last message Actions
{{ row.name }} {% if row.unprotected %}
Secret stored unprotected{% endif %}
{{ row.kind_label }} {{ row.scope_label }} {{ ui.status_badge(row.state) }} {% if row.last_outcome %}{{ ui.status_badge(row.last_outcome) }} {{ row.last_when | format_datetime('%Y-%m-%d %H:%M') }}{% else %}Nothing sent yet{% endif %} Open

Rules

{% if can_manage and channels %}
{{ ui.icon("add") }} Add Rule
{% endif %}
{% if can_manage %}{% endif %} {% for rule in rules %} {% if can_manage %} {% endif %} {% else %} {{ ui.empty_state("No rules yet, so nothing is sent.", hint="A rule says: when this happens, send a message through that channel to these people." if channels else "Add a channel first; a rule sends through a channel.", colspan=7 if can_manage else 6) }} {% endfor %}
When Project Send through To Limit StateActions
{{ rule.event_label }} {{ rule.project }} {{ rule.channels | join(', ') }} {{ rule.recipients | join(', ') }} {% if rule.rate_limit %}{{ rule.rate_limit }} a minute{% else %}No limit{% endif %} {{ ui.status_badge(rule.state) }}
{{ ui.confirm_button("Delete", class="btn btn-sm btn-danger") }}

Recent messages

{% for row in deliveries %} {% else %} {{ ui.empty_state("Nothing has been sent yet.", hint="Messages appear here as runs fail or complete, and when you send a test message from a channel.", colspan=6) }} {% endfor %}
Time Event Channel To Result Detail
{{ row.when | format_datetime('%Y-%m-%d %H:%M:%S') }} {{ row.event_label }} {% if row.channel_deleted %}{{ row.channel }}{% else %}{{ row.channel }}{% endif %} {{ row.recipient }} {{ ui.status_badge(row.outcome) }} {{ row.detail if row.detail else '' }}
{% endblock %}