{% extends 'layouts/default.html' %}
{% block title %}Flowspec RTBH communities{% endblock %}
{% block content %}
    <table class="table table-hover">
    <tr>
    <th>Id</th>
    <th>Display Name</th>
    <th>Community</th>
    <th>Large comm.</th>
    <th>Extended comm.</th>
    <th>AS-path</th>
    <th>Description</th>
    <th>Minimum level</th>
    <th>Edit</th>
    </tr>
    {% for community in communities %}
        <tr>
        <td>{{ community.id }}</td>
        <td>{{ community.name }}</td>
        <td>{{ community.comm }}</td>
        <td>{{ community.larcomm }}</td>
        <td>{{ community.extcomm }}</td>
        <td>{{ community.as_path }}</td>
        <td>
            {{ community.description }}
        </td>
        <td>
            {{ community.role }}
        </td>
        <td>
        <a class="btn btn-info btn-sm" href="{{ url_for('admin.edit_community', community_id=community.id) }}" role="button">
            <i class="bi bi-pen"></i>
        </a>
        <a class="btn btn-danger btn-sm" href="{{ url_for('admin.delete_community', community_id=community.id) }}" role="button">
            <i class="bi bi-x-lg"></i>
        </a>
        </td>
        </tr>
    {% endfor %}
    </table>
{% endblock %}