{% extends "base.html" %} {% block title %}Content - {{ project.name }} - AutoModerate{% endblock %} {% block page_title %}Content - {{ project.name }}{% endblock %} {% block page_actions %}
{% endblock %} {% block content %} {% if current_search or current_time_filter %}{{ current_search }}
{% else %}
Search: "{{ current_search }}"
{% endif %}
{% if current_time_filter == '1h' %}
| Time: Last Hour
{% elif current_time_filter == '24h' %}
| Time: Last 24 Hours
{% elif current_time_filter == '7d' %}
| Time: Last 7 Days
{% elif current_time_filter == '30d' %}
| Time: Last 30 Days
{% endif %}
{% elif current_search %}
Search Results:
{% if current_search|length == 36 and '-' in current_search %}
Showing content with ID: {{ current_search }}
{% else %}
Showing content containing: "{{ current_search }}"
{% endif %}
{% elif current_time_filter %}
Time Filter:
{% if current_time_filter == '1h' %}
Showing content from the Last Hour
{% elif current_time_filter == '24h' %}
Showing content from the Last 24 Hours
{% elif current_time_filter == '7d' %}
Showing content from the Last 7 Days
{% elif current_time_filter == '30d' %}
Showing content from the Last 30 Days
{% endif %}
{% endif %}
Total Content
Approved
Rejected
Flagged
Average Processing Time
| Content ID | Type | Content | Status | Moderation Results | Processing Time | Created | Actions |
|---|---|---|---|---|---|---|---|
{{ content.id[:8] }}...
|
{{ content.content_type|title }} | {% if content.meta_data %} Has metadata {% endif %} | {% if content.status == 'approved' %} Approved {% elif content.status == 'rejected' %} Rejected {% elif content.status == 'flagged' %} Flagged {% elif content.status == 'error' %} Error {% else %} Pending {% endif %} |
{% if content.moderation_results %}
{% for result in content.moderation_results[:3] %}
{% if result.moderator_type == 'ai' %}
AI
{% elif result.moderator_type == 'rule' %}
Rule
{% else %}
Manual
{% endif %}
{% endfor %}
{% if content.moderation_results|length > 3 %}
+{{ content.moderation_results|length - 3 }}
{% endif %}
{% else %}
No results
{% endif %}
|
{% if content.moderation_results %} {% set first_result = content.moderation_results[0] %} {% if first_result.details and first_result.details.total_request_time %} {% set total_time = first_result.details.total_request_time %} {% if total_time < 1 %} {{ (total_time * 1000) | round | int }}ms {% else %} {{ "%.2f" | format(total_time) }}s {% endif %} {% else %} {# Fallback to old behavior for legacy records #} {% set total_time = content.moderation_results | sum(attribute='processing_time') %} {% if total_time %} {% if total_time < 1 %} {{ (total_time * 1000) | round | int }}ms {% else %} {{ "%.2f" | format(total_time) }}s {% endif %} {% else %} N/A {% endif %} {% endif %} {% else %} N/A {% endif %} | {{ content.created_at.strftime('%Y-%m-%d %H:%M') }} |
|
{% if current_status %} No content with status "{{ current_status }}" found. {% else %} No content has been submitted for moderation yet. {% endif %}
{% if current_status %} View All Content {% endif %}