{% extends "base.html" %} {% block title %}View Source: {{ source.name }} - PoliSage{% endblock %} {% block content %}

{{ source.name }}

Source ID: {{ source.id }} | Added: {{ source.created_at.strftime("%Y-%m-%d") }}

Source Details
URL
{{ source.url }}
Type
{{ source.type }}
Check Frequency
{{ source.frequency_minutes }} minutes
Status
{{ "Active" if source.is_active else "Inactive" }}
Last Checked
{{ source.last_checked.strftime("%Y-%m-%d %H:%M") if source.last_checked else "Never" }}

Recent Events from this Source

{% set events = source.events | sort(attribute=\"detected_at\", reverse=True) %} {% if events %}
{% for event in events[:10] %} {# Show latest 10 events #}
{{ event.event_summary | truncate(100) }}
{{ event.detected_at.strftime("%Y-%m-%d %H:%M") }}

Status: {{ event.status }}

{% endfor %}
{% if events|length > 10 %}

View all events from this source...

{% endif %} {% else %} {% endif %}
{% endblock %}