{% extends "layouts/app.html" %} {% from "components/breadcrumb.html" import page_header %} {% from "components/button.html" import button %} {% block title %}Security Dashboard - NeoZen Admin{% endblock %} {% block page_header %} {% call page_header("Security Dashboard", subtitle="Monitor security metrics and configure policies", breadcrumbs=[{"label": "Security"}]) %}
{{ button("Audit Logs", variant="secondary", href="/audit") }} {{ button("Security Policies", variant="secondary", href="/security/policies") }}
{% endcall %} {% endblock %} {% block content %}
{% with live = True %}{% include "security/_stats.html" %}{% endwith %}

Login Activity (7 days)

{% if login_activity %}
{% else %}

No login data available

{% endif %}

Event Types

{% set event_types = stats.event_types | default({}) %} {% if event_types %}
{% for event_type, count in event_types.items() %}
{{ event_type }} {{ count }}
{% endfor %}
{% else %}

No event data available

{% endif %}

MFA Status

{% if mfa_adoption >= 80 %}Good{% elif mfa_adoption >= 50 %}Moderate{% else %}Low{% endif %}
{{ mfa_adoption | round(1) }}%

{{ mfa_enabled_users }} of {{ total_users }} users have MFA enabled.

View users without MFA →

Security Alerts

{% if (stats.failure_count | default(0)) > 10 %}

High failure rate

{{ (stats.failure_count | default(0)) }} failed events in the last 7 days.

{% elif (stats.failure_count | default(0)) > 0 %}

Some failures detected

{{ (stats.failure_count | default(0)) }} failed events in the last 7 days.

{% else %}

All clear

No failed events in the last 7 days.

{% endif %}

Recent Security Events

View all →
{% if recent_events %}
    {% for event in recent_events %}
  • {% if event.outcome == 'success' %} {% elif event.outcome == 'failure' %} {% else %} {% endif %}

    {{ event.event_type }}: {{ event.action }}

    {% if event.subject_id %}Subject: {{ event.subject_id[:16] }}...{% endif %} {% if event.resource_type %} | Resource: {{ event.resource_type }}{% endif %}

  • {% endfor %}
{% else %}

No recent events

Security events will appear here as they occur.

{% endif %}
{% if login_activity %} {% endif %} {% endblock %}