{% extends 'layouts/default.html' %}
{% from 'macros.html' import build_ip_tbody, build_rtbh_tbody, build_rules_thead %}
{% from 'pagination_macro.html' import render_pagination %}


{% block title %}Flowspec{% endblock %}
{% block content %}

    {% include 'pages/submenu_dashboard_view.html' %}

    {% if display_rules %}
    <h2>{{ rstate|capitalize }}  {{ table_title }}</h2>
        <p>You can see the rules for your information. However, you can not modify their expiration time or delete them.</p>
        <table class="table table-hover ip-table">
        {{ dashboard_table_head }}
        {{ dashboard_table_body }}

        </table>
        
        {# Pagination controls #}
        {{ render_pagination(pagination, rtype, rstate, sort_key, sort_order, search_query, per_page, per_page_options) }}
    {% else %}
        <h2>There are no {{ rstate|capitalize }} {{ table_title }}.</h2>
    {% endif %}

{% endblock %}
