{% extends "base.html" %}

{% block title %}Intents - MCP Network Diagnostics{% endblock %}

{% block content %}
<div class="card">
    <div class="card-title">Monitoring Intents</div>
    {% if intents %}
    <table>
        <thead>
            <tr>
                <th>Intent</th>
                <th>Created</th>
                <th>Status</th>
                <th>Last Checked</th>
            </tr>
        </thead>
        <tbody>
            {% for intent in intents %}
            <tr>
                <td>{{ intent.natural_language }}</td>
                <td class="time">{{ intent.created_at.strftime('%Y-%m-%d') }}</td>
                <td>
                    <span class="badge {% if intent.active %}badge-success{% else %}badge-warning{% endif %}">
                        {{ 'Active' if intent.active else 'Inactive' }}
                    </span>
                </td>
                <td class="time">
                    {% if intent.last_checked %}
                        {{ intent.last_checked.strftime('%H:%M:%S') }}
                    {% else %}
                        Never
                    {% endif %}
                </td>
            </tr>
            {% endfor %}
        </tbody>
    </table>
    {% else %}
    <p style="text-align: center; color: #8b949e; padding: 40px;">No intents configured</p>
    {% endif %}
</div>
{% endblock %}
