{% extends 'layouts/default.html' %}
{% from 'pagination_macro.html' import render_pagination %}


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

    {% include 'pages/submenu_dashboard.html' %}
    {% if display_rules %}
    <div class="row">
        <form action="{{ url_for('rules.group_operation') }}" method="post">
         <input type="hidden" name="csrf_token" value="{{ csrf_token() }}"/>
        <table class="table table-hover ip-table">
            {{ dashboard_table_head }} 
            
            {{ dashboard_table_body }}
            
            {{ dashboard_table_foot }}
        </table>
        </form>
    </div>
    
    {# Pagination controls #}
    {{ render_pagination(pagination, rtype, rstate, sort_key, sort_order, search_query, per_page, per_page_options) }}
    
    <script type="text/javascript" src="{{ url_for('static', filename='js/check_all.js') }}"></script>
    {% else %}
        <h2>There are no {{ rstate|capitalize }} {{ table_title }}.</h2>
    {% endif %}
{% endblock %}
