{% extends "base.html" %} {% block title %}Analytics{% endblock %} {% block breadcrumb %}Analytics{% endblock %} {% block content %}
{{stats.total}}
Total
{{stats.open}}
Open
{{stats.progress}}
In Progress
{{stats.resolved}}
Resolved
{{stats.critical}}
Critical
By Severity
{% set total = stats.total %} {% if total > 0 %}
{% for row in by_sev %} {% set pct = ((row.c / total)*100)|round|int %}
{{row.severity}} {{row.c}} ({{pct}}%)
{% endfor %}
{% else %}
No data yet
{% endif %}
By Status
{% if total > 0 %}
{% for row in by_stat %} {% set pct = ((row.c / total)*100)|round|int %}
{{row.status}} {{row.c}} ({{pct}}%)
{% endfor %}
{% else %}
No data yet
{% endif %}
By Category
{% if by_cat %} {% set max_c = by_cat[0].c %}
{% for row in by_cat %}
{{row.category}}{{row.c}}
{% endfor %}
{% else %}
No data yet
{% endif %}
Time to Resolution (hours)
{% if mttr %}
{% for row in mttr %}
{{row.ref}}
{% set max_h = mttr|map(attribute='hours')|select('number')|list|max if mttr else 1 %}
{{row.hours}}h
{% endfor %}
{% else %}
MTTR data appears here once incidents with start and end times are resolved.
{% endif %}
Incidents Created โ€” Last 30 Days
{% if by_day %}
{% set max_day = by_day|map(attribute='c')|max %} {% for row in by_day %}
{% endfor %}
{{by_day[0].day}} โ†’ {{by_day[-1].day}}  ยท  Total: {{by_day|map(attribute='c')|sum}} incidents across {{by_day|length}} days
{% else %}
No incidents in the last 30 days
{% endif %}
{% endblock %} {% block scripts %} {% endblock %}