{% extends "base.html" %} {% block content %} {% set methods = ["all"] %} {% set codes = ["all"] %} {% set reasons = ["all"] %} {% set countries = ["all"] %} {% for report in reports %} {% if report["method"] not in methods %} {% if methods.append(report["method"]) %}{% endif %} {% endif %} {% if report["status"] not in codes %} {% if codes.append(report["status"]) %}{% endif %} {% endif %} {% if report["reason"] not in reasons %} {% if reasons.append(report["reason"]) %}{% endif %} {% endif %} {% if report["country"] not in countries %} {% if countries.append(report["country"]) %}{% endif %} {% endif %} {% endfor %}
No reports found
{% if reports|length != 0 %} {% set reports_info = [ {"name" : "REPORTING TOTAL", "data" : total_report|string}, {"name" : "TOP REASON", "data" : total_reason|string}, {"name" : "TOP STATUS CODE", "data" : top_code|string}, ] %}
INFO
{% for info in reports_info %}

{{ info['name'] }}

{{ info['data'] }}

{% endfor %}
{% set filters = [ { "type": "input", "name": "Search", "label": "search", "id": "keyword", "placeholder": "ip, url, date, data", "pattern": "(.*?)" }, { "type": "select", "name": "Country", "id": "country", "value": "all", "values": countries }, { "type": "select", "name": "Method", "id": "method", "value": "all", "values": methods }, { "type": "select", "name": "Status code", "id": "status", "value": "all", "values": codes }, { "type": "select", "name": "Reason", "id": "reason", "value": "all", "values": reasons } ] %}
FILTER
{% for filter in filters %} {% if filter['type'] == 'input' %}
{{ filter['name'] }}
{% endif %} {% if filter['type'] == 'select' %}
{{ filter['name'] }}
{% endif %} {% endfor %}
REPORTING
{% set reports_header = [ { "name": "Date", "position": "col-span-1" }, { "name": "IP", "position": "col-span-1" }, { "name": "Country", "position": "col-span-1" }, { "name": "Method", "position": "col-span-1" }, { "name": "URL", "position": "col-span-2" }, { "name": "Code", "position": "col-span-1" }, { "name": "User agent", "position": "col-span-2" }, { "name": "Reason", "position": "col-span-1" }, { "name": "Data", "position": "col-span-2" } ] %} {% for header in reports_header %}

{{ header['name'] }}

{% endfor %}
    {% for report in reports %}
  • {{ report['date'] }}

    {{ report['ip'] }}

    {{ report['country'] }}

    {{ report["method"] }}

    {{ report['url'] }}

    {{ report["status"] }}

    {{ report["user_agent"] }}

    {{ report["reason"] }}

    {{ report["data"] }}

  • {% endfor %}
{% endif %} {% endblock content %}