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


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

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



    {% if display_editable %}
    <h2>{{ rstate|capitalize }} {{ table_title }} that you can modify</h2>
    <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_editable_head }}
        {{ dashboard_table_editable }}
        {{ dashboard_table_foot }}
        </table>
    </form>
    <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 %}

    {% if display_readonly %}
    <h2>{{ rstate|capitalize }}  {{ table_title }} that are read-only for you</h2>
        <p>Those rules somehow including your network ranges. You can see them all for your information. However, you can not modify their expiration time or delete them.</p>
        <table class="table table-hover ip-table">
        {{ dashboard_table_readonly_head }}
        {{ dashboard_table_readonly }}
        </table>
    {% else %}
        <h2>There are no read only {{ rstate }}  {{ table_title }}.</h2>
    {% endif %}

    <script type="text/javascript">
    </script>

{% endblock %}