{% extends 'base.html' %} {% load static %} {% block title %}Notification Rules - Stream Processor{% endblock %} {% block page_title %}

Notification Rules

Manage automatic notification rules for system events

{% endblock %} {% block content %}

Total Rules

{{ rules|length|default:0 }}

Active Rules

{% for rule in rules %}{% if rule.is_active %}{{ forloop.counter0|add:1 }}{% endif %}{% empty %}0{% endfor %}

Inactive Rules

{% for rule in rules %}{% if not rule.is_active %}{{ forloop.counter0|add:1 }}{% endif %}{% empty %}0{% endfor %}

Triggered Today

0

New Rule
{% if rules %}

Notification Rules

{{ rules.count }} rule{{ rules.count|pluralize }}
{% for rule in rules %}

{{ rule.name }}

{% if rule.is_active %} Active {% else %} Inactive {% endif %} {% if rule.priority > 0 %} Priority {{ rule.priority }} {% endif %}
Event Type:
{{ rule.get_event_type_display }}
Channel:
{{ rule.channel.name }}
Template:
{{ rule.template.name }}
Throttle:
{% if rule.throttle_minutes > 0 %} {{ rule.throttle_minutes }} minute{{ rule.throttle_minutes|pluralize }} {% else %} No throttling {% endif %}
{% if rule.last_triggered %}
Last triggered: {{ rule.last_triggered|timesince }} ago
{% else %}
Never triggered
{% endif %} {% if rule.conditions %}
Conditions:
{{ rule.conditions|truncatechars:100 }}
{% endif %}
{% if rule.is_active %} {% else %} {% endif %}
{% endfor %}
{% if is_paginated %}
{% if page_obj.has_previous %} Previous {% endif %} {% if page_obj.has_next %} Next {% endif %}
{% endif %} {% else %}

No notification rules

Create your first notification rule to get started with automated alerts

{% endif %}

About Notification Rules

Notification rules automatically trigger alerts when specific system events occur. Each rule defines:

  • Event Type - What system event triggers the notification
  • Channel - Where the notification is sent (Telegram, email, etc.)
  • Template - The message format and content
  • Throttling - Minimum time between notifications to prevent spam
  • Conditions - Additional criteria that must be met
  • Priority - Rule execution order (higher numbers first)
{% endblock %} {% block extra_js %} {% endblock %}