{% extends "base.html" %} {% load static %} {% block title %}{{ object.rule_name }} - Alert Rule Details{% endblock %} {% block content %}

Alert Rule Details

{{ object.rule_name }}
{{ object.get_category_display }} {{ object.get_severity_display }} {% if object.is_active %}Active{% else %}Inactive{% endif %}
Rule Name: {{ object.rule_name }}
Category: {{ object.get_category_display }}
Severity: {{ object.get_severity_display }}
Event Type: {{ object.event_type|default:"Any" }}
Created: {{ object.created_at|date:"M d, Y g:i A" }}
Last Updated: {{ object.updated_at|date:"M d, Y g:i A" }}
Last Triggered: {% if object.last_triggered %} {{ object.last_triggered|date:"M d, Y g:i A" }} {% else %} Never {% endif %}
Trigger Count: {{ object.trigger_count|default:0 }} times
{% if object.description %}
Description:
{{ object.description|linebreaks }}
{% endif %}
Condition Expression:
{{ object.condition_expression }}
This condition is evaluated to determine when the alert should trigger
{% if object.condition_parameters %}
Condition Parameters:
{{ object.condition_parameters|pprint }}
{% endif %}
Notification Settings:
Cooldown Period: {{ object.cooldown_minutes|default:0 }} minutes
Max Triggers/Day: {{ object.max_triggers_per_day|default:"Unlimited" }}
Auto Resolve: {% if object.auto_resolve %} Enabled {% else %} Disabled {% endif %}
Escalation: {% if object.escalation_enabled %} Enabled {% else %} Disabled {% endif %}
Escalation Time: {{ object.escalation_minutes|default:"N/A" }} minutes
Snooze Enabled: {% if object.snooze_enabled %} Enabled {% else %} Disabled {% endif %}
{% if object.recipients.exists %}
Alert Recipients:
{% for recipient in object.recipients.all %}
{{ recipient.first_name.0 }}{{ recipient.last_name.0 }}
{{ recipient.get_full_name }}
{{ recipient.email }}
{% endfor %}
{% endif %} {% if object.metadata %}
Additional Metadata:
{{ object.metadata|pprint }}
{% endif %}
{% if recent_instances %}
Recent Alert Instances
{% for instance in recent_instances %} {% endfor %}
Triggered Status Message Acknowledged Actions
{{ instance.triggered_at|date:"M d, Y g:i A" }} {{ instance.get_status_display }} {{ instance.message|truncatechars:50 }} {% if instance.acknowledged_at %} {{ instance.acknowledged_at|date:"M d, g:i A" }} {% else %} - {% endif %}
{% endif %}
Performance Metrics
{{ object.trigger_count|default:0 }}
Total Triggers
{{ weekly_triggers|default:0 }}
This Week
{{ accuracy_rate|default:0 }}%
Accuracy Rate
{{ avg_response_time|default:0 }}s
Avg Response
Quick Actions
Edit Rule
{% if object.is_active %} {% else %} {% endif %}
{% if object.snooze_enabled %} {% endif %} Delete Rule
Rule Status
Current Status: {% if object.is_active %} Active {% else %} Inactive {% endif %}
Health Status: Healthy
Last Check: {{ last_evaluation|default:"Never"|date:"M d, g:i A" }}
Next Check: {{ next_evaluation|default:"N/A"|date:"M d, g:i A" }}
Configuration Summary
Evaluation Frequency: {{ object.evaluation_frequency|default:"Real-time" }}
Notification Channels: {{ object.notification_channels.count|default:0 }}
Recipients: {{ object.recipients.count|default:0 }}
Template: {% if object.notification_template %} {{ object.notification_template.template_name }} {% else %} Default {% endif %}
{% if related_rules %}
Related Rules
{% for rule in related_rules %}
{{ rule.rule_name|truncatechars:25 }}
{{ rule.get_category_display }}
{% endfor %}
{% endif %}
{% endblock %} {% block js %} {% endblock %}